[350b2] Problem with rotated fisheye images  

This forum is dedicated to Autopano Pro / Giga bug reports and features discussion.
Please read the posting rules before starting a topic!
User avatar
DrSlony
Moderator
 
Posts: 1874
Joined: Sat Nov 03, 2007 6:30 pm
Location: Sweden

[350b2] Problem with rotated fisheye images

by DrSlony » Sat Mar 01, 2014 1:29 pm

I still need to confirm this, but so far it looks like APG has a problem with fisheye images which were rotated from portrait to landscape. After running "local geometry analysis" the control points are completely wrong, there is nothing remotely similar between any of them. I've reproduced this in most of my panoramas, and the thing these zenith shots have in common is that they were rotated from portrait to landscape.

If I add CPs manually and then optimize, it's fine.
Attachments
scrot_2014-03-01 132912.png

User avatar
AntoineM
Kolor Team
 
Posts: 69
Joined: Sun Apr 21, 2013 6:43 pm

Re: [350b2] Problem with rotated fisheye images

by AntoineM » Sat Mar 01, 2014 2:59 pm

Hi DrSlony,
Thank you for your report, I am going to work on it.
It would help if I could download a pair of affected pictures like the one in your screenshot.
Best regards,
Antoine

User avatar
DrSlony
Moderator
 
Posts: 1874
Joined: Sat Nov 03, 2007 6:30 pm
Location: Sweden

Re: [350b2] Problem with rotated fisheye images

by DrSlony » Sat Mar 01, 2014 4:45 pm

The problem might be this: the original shot was of the zenith and my camera decided to call it portrait, then I rotated it when developing the raw to TIFF in RawTherapee which set the Exif tag "Orientation" to "Horizontal (normal)", but the MakerNotes still say that "Rotation" is "Rotate 270 CW". My guess is APG relies on that in the CP code but not in the preview code, and you get what you see in the screenshot.

Exiv2 doesn't find anything, but ExifTool found this in the original PEF:
Code: Select all
[EXIF]          Orientation                     : Rotate 270 CW
[MakerNotes]    Rotation                        : Rotate 270 CW

then this in the not-rotated TIFF:
Code: Select all
[EXIF]          Orientation                     : Horizontal (normal)
[MakerNotes]    Rotation                        : Rotate 270 CW

and this in the rotated TIFF:
Code: Select all
[EXIF]          Orientation                     : Horizontal (normal)
[MakerNotes]    Rotation                        : Rotate 270 CW


Upload on it's way...
Last edited by DrSlony on Sat Mar 01, 2014 5:07 pm, edited 2 times in total.

User avatar
DrSlony
Moderator
 
Posts: 1874
Joined: Sat Nov 03, 2007 6:30 pm
Location: Sweden

Re: [350b2] Problem with rotated fisheye images

by DrSlony » Sat Mar 01, 2014 5:05 pm

Directions to reproduce:
1- Create a group with the first four images, detect.
2- Open the panorama in the Panorama Editor window.
3- In the Layers tab, add the fifth image.
4- Move it roughly into place.
5- Using the CPE, right-click on it, Local Geometric Analysis.
6- Check the links, completely wrong CPs.

I tried converting to JPEG so I wouldn't have to upload so much, but I couldn't reproduce it there.

btw. "Local geometry Analysis", don't capitalize "analysis" ;]

User avatar
DrSlony
Moderator
 
Posts: 1874
Joined: Sat Nov 03, 2007 6:30 pm
Location: Sweden

Re: [350b2] Problem with rotated fisheye images

by DrSlony » Sat Mar 01, 2014 5:09 pm

Uploading drslony_CPbug_topic21676.7z

User avatar
AntoineM
Kolor Team
 
Posts: 69
Joined: Sun Apr 21, 2013 6:43 pm

Re: [350b2] Problem with rotated fisheye images

by AntoineM » Mon Mar 03, 2014 4:58 pm

Hi DrSlony,
Thank you for all this information.
I didn't find problem with EXIF interpretation but I think I got it.
When you move roughly the fifth image, you also have to rotate it (roughly) to the right orientation.
The position and the orientation are both used by the local geometry analysis to compute the overlap between the fifth image and each of the other ones, and matches will only be searched in overlapping parts.
If overlapping parts are not correct, APG will more often find bad matches than nothing.

I join 4 images:
1) I move the fifth image without rotating it
2) I click Local geometry analysis and get 4 bad links (just like in your screenshot)
3) I move the fifth image + rotate it properly
4) I click Local geometry analysis and now get 4 good links

Best regards,
Antoine
Attachments
3.png
2.png
1.png

User avatar
AntoineM
Kolor Team
 
Posts: 69
Joined: Sun Apr 21, 2013 6:43 pm

Re: [350b2] Problem with rotated fisheye images

by AntoineM » Mon Mar 03, 2014 5:00 pm

last attachment:
Attachments
4.png

User avatar
DrSlony
Moderator
 
Posts: 1874
Joined: Sat Nov 03, 2007 6:30 pm
Location: Sweden

Re: [350b2] Problem with rotated fisheye images

by DrSlony » Mon Mar 03, 2014 7:58 pm

Hello

Thank you for taking a look.
I figured out that I need to rotate the image more-or-less into place before running LGA. However, because those control points when you don't rotate it are completely wrong, every single one, do you think there is a bug here?

User avatar
AntoineM
Kolor Team
 
Posts: 69
Joined: Sun Apr 21, 2013 6:43 pm

Re: [350b2] Problem with rotated fisheye images

by AntoineM » Mon Mar 03, 2014 9:04 pm

Actually it is not a bug but more a threshold problem.
In the context of a local geometric analysis, the decision of matching two points of the compared images is very permissive because it trusts the fact that the images are overlapping.
Thus, the input of the following filtering aiming to find a geometrically consistent sub-set of matches is tens of thousands of candidate matches.
This filtering (and particularely the method "Spherical" used by default for fisheye images) often succeeds in finding a consistent sub-set of completely wrong matches...
We could decrease the threshold of this filtering but it then could fail on fisheye images with higher distortion, unusual FOV or shifted viewpoint.
The best option is certainly considering to be less permissive during the matching process but it is not as simple as decreasing a threshold because there is no absolute threshold for the visual similarity between two points...

User avatar
DrSlony
Moderator
 
Posts: 1874
Joined: Sat Nov 03, 2007 6:30 pm
Location: Sweden

Re: [350b2] Problem with rotated fisheye images

by DrSlony » Mon Mar 03, 2014 10:30 pm

That makes perfect sense and explains it well, thank you.
I checked the documentation now and it does indeed say that it searches overlapping images, I didn't know that it only searched overlapping areas of those images. No problem rotating it, now that I know :]

Oh, I do have one more question. My fisheye shots are usually detected as having a FOV of about 172 degrees. When I add new ones, they are set to 180 degrees. Is it recommended to change that (in the Layers panel) to 172, or can I just leave it at 180 and run Geometric Analysis?

User avatar
AntoineM
Kolor Team
 
Posts: 69
Joined: Sun Apr 21, 2013 6:43 pm

Re: [350b2] Problem with rotated fisheye images

by AntoineM » Tue Mar 04, 2014 9:20 am

No, you don't need to change the FOV manually. It's value is not used during detection (exept for computing overlaps but it does not need to be accurate at all)
And then, when you will run a quick optim, the very first action of the optimizer will be to set the FOV of the new image to the same value than the others (unless you set the focal scope to "image").

User avatar
DrSlony
Moderator
 
Posts: 1874
Joined: Sat Nov 03, 2007 6:30 pm
Location: Sweden

Re: [350b2] Problem with rotated fisheye images

by DrSlony » Tue Mar 04, 2014 12:56 pm

Great! Thanks again.


Return to Autopano bug & discussion

Who is online

Users browsing this forum: No registered users and 1 guest