## Re: [PanoTools-devel] control points

 Re: [PanoTools-devel] control points From: Igor Tuphanov - 2010-01-31 23:54:06 Attachments: Message as HTML ```Thanks for the tip, Chris. I'll get to it. Btw, if you do plan on rectifying a non planar surface > without a Digital Elevation Model, I'd be interested in hearing how. > No, that will be a plane surface. If we would talk about non-plane surfaces, I guess we'd need a pair of images to reconstruct the surface shape. ```

 [PanoTools-devel] control points From: Igor Tuphanov - 2010-01-31 08:12:02 Attachments: Message as HTML ```I've thought of using libpano for rectification of sea images. We have a perspective image of some area and want to rectify it to easily put on maps and so on. The way to determine angles of a shot, is to take it directly from a camera, or use ground control point, witch can be seen on the picture. If we know GPS coordinates of such ground control points, we can make an equations and after that make optimization like libpano does. But, using libpano for this look not easy, cause in libpano we should have a pairs of control points and mark it as weather vertical or horizontal. What do you think, would it be difficult to use libpano for such mention of control points? Do I understand libpano's control points correct? ```
 Re: [PanoTools-devel] control points From: Chris Gat - 2010-01-31 17:08:45 ```Hey Igor, you might be interested in a program developed by Javier Corripio that does something like this, expect for Mountain/glaciers with Digital Elevation Models. You can find a list of his publications here, http://www.uibk.ac.at/geographie/personal/corripio/publications.html . The paper, "Snow surface albedo estimation using terrestrial photography" gives a description of the technique. If the surface you a photographing is planar (flat sea bed) that would simplify the problem a lot. Create manual control points between a map and the image. You can rotate planes by optimizing the variables TrX TrY TrZ (I also help developed another way of doing this if your are interested). Search the list for "mosaic mode" "TrX", "planar" for more details. Btw, if you do plan on rectifying a non planar surface without a Digital Elevation Model, I'd be interested in hearing how. Thanks, Chris 2010/1/31 Igor Tuphanov : > I've thought of using libpano for rectification of sea images. > > We have a perspective image of some area and want to rectify it to easily > put on maps and so on. The way to determine angles of a shot, is to take it > directly from a camera, or use ground control point, witch can be seen on > the picture. If we know GPS coordinates of such ground control points, we > can make an equations and after that make optimization like libpano does. > > But, using libpano for this look not easy, cause in libpano we should have a > pairs of control points and mark it as weather vertical or horizontal. > > What do you think, would it be difficult to use libpano for such mention of > control points? Do I understand libpano's control points correct? > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > PanoTools-devel mailing list > PanoTools-devel@... > https://lists.sourceforge.net/lists/listinfo/panotools-devel > > ```
 Re: [PanoTools-devel] control points From: Igor Tuphanov - 2010-01-31 23:54:06 Attachments: Message as HTML ```Thanks for the tip, Chris. I'll get to it. Btw, if you do plan on rectifying a non planar surface > without a Digital Elevation Model, I'd be interested in hearing how. > No, that will be a plane surface. If we would talk about non-plane surfaces, I guess we'd need a pair of images to reconstruct the surface shape. ```
 Re: [PanoTools-devel] control points From: Thomas Sharpless - 2010-01-31 19:18:33 Attachments: Message as HTML ```Hi Igor 2010/1/31 Igor Tuphanov > I've thought of using libpano for rectification of sea images. > > We have a perspective image of some area and want to rectify it to easily > put on maps and so on. The way to determine angles of a shot, is to take it > directly from a camera, or use ground control point, witch can be seen on > the picture. If we know GPS coordinates of such ground control points, we > can make an equations and after that make optimization like libpano does. > > But, using libpano for this look not easy, cause in libpano we should have > a pairs of control points and mark it as weather vertical or horizontal. > > What do you think, would it be difficult to use libpano for such mention of > control points? Do I understand libpano's control points correct? > I don't think there is any need here for control point pairs of the kind used in stitching panoramas. Their purpose is to determine the unknown transformations relating multiple images. Once those transformations are determined, the control points have no part in the actual image warping. You have a single image and already know (or can calculate) the transformation you need. So it is only a question of whether you can use PanoTools to apply that transformation. It sounds as if the transformation you need is just a perspective remapping to change the apparent angle of view to vertical. PanoTools can do that easily, given rotation angles around the X and Y axes. There is a tool among the PT Photoshop plugins whose job is exactly that, I think its name is Perspective. Of course if you own Photoshop you could just as well use its own perspective tool, so I'm assuming you don't. In that case you have to learn how to write a script for PTMender (the image warping engine) that will make it do what you need. The script format is primitive, but intelligible once you know the meanings of the symbols. I am not expert in such scripting, but I think you need to specify the rectilinear projection (code 0) for both source and destination images, and give the rotations around X and Y as the pitch ( 'p' ) and yaw ('y' ) parameters. Of course you put image sizes, file names, etc. in the script too. If you need to correct radial distortion in the lens, PT has a mechanism for that, in the form of a 4th order polynomial (a little different from the ones common in photogrammetry but usable). Its coefficients are the 'a', 'b', and 'c' parameters. For manual use it is recommended to leave 'a' and 'c' at zero,and use 'b' to correct the 'barrel' or 'pincushion' distortion. If you can measure it. You should find some guidance to PT scripts at the Panotools.org wiki, though there is no complete manual. It is quite convenient to run the command line PanoTools from Perl or Python scripts, in case you want to combine calculating the transformation with executing it. There is a nice collection of Bruno Postle's Perl scripts at http://search.cpan.org/~bpostle/Panotools-Script-0.24/. If you have any luck, let us see some results. Regards, Tom > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > PanoTools-devel mailing list > PanoTools-devel@... > https://lists.sourceforge.net/lists/listinfo/panotools-devel > > ```