Lets Learn together... Happy Reading

" Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference "-Robert Frost

Black and White-Optical illusion

Today, Some of my friends in Facebook posted black and white optical illusion photo saying 'ITS FREAKING AWESOME'.
After seeing the image, I found it's actually black and white illusion. Yes, convert the image to binary and do logical not of the image. When you look or concentrate at one point on the image ,maybe in center you can see a logical not of the image (i.e) White pixels will be black and black pixels will be white.

The most interesting thing is, you can try with your own photo.

MATLAB CODE:


A=imread('illusion.jpg');


B=uint8(zeros(size(A)));
A=~im2bw(A);
Logical Not on Binary Image

for i=1:size(A,1)
    for j=1:size(A,2)
        if(A(i,j)==1)
            B(i,j,:)=255;
        end
    end
end

Stare at the dots on image for 20 to 30 secs. Close your eyes or look up towards the ceiling.
You can see a binary image. i.e im2bw(A);

To draw the dots on the image:

C=uint8(ones(4 ,4, 3));
C(:,:,1)=C(:,:,1)*200;
C(:,:,2)=C(:,:,2)*0;
C(:,:,3)=C(:,:,3)*250;
%Find the mid point of the image and draw 3 dots.


midx=round(size(B,1)/2);
midy=round(size(B,2)/2)+30;
for i=1:size(C,1)
    for j=1:size(C,2)
B(midx+i+5,midy+j,:)=C(i,j,:);
B(midx+i-5,midy+j,:)=C(i,j,:);
B(midx+i+15,midy+j,:)=C(i,j,:);
    end
end

















Check this Illusion also:I cant sleep Illusion
Check this link for more optical Illusion Images: Images from Blog


like button Like "IMAGE PROCESSING" page

0 comments:

Enjoyed Reading? Share Your Views

Previous Post Next Post Home

Link

Related Posts Plugin for WordPress, Blogger...
Google ping Hypersmash.com