[ptx] [ hugin-Feature Requests-978224 ] computing of barrel distortion

SourceForge.net noreply at sourceforge.net
Thu Mar 31 11:35:36 BST 2005


Feature Requests item #978224, was opened at 2004-06-23 15:41
Message generated for change (Comment added) made by sbrabec
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=550444&aid=978224&group_id=77506

Category: None
Group: None
Status: Closed
Priority: 1
Submitted By: Stanislav Brabec (sbrabec)
Assigned to: Nobody/Anonymous (nobody)
Summary: computing of barrel distortion

Initial Comment:
Looking at GUI, it seems, that user has to add focal
length/crop factor, lenses type and barrel distortion.

I am not an expert on this type of mathematics, but
IMHO it should be possible to compute lenses barrel
distortion from following sourcs:

- lenses type and angle of view
- coordinates comparison of three well positioned
control points on two neighbour images.

----------------------------------------------------------------------

>Comment By: Stanislav Brabec (sbrabec)
Date: 2005-03-31 12:35

Message:
Logged In: YES 
user_id=616997

Well. I digged more into this and it seems, that there is
something strange either in camera (Minolta DiMAGE A1) EXIF
(focal length eq. 35mm, real focal length) or in algorithms.

It seems, that hugin absolutelly believes focal length
values from EXIF tag. If there is any inaccurracy, hugin
fails to optimize panorama correctly (360 degree don't fit,
bad distortion etc.).

Click to "Load EXIF". It returns: 7.20312mm, crop factor 3.8872.

Now save the script, quit Hugin and start again. You will
see crop factor 1 and focal length 26.9mm!

But there is more magic on camera side. Value 7.20312mm,
crop factor 3.8872, is exactly 28mm ekv. declared by
Minolta. But proprietary tag in MakerNote says 7.38mm. And
creation of 360 degree panorama best fits, if I enter
7.59mm. Well, what is correct?

----------------------------------------------------------------------

Comment By: Bruno Postle (brunopostle)
Date: 2005-03-31 12:01

Message:
Logged In: YES 
user_id=35360

Yes you can do this already using the optimiser.

With two pictures taken from exactly the same position and
lots of control points, it is possible to calculate the
field of view as well as the a, b, c, d & e lens correction
parameters.

Most of the parameters in the first two tabs can be
optimised in this way and do not need to be set manually.

Somebody ought to write a tutorial on this.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2005-03-30 21:41

Message:
Logged In: NO 

Mmmm... Not really...

In my case, this information is extracted from exif fields
of the picture...

Every modern and good camera add a lot of information in
that exif info. Here is an example :

$ exiftags 2005-03-03_11-54-15.jpg
---------------------------------------------------
Equipment Make: Canon
Camera Model: Canon EOS 300D DIGITAL
Maximum Lens Aperture: f/4.5
Sensing Method: One-Chip Color Area
Lens Size: 18.00 - 55.00 mm
Firmware Version: Firmware Version 1.1.1
Serial Number: XXXXXXXXXXXXX
Owner Name: XXXXXXXXXXXXXX

Image-Specific Properties:

Image Orientation: Top, Left-Hand
Horizontal Resolution: 180 dpi
Vertical Resolution: 180 dpi
Image Created: 2005:03:03 11:54:15
Exposure Time: 1/250 sec
F-Number: f/16.0
ISO Speed Rating: 100
Lens Aperture: f/16.0
Exposure Bias: 0 EV
Flash: No Flash
Focal Length: 34.00 mm
Color Space Information: sRGB
Image Width: 3072
Image Height: 2048
Rendering: Normal
Exposure Mode: Manual
Scene Capture Type: Standard
Exposure Mode: Manual
Focus Type: Auto
Metering Mode: Center-Weighted
Sharpness: High
Saturation: High
Contrast: High
Digital Zoom: Unknown
Shooting Mode: Manual
Image Size: Large
Focus Mode: AI Focus
Drive Mode: Single
Flash Mode: Off
Compression Setting: Fine
Macro Mode: Unknown
White Balance: Auto
Image Number: 178-7818

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=550444&aid=978224&group_id=77506


More information about the ptX mailing list