IPB
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

Stitching Mers Images With Pov-ray
erwan
post Mar 31 2005, 11:17 AM
Post #1


Member
***

Group: Members
Posts: 180
Joined: 31-January 05
From: Brittany (France)
Member No.: 164



I used Panorama Tools and Autostitch softwares to make Navcam or Pancam mosaics. Though powerful, these softwares assumed pictures to stitch are all shooted from an unique "Optical center". That is not the case for MER Navcam or Pancam images, shooted from the rotating Pancam Mast Assembly. Such an issue is very troublesome with Navcam images, given the wide field of view, and parallax defects between images, especially for close objects. For example, two Navcam images picturing some elements of the Rovers cannot very often be correctly stitched...
A good solution to stitch Navcam images is geometrical, i mean to project the different images reproducing Pancam Mast Assembly rotation. For images available on PDS node websites, we may found adapted PMA parameters near the end of the PDS label (Rover defined parameters, Azimuth and Elevation in degrees).
Then, we may render images projected this way with help of POV-ray sofware - POV-ray home - , and it's not difficult.
We have to create one flat square for each image to stitch. Then translate the square on a virtual sphere, according to Elevation and Azimuth parameters founded on the image label. Then texture the square with an image map: the image. Doing so for the different images to stitch, add a camera on the center of the sphere, render! It works! And we may finely tune every parameters needed to stitch nicely important features as horizon line, to orient the resulting mosaic, etc...

The sketch below illustrate the text:




And the Navcam mosaic linked below was made this way:



--------------------

Erwann
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
Jeff7
post Sep 13 2005, 11:39 PM
Post #2


Member
***

Group: Members
Posts: 477
Joined: 2-March 05
Member No.: 180



Yeah, I'm kind of thinking I'll reserve POV-Ray for panoramas of rooms or landscapes, and leave the Mars panoramas either to MMB's wonderous workings, or to the others here who already know how to make them.

My trouble now - rotate again. Rotating along the x and z axes seems to do the same thing.
Example:

rotate <ELEV_IMAGE003, -AZIM_IMAGE003, 20>

seems to do very nearly the same thing as

rotate <ELEV_IMAGE003+20, -AZIM_IMAGE003, 0>


Both instructions merely move the image toward the top of the rendering area. I would expect the first command line there to rotate it 20 degrees to the right - just as the rotate command in a photo editor would do. My understanding:
X axis runs left to right.
Y axis runs up and down.
Z axis runs toward and away from the user, facing the monitor.

Thus rotating along the z axis should simply make the image appear to rotate.
Right?

The tutorial I linked to earlier uses a cone as a demo object. A symmetrical object. So rotating along one axis would net no visible changes for the sake of a demonstration. unsure.gif
Go to the top of the page
 
+Quote Post
dilo
post Sep 14 2005, 04:51 AM
Post #3


Senior Member
****

Group: Members
Posts: 2492
Joined: 15-January 05
From: center Italy
Member No.: 150



Jeff, your axis identifications are absolutely correct.
Now, take in mind that, in the Erwan code, observer (camera) still in the origin, where axes cross. Then, you translate the textured box toward -z direction before to rotate it (herebelow complete sequence for a single image):
CODE
box {
<-1, -1, -1>, <1, 1, 1>
scale <1024/2, 1024/2, 0.00001>/FOV
translate -1423.01*z
material {
image003
}
rotate <ELEV_IMAGE003, -AZIM_IMAGE003, 0.0>
}

The "translate" command is essential to see the image (otherwise observer would lie inside the box!) but after it, any rotation around the other two axis would displace the image (box) in space, not only rotate it!
In other words, when (after translation) you give this command:
rotate <ELEV_IMAGE003, -AZIM_IMAGE003, 20>
your box will be first rotated around X and Y axis which are now outside it and, as you can imagine, this rotation will displace the box from it's original position. In fact, as you observed, the ELEV_IMAGE003 angle determine a shift toward the top and AZIM_IMAGE003 will shift in horizontal direction...
This is absolutely normal: those two angles are elevation and azimut of images centers, referred to observer. At this point, Erwan didn't use again the "translate" command to shift images simply because we need to have images always perpendicular to the line of sight, in order to not distort them with perspective effects.

You are reporting that rotation of angles <ELEV_IMAGE003, -AZIM_IMAGE003, 20> brings same results of rotation <ELEV_IMAGE003+20, -AZIM_IMAGE003, 0>.
This is absolutely incidental and, if you change the initial values of ELEV_IMAGE003 and AZIM_IMAGE003, you will see a different result (coincidence disappear!).
So, again, remember that consecutive rotations aren't commutative and that rotation after translation introduce a spatial shift!
You must use the angles just as their names suggests, so elevation will control height above/below horizon (vertical shift), azimut will shift around horizontally. Last angle (tilt) is the rotation around the line of sight, to eventually correct the horizon inclination inside the image; in fact, it is the real image rotation you are looking for! However, Erwan made it equal to 0 because, in general, images belonging to the same panorama are already aligned to each other (they have the same elevation angle in the rover coordinate system).
So, is more easy to apply a unique final correction to the general stitch orientation, instead to match a single image at each time... In fact, the two parameters "AZIMUT_CAMERA" and "ROLL_CAMERA" will make this final correction! So I reccomend you to play with them and not to touch third (z) angle in the image orientations.

I hope I was clear enough without boring you! Ask for other doubt..
Bye.


--------------------
I always think before posting! - Marco -
Go to the top of the page
 
+Quote Post

Posts in this topic
- erwan   Stitching Mers Images With Pov-ray   Mar 31 2005, 11:17 AM
- - spaceffm   Thank You for the link and the explanation, but ev...   Mar 31 2005, 11:50 AM
|- - Tman   QUOTE (spaceffm @ Mar 31 2005, 11:50 AM)Thank...   Mar 31 2005, 02:39 PM
- - Jeff7   Great, now all we need is a quick, easy way of get...   Mar 31 2005, 03:04 PM
- - dilo   Merci Erwan, very interesting method! I'm ...   Mar 31 2005, 08:06 PM
|- - erwan   Arrivederci,, Dilo! Here is the entire text re...   Mar 31 2005, 08:38 PM
|- - cIclops   QUOTE (erwan @ Mar 31 2005, 08:38 PM)Here is ...   Apr 4 2005, 03:17 PM
|- - dilo   QUOTE (cIclops @ Apr 4 2005, 03:17 PM)QUOTE (...   Apr 5 2005, 03:48 AM
|- - Tman   QUOTE (cIclops @ Apr 4 2005, 03:17 PM)Thanks ...   Apr 5 2005, 01:28 PM
- - Tman   Ok Erwann, just I'm trying an attempt with POV...   Apr 4 2005, 01:33 PM
- - Tman   Text cancelled (comment: was shit )   Apr 4 2005, 03:16 PM
- - Tman   I slowly approach too But there are as much to a...   Apr 5 2005, 12:59 PM
- - slinted   erwan, This looks like a great method! Getti...   Apr 5 2005, 01:57 PM
- - erwan   Thanks for your comments, folks. Some explanations...   Apr 5 2005, 05:19 PM
|- - cIclops   QUOTE (erwan @ Apr 5 2005, 05:19 PM)<snip...   Apr 5 2005, 07:16 PM
- - erwan   Tman and Dilo: i'm happy to see you handle the...   Apr 5 2005, 05:31 PM
|- - dilo   QUOTE (erwan @ Apr 5 2005, 05:31 PM)Tman and ...   Apr 5 2005, 09:58 PM
- - erwan   Thanks for the tip, cIclops, far more easy and fas...   Apr 5 2005, 07:26 PM
- - Tman   My try could have worked with the 7 raw pics that ...   Apr 6 2005, 04:18 PM
- - Tman   Marco, have you also tried an attempt with the 7 p...   Apr 6 2005, 04:47 PM
|- - dilo   Hi Tman, I didn't tried before because I was i...   Apr 6 2005, 09:15 PM
- - Tman   Sorry, but I dont get a useful result too. By fr...   Apr 6 2005, 08:56 PM
- - Tman   Hi Marco, (due to your question in this Thread) I...   Apr 10 2005, 05:29 PM
|- - dilo   QUOTE (Tman @ Apr 10 2005, 05:29 PM)Hi Marco,...   Apr 11 2005, 05:16 AM
- - Jeff7   Tis an old thread, but you've got another pada...   Sep 12 2005, 05:25 AM
|- - dilo   Welcome to the Pov-Jedi academy, Jef... Unfortu...   Sep 12 2005, 05:52 AM
- - Jeff7   Next thing I need to figure out is how to get the ...   Sep 12 2005, 08:34 PM
|- - dilo   Great steady progress, Jeff! You last stitch s...   Sep 13 2005, 06:29 AM
|- - mhoward   QUOTE (dilo @ Sep 13 2005, 06:29 AM)Great ste...   Sep 13 2005, 01:12 PM
- - Jeff7   I got the scale command down - it was helpful to m...   Sep 13 2005, 12:16 PM
- - Jeff7   Yeah, I'm kind of thinking I'll reserve PO...   Sep 13 2005, 11:39 PM
- - dilo   Jeff, your axis identifications are absolutely cor...   Sep 14 2005, 04:51 AM


Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 16th December 2024 - 08:22 PM
RULES AND GUIDELINES
Please read the Forum Rules and Guidelines before posting.

IMAGE COPYRIGHT
Images posted on UnmannedSpaceflight.com may be copyrighted. Do not reproduce without permission. Read here for further information on space images and copyright.

OPINIONS AND MODERATION
Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators.
SUPPORT THE FORUM
Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member.