Bruno, thank you - However, I suspect that the Python Plugin Interface (which I believe is what I would need to do that) does not work with the OSX version of Hugin. I can not find it in my Preferences menus nor an angle of view threshold. I think instead that I will create a library of .pto files (1 x 2 frames , 2 x 2 frames, 2 x 3 frames, 3 x 3 frames and so on) where I would just need to substitute the filenames of my images, preset an XY optimisation, and then find control points, and then optimise pitch, yaw and Z.
On Thursday, 14 April 2022 at 14:39:21 UTC+1 bruno...@gmail.com wrote:
I'm not at a computer, so I can't point directly to functionality, but I seem to remember that the default Hugin Assistant has an angle of view threshold, below which it chooses rectilinear, and above which it chooses equirectangular.Regarding custom workflows that don't use these default Assistant settings (again, I can't point to this off the top of my head), there are a series of Hugin 'executor' configurations that you can use instead. These are in an easy-to-edit INI format, so you are encouraged to modify, create and share. I haven't played with them since they were first introduced, it would be really useful if you could try this method and describe your success or failure here, as they are an underused resource that more people would use if they were aware.
Dear Bruno
I am converting my workflow to the command line. I have a problem with pto_var and a question about pano_modify, I wonder if you can advise me.
BACKGROUND
I am stitching a mosaic of images of a painting. The photographs have been shot with a camera mounted on a gimbal that is itself suspended on an X-Y frame. The biggest difference between one image and the next is its X-Y position. In theory they should all have the same pitch and yaw as the camera moves little on its gimbal. There is some slight Z to account for as the frame is not perfectly parallel to the painting. The images have to be rotated some 90 degrees.
The images have been pre-processed for lens distortion and vignetting with Capture One, so I am ignoring lens parameters.
COMMAND LINE
I have been using the following commands to build the .pto file. I have annotated them in case it is useful for other people
pto_gen -p 0 -f 40.7 -o project.pto *.tif
(create the project with all files in folder, rectilinear projection and a 50mm lens (FOV = 40.7)
cpfind --multirow --fullscale -o project_cp.pto project.pto
(find control points in a mosaic, full-scale probably not necessary for me)
cpclean -o project_clean.pto project_cp.pto
(clean control points)
pto_var --set=r=90 --opt=TrX,TrY -o project_XY.pto project_clean.pto
(set X-Y variables of all images EXCEPT anchor, for optimisation)
autooptimiser -n -o project_XY.pto project_XY.pto
(optimise images for X and Y)
pto_var --opt=y,p,TrZ -o project_ypZ.pto project_XY.pto
(set pitch, yaw and Z of all images EXCEPT anchor)
This is where I have the problem, I need to select the yaw and pitch of the anchor image for optimisation with all the rest. I can not see how to do that easily.
POSSIBLE SOLUTION
pto_var --opt=y0,p0,y1,p1,TrZ -o project_ypXYZ.pto project_ypZ.pto
(set pitch, yaw and Z of all images INCLUDING anchor)
It is possible to select the anchor if each image is individually selected. HOWEVER when large mosaics are stitched it makes for clumsy code.
EXTRA QUESTION
pano_modify --projection=0 --fov=AUTO -o finished.pto project_ypXYZ.pto
(Set projection to Rectilinear, fit image to screen)
I finalise the image in Fast Panorama preview having set Projection to Rectilinear and fitted the image to the screen. It would be helpful if I could also set the Drag Mode to Mosaic in the Move/Drag tab and the Overview Mode to Mosaic Plane. Is there some code that might effect this?
Hoping you will find these interesting problems.
Michael
pto_var: can anyone tell me whether there is a way to specify, for example, optimising yaw of all images including the anchor without having to specify each image?Thus, some sort of:--opt=yALLrather than--opt=y0,y1,y2,y3,y4…