Hello / Hallo
> Am I right to assume that you are finding your control points
> via command line, using cpfind and wish to have a command
> line method of fine tuning those control points?
Yes, you're right, my exact command is:
cpfind --fullscale --celeste --multirow -o ptoFileName.pto ptoFileName.pto
And my idea was to drop CPoints that had a questionable correlation value.
> In case you haven't looked in detail at the cpfind options, you
> can use --fullscale which may provide "better" control points.
Totally right. I confirm: It takes few more seconds (minutes with older CPU and less memory) but gives better results. I was using this one also.
> There are also a number of parameters for fine-tuning, such
> as --sieve1width, --seive1height etc which may help.
Good idea. I left those options aside, but I wonder if I would get more trustful CPoints by using smaller --sieve1* values...
> In addition, the command line tool cpclean has options
> to remove any generated control points with errors bigger
> than a specified value.
I use it also. But I understood that it removes points based on points "too far" from their position. Ideally, I would like to use it as a "second pass". The "first pass" would the correlation.
Yes, always. By confirming my thoughts and giving some ideas... (sievel*)
> I don't see the point of fine-tune cp from the command line.
> Cpfind and align_image_stack set the cp already with sub-pixel
> accuracy. So fine-tune is not helpful.
I don't know how cpfind works in details but I always got CPoints with correlation below 0.5 (generally in some "blurry" areas, in the middle of a bigger pattern). I believe that this might be because cpfind works on bigger areas to find similarities while fine-tune option of hugin works on smaller search area.
My idea would be to drop the points that cannot be aligned at pixel-level (with high-contrast details in a small region).
(Regarding align_image_stack, I did not use it as I am focusing on panorama now, but useful to know anyway).
> Fine-tune has its application when setting cp
> by hand and then fine-tune the rough position.
Partially agree:
Fine-tune is extremely useful and saves a huge time when adding manual points.
But
It is also extremely useful to automatically estimate how "trustful" are the control points that cpfind created automatically. Especially with the "Edit > Fine-tune all Points" option.
When proceeding manually, right after having cpfind created the points, I "Fine-tune all Points" and then delete all the CPoints that are below 0.6 "distance" (that is correlation value at this point). I prefer creating my own extra CPoints if needed.
----------
Some more details on my target: I often take panoramas and people request to have those quickly on the web. So my aim here is to automate the creation of panorama from a set of pictures.
Sunday afternoon, I created the Python script attached to this message. That does most of the work.
The same is also there:
http://t.baeckeroot.free.fr/createPanorama.py(I'll update on my site)
(feel free to adapt and/or revert to me and/or re-use it in any way you want. I build this for me: Python 2.7, Linux, Hugin 2011.4)
In brief my idea was to:
A- load the pictures composing a panorama
B- create Control-Points (cpfind)
C- Fine-tune them and drop CPoints that had correlation < 0.6
D- optimise alignment (autooptimiser and pano_modify)
E- drop CPoints that were statistically "too far" (cpclean)
F- create "final draft image" (nona and enblend)
Result is not perfect but enough for web. And fully automated.
The only missing part is C- to get the correlation value of the CPoints (to drop the less trustful).
If I can "Fine-tune all Points" and get the correlation value (in place of distance in hugin), then I believe I would be able to delete the CPoints from Python.
In my script, this is the part:
"
######## ( File > Preferences > Control Points Editor > Correlation Threshold: lower to 0.4 ) ########
######## Edit > Fine-tune all Points ########
######## Drop the CPoints that have correlation (distance) < 0.6 ########
"
Thanks Terry and Thomas