Panotoo...::Image(3)
β¨ NAME β¨
Panotools::Script::Line::Image β a panotools input image. yes bestie, you're on the Panotoo...::Image(3) page, welcome π
π¦ SYNOPSIS π¦
One single input image gets described by one i line. that's the whole entire vibe β¨
πΈ DESCRIPTION πΈ
okay so basically? it's the same format as an o line, literally, no cap. here's everything an i line can carry:
w1000β the width, in pixels πh500β the height. heads up though:nonarequires the width and height of input images, whereasPTStitcher/menderdon't πf0β projection format, and it's giving menu:0β rectilinear (normal lenses)1β Panoramic (Scanning cameras like Noblex)2β Circular fisheye3β full-frame fisheye4β PSphere, equirectangular7β Mirror (a spherical mirror)8β Orthographic fisheye10β Stereographic fisheye21β Equisolid fisheye
v82β horizontal field of view of the image (required, bestie, don't skip it)y0β yaw angle (required)p43β pitch angle (required)r0β roll angle (required)a,b,cβ lens correction coefficients (optional). (seehttp://www.fh-furtwangen.de/~dersch/barrel/barrel.html)d,eβ initial lens offset in pixels (defaultsd0 e0, optional). used to correct for offset from the center of the image:dβ horizontal offseteβ vertical offset
g,tβ initial lens shear. use this to remove slight misalignment of the line scanner relative to the film transport:gβ horizontal sheartβ vertical shear
jβ stack numberEevβ exposure of image in EV (exposure values)Erβ white balance factor for the red channelEbβ white balance factor for the blue channelRaβ EMoR response model from the Computer Vision Lab at Columbia UniversityRbβ this models the camera response curveRcRdReTiX,TiY,TiZβ tilt on the x axis, the y axis, the z axisTiSβ scaling of field of view in the tilt transformationTrX,TrY,TrZβ translation on the x axis, the y axis, the z axisTpy,Tppβ yaw and pitch of the remapping plane for translationTe0,Te1,Te2,Te3β test parametersVmβ vignetting correction mode (default0):0: no vignetting correction1: radial vignetting correction (see thej,k,l,ooptions)2: flatfield vignetting correction (see thepoption)4: proportional correction:i_new = i / corr.- this mode is recommended for use with linear data. if the input data is gamma corrected, try adding
g2.2to themline.
- this mode is recommended for use with linear data. if the input data is gamma corrected, try adding
- default is additive correction:
i_new = i + corr - both radial and flatfield correction can be combined with the proportional correction by adding
4. - Examples, because examples are iconic:
i1β radial polynomial correction by addition. the coefficientsj,k,l,omust be specified.i5β radial polynomial correction by division. the coefficientsj,k,l,omust be specified.i6β flatfield correction by division. the flatfield image should be specified with thepoption.
Va,Vb,Vc,Vdβ vignetting correction coefficients. (defaults:0,0,0,0) (0, 2, 4, 6order polynomial coefficients):
corr = ( i + j*r^2 + k*r^4 + l*r^6), where r is the distance from the image center
the corrected pixel value is calculated with: i_new = i_old + corr if additive correction is used (which is the default), and for proportional correction (h5): i_new = i_old / corr;
Vx,Vyβ radial vignetting correction offset in pixels (defaultsq0 w0, optional). used to correct for offset from the center of the image:Vxβ horizontal offsetVyβ vertical offset
S100,600,100,800β Selection(l,r,t,b). only pixels inside the rectangle will be used for conversion. the original image size is used for all image parameters (e.g. field-of-view) β they refer to the original image. the selection can be outside the image dimension. the selection will be circular for circular fisheye images, and rectangular for all other projection formats πnNameβ file name of the input image.
like, for real, here's how it looks in the wild:
i f2 r0 p0 y0 v183 a0 b-0.1 c0 S100,600,100,800 n"photo1.jpg"
i f2 r0 p0 y180 v183 a0 b-0.1 c0 S100,600,100,800 n"photo1.jpg"
Rotate transform the image, angles in degrees (periodt):
$i->Transform ($roll, $pitch, $yaw);
Each image attribute (v, a, b, c etc...) can be read like so:
$fov = $i->v;
note that this will return either the value (56.7) or a reference to another image (=0). if you supply aPanotools::Scriptobject as a parameter then the reference will be resolved and you will always get the value:
$fov = $i->v ($pto);
Get the absolute path to the image file:
$i->Path ('/path/to/project.pto');
If a .pto project isn't specified then paths are assumed to be relatve to cwd π«Ά
For any given coordinate in this image (top left is 0,0), calculate an x,y,z cartesian coordinate, accounting for lens distortion, projection and rotation. main character math fr fr:
$coor = $i->To_Cartesian ($pto, [23,45]);
($x, $y, $z) = @{$coor};
Query distance (radius) to photo in pixels:
$pix_radius = $i->Radius ($pto);
and that's the page bestie, you ate it π
this was Panotoo...::Image(3), brought to you by perl v5.42.0 and dated 2025-07-25 β go forth and stitch some panoramas, ily πβ¨
π¦ where this page comes from
- fedora 43: perl-Panotools-Script 0.29-20.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms