5 ms·
Automatic Optical Illusions Using Python and OpenCV
- The_rationalist 6y agoTo think the minecraft image really is in black and white is mind blowing. I wonder if that could become a minecraft mode and how it would look as a video
- tgb 6y agoBut it's not really in black and white, every Nth row and Nth column is in color (where N is something like 5?). Still kind of interesting, though.
- amelius 6y agoIt's like eating a candy bar with 10% of the sugar. The mind will think it's almost as nice as the original candy bar.
- tyleo 6y agoI agree. The github page links to a Google colab page though(https://colab.research.google.com/drive/1WJfLJH0mBzXGGeRfvQaxNjQxQaAECwYj?usp=sharing https://colab.research.google.com/drive/1WJfLJH0mBzXGGeRfvQa...) where the first image has a diagonal grid with much less frequent lines. This version of the illusion is more compelling to me.
- anjc 6y agoWell, it is B&W. The N here is so large that you can easily resolve the pixels that should be B&W, yet they aren't.
- vernie 6y agoSimilar to chroma subsampling used by most lossy image and video compression algorithms.
- C4stor 6y agoI genuinely don't really understand what's trying to be proven here. I mean, it's just how our eye+brain work indeed. You can make it "better" by dezooming on the images, or "worst" by zooming in, which is just as expected. It doesn't really seem far from other techniques for image compression, just a less good version of those ?
- jjk166 6y ago> I mean, it's just how our eye+brain work That's what optical illusions are
- ConcernedCoder 6y agoThe photos look exactly as I'd imagine they should, i.e. if the grid is providing 20% of the color of the original, the result looks 20% as colorful... I'm not sure I get what's "magical" about this?
- anjc 6y agoWell why don't we see a B&W image with coloured lines on it? Rather we see a coloured image with coloured lines on it. It's pretty spooky to me. It's interesting zooming in, until the point that your brains perceives the grid properly, and a B&W image pops forth.
- Joker_vD 6y agoWhy, because we're myopic, so our eyes run "blur interpolate" on the image... or do those also work for people with 20/20 eye sight?
- anjc 6y agoHm, not sure. We can easily resolve the structural detail within each grid, so does our brain just interpolate for colour? I wonder would a green grid on the sky make us perceive a green sky, or do we interpolate it here because we know the sky should be blue.
- Imnimo 6y agoIf I zoom into the point where I can clearly see the grid pixels, the grayscale areas in between the grid lines still have an illusion of color for me. I think the examples images have too fine of a grid that makes the illusion seem unimpressive and trivial. But if you open them in an image editor (or just use your browser's magnify feature) and zoom in, there's a point where things change from being just a blurry color image to a surprising illusion.
- itronitron 6y agoThis effect works because the human visual system naturally acquires color information at lower resolution than black and white information.
- celias 6y agoThe default interpolation for imshow is 'antialiased' so I think the calls to imshow should use interpolation='none' to avoid the line colors bleeding into the gray image
- sllabres 6y agoThis is the same effect JPEG chroma subsampling https://en.wikipedia.org/wiki/Chroma_subsampling https://en.wikipedia.org/wiki/Chroma_subsampling encoding takes advantage of.
- andrewla 6y ago"Optical Illusion" feels strong here -- really the image is just being desaturated. Same effect can be seen by just replacing random pixels with their grayscale equivalent. Something like: width, height, _ = bw_img.shape pixels = int(width * height * .5) xs = np.random.choice(width, pixels) ys = np.random.choice(height, pixels) bw_img[xs,ys,:] = img[xs, ys, :]
- floatingatoll 6y agoEverybody who wonders if they were just exposed to The Parrot, raise your hand.
- ageitgey 6y agoNot to take away from the post (which is nice), but it's kind of funny that the illusion is to make a black and white image look sort of color only by overlaying it with some color. This reminds me of the old King of the Hill episode where Dale says "If you want, I can show you how to make a bomb out of a roll of toilet paper and a stick of dynamite."