Afterimage Illusion

21,782

111

13

About: Build.Share.Destroy.Repeat. Follow me and try a few of my projects for yourself!

An afterimage is the persistence of a picture or shape after exposure to the original picture or shape has been removed. You've probably seen them before after looking away from a bright light and still being able to see a halo or glow in your vision. This phenomenon also happens with colours. Wikipedia defines afterimage as "prolonged viewing of a color induces an afterimage of the complementary color (for example, yellow color induces a bluish afterimage)."

Here's an example of an afterimage I made:

Mouse over image and stare at white dot for 30 seconds.
Move mouse off image and stare at B+W image to see colour.

Why does this happen?

Afterimages occur when the photoreceptors in our eyes are overstimulated and become fatigued. In everyday life your eyes are moving around and focusing on thousands of things every minute, allowing the rod and cone cells (photorecptors) to stay stimulated by an ever changing array of information. However when you focus on a picture the cone cells (used for colour) in our eyes become overstimulated. After a short period of time (about 5 seconds) these cone cells are only sending a weak signal to your brain telling you what colour you are looking at, making the colours seem muted. When you move your eyes to a blank space like a wall the photoreceptors compensate for this change in information and the brain interprets these new signals as colours complementary to what you were just viewing (an opposite, or negative).

The read on negative afterimage is fascinating stuff. Here's some further source information to enlarge your brain.

Making your own negative afterimage is a great way to demonstrate how our eyeballs work, or just have fun with your latest vacation pictures.

Step 1: Simple Negative Afterimage

Open an image in any photo editor and duplicate the layer twice, make one of the new layers desaturated and invert the colour of the second. I did this in Photoshop, but I've provided links to free alternatives.

Duplicate layer (make 2 additional layers):

Desaturate first layer:

  • Photoshop: ctrl + u
  • PIXLR: ctrl + u (saturation to -100)
  • GIMP: ctrl + shift + u
  • Paint.NET: ctrl + shift + u (saturation to -100)

Invert second layer:

  • Photoshop: ctrl + i
  • PIXLR: ctrl + i
  • GIMP: ctrl + shift + i
  • Paint.NET: ctrl + shift + i

Step 2: Add Focal Dot on Inverted Layer

In the center of the inverted layer add a visible dot. Make sure the dot is identifiable and a neutral colour. I went with a white dot with a black outline to make it really stand out.

Step 3: Save Layers As New Images

Save the desaturated and inverted versions of your photo as separate images.

Step 4: Make a Rollover Image

To make a rollover image like I did in the intro step you'll need to use a little HTML. The "mouseover" HTML command determines what image is displayed when you move your mouse over the image, and which image to display when the mouse is moved off the image.

I've pasted the code I used below, you'll need to change the capitalized letters and underscores to wherever your file is located.

<pre><img onmouseout="this.src='LOCATION_OF_IMAGE/DESATURATED_IMAGE_NAME.jpg'" onmouseover="this.src='LOCATION_OF_IMAGE/INVERTED_IMAGE_NAME.jpg'">

I suggest hosting your files online, then copying the file locations into this code.

An example would be:
https://www.instructables.com/files/orig/FBC/J1A4/HS3GT1E0/FBCJ1A4HS3GT1E0.jpg

Step 5: Make a GIF

I've made an entire Instructable about making your own animated GIF's. It's super easy to do, and there's a few options:


Have you made your own negative afterimage? I want to see it!
Share a picture of your version of this project in the comments below and be awarded a 3-month Pro Membership on Instructables.com and a digital patch.

3-month Pro Memberships remaining: 3 / 10

6 People Made This Project!

Recommendations

  • First Time Author

    First Time Author
  • Toys Contest

    Toys Contest
  • Make it Glow Contest 2018

    Make it Glow Contest 2018

13 Discussions

0
None
sabu.dawdy

4 years ago on Introduction

<pre><img onmouseout="this.src='https://www.instructables.com/file/F4LH6Z3HTB0WI2I/'" onmouseover="this.src='https://www.instructables.com/file/FNQMCDVHTB0WI39/'">
2 replies
0
None
Matt Makes

4 years ago on Introduction

Hello Mikeasaurus,

Thank you very much for posting this cool instructable, I think these after images are amazing! I'm trying to use the roll over code you posted in an instructable I'm making to show how something that glows in the dark looks in the day and in the night. I'm having a bit of trouble making the code work. could you please provide explicit instructions on how you added the roll over images to this instructable?

1 reply
0
None
mikeasaurusMatt Makes

Reply 4 years ago on Introduction

The exact code is in Step 4. Here it is in context of my example

<center>
<a href="www.instructables.com/id/afterimage-illusion">
<img onmouseout="this.src='https://www.instructables.com/files/orig/FY5/RPBL/HJKC2B4V/FY5RPBLHJKC2B4V.jpg'"
onmouseover="this.src='https://www.instructables.com/files/orig/FOQ/BLQK/HJKBZRXL/FOQBLQKHJKBZRXL.jpg'"
src="https://www.instructables.com/files/orig/FY5/RPBL/HJKC2B4V/FY5RPBLHJKC2B4V.jpg" /></a>
</center>

0
None
artducko

4 years ago on Introduction

i saw a simple demonstration of this effect in the perception chapter in my psych 101 text many years ago. this is rather elegant. i was surprised at how well this worked. eerie! i'm thinking i could make a screen saver with a slide show on a 30 second cycle? hmmm