PDA

View Full Version : Optical Illusions (colors)



zak
13-08-2011, 09:41
we think the girl has one blue eye and one gray eye. In fact, both eyes are exactly the same shade of gray. The girl’s right eye only looks the same as the turquoise hair clip because of the reddish context


use the color picker of the paint program and press over the blue eye and you will see in the preview pane that it has the same color as the left eye
7387

references:
1- http://www.scientificamerican.com/slideshow.cfm?id=colors-out-of-space
2- http://en.wikipedia.org/wiki/Checker_shadow_illusion
3- http://web.mit.edu/persci/people/adelson/checkershadow_illusion.html
4- Get Pixel Color from a Picture (http://www.thinbasic.com/community/showthread.php?11064-Get-Pixel-Color-from-a-Picture) thinbasic code

danbaron
13-08-2011, 09:50
Didn't we go through something similar previously, with the chessboard that was partly in a shadow?

:twisted:

zak
13-08-2011, 10:05
yes Dan , it is the article Are squares A and B are the same color (http://www.thinbasic.com/community/showthread.php?10527-Are-squares-A-and-B-are-the-same-color&highlight=illusion)?

Petr Schreiber
13-08-2011, 11:38
Hi Zak,

I did downloaded the image in higher resolution from the first reference, and once I cut the eyes out (huh!) and compared left to right + boosted the saturation, I can see the left eye has directly stored color information (see attachement).
It might be because of JPG processing, but it kind of spoils the illusion.

I tried to recreate the basic elements of the effect via this scirpt, and it really makes the left eye cyan:

'
' Eyes
'

Uses "UI"

%colorLeftField = Rgb(218, 88, 88)
%colorRightField = Rgb(180, 180, 180)
%colorEyeInside = Rgb(128, 128, 128)
%colorEyeContourA = Rgb(118, 15, 16)
%colorEyeContourB = Rgb(0, 0, 0)

%colorThing = Rgb(111, 224, 222)

Dim hWnd As DWord = Canvas_Window("Eyes illusion", 100, 100, 318, 160)
Canvas_Attach(hWnd, 0)
Canvas_Scale Pixels

' -- Flat planes
Canvas_Box_WH(0, 0, 160, 320, 0, %colorLeftField, %colorLeftField)
Canvas_Box_WH(159, 0, 160, 320, 0, %colorRightField, %colorRightField)

Canvas_Width(3)

' -- Eye on the left
Canvas_Ellipse_WH(110, 100, 30, 30, %colorEyeContourA, %colorEyeInside)
Canvas_Ellipse_WH(122, 112, 5, 5, %colorEyeContourA, %colorEyeContourA)

' -- Eye on the right
Canvas_Ellipse_WH(180, 100, 30, 30, %colorEyeContourB, %colorEyeInside)
Canvas_Ellipse_WH(192, 112, 5, 5, %colorEyeContourB, %colorEyeContourB)

' -- The "thing"
Canvas_Ellipse_WH(250, 50, 30, 30, %colorEyeContourB, %colorThing)

Canvas_WaitKey
Canvas_WaitKey

Canvas_Window End


Petr

zak
13-08-2011, 12:41
thanks Petr for testing, believe me i saw in the first 10 minutes the left eye in your code as gray like the right eye, and said to myself where is that cyan eye ? but now i can see it as a cyan, i arrange it beside the girl eye and it is the same, the vb color picker (http://www.silvermaine.co.uk/downloads.html) gives RGB(128,128,128 ) for both eyes in you code.

for the picture in the magazine i have the picture by print screen then save as bmp
but i am still see the left eye from your code less blue than as in the magazine picture unless i align the two pictures side by side, this is may be due to a faulty vision.

Petr Schreiber
13-08-2011, 13:15
You are right the illusion is not that strong in the TB example,
it has probably something to do with the size of the "eyes" and the color planes.


Petr