Hugin not stitching well with fisheye lens???

185 views
Skip to first unread message

jiang...@gmail.com

unread,
Sep 5, 2018, 4:55:35 PM9/5/18
to hugin and other free panoramic software
Hello all, 

I have 4 pictures taken using canon 5d mark ii and 8mm fisyeye lens. files can be found here, https://drive.google.com/drive/folders/1HpG0k7f9Zg8L-W3fuVrItYqtvZpLNRgY?usp=sharing

I followed the simple steps on hugin, but the final output looks awful. 

IMG_0429 - IMG_0432.jpg















In contrast, ptgui has no major issues at all.
IMG_0429 Panorama.jpg














Can anyone help and tell me what I was doing wrong? and how can I improve the quality?


Thanks a lot in advance!!!

Greg 'groggy' Lehey

unread,
Sep 6, 2018, 1:12:04 AM9/6/18
to hugi...@googlegroups.com
On Wednesday, 5 September 2018 at 12:43:40 -0700, jiang...@gmail.com wrote:
On Wednesday, 5 September 2018 at 12:55:36 -0700, jiang...@gmail.com wrote:

Once is enough,especially since you included relatively large images
(for email). It would have been better to put all the images on your
Google Drive page.

> I have 4 pictures taken using canon 5d mark ii and 8mm fisyeye lens. files
> can be found
> here, https://drive.google.com/drive/folders/1HpG0k7f9Zg8L-W3fuVrItYqtvZpLNRgY?usp=sharing
>
> I followed the simple steps on hugin, but the final output looks awful.
>
> [image: IMG_0429 - IMG_0432.jpg] <about:invalid#zClosurez>

Indeed, this is not good. I've put a copy at
http://www.lemis.com/grog/Photos/20180906/small/IMG_0429---IMG_0432.jpeg
for anybody who is interested in checking.

> In contrast, ptgui has no major issues at all.
> [image: IMG_0429 Panorama.jpg] <about:invalid#zClosurez>

This is better, but still not good. Copy at
http://www.lemis.com/grog/Photos/20180906/small/IMG_0429-Panorama.jpeg.
There are clear discontinuities round the frame of the “Chicago"
poster on the left.

> Can anyone help and tell me what I was doing wrong? and how can I
> improve the quality?

This is really very puzzling. I downloaded the images and stitched
them. I expected problems, and I got them. But they were in no way
related to your problems. Some look like Hugin bugs:

1. The Exif data clearly show:

File IMG_0429.JPG
Date taken: Friday, 24 August 2018, 21:12:58
Exposure: 1/4 sec, f/4.0 (EV 6.0), 29/640 ISO
Camera: Canon Canon EOS 5D Mark II
Lens: Canon EF 8-15mm f/4L Fisheye USM
Focal length: 8.0 mm (full frame equivalent: 8 mm)

But Hugin still asks for a crop factor. That shouldn't be
necessary. I put in 1, of course. Did you? That might be part
of the problem.

2. I set "circular fisheye" in the Assistant, and it located control
points relatively well, a maximum error of 4.6. But the fast
panorama preview looked terrible, full of black:
http://www.lemis.com/grog/Photos/20180906/Hugin-1.png. I tried a
normal panorama preview and got the same thing.

3. I stitched the panorama anyway, and got a panorama still with
black areas, but not nearly as much:
http://www.lemis.com/grog/Photos/20180906/small/IMG_0429-IMG_0432-2.jpeg

4. The disturbance was clearly related to the panorama head reaching
into the image, so I masked that off. And then, without any
further problems, I was able to stitch a reasonable panorama:
http://www.lemis.com/grog/Photos/20180906/small/IMG_0429-IMG_0432.jpeg.
Clearly it needs cropping, but I deliberately didn't do so.

All of these images are available at
http://www.lemis.com/grog/photos/Photos.php?dirdate=20180906

I can't see any discontinuities in the final panorama, and I did
absolutely nothing to avoid them. So I'm really puzzled how you ended
up with such poor results. The project file is at
http://www.lemis.com/grog/Photos/20180906/IMG_0429-IMG_0432.pto. Try
it and see what you get.

TO HUGIN DEVELOPERS: It seems to me that there are bugs involved here,
possibly relating to circular fisheye lenses. I take photos with full
frame fisheyes on a regular basis, and though I have issues that may
be related (and which I will report when I have investigated
sufficiently), I have never seen anything like this. In particular
the lack of recognition of the field of view and the the initial
panorama previews look like bugs to me.

Greg
--
Sent from my desktop computer.
Finger groo...@gmail.com for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed. If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA
signature.asc

panostar

unread,
Sep 6, 2018, 5:40:56 AM9/6/18
to hugin and other free panoramic software
You would do better to set the zoom to 12mm. At 8mm, you waste half of the available pixels on black space surrounding the image circle.  At 12mm, you still get full 180 degree coverage vertically and perfectly adequate overlap horizontally. Furthermore, you then don't include the black bit of the panorama head on the right hand side.  Much simpler and better all round.  On occasion, you might want more overlap for one reason or another, but 12mm is generally satisfactory.  It's equivalent to what people get with the Sigma 8mm on their APS-C cameras.

John

jiang...@gmail.com

unread,
Sep 6, 2018, 10:05:37 AM9/6/18
to hugin and other free panoramic software


On Thursday, September 6, 2018 at 12:12:04 AM UTC-5, Groogle wrote:
On Wednesday,  5 September 2018 at 12:43:40 -0700, jiang...@gmail.com wrote:
On Wednesday,  5 September 2018 at 12:55:36 -0700, jiang...@gmail.com wrote:

Once is enough,especially since you included relatively large images
(for email).  It would have been better to put all the images on your
Google Drive page.
 
I posted it once but didn't see it on the website, so posted it again. I realized the post has to be approved after the second try. 
        Yeah, I selected circular fisheye and put 1 for crop factor. 
 
2.  I set "circular fisheye" in the Assistant, and it located control
    points relatively well, a maximum error of 4.6.  But the fast
    panorama preview looked terrible, full of black:
    http://www.lemis.com/grog/Photos/20180906/Hugin-1.png.  I tried a
    normal panorama preview and got the same thing.

        I even manually added couple control points myself, but preview still looks terrible. 
        I thought it might be showing me pre-blending image, so I decided to stitch it anyway.
        
3.  I stitched the panorama anyway, and got a panorama still with
    black areas, but not nearly as much:
    http://www.lemis.com/grog/Photos/20180906/small/IMG_0429-IMG_0432-2.jpeg

4.  The disturbance was clearly related to the panorama head reaching
    into the image, so I masked that off.  And then, without any
    further problems, I was able to stitch a reasonable panorama:
    http://www.lemis.com/grog/Photos/20180906/small/IMG_0429-IMG_0432.jpeg.
    Clearly it needs cropping, but I deliberately didn't do so.

        I did crop all the pics, and I the areas left are the same as ptgui. which left the pano head IN.
        I will try it again to left those out. and I will let you know how it goes.

All of these images are available at
http://www.lemis.com/grog/photos/Photos.php?dirdate=20180906

I can't see any discontinuities in the final panorama, and I did
absolutely nothing to avoid them.  So I'm really puzzled how you ended
up with such poor results.  The project file is at
http://www.lemis.com/grog/Photos/20180906/IMG_0429-IMG_0432.pto.  Try
it and see what you get.

TO HUGIN DEVELOPERS: It seems to me that there are bugs involved here,
possibly relating to circular fisheye lenses.  I take photos with full
frame fisheyes on a regular basis, and though I have issues that may
be related (and which I will report when I have investigated
sufficiently), I have never seen anything like this.  In particular
the lack of recognition of the field of view and the the initial
panorama previews look like bugs to me.

Greg 
--
Sent from my desktop computer.
Finger groo...@gmail.com for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA


Thank you very much Greg! 

JJ  

jiang...@gmail.com

unread,
Sep 6, 2018, 10:09:49 AM9/6/18
to hugin and other free panoramic software


On Thursday, September 6, 2018 at 4:40:56 AM UTC-5, panostar wrote:
You would do better to set the zoom to 12mm. At 8mm, you waste half of the available pixels on black space surrounding the image circle.  At 12mm, you still get full 180 degree coverage vertically and perfectly adequate overlap horizontally. Furthermore, you then don't include the black bit of the panorama head on the right hand side.  Much simpler and better all round.  On occasion, you might want more overlap for one reason or another, but 12mm is generally satisfactory.  It's equivalent to what people get with the Sigma 8mm on their APS-C cameras.

John

I didn't want the pano head in the shots, but I wasn't able the remove it with 8mm no matter how i position the camera. 
I will try the setting you suggested, and let you know how it goes! 


Thanks a lot John!!! 

JJ

jiang...@gmail.com

unread,
Sep 6, 2018, 11:37:22 AM9/6/18
to hugin and other free panoramic software
Just a follow up on the previous discussion. I have tried 3 different methods this morning.
  1. crop without masks (exactly the same as original post), quality is still bad as expected.
  2. crop with masks, the output is bad as well.
  3. masks without crop (from Greg's pto file), the output is not bad (same as Greg's), but it still looks bad in hugin preview.
Another weird thing is that Hugin automatically filled out the lens info correctly, it also figured out the correct crop area, which I have to manually to them before.

T. Modes

unread,
Sep 6, 2018, 11:58:30 AM9/6/18
to hugin and other free panoramic software
Hi Greg,

Am Donnerstag, 6. September 2018 07:12:04 UTC+2 schrieb Groogle:
TO HUGIN DEVELOPERS: It seems to me that there are bugs involved here,
possibly relating to circular fisheye lenses.  I take photos with full
frame fisheyes on a regular basis, and though I have issues that may
be related (and which I will report when I have investigated
sufficiently), I have never seen anything like this.  In particular
the lack of recognition of the field of view and the the initial
panorama previews look like bugs to me.

The first one is due to the check of plausibility of the EXIF data. This was too hard. I relaxed the check.
The second one is no bug. If you don't crop the black border, this is was you get - GIGO.

(Using the crop has the advantage that the crop is remembered when you stitch a project and then loaded automatically when you load images from the same lens the next time.)

Thomas

T. Modes

unread,
Sep 6, 2018, 12:00:11 PM9/6/18
to hugin and other free panoramic software


Am Donnerstag, 6. September 2018 17:37:22 UTC+2 schrieb jiang...@gmail.com:
Another weird thing is that Hugin automatically filled out the lens info correctly, it also figured out the correct crop area, which I have to manually to them before.

Nothing weird here. This is exactly what Hugin should done. The lens settings are saved in a database when you stitch a pano. When you now add images to a new project the settings are read from the database.

Thomas

jiang...@gmail.com

unread,
Sep 6, 2018, 12:15:03 PM9/6/18
to hugin and other free panoramic software
ok, good to know! 

but I still have a question. saved to the database meaning saved to my computer? if so, I have loaded and stitched those photos for like a dozen times already, how come it doesn't recognize them before?

JJ

T. Modes

unread,
Sep 6, 2018, 1:24:57 PM9/6/18
to hugin and other free panoramic software


Am Donnerstag, 6. September 2018 18:15:03 UTC+2 schrieb jiang...@gmail.com:
but I still have a question. saved to the database meaning saved to my computer?
Yes.
 
if so, I have loaded and stitched those photos for like a dozen times already, how come it doesn't recognize them before?
Before saving there are some checks done to prevent storing obviously wrong values. So maybe the checks failed in the first runs.
Or when you tested without crop then the crop information was removed from the db.

jiang...@gmail.com

unread,
Sep 6, 2018, 2:50:48 PM9/6/18
to hugin and other free panoramic software
Great! Thanks a lot for the explanation!

jiang...@gmail.com

unread,
Sep 6, 2018, 5:32:21 PM9/6/18
to hugin and other free panoramic software
Hello John, 

I took several photos (same aperture, shutter speed, iso, and focal length) with 12mm and removed the pano head from the image, but the final result is still bad (also tried ptgui, no major issues). I documented the entire process, if you or Greg can kindly point out where went wrong. 
the source photos, pto file, and output can be found here, https://drive.google.com/drive/folders/10MhXtkNvzohYmO1H4nupXjYbOtMUEP3u?usp=sharing

Thanks a lot in advance!!!

1.JPG

3.JPG

4.JPG

5.JPG

6.JPG



On Thursday, September 6, 2018 at 4:40:56 AM UTC-5, panostar wrote:
Message has been deleted

panostar

unread,
Sep 6, 2018, 6:46:28 PM9/6/18
to hugin and other free panoramic software


On Thursday, September 6, 2018 at 10:32:21 PM UTC+1, jiang...@gmail.com wrote:
Hello John, 

I took several photos (same aperture, shutter speed, iso, and focal length) with 12mm and removed the pano head from the image, but the final result is still bad (also tried ptgui, no major issues). I documented the entire process, if you or Greg can kindly point out where went wrong.

You should set the lens type as circular fisheye and set the crop circle just inside the edge of the image circle in the images. I added two vertical line control points on the edges of one wall to level the panorama. The project file and small panorama are attached.

John 
IMG_0451 - IMG_0454.pto
jiang.jpg

jiang...@gmail.com

unread,
Sep 6, 2018, 7:12:03 PM9/6/18
to hugin and other free panoramic software
Got it!!! Thanks!!!

I thought in the simple interface, hugin was going to crop them for me, guess i was wrong. Thanks again!

Greg 'groggy' Lehey

unread,
Sep 9, 2018, 4:22:30 AM9/9/18
to hugi...@googlegroups.com
On Thursday, 6 September 2018 at 8:58:30 -0700, T. Modes wrote:
> Hi Greg,
> Am Donnerstag, 6. September 2018 07:12:04 UTC+2 schrieb Groogle:
>>
>> TO HUGIN DEVELOPERS: It seems to me that there are bugs involved here,
>> possibly relating to circular fisheye lenses. I take photos with full
>> frame fisheyes on a regular basis, and though I have issues that may
>> be related (and which I will report when I have investigated
>> sufficiently), I have never seen anything like this. In particular
>> the lack of recognition of the field of view and the the initial
>> panorama previews look like bugs to me.
>
> The first one is due to the check of plausibility of the EXIF data. This
> was too hard. I relaxed the check.

What was the issue? The Exif data looked fine to me.

> The second one is no bug. If you don't crop the black border, this is was
> you get - GIGO.

This has nothing to do with the border. Did you check the images to
which I referred? They're completely wrong, nothing like the stitched
result.

> (Using the crop has the advantage that the crop is remembered when
> you stitch a project and then loaded automatically when you load
> images from the same lens the next time.)

There seems to be a discontinuity here. I crop completed panos, not
individual images. Are you talking about the latter?
signature.asc

T. Modes

unread,
Sep 9, 2018, 5:12:33 AM9/9/18
to hugin and other free panoramic software


Am Sonntag, 9. September 2018 10:22:30 UTC+2 schrieb Groogle:
> The first one is due to the check of plausibility of the EXIF data. This
> was too hard. I relaxed the check.

What was the issue?  The Exif data looked fine to me.
The EXIF data were fine. But Hugin does some checks for plausibility instead of blindly trusty them. This check was to hard - as I already wrote. It did also reject valid data. Now the check is relaxed.

> The second one is no bug. If you don't crop the black border, this is was
> you get - GIGO.

This has nothing to do with the border.  Did you check the images to
which I referred?  They're completely wrong, nothing like the stitched
result.
It did test with the images. These (input) images clearly need a crop - the black border needs to be cropped, because the image circle does not cover the full sensor/image. Otherwise the black border is also used for the calculations. And this crop is saved in the database. This has nothing to do with crop of the final panorama - these are 2 different things.
With these images you need to set the lens projection to circular fisheye and crop all images to the image circle. When you then run the assistant the preview looks fine. (Without cropping the preview gets the big black areas you observed.)


> (Using the crop has the advantage that the crop is remembered when
> you stitch a project and then loaded automatically when you load
> images from the same lens the next time.)

There seems to be a discontinuity here.  I crop completed panos, not
individual images.  Are you talking about the latter?
Yes, see above.

Reply all
Reply to author
Forward
0 new messages