Bad results with cpfind

186 views
Skip to first unread message

Laurent E

unread,
Dec 16, 2020, 9:00:07 AM12/16/20
to hugin and other free panoramic software
Hello everyone,
I'm currently doing my 1st steps on Hugin (v2019.2.0 on Mac), and I'm having a hard time trying to create Control Points.

For example, I'm trying to reproduce this tutorial about stitching murals (http://hugin.sourceforge.net/tutorials/Mosaic-mode/en.shtml). I've downloaded the 2 images linked (they have the correct EXIF data) but unlike in the tutorial I'm having bad results after using cpfind to create control points (the distance between the CPs go from 2035 to 2099).
After using the same Geometric optimization (y,p,r,x,y,z) I get an avg CP distance of 5.36 with the max being at 10.9 (compared to the person in the tutorial having a result of 0.13).

I also tried cpfind with personal images using JPGs straight out of the camera, and once again I'm having poor results, from 553 to 753).

I finally did a 3rd test with pictures shot on a calibrated pano head, results vary from 35 to 965, and the gauge (the coloured block indicating the average quality of the control-points between the selected photos) being always in the red.

I'm not sure what I'm missing but I will gladly accept any help.

Laurent

AKS-Gmail-IMAP

unread,
Dec 16, 2020, 12:35:45 PM12/16/20
to hugi...@googlegroups.com

I also don't get the same numbers as shown in the tutorial, but the resulting stitch looks fine.

If you are just starting out with Hugin then this workflow for a run of the mill stitch might be of use.

First of all regarding control points there is a Control Points Editor preference to enable rotation search. Enabling rotation search does not impact the process as much as it did with older computers. So I start out enabling it. The default setting disables it. Operate Hugin in Interface Advanced or Interface Expert mode.

  1. “Fine-tune all Points” after running the “Create control points” process. This command is found in the Edit pulldown menu. The control point distances get normalized in a way to make it easier to notice the outliers. The fine-tune process also reports how many control points fall below the “Correlation Threshold” set in the Control Points Editor preference.

  2. View the Control point table. There is a selection on the Edit menu pulldown. On a Mac, Fn F3 also pulls it up. Sort that table by its Correlation column by clicking on the column heading to show the smaller control point correlation numbers at the top. Those smaller correlation control points are the poorest control points after executing “Fine-tune all Points". Delete at least those control points that fall below your correlation threshold. Hugin will graphically show you what each control point pair is when selecting a point in the table. Depending on what the photograph image subject is you might also check the best scoring correlating control points just to confirm there are no point matches that fooled the point finding process. How the ranked control points distribute reveals a lot about how well the images align.

  3. Now perform the geometric Optimize processes. Proceed down the list of choices one after the other keeping an eye on the numbers reported. Apply the changes only when the optimizing numbers are better than the previous run. Viewing a sorted Control point table again will reveal problematic control point pairs after the first and possibly subsequent optimization runs. The numbers in the table will no longer be normalized like before. Now the table shows “distance” values instead of “correlation” values”. The larger distance numbers correspond to the problematic points. These higher distance points might show numbers much higher than the majority of the control points. Delete those pairs and continue optimizing processes. The alignment and warping process is trying to best fit all the control points as if they all sit on the same curved surface. Removing bad matches or matches on features not on that common surface, like matches on foreground objects, helps the overall goal.

  4. Perform the photometric optimization.

  5. Switch to the “Fast Panorama preview”. (The control button with the letters GL. Also found in the Window pulldown menu.) Select the “Projection” tab and change the projection type as needed.

  6. Select the “Move/Drag” tab. Press the “Center” button. Press the “Fit” button. Then hold your breath while selecting the “Straighten” button. Perform an “Undo” if the Straighten process messed things up. Sometimes the Straighten process results in a Picasso-goes-to-Superman's-Fortress-of-Solitude image. If that happens then selecting Hugin's original preview interface, “Panorama preview”, in the main “Hugin – Panorama Stitcher” window can confirm how the preview really appears.

  7. Select the “Crop” tab. Perform any desired cropping.

  8. Return to the main “Hugin – Panorama Stitcher” window and select the “Stitcher” tab.

  9. Press “Calculate optimal size” and then press the “Stitch” located at the lower right to start the final processes.



--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/adf181d2-8042-49cd-bce9-2e376413f3adn%40googlegroups.com.

T. Modes

unread,
Dec 17, 2020, 11:32:13 AM12/17/20
to hugin and other free panoramic software
aks schrieb am Mittwoch, 16. Dezember 2020 um 18:35:45 UTC+1:
1. “Fine-tune all Points” after running the “Create control points” process. This command is found in the Edit pulldown menu. The control point distances get normalized in a way to make it easier to notice the outliers. The fine-tune process also reports how many control points fall below the “Correlation Threshold” set in the Control Points Editor preference.

Cpfind search control points at different scales and does also some other kind of fine-tuning (different algorithm). Using fine-tune from the menu is only looking at the 1:1 scale on a small patch. So if you manually fine-tune the cp after cpfind you are destroy some information.
So after running cpfind there should be no need to additional run fine-tune from the menu. Please stay away from this or post a bug report if you think there is a bug in the algorithm.

Thomas

Gunter Königsmann

unread,
Dec 17, 2020, 2:17:59 PM12/17/20
to hugi...@googlegroups.com

One thing that can go with auto-detecting control points on stars  is: Stars look all alike, from a distance. cpfind is good. But from time to time it might happen that cpfind will interpret one tiny speck of ligkt as a completely different one. In that case you can sometimes get surprising results involving a warped sky.

Kind regards,

  Gunter

--
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+...@googlegroups.com.

njsgastro

unread,
Dec 17, 2020, 4:00:05 PM12/17/20
to hugi...@googlegroups.com
What you described is what i have experienced.  I now manually add the points.

Thanks
Nor



Sent from my Galaxy

Laurent E

unread,
Dec 18, 2020, 4:17:18 AM12/18/20
to hugin and other free panoramic software
Hello aks. First of all, I want to thank you for taking the time to write these very detailed explanations. It's helping me a lot to get started with Hugin.
I now get good results, especially after using “Fine-tune all Points”. The next step for me is to succeed in stitching multiple 'mosaic' images. Things are a bit confusing since most of the tutorials about that are 10 years old, and the software has changed since then. I'll keep studying about that, wish me luck ;)

Reply all
Reply to author
Forward
0 new messages