Live data from Hacker News

Automatic Optical Illusions Using Python and OpenCV

github.com

11–20 of 20 posts

Re: Automatic Optical Illusions Using Python and OpenCV

#11
post #9

The 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?

Well 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.

Why, 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?

Re: Automatic Optical Illusions Using Python and OpenCV

#12
post #9

Earlier quoted context omitted.

Well 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.

Why, 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?

Hm, 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.

Re: Automatic Optical Illusions Using Python and OpenCV

#13
post #6

I 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 ?

> I mean, it's just how our eye+brain work

That's what optical illusions are

Re: Automatic Optical Illusions Using Python and OpenCV

#14
post #9

Earlier quoted context omitted.

Well 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.

Why, 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?

If 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.

Re: Automatic Optical Illusions Using Python and OpenCV

#17
"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, :]

Re: Automatic Optical Illusions Using Python and OpenCV

#18
post #9

The 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?

Well 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.

This effect works because the human visual system naturally acquires color information at lower resolution than black and white information.

Re: Automatic Optical Illusions Using Python and OpenCV

#20
Not 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."

Post reply on HN