[ptx] panosifter problems & questions
Terje Mathisen
terje.mathisen at hda.hydro.com
Tue Feb 17 10:47:46 GMT 2004
Pablo d'Angelo wrote:
> On Tue, 17 Feb 2004, Terje Mathisen wrote:
>
>
>>Pablo d'Angelo wrote:
>>
>>
>>>Actually, I'm not completely sure what the crop factor really is.
>>>the ratio of the diagonals? Or the ratio of width, or height? Have seem
>>>different interpretations on the web.
>>
>>You're right, I've even suspected PTAsm of getting this wrong for
>>cameras which don't have a 3:2 aspect ratio, i.e. almost all digicams
>>which have a 4:3 TV style chip.
>>
>>IMHO, the proper way would be to calculate all crop factors relative to
>>a film/chip plane diagonal, since this diagonal determines the size of
>>the optics, right?
>
> I thought I've implemented it like that in hugin (but it breaks in case of a
> missing exif sensor size). but probably, some bugs have slipped through.
> Anyway, a proper lens handling is needed sometime.
It still seems like a command line crop factor, to be used to calculate
the chip diagonal, would be the easiest way to handle it:
diag = DIAG36x24 / cropfactor; // Command line option
aspect = pixelwidth / pixelheight; // From image size
// width*width + height*height = diag*diag;
// height*height(1 + aspect*aspect) = diag*diag;
chip_height = diag / sqrt(1 + aspect*aspect);
chip_width = chip_height * aspect;
>>So a 24x36 lens has a 43.27 mm diagonal, while a "standard" small
>>digicam uses a 1/1.8" chip which should have an 8.88 mm diagonal:
>>
>>43.27/8.88 = 4.873
>>
>>Using Google, I find various sizes given for chips that should all be
>>1/1.8", but 7.1x5.3 mm seems typical, this corresponds well to the
>>7.104x5.328 which I get when starting with an 8.88 mm diagonal.
>
>
> I was quite surprised when I found:
> http://www.dpreview.com/learn/?/Glossary/Camera_System/Sensor_Sizes_01.htm
Right, that was the article I was hoping to find before I started
Googling. The size given for 1/1.8" is very close to those I used above.
Terje
--
- <Terje.Mathisen at hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"
More information about the ptX
mailing list