.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "CPFIND ""1""" .TH CPFIND "1" "2020-12-29" """Version: 2020.0.0""" "HUGIN" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" cpfind \- Feature matching for panoramic stitching .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBcpfind\fR [options] \-o \fIoutput_project\fR \fIproject.pto\fR .PP \&\fBcpfind\fR [options] \-k i0 \-k i1 [...] \fIproject.pto\fR .PP \&\fBcpfind\fR [options] \-\-kall \fIproject.pto\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBcpfind\fR cpfind is a control-point detector for Hugin. It expects a project file as input and writes a project file with control-points on success. It depends on reasonable lens information in the input project file. .PP The first step is the feature description: In this step the images of the project file are loaded and so called keypoints are searched. They describe destinctive features in the image. \fBcpfind\fR uses a gradient based descriptor for the feature description of the keypoints. .PP In a second step, the feature matching, all keypoints of two images are matched against each other to find features which are on both images. If this matching was successful two keypoints in the two images become one control point. .SH "USAGE" .IX Header "USAGE" .SS "Rectilinear and fisheye images" .IX Subsection "Rectilinear and fisheye images" Cpfind can find control points in rectilinear and fisheye images. To achieve good control points images with a high horizontal field of view (e.g. ultra wide rectilinear or fisheye) are therefore remapped into a conformal space (cpfind is using the stereographic projection) and the feature matching occurs in this space. Before writing the control points the coordinates are remapped back to the image space. This happens automatic depending on the information about the lens in the input project file. So check that your input project file contains reasonable information about the used lens. .SS "Using celeste" .IX Subsection "Using celeste" Outdoor panorama often contains clouds. Clouds are bad areas for setting control points because they are moving object. Cpfind can use the same algorithm as celeste_standalone to masked out areas which contains clouds. (This is only done internal for the keypoint finding step and does not change the alpha channel of your image. If you want to generate a mask image use celeste_standalone). To run cpfind with celeste use .PP .Vb 1 \& cpfind \-\-celeste \-o output.pto input.pto .Ve .PP Using cpfind with integrated celeste should be superior against using cpfind and celeste_standalone sequential. When running cpfind with celeste areas of clouds, which often contains keypoints with a high quality measure, are disregarded and areas without clouds are used instead. When running cpfind without celeste also keypoints on clouds are found. When afterwards running celeste_standalone these control points are removed. In the worst case all control points of a certain image pair are removed. .PP So running cpfind with celeste leads to a better \*(L"control point quality\*(R" for outdoor panorama (e.g. panorama with clouds). Running cpfind with celeste takes longer than cpfind alone. So for indoor panorama this option does not need to specified (because of longer computation time). .PP The celeste step can be fine tuned by the parameters \-\-celesteRadius and \-\-celesteThreshold. .SS "Matching strategy" .IX Subsection "Matching strategy" \fIAll pairs\fR .IX Subsection "All pairs" .PP This is the default matching strategy. Here all image pairs are matched against each other. E.g. if your project contains 5 images then cpfind matches the image pairs: 0\-1, 0\-2, 0\-3, 0\-4, 1\-2, 1\-3, 1\-4, 2\-3, 2\-4 and 3\-4 .PP This strategy works for all shooting strategy (single-row, multi-row, unordered). It finds (nearly) all connected image pairs. But it is computational expensive for projects with many images, because it test many image pairs which are not connected. .PP \fILinear match\fR .IX Subsection "Linear match" .PP This matching strategy works best for single row panoramas: .PP .Vb 1 \& cpfind \-\-linearmatch \-o output.pto input.pto .Ve .PP This will only detect matches between adjacent images, e.g. for the 5 image example it will matches images pairs 0\-1, 1\-2, 2\-3 and 3\-4. The matching distance can be increased with the switch \-\-linearmatchlen. E.g. with \-\-linearmatchlen 2 cpfind will match a image with the next image and the image after next, in our example it would be 0\-1, 0\-2, 1\-2, 1\-3, 2\-3, 2\-4 and 3\-4. .PP \fIMultirow matching\fR .IX Subsection "Multirow matching" .PP This is an optimized matching strategy for single and multi-row panorama: .PP .Vb 1 \& cpfind \-\-multirow \-o output.pto input.pto .Ve .PP The algorithm is the same as described in multi-row panorama. By integrating this algorithm into cpfind it is faster by using several cores of modern CPUs and don't caching the keypoints to disc (which is time consuming). If you want to use this multi-row matching inside hugin set the control point detector type to All images at once. .PP \fIKeypoints caching to disc\fR .IX Subsection "Keypoints caching to disc" .PP The calculation of keypoints takes some time. So cpfind offers the possibility to save the keypoints to a file and reuse them later again. With \-\-kall the keypoints for all images in the project are saved to disc. If you only want the keypoints of particular image use the parameter \-k with the image number: .PP .Vb 2 \& cpfind \-\-kall input.pto \& cpfind \-k 0 \-k 1 input.pto .Ve .PP The keypoint files are saved by default into the same directory as the images with the extension .key. In this case no matching of images occurs and therefore no output project file needs to specified. If cpfind finds keyfiles for an image in the project it will use them automatically and not run the feature descriptor again on this image. If you want to save them to annother directory use the \-\-keypath switch. .PP This procedure can also be automate with the switch \-\-cache: .PP .Vb 1 \& cpfind \-\-cache \-o output.pto input.pto .Ve .PP In this case it tries to load existing keypoint files. For images, which don't have a keypoint file, the keypoints are detected and save to the file. Then it matches all loaded and newly found keypoints and writes the output project. .PP If you don't need the keyfile longer, the can be deleted automatic by .PP .Vb 1 \& cpfind \-\-clean input.pto .Ve .SH "EXTENDED OPTIONS" .IX Header "EXTENDED OPTIONS" .SS "Feature description" .IX Subsection "Feature description" For speed reasons cpfind is using images, which are scaled to their half width and height, to find keypoints. With the switch \-\-fullscale cpfind is working on the full scale images. This takes longer but can provide \*(L"better\*(R" and/or more control points. .PP The feature description step can be fine-tuned by the parameters: .IP "\fB\-\-sieve1width\fR " 4 .IX Item "--sieve1width " Sieve 1: Number of buckets on width (default: 10) .IP "\fB\-\-sieve1height\fR " 4 .IX Item "--sieve1height " Sieve 1: Number of buckets on height (default: 10) .IP "\fB\-\-sieve1size\fR " 4 .IX Item "--sieve1size " Sieve 1: Max points per bucket (default: 100) .IP "\fB\-\-kdtreesteps\fR " 4 .IX Item "--kdtreesteps " KDTree: search steps (default: 200) .IP "\fB\-\-kdtreeseconddist\fR " 4 .IX Item "--kdtreeseconddist " .PP KDTree: distance of 2nd match (default: 0.25) .PP Cpfind stores maximal sieve1width * sieve1height * sieve1size keypoints per image. If you have only a small overlap, e.g. for 360 degree panorama shoot with fisheye images, you can get better results if you increase sieve1size. You can also try to increase sieve1width and/or sieve1height. .SS "Feature matching" .IX Subsection "Feature matching" Fine-tuning of the matching step by the following parameters: .IP "\fB\-\-ransaciter\fR " 4 .IX Item "--ransaciter " Ransac: iterations (default: 1000) .IP "\fB\-\-ransacdist\fR " 4 .IX Item "--ransacdist " Ransac: homography estimation distance threshold (pixels) (default: 25) .IP "\fB\-\-ransacmode\fR (auto, hom, rpy, rpyv, rpyb)" 4 .IX Item "--ransacmode (auto, hom, rpy, rpyv, rpyb)" Select the model used in the ransac step. .Sp hom: Assume a homography. Only applicable for non-wide angle views. Uses the original panomatic code. It is also more flexible than required and can generate false matches, particularly if most of the matches are located on a single line. .Sp rpy: Align images using roll, pitch and yaw. This requires a good estimate for the horizontal field of view (and distortion, for heavily distorted images). It is the preferred mode if a calibrated lens is used, or the \s-1HFOV\s0 could be read successfully from the \s-1EXIF\s0 data. .Sp rpyv: Align pair by optimizing roll, pitch, yaw and field of view. Should work without prior knowledge of the field of view, but might fail more often, due to error function used in the panotools optimizer, it tends to shrink the fov to 0. .Sp rpyvb: Align pair by optimizing roll, pitch, yaw, field of view and the \*(L"b\*(R" distortion parameter. Probably very fragile, just implemented for testing. .Sp auto: Use homography for images with hfov < 65 degrees and rpy otherwise. .IP "\fB\-\-minmatches\fR " 4 .IX Item "--minmatches " Minimum matches (default: 4) .IP "\fB\-\-sieve2width\fR " 4 .IX Item "--sieve2width " Sieve 2: Number of buckets on width (default: 5) .IP "\fB\-\-sieve2height\fR " 4 .IX Item "--sieve2height " Sieve 2: Number of buckets on height (default: 5) .IP "\fB\-\-sieve2size\fR " 4 .IX Item "--sieve2size " Sieve 2: Max points per bucket (default: 2) .Sp Cpfind generates between minmatches and sieve2width * sieve2height * sieve2size control points between an image pair. (Default setting is between 4 and 50 (=5*5*2) control points per image pair.) If less then minmatches control points are found for a given image pairs these control points are disregarded and this image pair is considers as not connected. For narrow overlaps you can try to decrease minmatches, but this increases the risk of getting wrong control points. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-celesteRadius\fR " 4 .IX Item "--celesteRadius " Radius for celeste (default 20) .IP "\fB\-\-celesteThreshold\fR " 4 .IX Item "--celesteThreshold " Threshold for celeste (default 0.5) .IP "\fB\-\-celeste\fR" 4 .IX Item "--celeste" Run celeste sky identification after loading images, this ignores all features associated with 'clouds'. .IP "\fB\-p " 4 .IX Item "-p " Path to cache keyfiles .IP "\fB\-\-clean\fR" 4 .IX Item "--clean" Clean up cached keyfiles .IP "\fB\-c\fR, \fB\-\-cache\fR" 4 .IX Item "-c, --cache" Caches keypoints to external file .IP "\fB\-\-kall\fR" 4 .IX Item "--kall" Write keyfiles for all images .IP "\fB\-k\fR , \fB\-\-writekeyfile\fR " 4 .IX Item "-k , --writekeyfile " Write a keyfile for this image number (accepted multiple times) .IP "\fB\-o\fR , \fB\-\-output\fR " 4 .IX Item "-o , --output " Output file, required .IP "\fB\-n\fR , \fB\-\-ncores\fR " 4 .IX Item "-n , --ncores " Number of CPU/Cores (default:autodetect) .IP "\fB\-t\fR, \fB\-\-test\fR" 4 .IX Item "-t, --test" Enables test mode .IP "\fB\-\-fullscale\fR" 4 .IX Item "--fullscale" Uses full scale image to detect keypoints (default:false) .IP "\fB\-\-sieve1width\fR " 4 .IX Item "--sieve1width " Sieve 1 : Number of buckets on width (default : 10) .IP "\fB\-\-sieve1height\fR " 4 .IX Item "--sieve1height " Sieve 1 : Number of buckets on height (default : 10) .IP "\fB\-\-sieve1size\fR " 4 .IX Item "--sieve1size " Sieve 1 : Max points per bucket (default : 100) .IP "\fB\-\-kdtreesteps\fR " 4 .IX Item "--kdtreesteps " KDTree : search steps (default : 200) .IP "\fB\-\-kdtreeseconddist\fR " 4 .IX Item "--kdtreeseconddist " KDTree : distance of 2nd match (default : 0.15) .IP "\fB\-\-multirow\fR" 4 .IX Item "--multirow" Enable heuristic multi row matching (default: off) .IP "\fB\-\-linearmatch\fR" 4 .IX Item "--linearmatch" Enable linear images matching (default : all pairs) .IP "\fB\-\-linearmatchlen\fR " 4 .IX Item "--linearmatchlen " Number of images to match in linear matching (default:1) .IP "\fB\-\-minmatches\fR " 4 .IX Item "--minmatches " Minimum matches (default : 4) .IP "\fB\-\-ransaciter\fR " 4 .IX Item "--ransaciter " Ransac : iterations (default : 1000) .IP "\fB\-\-ransacdist\fR " 4 .IX Item "--ransacdist " Ransac : homography estimation distance threshold (pixels) (default : 25) .IP "\fB\-\-sieve2width\fR " 4 .IX Item "--sieve2width " Sieve 2 : Number of buckets on width (default : 5) .IP "\fB\-\-sieve2height\fR " 4 .IX Item "--sieve2height " Sieve 2 : Number of buckets on height (default : 5) .IP "\fB\-\-sieve2size\fR " 4 .IX Item "--sieve2size " Sieve 2 : Max points per bucket (default : 2) .IP "\fB\-\-\fR, \fB\-\-ignore_rest\fR" 4 .IX Item "--, --ignore_rest" Ignores the rest of the labeled arguments following this flag. .IP "\fB\-\-version\fR" 4 .IX Item "--version" Displays version information and exits. .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Displays usage information and exits. .SH "AUTHORS" .IX Header "AUTHORS" Anael Orlinski, Pablo d'Angelo, Antoine Deleforge, Thomas Modes