[GRASS-user] Scripting i.ortho.photo
Markus Neteler
neteler at osgeo.org
Thu Oct 16 03:45:28 EDT 2008
On Thu, Oct 16, 2008 at 9:20 AM, Andy Harfoot <ajph at geodata.soton.ac.uk> wrote:
> Hi there,
>
> I'm a GRASS newbie, and have been playing around with aerial photo
> orthorectification over the last few days. I have used i.ortho.photo to
> successfully process a frame, working my way through the menu system.
Great, good to know that it works.
> What I would like to know is whether it is possible to batch run the
> i.ortho.photo command - ie set up the parameters and control points for a
> number of images but actually rectify them in a job lot that can be left
> running overnight. I guess another way of phrasing this is to know whether
> the photo.rectify and associated photo. commands detailed in the reference
> manual can be called independently of the i.ortho.photo menu. I have tried
> running 'i.ortho.photo --script' but the output generated does not seem to
> give any further clues.
In theory it should be possible since all the menu stuff generates
a couple of ASCII files with reference points and so on. Since the
interactive classical monitor in GRASS 7 is demolished, we do need
some scripted (Python) approach to run the underlying algorithms.
The main program is i.ortho.photo which is just a menu driver for the
following programs:
1 i.group
2 photo.target
3 photo.init
4 photo.camera
5 photo.elev
6 photo.2image
7 photo.2target
8 photo.rectify
The general workflow of the i.ortho.photo algorithms is following
Paul R. Wolf, 1983: Elements of Photogrammetry, With Air Photo
Interpretation and Remote Sensing. 562 pages, McGraw Hill Text
2nd edition
(I bought this as used book for a few USD)
A former student of mine has tracked down implementation
details in the source code:
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/imagery/i.ortho.photo
-> alg_camera_position.txt
-> alg_photo_rectify.txt
Years ago I received Octave code which was implementing bundle block
adjustment on top of i.ortho.photo - so that was scripted as far as
I remember.
Some effort is needed... and appreciated.
Markus
More information about the grass-user
mailing list