Easy Create Pop-up Anaglyph using SPM


If we capture a pair of stereo images from a 45-degree angle above a three-dimensional subject and then use image processing software to produce the 'projection' of the two views onto the flat background,an anglyph made from the projected images produces a highly realistic illusion of the subject popping-up from the surface.
We call this a 'popup anaglyph', it is also known as a 'phantogram'.
The image-processing could be done with commercial programmes such as Adobe Illustrator or Photoshop,but it is quite a difficult task.
To considerably simplify this procedure, a new feature 'Easy Create Pop-up Anaglyph' has been added to SPM.
The feature is intended for creating popup anaglyphs for non-commercial use.
For indoor 'studio' shots, you can use a square background of uniform colour or a rectangular background with a known aspect ratio (width and height).
For example, A4 size is 210 x 297 mm.
SPM can often detect such backgrounds automatically without requiring any user input so this is a very simple method. For outdoor shots it is only necessary to match four corresponding pairs of points on the flat background of each image. You then apply rotation and perspective corrections to create the correct image transformation.
If you are interested in a precise way of capturing the source images, Steve Hughes has provided a useful guide.
There are also some videos on YouTube showing the procedure to be described below.
http://youtu.be/udsRuY7mV78 http://youtu.be/1iD_qE6Nf1E First of all, import your source images into SPM using the File\Open menu option.

1. Capture a pair of stereo images from a 45-degree angle above a three-dimensional subject

.
2. Import your source images into SPM using the File/Open menu option. 

.
3.We need to specify four, corresponding pairs of points on the flat reference background of the left and right images.
Before specifying each pair, we have to select 'Easy Create Pop-up Anaglyph' from the Adjust menu or by using the shortcut (Alt + F).
It is more convenient to use a toolbar button, so double-click the mouse on a blank area to the right of the existing toolbar buttons, the tool button edit screen will be displayed.
Highlight [Easy Create Pop-up Anaglyph] in the left column, click [Add] and the button will be added to the toolbar.


.
4. If you enlarge the image size to 100% (by pressing the [J] key) you can define the reference points more accurately.
This means that auto-detection of square or rectangular backgrounds is more likely to work correctly.
Using the horizontal and vertical scrollbars, move to the first location where you want to specify a reference point, click the toolbar button or use the (Alt + F) shortcut key. (See photo below) Click corresponding reference points on the left and right images.
You can select points moving from left-to-right (counter clockwise) or right-to-left (clockwise).
After specifying the two points, in the information area at the bottom left,you will see the pair-number and their co-ordinates.



.
5. Now specify the second pair of points.
The new pair-number and their co-ordinates will be displayed in the information area at the bottom left.
After specifying the left or right point you can press the "ESC" key to cancel it if necessary.
If you press "ESC" key after specifying both points then all specified points will be cancelled and you may start again from the first pair of points.
Repeat the procedure for the third and fourth pair of reference points.

.
6. After specifying the four points, the 'Easy Create Popup Anaglyph' Edit screen will be displayed.

.
7. The reference points on each image are marked with a '+'.
Click 'Match L/R' to check the four pairs of reference points overlap correctly.
Check the radio button for a square or rectangular background and for rectangular backgrounds enter the width and height.
The image transformations will then be applied and to check accuracy enable the grid overlay.
The transformed image should be rectangular.
If necessary, you can use the Angle option to rotate the image in the screen plane or V.pers to apply a perpective rotation to top-and-bottom of the image.
With accurate, undamaged backgrounds, the procedure can be even easier .. from the Adjust menu simply choose 'Auto detect rectangle' or use shortcut (Alt + G).
Although not a plain background, even the cutting mat with a printed grid shown above can be auto-detected.
If not, use the four reference points method.
For outdoor shots, we specify four distinctive pairs of points on the flat background.
It will be necessary to use the Angle option to rotate the image in the screen plane or V.pers to apply a perpective rotation to top-and-bottom of the image.
See this video http://youtu.be/1iD_qE6Nf1E starting at the 2:33 minutes mark.
When the 'Easy Create Popup Anaglyph' Edit screen opens, make sure the appropriate Square or Rectangular radio button is checked and for rectangular the width and height are correct.
SPM remembers those settings and will use them, by default, every time 'Easy Create Popup Anaglyph' opens.
When you are satisfied with the result, press the [OK] button.

.
8. Press the [F] key to fit the image to the window size.

.
9. Using the menu Stereo options, display as side-by-side or anaglyph.
If necessary, use the Edit\Crop\Free Cropping menu option, the [B] shortcut or the 'Free Cropping'toolbar button, crop the image to the required area.


.
10. If you want to save the image produced, you should check the 'No compression ghosting' option [to prevent colour loss due to JPG compression]to improve image quality.

.
11. Use the menu File/Print option or shortcut (Ctrl + P) to print the completed colour, anaglyph image, as shown below.
When viewed through through red-cyan glasses, looking at it from a distance of about 40cm above and 45 degrees to the front, the illusion of observing a real, three-dimensional object is very striking.


Auto-detect background rectangle

You can use a square background of uniform colour or a rectangular background with a known aspect ratio (width and height).
For example, A4 size is 210 x 297 mm. SPM can often detect such backgrounds automatically without requiring any user input so this is a very simple method.

Sample source images,

p1000206.mpo
p1000208.mpo
p1000209.mpo
p1000212.mpo
p1000213.mpo
p1000214.mpo
p1000215.mpo
p1000216.mpo
p1000217.mpo
p1000218.mpo
p1000219.mpo

1. Import your source images into SPM using the File/Open menu option.


.
2. Select Adjust/Auto detect Rectangle or press [Alt+G] key.

.
3. If SPM can not detect a background rectangle, please use the four points method.

.
4.After detecting a background rectangle, the 'Easy Create Popup Anaglyph' Edit screen will be displayed.

.
5.Choose [rectangle] with a known aspect ratio



How to use [Angle] mode

For outdoor shots it is only necessary to match four corresponding pairs of points on the flat background of each image.
You then apply rotation and perspective corrections to create the correct image transformation.

1. Adjust rotation error for upper side.


2. Adjust rotation error for lower side.
If you want to adjust both errors at same time, check [link both rotations together' option.

.
3. Perspective corrections to create the correct image transformation

.
4. Correct the skew problem with [Shift] value.

.

Let's all enjoy the 'Pop-up anglyphs' !