Zerene stereo support and StereoPhoto Maker (SPM)

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

David Sykes
Posts: 51
Joined: Mon May 02, 2016 2:04 pm
Location: North Wales,U.K.
Contact:

Zerene stereo support and StereoPhoto Maker (SPM)

Post by David Sykes »

I enjoy viewing my stereo images and movies on a 3DTV using SPM and am therefore interested in Zerene's support for stereo images.
I assume this feature is also available in the evaluation version ?

I am thinking of adding a section on this feature to SPM's documentation so I have a number of background questions.

Rik says that what you're seeing now is primarily a matter of algorithm selection and packaging of techniques that date back to the 1980's.
Can you explain that a bit more, any recommended publications ?

Does the technique only work if the system is not telecentric in object space, which I guess is most of the time ?

Does it rely on the outer parts of the objective being able to see around the focused point ?

How is the viewpoint divergence angle related to image-layer shift ?

Zerene places the midpoint of the subject at the same depth as the frame, do you think that is a good idea, in many (most ?) cases it will lead to edge violations unless you waste part of the image by cropping it ?
(An example of an edge violation would be a person's arm extending beyond the window edge AND in front of it, an impossible situation).
Personally, I prefer to see the nearest part of the uncropped subject at screen level.

For the actual layer shift is it really necessary to have one decimal place precision and if so what situations would require it ?

Also, why is there a mandatory 'Y' displacement equal to the 'X' displacement ?

You also mention that it is possible for the left/right order of the stacks to be sometimes or always incorrect, why is this ?

You say "Make Stereo Pair(s) creates a plain side-by-side pair, either crossed-eye or parallel viewing depending on how you selected the images ", can you explain that further ?

When capturing hyperstereoscopic pairs with two cameras and a telephoto zoom setting you get an effect known as 'cardboarding', where the distant subjects are separated in space but which in themselves do not have any depth.
They look as if they are cut from cardboard, like in a popup book.
It is because the change of divergence angle over the depth of the subject is not visually discernable.
I guess we have a similar situation with macro stacks that do not have many layers.
Rik, any comments on the maths of that ?

Although you suggest reducing image size because "it is rare to display a stereo pair at anything approaching full camera resolution" I enjoy panning and zooming (to some extent) large images on the 3DTV with SPM.

You mention retouching does not work well with shifted images and 'Make Stereo Pair(s) cannot be used in batch mode' but both will be addressed in a future update.
Life is short, any progress on that ? :)

Finally, and I cannot think of anything, are there any features that could be added to SPM to support Zerene ?


David

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

A lot of questions! Let me just answer one by one...
David Sykes wrote:I enjoy viewing my stereo images and movies on a 3DTV using SPM and am therefore interested in Zerene's support for stereo images.
I assume this feature is also available in the evaluation version ?
Yes. All functionality is supported in the free trial. Even better, synthetic stereo is supported by all types of licenses, including Student and Personal.
Rik says that what you're seeing now is primarily a matter of algorithm selection and packaging of techniques that date back to the 1980's.
Can you explain that a bit more, any recommended publications ?
The basic method is to just skew the stack, then run any of the usual rendering algorithms. I don't know the origin of using a skew instead of a full perspective transform. I first published a minor paper using the skew method to make data display graphics back in 1982. But I assumed at the time that it was not original; I just described it because I didn't want to take time to track down a reference. (That was before search engines -- the old days!)

For clean handling of transparency, hair, bristles, and so on, good results depend on using a stacking method that holds up well to complicated geometry. In Zerene Stacker, that means PMax. The core of PMax was laid out in "Pyramid methods in image processing" by Adelson et.al. in 1984. That paper can currently be retrieved from http://persci.mit.edu/pub_pdfs/RCA84.pdf . For sufficiently simple geometries, any of the depth map methods also work. I don't have references handy for those.

The first instance that I know of, for combining skew and focus stacking to produce stereo pairs, is my own work briefly documented at http://www.janrik.net/insects/ExtendedD ... tCase.html. In that case the pair was generated using the "skew" function that Alan Hadley put into CombineZM at my request, used in conjunction with one of CombineZM's rendering methods that is tolerant of complex geometry. Probably somebody did something similar earlier and I just don't know about it.
Does the technique only work if the system is not telecentric in object space, which I guess is most of the time ?
The method does not care if the optics are telecentric. Stereo pairs generated with telecentric optics look essentially the same as those from ordinary optics.
Does it rely on the outer parts of the objective being able to see around the focused point ?
Not really. Consider the case of an opaque subject with simple geometry, for example a sphere. In this case it's clearly impossible to see around the focused point, but still the synthetic stereo works fine.
How is the viewpoint divergence angle related to image-layer shift ?
It's proportional, with the constant of proportionality depending on the aspect ratio of the volume being imaged. The formula should be something like angle=atan((PctShift/100)*(width/depth)). I have not experimentally confirmed that formula, but assuming it's correct, then if you're imaging a volume that is three times as wide as it is deep, each 1% shift amounts to about 1.7 degrees.
Zerene places the midpoint of the subject at the same depth as the frame, do you think that is a good idea, in many (most ?) cases it will lead to edge violations unless you waste part of the image by cropping it ?
(An example of an edge violation would be a person's arm extending beyond the window edge AND in front of it, an impossible situation).
Personally, I prefer to see the nearest part of the uncropped subject at screen level.
It's certainly not the best choice in all circumstances. But I think it's a good compromise, particularly since the (current) software doesn't know which end of the stack is front versus back.

Someplace on the infamous list of future features is to expand the capability to let the user specify more things about the source stack, like which end is the front, as well as where the zero-disparity point should be placed. At that point, you could generate the off-axis views so that the front of the subject would naturally be at the screen level.

However, I suspect that being able to specify that point wouldn't help much with the cropping issue. The main difficulty is that the (current) software is likely to give unacceptable edge streaks in areas that are covered by some but not all source frames. When you skew the stack, the sides are always vulnerable to this problem. If I recall correctly, it works out that putting the zero-disparity point in the middle of the stack minimizes the total amount of potentially bad edges.
For the actual layer shift is it really necessary to have one decimal place precision and if so what situations would require it ?
Well, sometimes 2% is too little, 3% is too much, and 2.5% is just right. It's not just a matter of establishing proper depth. Rendering artifacts like streaking and smearing get worse with larger shifts, so sometimes it's a matter of choosing the largest shift that gives acceptable artifacts.
Also, why is there a mandatory 'Y' displacement equal to the 'X' displacement ?
I wonder if I've understood the question correctly.

There is no requirement that the displacements be equal. Typically Y is zero while X is negative and positive.

The main use for providing Y shift at all is to allow things like rocking around a cone. In that case the whole operation would probably be done under control of a computed batch script that generates multiple views, one at a time, with the X and Y shifts having a sine/cosine relationship to each other. Viewing these things has to be done as either an animation or interactive, of course.

Y shift is also useful in some cases if you want to generate a pair to be rotated before display, and for whatever reason you don't want to use the Pre-rotation feature that operates on the source images.
You also mention that it is possible for the left/right order of the stacks to be sometimes or always incorrect, why is this ?
It's because the stack can end up getting processed from either front to back or back to front, depending on exactly what optics you're using, and which way you shot the stack to start with, and whether you have Alignment > "Automatic order" selected. With a standardized shooting setup, the left/right ordering becomes predictable.
You say "Make Stereo Pair(s) creates a plain side-by-side pair, either crossed-eye or parallel viewing depending on how you selected the images ", can you explain that further ?
It's the usual issue: left side = left eye is parallel, left side = right eye is crossed. The single image generated by Make Stereo Pair(s) preserves whichever ordering was last shown by stereo preview, which of course is something you have control over by choosing which image to put in each window.
When capturing hyperstereoscopic pairs with two cameras and a telephoto zoom setting you get an effect known as 'cardboarding', where the distant subjects are separated in space but which in themselves do not have any depth.
They look as if they are cut from cardboard, like in a popup book.
It is because the change of divergence angle over the depth of the subject is not visually discernable.
I guess we have a similar situation with macro stacks that do not have many layers.
Rik, any comments on the maths of that ?
I don't know what maths apply to that comparison.

With synthetic stereo, what happens is that all details chosen from the same image will have exactly the same disparity (apparent depth), no matter what their actual depth is.

With your situation, cardboarding happens because the difference in depth within each subject is very small compared to the difference in depth between subjects. Two details at different depths will always have different disparities; the cardboard effect occurs because the difference is too small for the observer to perceive.

So, the visual effects are similar, but the causes are different. The macro equivalent to your cardboarding would involve a very deep stack, in which two features would come from different source frames but the frames would be too close together to see the difference in disparity. I suppose there must be some way to formalize the comparison, but offhand I don't see how to improve understanding by doing that.
Although you suggest reducing image size because "it is rare to display a stereo pair at anything approaching full camera resolution" I enjoy panning and zooming (to some extent) large images on the 3DTV with SPM.
Noted. I enjoy it also. John Hallmén has done the same thing for browser display from the web using (as best I recall) an Adobe Flash wrapper to manage the panning and zooming. Nonetheless, I think this mode of zooming into a high resolution pair is pretty uncommon so I'm still comfortable with what I wrote.
You mention retouching does not work well with shifted images and 'Make Stereo Pair(s) cannot be used in batch mode' but both will be addressed in a future update.
Life is short, any progress on that ? :)
Life is full, no progress to report. :)
Finally, and I cannot think of anything, are there any features that could be added to SPM to support Zerene ?
Not that have occurred to me. I consider SPM to be one of the miracles of the modern world.

--Rik

Lou Jost
Posts: 5943
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

" I consider SPM to be one of the miracles of the modern world. "

Sounds like something worth knowing. What is SPM?

Chris S.
Site Admin
Posts: 4042
Joined: Sun Apr 05, 2009 9:55 pm
Location: Ohio, USA

Post by Chris S. »

Lou Jost wrote:What is SPM?
SPM stands for StereoPhoto Maker, a free and richly-featured application for making and manipulating stereo images. I use it from time to time, and am impressed with it. This said, I'm at best a beginner with this software.

--Chris S.

Lou Jost
Posts: 5943
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Thanks Chris, I'll take a look. I am mainly interested in rocking stereo gifs to be included as online supplementary material for publications of new plant species...

David Sykes
Posts: 51
Joined: Mon May 02, 2016 2:04 pm
Location: North Wales,U.K.
Contact:

Post by David Sykes »

Many thanks Rik for the detailed replies to my long list of questions.
I will follow-up the links and bookmark this topic.

(pity individual messages do not have a unique link).

I do enjoy cross-eyed viewing the stereo images posted to the Group.

David

Chris S.
Site Admin
Posts: 4042
Joined: Sun Apr 05, 2009 9:55 pm
Location: Ohio, USA

Post by Chris S. »

David,
David Sykes wrote:(pity individual messages do not have a unique link).
They do, actually. See here.
I do enjoy cross-eyed viewing the stereo images posted to the Group.
So do I! :D Once upon a time, my eyes/brain could not fuse them. Then I bought a pair of "glasses" to do it. After using these a short while, I found I could easily fuse cross-eyed pairs without them.

Cheers,

--Chris S.

David Sykes
Posts: 51
Joined: Mon May 02, 2016 2:04 pm
Location: North Wales,U.K.
Contact:

Post by David Sykes »

Thanks, bookmark updated.

Post Reply Previous topicNext topic