I've had a look through the archives and I see that the options you
mention could indeed be very useful. What version of Hugin are these
likely to turn up in? I don't mind building from source but I'd like
to know which branch to get. Or should I just grab trunk?
> I'd try to load map into hugin and manually add control points to
> photos and corresponding parts of map. Then optimize with map set as
> anchor image. This would hopefully transform images to fit map
> directly in hugin. And for stitching I'de disable the map so it
> doesn't blend with photos by coincidence.
Yes, that's what I've been doing so far but I'm unable to stitch
together more than about 3 images before it significantly deviates (as
in ~20 ground distance) from the map. The tilt options should help
with this, even if they don't allow me to stitch any more together at
once but only allow the images to be more accurate. Really for our
purposes, accurately conforming to the ground truth is more important
than seamless blending or colour balance (though they would help).
--
Matt Williams
http://milliams.com
Sorry, this was confusing. This is a better explanation: Tie point are
measured between the images, Ground Control points are measured between
the image and some reference data (maps, gps traces, digital elevation
models, geodetic gps measurements etc.).
ciao
Pablo
0. Get and compile the current trunk of libpano13
4. Now you need to select which variables to optimize, using by adding
them to the v line in optimize.txt. I would try optimizing roll, pitch,
yaw and Tx, Ty, Ts for all but the first image. Run
$ PToptimizer optimize.txt
to perform the optimisation. Check the file to see some information
about the errors. Here some trial and error with different parameter
sets is probably needed.
Yes, I've been experimenting with using bundler for analysing the
camera positions but it's fairly undocumented so it'll be a while
before I can get it to work for me.
I'll also have a closer look at SBA. I've compiled the latest version
so I'll see what it can tell me.
> - Orthorectification can be done using open source remote sensing
> software packages such as http://www.ossim.org or
> http://www.orfeo-toolbox.org. However, these packages are mostly
> designed for handling commercial satellite and aerial imagery, and I'm
> not sure if the support a simple camera model.
I'll have a look at them to see if they can be of any use. Even if
they're not suitable for our purpose, I'm sure that I'll learn
something :)
> Then there is e-foto, which I have just downloaded as tried, but I
> didn't manage to do something useful with it.
Yes, I've got e-foto but I couldn't get it to do anything useful
either yet. It seems it's more of a research project and as such, it's
rather underdocumented (at least in English).
These steps seem to work fine for a set of about 3 or 4 images.
PTroller tried to create an output image which was well over 4 GB
large (before I stopped it) so I just had to use enblend instead. I'll
try with another set from the centre of the town where there should be
more overlapping images.
> If that works very well, one could maybe replace the first image with a
> larger OSM image and use that to define the plane to which the images
> should be projected. Control points between the photos and the OSM map
> could then be used for pinning the photos to the map (as mentioned, this
> will only work well for flat regions!)
> This might work up to a certain size, and probably best for regions near
> the equator if the default spherical mercator image is used.
> It is probably better to use an OSM map that has been projected to your
> local UTM Zone, as it has less distortions.
This is the method I had been using before, but obviously without the
Tilt parameters and so it really struggled.
I'll continue to play around with things since it would be nice to
have something to show (even if it's only a small satellite village's
worth) at the AGI GIS later this week.That is, after all, why
Stratford-upon-Avon was chosen.
Thanks a lot for all your suggestions. I think I'm going to have to
get a working group together within OSM to try to work on these
problems. This experiment with aerial photography will likely be
repeated again and so I feel it's worthwhile for us to create a strong
open source workflow for creating full stitched images.
I absolutely will. This won't be the last time that OSM hire a plane
for some aerial photography and so it's important that we find a
decent way of doing it.
The final images (like the source images) will be creative-commons
licensed and will be available to the public for tracing (or whatever)
so I'll be sure to update this list when I've got something
good-looking.
>> 0. Get and compile the current trunk of libpano13
>
> If you so happens to build panotools on windows, pls drop me a mail. (and
> I'll give this a try too)
Sorry, I'm on Linux. I found Panotools really quick and easy to build though.
>> 4. Now you need to select which variables to optimize, using by adding
>> them to the v line in optimize.txt. I would try optimizing roll, pitch,
>> yaw and Tx, Ty, Ts for all but the first image. Run
>> $ PToptimizer optimize.txt
>> to perform the optimisation. Check the file to see some information
>> about the errors. Here some trial and error with different parameter
>> sets is probably needed.
>
> I would think you should optimize for x(d), y(e), Tx, Ty, Tz and Ts. Yaw,
> pitch and roll would put the result off, as it is done though panorama
> center and not camera center.
Ok, I'll have a try with those parameters to see if it gives any
better results. I'm still getting used to the notations and parameters
used by Panotools so I'm pretty much going by what people suggest and
trial and error at the moment.
Matt Williams schreef:
> 2009/9/22 Oskar Sander <oskar....@gmail.com>:
>> Hi Matt,
>>
>> If you experiment on this further, it would be really sweet if you did a
>> tutorial writeup here even if it doesn't work out perfect right now.
>
> I absolutely will. This won't be the last time that OSM hire a plane
> for some aerial photography and so it's important that we find a
> decent way of doing it.
Thats why we got money for http://www.openstreetphoto.org/ see our blog:
http://blog.opengeo.nl/ We have two aircrafts and get two more, this
time 3 meter wide electro-gliders :)
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAkq42eAACgkQYH1+F2Rqwn1VaQCeNMnl08L9SyZTzM8zIkexmDCt
GaoAoIFiKZtVOpH4N7jW7Nl/eydxBoIw
=9oji
-----END PGP SIGNATURE-----
Hey Stefan. I was wondering when you might turn up. I guessed you
don't read tal...@osm.org but I knew you were working on stuff in
this area. From what I could tell, you haven't made much progress with
processing the images yet (although I do like the quadcopter thing
:D). If I'm mistaken or if you could be of help with the Stratford
Imagery it would be much appreciated. I haven't been able to find any
mailing list discussions of your work.
In the mean time, I've found that some people have started a project
based on Orfeo-toolbox for simplifying the workflow and it sounds like
it could be useful for our purpose, they even mention OpenStreetMap
(http://wiki.orfeo-toolbox.org/index.php/Monteverdi).
Perhaps we'd do well to take this discussion to an OSM list of some
kind (maybe 'photos@' or 'talk@')?
Matt Williams schreef:
> Hey Stefan. I was wondering when you might turn up.
I have posted bounties on this list for increasing documentation and for
features ;) So I turned up well before you ;)
> I guessed you
> don't read tal...@osm.org but I knew you were working on stuff in
> this area. From what I could tell, you haven't made much progress with
> processing the images yet (although I do like the quadcopter thing
> :D). If I'm mistaken or if you could be of help with the Stratford
> Imagery it would be much appreciated. I haven't been able to find any
> mailing list discussions of your work.
We did; we have a rectifying program, and like I posted before I was
pointed myself to efoto. From there on we can use qgis and mapserver for
final positioning. Come and idle in #osp on oftc ;)
> In the mean time, I've found that some people have started a project
> based on Orfeo-toolbox for simplifying the workflow and it sounds like
> it could be useful for our purpose, they even mention OpenStreetMap
> (http://wiki.orfeo-toolbox.org/index.php/Monteverdi).
I guess we should all focus on implementations that already exist?
> Perhaps we'd do well to take this discussion to an OSM list of some
> kind (maybe 'photos@' or 'talk@')?
Also a possibility.
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAkq5A0IACgkQYH1+F2Rqwn2APwCfczUDKoqrodPiNVdbp/H8kYar
mogAn0hnBJuWS3MZamAAXdPzFFlIrnpr
=ZbO+
-----END PGP SIGNATURE-----
> This is the method I had been using before, but obviously without the
> Tilt parameters and so it really struggled.
Actually, I played around a little, and I wasn't satisfied with the tilt
parameters, so changed libpano to allow estimate the X,Y and Z camera
position (assuming a planar earth). I still need to do some final
testing, but so far it doesn't look too bad.
> Thanks a lot for all your suggestions. I think I'm going to have to
> get a working group together within OSM to try to work on these
> problems. This experiment with aerial photography will likely be
> repeated again and so I feel it's worthwhile for us to create a strong
> open source workflow for creating full stitched images.
Please keep me updated. Where do you discuss these issues?
ciao
Pablo
I have played a little with the images, and from my perspective, it
would be more usable, if the camera with a wide angle lens (maybe 28 mm
instead of 50 mm) would be used especially for the nadir shots. Flying
at a higher altitude will probably also help.
They probably still have enough detail for mapping (you probably do not
need 5 cm ground resolution or so, 10 or 20 cm are probably enough to
recognize most details required for mapping.
At work, we have a full frame camera system ( 3xCanon EOS-1d) with 50 mm
lenses. Flying that at 1000m gives reasonable detail when looking
straight down and the imaged area is much larger than with your example
images, making them easier to handle.
ciao
Pablo
> We did; we have a rectifying program, and like I posted before I was
> pointed myself to efoto. From there on we can use qgis and mapserver for
> final positioning. Come and idle in #osp on oftc ;)
Do you have a procedure that works nicely for the large amount of image?
I couldn't find anything on http://www.openstreetphoto.org ?
ciao
Pablo
I see you've checked some of these changes into SVN, I've uncommented
the '#define MOSAIC_XYZ 1' line in adjust.c. Is there anything I need
to do elsewhere to allow it estimate these variables?
>> Thanks a lot for all your suggestions. I think I'm going to have to
>> get a working group together within OSM to try to work on these
>> problems. This experiment with aerial photography will likely be
>> repeated again and so I feel it's worthwhile for us to create a strong
>> open source workflow for creating full stitched images.
>
> Please keep me updated. Where do you discuss these issues?
Well, I only got involved in this a few days ago but Stefan de Konink
has been looking at this for a while now. As I understand it, most
discussion has gone on in the Dutch language list so far.
Ok. That's definitely something worth considering for the future. For
the shots you've seen, the camera was provided by whoever in the area
had a camera and free time for when the plane was booked. It's
possible we could obtain a higher quality camera as a community. I
guess Stefan won't want to spend his grant money on a camera that is
too heavy for a Quadcopter :)
No. With these you could just try to optimize y,p,r,Tx,Ty,Tz for all
images except the first one.
ciao
Pablo
There is a bug in panotools. Sometimes it does not optimize parameters
if they are exactly set to 0. This seems to affect the Tx, Ty and Tz
parameters as well (a,b,c parameters are the other parameter that suffer
from this).
So simply add Tx0.1 Ty0.1 Tz0.1 to "i" lines, except for the first one.
Note: the names of the Tx, Ty, Tz parameters are only valid with the
current svn and the MOSAIC_XYZ define in adjust.c. They will be
available under another name in the future (probably just X Y Z).
Here is the result of merging images 539-549 from
http://vps-1005786-1584.united-hoster.de/tmp/539-549.jpg
It is not referenced to an OSM map (too late in the evening...), but the
result looks very promising. It also shows that the sideward views are
probably not that helpful for mapping, at least when reprojecting them.
Quick procedure:
1. panomatic -o 539-549.pto *.jpg
2. hugin 539-549.pto
- set focal length to 50mm (~ HFOV 26°)
- open fast preview
- set projection to rectilinear,
- select hfov and vfov ~ 100
- show only the first image.
- use the drag tool to move the first image so that it roughly
looking like a nadir image
- select all images again
- Go to the optimizer tab, select (optimize y,p,r)
- tick "edit script"
- copy script into a text file 539.549.txt
- Edit script, add
Tx0.1 Ty0.1 Tz0.1 to "i" lines, except for the first one.
- modify the v lines to include Tx# Ty# Tz# (where # is the image
number)
- run PToptimizer 539-549.txt
- run PTmender -o 539-549 539-549.txt
- run PTroller -o 539-549.tif 539-5490*.tif
- crop 539-549.tif in your favorite image editor.
ciao
Pablo
Pablo d'Angelo schreef:
> Do you have a procedure that works nicely for the large amount of image?
Next to just adding them to Hugin and per photo stitching we don't have it.
But I saw your last email and I wonder:
How did you solve the altitude difference? Because we have many
problems with that. If in one flight different altitudes were flown
hugin really can't stitch it.
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAkq5UtYACgkQYH1+F2Rqwn2qmQCfTiYr4LxyjFtMO+HVa1em2Jw9
Lw0AnjryTx1OfjSylBBltgHSAh68yvIW
=VKWd
-----END PGP SIGNATURE-----
Go to http://78.46.66.234/jpeg1600/ and scroll down to image
DSC00539.jpg Pablo used DSC00539.jpg through to DSC00549.jpg to create
the image above. There are higher resolution versions at
http://78.46.66.234/jpeghigh/.
Dale Beams schreef:
> There is software out there for model RC planes that will allow you to
> use an altimeter and get a constant height with a gps combo It'll fly a
> grid pattern as well.
Yeah right, does that 'software out there' also stitch photo's taken
from different altitudes?
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAkq6HV8ACgkQYH1+F2Rqwn0/8gCfcv6MpQHZ65bSMypEsBLiKUGY
fjcAmQGe6HA6zZXgqIsnFfMdHpaGoeHY
=AxDZ
-----END PGP SIGNATURE-----
Dale Beams schreef:
> One doesn't need to take at different heights if your "locking" in your
> height from ground to plane. I live in the "Plains" and everything is flat.
Likewise here. But still if one blow of wind can take a quad copter
about 2 meters down. That *does* matter, optically.
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAkq6QP0ACgkQYH1+F2Rqwn2UhACbBiLfIQK8Oa37mz5xZOg5GSjt
2VYAn0HHSbWKUoMrUZ94ZclhBYyr4JRk
=ykDT
-----END PGP SIGNATURE-----
Works for me, I also found that I can successfully optimise lens
parameters:
http://www.flickr.com/photos/36383814@N00/3947727801/
..so when can we have this in Hugin? ;-)
--
Bruno
Bruno wrote:
> Works for me, I also found that I can successfully optimise lens
> parameters:
>
> http://www.flickr.com/photos/36383814@N00/3947727801/
>
> ..so when can we have this in Hugin? ;-)
It doesn't make sense to add these the the trunk, as it would complicate
the merging of layout. I'll looking into adding them to the layout branch.
Btw is there a list of issues in the tracker (or somewhere else) for the
problems in the layout branch?
ciao
Pablo
Sorry, I only tried Pablo's modified version.
>Could you post the script so I can try it? Thanks!
I think I put all the photos and the script here:
http://bugbear.postle.net/~bruno/misc/DSC00169-DSC00184.zip
This is quite an extreme example, I deliberately took photos from
lots of different angles and distances.
>> Works for me, I also found that I can successfully optimise lens
>> parameters:
>> http://www.flickr.com/photos/36383814@N00/3947727801/
--
Bruno
Oskar Sander schrieb:
> Thanks, I see. So the method was to take one shot as straight down as
> possible and then to take consecutive shots panning out towards the
> horizon perpendicular to the flightpath, and then repeat that procedure
> from the downward view, right?
Looks like it, but it doesn't seem to be the very best option. I'd liked
to have more nadir shots and with a wide angle lens.
So for your diving activities, better look straight down, and swim as
high as possible over the area of interest (which is probably hard,
given visibility constraints).
> I think the result looks really nice Pablo!
>
> It would be really interesting if the result continue to come out as
> nice if some more pic in the flightpath (= even more x & y camera shift)
> are included in the project like with adding these pictures.
> DSC00554-555
> 558-559-560
> 562-563-564
I have done some experiments and added support for XYZ into the
gsoc2008_layout branch (not commited yet, as the variable names in
libpano13 will change soon, I hope).
Here are the results of using the above images and aligning it onto an
OSM map image. It took some efforts to selecting the right control
points between the map and the images. I also used many straight line
control points, as it is hard to measure the position of an single point
precisely.
Results:
Mosaic (4800x6400 pixels):
http://vps-1005786-1584.united-hoster.de/tmp/osm_mosaic/with_manual_control_merged.jpg
Mosaic blended with map (4800x6400 pixels):
http://vps-1005786-1584.united-hoster.de/tmp/osm_mosaic/with_manual_control_merged_overlay.jpg
source data with hugin projects and control points:
http://vps-1005786-1584.united-hoster.de/tmp/osm_mosaic/osm_aerial_mosaic.zip
This is probably a good test case to compare the XYZ model with the tilt
model.
ciao
Pablo
The good news is that TiX, TiY, TiZ is *very promising*.
The bad news is that the process is extremely dependent on having all
CPs on a single plane - just the relief on the brick walls I shot seems
to be enough to generate significant error. The best I got it down was
around RMS 6, although at one attempt I even got to RMS 4.
Bruno Postle wrote:
> On Wed 23-Sep-2009 at 00:37 +0200, Pablo d'Angelo wrote:
>> Quick procedure:
>>
>> 1. panomatic -o 539-549.pto *.jpg
lots of CPs to prune after this stage. I guess I am better off with
manually setting them. Do I understand correctly that if I use a
calibrated lens and optimize only for y,p,r,TiX,TiY,TiZ I need six CPs
per image pair?
>> 2. hugin 539-549.pto
>> - set focal length to 50mm (~ HFOV 26°)
I guess this is specific to the 539-549 project? I left the focal length
from EXIF.
>> - open fast preview
>> - set projection to rectilinear,
>> - select hfov and vfov ~ 100
>> - show only the first image.
>> - use the drag tool to move the first image so that it roughly
>> looking like a nadir image
I moved the middle image in my sequence to be the first image on the
list; and then I moved it down to the nadir by editing the pitch value
in the Images tab.
When I was using rectilinear projection in the rest of the process, it
would only render a part of the image. I ended up setting projection to
equirect HFOV360 VFOV180.
>> - select all images again
>> - Go to the optimizer tab, select (optimize y,p,r)
>> - tick "edit script"
>> - copy script into a text file 539.549.txt
>> - Edit script, add
>> Tx0.1 Ty0.1 Tz0.1 to "i" lines, except for the first one.
>> - modify the v lines to include Tx# Ty# Tz# (where # is the image
>> number)
>> - run PToptimizer 539-549.txt
>> - run PTmender -o 539-549 539-549.txt
>> - run PTroller -o 539-549.tif 539-5490*.tif
done everything as above. then I loaded the resuting equirect in Hugin.
The image is on the nadir. I reprojected it to rectilinear and set the
appropriate view. Because it is quite long I get some distorsion at the
extremes (and the rectilinear needs to be projected on 150°).
maybe I should have set a longer focal length / smaller HFOV at step 2
instead of using the EXIF, to "simulate" more distance from the sphere
and thus get a longer panorama within a reasonable HFOV for the
rectilinear projection?
> Works for me, I also found that I can successfully optimise lens
> parameters:
I also tried with optimizing lens parameters. a/b/c work. I did not try
to optimize FOV (v?). When I tried to optimize d and e I got the btter
RMS but the images where very much shifted.
> ..so when can we have this in Hugin? ;-)
I guess the answer is: when the layout branch is merged to trunk. what
is its status?
Yuv
Actually, the camera was ok, but maybe just use a wider angle lens and
do mostly downward looking shots, and fly higher, if possible.
Flying higher will also make the mosaicing and interpretation of the
pictures easier.
Btw. real aerial cameras (for example. UltraCam
http://www.microsoft.com/ultracam/default.mspx ), as used by the mapping
agencies, are probably 50 to 100 times as expensive as a Canon EOS 1D
something.
ciao
Pablo