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






On Tuesday, 26 April 2022 at 15:34:22 UTC+1 Michael Perry wrote:

> Oh! How exciting. I had not come across this Executor system - I will 
> search for it. Thank you
>
>
> On Friday, 15 April 2022 at 18:05:13 UTC+1 bruno...@gmail.com wrote:
>
>> Generating templates like this is a good approach, and it works well in 
>> the GUI and on the command-line.
>>
>> Though I wasn't referring to the python API, the 'Executor' system is 
>> used by Hugin when aligning and stitching using the Assistant. It is 
>> configurable by editing these INI files.
>>
>> -- 
>> Bruno
>>
>> On Fri, 15 Apr 2022, 13:54 'Michael Perry' via hugin and other free 
>> panoramic software, wrote:
>>
>>> 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.
>>>>
>>>> On Thu, 14 Apr 2022, 11:58 'Michael Perry' via hugin and other free 
>>>> panoramic software, wrote:
>>>>
>>>>> Is there a way to get the Hugin 2019.2.0 to use Rectilinear Projection 
>>>>> as its default projection rather than Equirectangular?
>>>>>
>>>>> On Thursday, 25 February 2021 at 13:00:58 UTC Michael Perry wrote:
>>>>>
>>>>>> I wonder if there is anyone in the forum who has a view about this?
>>>>>>
>>>>>> On Saturday, 22 August 2020 at 15:31:54 UTC+1 Michael Perry wrote:
>>>>>>
>>>>>>> Can anyone advise me how to change the default settings for y, p, r, 
>>>>>>> X, Y, projection (to and move/drag (to mosaic)
>>>>>>> Also, is there some way that I can restrict the clustering of 
>>>>>>> control points - reducing the number of points created in similar 
>>>>>>> locations 
>>>>>>> - I'd rather have 5 well-spaced control points per overlap than 25 
>>>>>>> control 
>>>>>>> points
>>>>>>>
>>>>>>> thank you
>>>>>>>
>>>>>>> On Sunday, 18 November 2018 at 09:46:51 UTC Michael Perry wrote:
>>>>>>>
>>>>>>>> I use Hugin to stitch mosaics. I find the best procedure is to 
>>>>>>>> optimise for X and Y before y, p and r. I have to select Custom 
>>>>>>>> parameters 
>>>>>>>> to be able to do this, then after de-selecting yaw, pitch and roll in 
>>>>>>>> the 
>>>>>>>> Optimiser tab, I select the X and Y variables columns in their place. 
>>>>>>>>
>>>>>>>> Is there a way to change the default settings for Hugin so that, on 
>>>>>>>> opening the application:
>>>>>>>> a) Custom parameters is always selected in Photos tab and X and Y 
>>>>>>>> columns are selected in the Custom tab?
>>>>>>>> b) Similarly, is there a way to change the default projection from 
>>>>>>>> Equirectangular to Rectilinear?
>>>>>>>>
>>>>>>>> Thank you for your thoughts
>>>>>>>>
>>>>>>>

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/14acf0c5-0f78-4105-b3b2-2129c678ad7bn%40googlegroups.com.
  • [hugin-ptx] De... 'Michael Perry' via hugin and other free panoramic software
    • [hugin-pt... 'Michael Perry' via hugin and other free panoramic software
      • [hugi... 'Michael Perry' via hugin and other free panoramic software
        • [... 'Michael Perry' via hugin and other free panoramic software
          • ... Bruno Postle
            • ... 'Michael Perry' via hugin and other free panoramic software
              • ... Bruno Postle
                • ... 'Michael Perry' via hugin and other free panoramic software
                • ... 'Michael Perry' via hugin and other free panoramic software
                • ... Bruno Postle
                • ... 'Michael Perry' via hugin and other free panoramic software
                • ... 'Michael Perry' via hugin and other free panoramic software
                • ... T. Modes
                • ... 'Michael Perry' via hugin and other free panoramic software
                • ... 'Michael Perry' via hugin and other free panoramic software

Reply via email to