TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Automatic Optical Illusions Using Python and OpenCV

36 pointsby edhu2017over 4 years ago

9 comments

ConcernedCoderover 4 years ago
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?
评论 #24756386 未加载
andrewlaover 4 years ago
&quot;Optical Illusion&quot; feels strong here -- really the image is just being desaturated. Same effect can be seen by just replacing random pixels with their grayscale equivalent.<p>Something like:<p><pre><code> 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, :]</code></pre>
C4storover 4 years ago
I genuinely don&#x27;t really understand what&#x27;s trying to be proven here.<p>I mean, it&#x27;s just how our eye+brain work indeed. You can make it &quot;better&quot; by dezooming on the images, or &quot;worst&quot; by zooming in, which is just as expected.<p>It doesn&#x27;t really seem far from other techniques for image compression, just a less good version of those ?
评论 #24756506 未加载
ageitgeyover 4 years ago
Not to take away from the post (which is nice), but it&#x27;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.<p>This reminds me of the old King of the Hill episode where Dale says &quot;If you want, I can show you how to make a bomb out of a roll of toilet paper and a stick of dynamite.&quot;
sllabresover 4 years ago
This is the same effect JPEG chroma subsampling <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Chroma_subsampling" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Chroma_subsampling</a> encoding takes advantage of.
vernieover 4 years ago
Similar to chroma subsampling used by most lossy image and video compression algorithms.
The_rationalistover 4 years ago
To 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
评论 #24755432 未加载
celiasover 4 years ago
The default interpolation for imshow is &#x27;antialiased&#x27; so I think the calls to imshow should use interpolation=&#x27;none&#x27; to avoid the line colors bleeding into the gray image
floatingatollover 4 years ago
Everybody who wonders if they were just exposed to The Parrot, raise your hand.