| View previous topic :: View next topic |
| Author |
Message |
Buho
Joined: 27 Jun 2004 Posts: 971 Location: Maryland, USA
|
Posted: Wed Nov 02, 2005 11:19 am Post subject: Hybrid Rectilinear & Cylindrical projections |
|
|
Hey all. I'm toying with an idea I haven't done before, but perhaps someone else has.
I've got a 180º x 120º panorama with architectural elements on the left side and nature on the right. I am strongly resisting projection in cylindrical because of the horrible distortion. However, rectilinear restricted to 120º or even 140º doesn't show everything and the resulting composition just doesn't work artisticly.
I'm toying with blending rectilinear on the left with cylindrical on the right. Is there anything special I have to do? Is it possible? Will it blend correctly? Are there examples of such I can look at to figure this out better? _________________ Eric |
|
| Back to top |
|
 |
Jim Z
Joined: 11 Oct 2005 Posts: 774 Location: Tahoma CA
|
Posted: Wed Nov 02, 2005 12:30 pm Post subject: |
|
|
Eric,
If you split the 'construction' in the center, the halves would match, but wouldn't the perspective of the left half be with the vanishing point at the right edge of the building? I'm thinking that the cylindrical and the rectilinier match at the vanishing point, perspective center, of the rectlinier projection.
I have many panoramas warped and merged by eye in PS, before PTassembler, with nothing close to correct perspective or projection, and they work very well. Correct perspective can some times be, to my eye, harsh in a natural scene.
I have a panoramic photo of a grand, 80 year old, log built lodge at Lake Tahoe, assembled from five images, about a 100deg FOV. The faciade isn't straight but ahs inside and out side corners towards the camera. More or less, my old pano keeps each side, or wall, correct with straight lines, but doesn't keep correct over-all perspective, but is an artistic, 'painting' perspective, verticals are right but the VP isn't. I just re-assembled the same photos in a correct rectilinear projection. It's a give or take which is better. The funny thing is that the most obvious roof eve in the photo looks worse in the correct projection, because the roof droops, for real (old age), towards the camera. The best rectilinear had that part 'morphed' up to be 'correct.' _________________ Jim Z |
|
| Back to top |
|
 |
GURL
Joined: 19 Oct 2003 Posts: 923 Location: Grenoble (France)
|
Posted: Wed Nov 02, 2005 2:55 pm Post subject: |
|
|
I would try that, too:
1) in a first project stitch the whole pano to cylindrical.
2) in a second project, use the cylindrical previous result as the (single) source image of Lens Type = Panoramic and use various "lens" Horizontal FOV (the Step 2 parameter). If those FOV values are lower than the real one (the Step 5 Horiz FOV of the first project) you should get various intermediate results between the "correct" rectilinear an the "correct" cylindrical projections.
I imagine you could end blending two half parts produced using different (fake) horizontal FOV...
Because I know you are using a 3 monitors setup, I would suggest making 3 separate panos using rectilinear projection and Horiz FOV = 60°: one pano for each of the monitors. If you want to make prints, use cylindrical projection but fix the result on a half cynlinder carboard mount and ... place your head in the center: this will correct the so called "distortion" (this is not a joke, a friend of mine saw some panoramas shown this way in a gallery and found the result being very pleasant.)
Besides that, showing us some thumbnail(s) of the pano could help... _________________ Georges - - Stay tuned, this is just the beginning of digital photography |
|
| Back to top |
|
 |
johnh
Joined: 20 Jul 2003 Posts: 2061 Location: UK
|
Posted: Wed Nov 02, 2005 4:06 pm Post subject: |
|
|
It isn't difficult to do a quick test. This has the left side in rectilinear projection and the right side in cylindrical. I had to use edit->transform->scale to match the images reasonably at the join. I haven't spent any time trying to get the join invisible. A blue sky helps.
John |
|
| Back to top |
|
 |
Pablo
Joined: 02 Sep 2004 Posts: 13 Location: Germany
|
Posted: Wed Nov 02, 2005 5:11 pm Post subject: |
|
|
I have seen a poster (called Squaring the Circle in Panoramas) about this topic at the ICCV conference:
http://www.vision.caltech.edu/lihi/Demos/SquarePanorama.html
They also explore the multiple projections in one Panorama like in the example by john, as well as using locally different projection centers, for example to represent peoples faces. Painters sometimes paint the buildings and faces with different viewing directions, so that the faces look undistorted even if they are far from the center of the image.
In the examples, the authors virtually center the camera on each head for example, and remap it. Then they have some holes in the background, which they fill using some image resynthesis algorithm.
ciao
Pablo |
|
| Back to top |
|
 |
Buho
Joined: 27 Jun 2004 Posts: 971 Location: Maryland, USA
|
Posted: Thu Nov 03, 2005 6:02 pm Post subject: |
|
|
| George wrote: |
1) in a first project stitch the whole pano to cylindrical.
2) in a second project, use the cylindrical previous result as the (single) source image of Lens Type = Panoramic and use various "lens" Horizontal FOV (the Step 2 parameter). If those FOV values are lower than the real one (the Step 5 Horiz FOV of the first project) you should get various intermediate results between the "correct" rectilinear an the "correct" cylindrical projections. |
Jim and George, I'll give this a shot. I hadn't thought of reprojecting a projected image. I was trying to figure out how to project the project twice and have them line up, but your method sounds more sure-fire.
| JohnH wrote: |
| I had to use edit->transform->scale to match the images reasonably at the join. I haven't spent any time trying to get the join invisible. A blue sky helps. |
Interesting they didn't line up exactly. I guess this depends on how far away the join is from the "center" of the rectilinear projection. Thanks for the example!
Pablo, great find! Thanks! Still reading it.
Off-topic:
| George wrote: |
| Because I know you are using a 3 monitors setup, I would suggest making 3 separate panos using rectilinear projection and Horiz FOV = 60°: one pano for each of the monitors. |
You know, I've also been trying to figure out how to automate this. For the past four years I've been using a Photoshop action that slices out the parts of the image that should appear between the monitors (behind the bezels), which produces a very nice effect (diagonals are continuous from one monitor to the next, not jagged like this setup). (The PS action will also resize chunks of the image to match a consistant "virtual PPI" if the screens are of different sizes and resolutions.) However I haven't figured out an easy way to project a pleasing view onto my screen. My current wallpaper is a cylindrical pano of the beach, approax 170º. Severe curvature on the bottom of the middle screen detracts from the display. I'd like to render three rectilinear views that mesh "between" the monitors.
I guess one solution would be to render cylindrical once for the final. Then launch a batch script that creates three new projects at different angles and renders them out. Kind of like PanoCUBE for QTVR. I suppose a batch file that launches PanoTools directly is better. I'll have to look into this.
You're exactly right, though. For years it's pissed me off that 3D video games don't support multiple cameras at the "head" point for multiple screens. If the game supports multiple monitors (which is rare), your only choice is to use a single rectilinear viewpoint of 160º or so which horribly distorts the wing monitor views. (I think MS Flight Simulator employs multiple cameras.) _________________ Eric |
|
| Back to top |
|
 |
GURL
Joined: 19 Oct 2003 Posts: 923 Location: Grenoble (France)
|
Posted: Fri Nov 04, 2005 11:24 am Post subject: |
|
|
Why pictures look right when viewed from the wrong place
...to which title was lately added
(and sometimes look wrong when viewed from the right place)
Marty Banks - Professor of Optometry and Adjunct Professor of Psychology - University of California, Berkeley (USA)
wrote: |
| Perspective paintings, photographs, computer-graphic images, and motion pictures can yield a compelling sensation of the 3d layout of the depicted scene. If they are viewed from the correct viewing position (the center of projection), the retinal image created by the picture is the same as the image that would be created by the scene itself. But we seldom view a picture from the center of projection. For example, the center of projection in a movie theater is in the middle of the room, above the audience. Nonetheless, viewers sitting too low and off to the side seem to perceive the depicted 3d layout correctly. Viewing a picture from the wrong position causes distortion in the retinal image, such that the image specifies a different scene than the scene depicted in the picture. However, picture percepts are generally close to the depicted scene. We asked how the visual system accomplishes the perceptual compensation that allows robustness to changes in viewing position. Five possible mechanisms have been described in the literature. Our experiments show that four of them do not account for compensation in picture viewing. Rather the visual system uses a local estimate of surface slant to adjust the retinal image for the expected foreshortening due to oblique viewing. This method is not geometrically correct, particularly for wide-angle pictures. We develop a quantitative model of the compensation process. We also discuss the consequences of the visual system's usage of this compensation method for picture composition and the design of pictorial displays such as cinema screens, computer screens, and virtual-reality devices. |
http://bankslab.berkeley.edu/Projects/PicturePerceptionIntro.html _________________ Georges - - Stay tuned, this is just the beginning of digital photography |
|
| Back to top |
|
 |
Jim Z
Joined: 11 Oct 2005 Posts: 774 Location: Tahoma CA
|
Posted: Fri Nov 04, 2005 12:21 pm Post subject: |
|
|
Pablo, excellent link.
I guess the reason the rectilinear and the cylindrical projections don't match at the vertical center lines of each is aproximately the equivalent of the differance between a Mercator and a geographic map. The rectilinear (the same as 'perspective') projection has the same vertical distortion at the center of perspective as the Mercator projection has uniformly and a cylindrical projection is the same as the geographic projection... I think.(?)
Now I know that I my own backwards way I've been doing 'Multi-Plane' projections... _________________ Jim Z |
|
| Back to top |
|
 |
johnh
Joined: 20 Jul 2003 Posts: 2061 Location: UK
|
Posted: Fri Nov 04, 2005 2:19 pm Post subject: |
|
|
| Jim Z wrote: |
| The rectilinear (the same as 'perspective') projection has the same vertical distortion at the center of perspective as the Mercator projection has uniformly and a cylindrical projection is the same as the geographic projection... I think.(?) |
The rectilinear projection has the same vertical distortion at its centre as the cylindrical projection, so the two can be easily joined at this point. Problems arise if you want to join to one side of a rectilinear image.
John |
|
| Back to top |
|
 |
Jim Z
Joined: 11 Oct 2005 Posts: 774 Location: Tahoma CA
|
Posted: Fri Nov 04, 2005 4:43 pm Post subject: |
|
|
| johnh wrote: |
The rectilinear projection has the same vertical distortion at its centre as the cylindrical projection, so the two can be easily joined at this point. Problems arise if you want to join to one side of a rectilinear image.
John |
Thanks, John
Then a cylndrical projection can't have a 180 deg vertical FOV, just as a rectilinear projection can't have a 180 deg vertical or horizontal FOV ? _________________ Jim Z |
|
| Back to top |
|
 |
johnh
Joined: 20 Jul 2003 Posts: 2061 Location: UK
|
Posted: Fri Nov 04, 2005 6:39 pm Post subject: |
|
|
| Jim Z wrote: |
| Then a cylndrical projection can't have a 180 deg vertical FOV, just as a rectilinear projection can't have a 180 deg vertical or horizontal FOV ? |
Correct.
John |
|
| Back to top |
|
 |
Buho
Joined: 27 Jun 2004 Posts: 971 Location: Maryland, USA
|
Posted: Mon Nov 07, 2005 5:48 pm Post subject: |
|
|
I gave the hybrid a shot last weekend.
1. Output cylindrical. Use Enblend or blend in PS. Do not crop.
2. In a new project, reproject cylindrical to rectilinear. Do not move yaw/pitch/roll. Set lens parameters to 0. Set the HFOV manually (annoying warning in PTA when doing this, Max).
3. Take both into Photoshop.
4. Mask out half of the rectilinear image, exactly over the vertical half line. Place overtop the cylindrical and line it up.
5. Edit -> Transform -> Scale until rectilinear half matches the cylindrical half. No blending nescescessary, as they should line up perfectly.
The results are a little smoother than one of these articles posted, since straight lines transition from a straight line smoothly to a parabolic curve instead of intersecting at angles. The technique is quite liberating, though, compositionally-wise, for ultra-wide angle scenes.
I'll post my pano later. It's quite wild to flip between full rectilinear and hybrid. It feels like my viewpoint is "bending" somehow, something I've never experienced in real life. _________________ Eric |
|
| Back to top |
|
 |
Jim Z
Joined: 11 Oct 2005 Posts: 774 Location: Tahoma CA
|
Posted: Tue Nov 08, 2005 2:09 am Post subject: |
|
|
Eric,
Thinking about this, you could join any number of rectilinear images if the joins between the two adjacent pairs are equal distance between the respective perspective centers. (And if you can survive the roller coaster horizontals.)
The join of a cylindrical and rectilinear projection at the (perspective) center of the rectilinear is a verticle line, but if you join the cylindrical and rectilinear images off of the center of the rectilinear image and vertically scale the images to match top and bottom equally above and below the horizon, and if I have this figured out correctly, the join line is the arc of a circle, covex towards the cylindrical projection, vertically tangent at the horizon line... _________________ Jim Z |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|