.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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 "MRCAL 1" .TH MRCAL 1 "2023-01-30" "mrcal 2.2" "mrcal: camera projection, calibration toolkit" .\" 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" mrcal\-cull\-corners \- Filters a corners.vnl on stdin to cut out some points .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& $ < corners.vnl mrcal\-cull\-corners \-\-cull\-left\-of 1000 > corners.culled.vnl .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This tool reads a set of corner detections on stdin, throws some of them out, and writes the result to stdout. This is useful for testing and evaluating the performance of the mrcal calibration tools. .PP The specific operation of this tool is defined on which \-\-cull\-... option is given. Exactly one is required: .PP .Vb 2 \& \-\-cull\-left\-of X: throw away all corner observations to the left of the given \& X coordinate \& \& \-\-cull\-rad\-off\-center D: throw away all corner observations further than D \& away from the center. \-\-imagersize or \-\-where must be given also so that we \& know where the center is. If D < 0: we cull the points \-D or closer to the \& corners: we use a radius of sqrt(width^2 + height^2)/2. \- abs(D) \& \& \-\-cull\-random\-observations\-ratio R: throws away a ratio R object observations \& at random. To throw out half of all object observations, pass R = 0.5. \& \-\-object\-width\-n and \-\-object\-height\-n are then required to make the parsing \& work .Ve .PP \&\-\-cull\-left\-of X and \-\-cull\-rad\-off\-center throw out individual points. This is done by keeping the point in the output data stream, but setting its decimation level to '\-'. The downstream tools then know to ignore those points .PP \&\-\-cull\-random\-observations\-ratio throws out whole object observations, not just individual points. These removed observations do not appear in the output data stream at all .PP This tool exists primarily for testing, and probably you don't want to use it. The filtering is crude, and the tool might report chessboard observations with very few remaining points. You \s-1PROBABLY\s0 want to post-process the output to keep only observations with enough points. For instance: .PP .Vb 1 \& mrcal\-cull\-corners ... > culled\-raw.vnl \& \& vnl\-join \-\-vnl\-sort \- \-j filename culled\-raw.vnl \e \& <(< culled\-raw.vnl vnl\-filter \-p filename \-\-has level | \& vnl\-uniq \-c | \& vnl\-filter \*(Aqcount > 20\*(Aq \-p filename ) \e \& > culled.vnl .Ve .PP options: \-h, \-\-help show this help message and exit \-\-object\-width\-n \s-1OBJECT_WIDTH_N\s0 How many points the calibration board has per horizontal side. This is required if \-\-cull\-random\- observation-ratio \-\-object\-height\-n \s-1OBJECT_HEIGHT_N\s0 How many points the calibration board has per vertical side. If omitted, I assume a square object and use the same value as \-\-object\-width\-n \-\-imagersize \s-1IMAGERSIZE IMAGERSIZE\s0 Size of the imager. If \-\-cull\-rad\-off\-center is given: we require \-\-imagersize or \-\-where \-\-cull\-left\-of \s-1CULL_LEFT_OF\s0 Throw out all observations with x < the given value. Exclusive with the other \-\-cull\-... options \-\-cull\-rad\-off\-center \s-1CULL_RAD_OFF_CENTER\s0 Throw out all observations with dist_from_center > the given value. Exclusive with the other \-\-cull\-... options. If \-\-cull\-rad\-off\-center is given: we require \-\-imagersize or \-\-where \-\-cull\-random\-observations\-ratio \s-1CULL_RANDOM_OBSERVATIONS_RATIO\s0 Throw out a random number of board observations. The ratio of observations is given as the argument. 1.0 = throw out \s-1ALL\s0 the observations; 0.0 = throw out \s-1NONE\s0 of the observations. Exclusive with the other \-\-cull\-... options \-\-where \s-1WHERE WHERE\s0 Used with \-\-cull\-rad\-off\-center. Specifies the location of the \*(L"center\*(R" point. If omitted, we use the center of the imager. May \s-1NOT\s0 be given if \-\-cull\-rad\- off-center < 0. If \-\-cull\-rad\-off\-center is given: we require \-\-imagersize or \-\-where \-\-filename \s-1FILENAME\s0 Apply the filtering only to observations where the filename matches the given regex. May be given multiple times: filenames that match \s-1ANY\s0 of the given regexen are culled. If omitted, we cull \s-1ALL\s0 the observations. Exclusive with \-\-cull\-random\- observations-ratio .SH "REPOSITORY" .IX Header "REPOSITORY" .SH "AUTHOR" .IX Header "AUTHOR" Dima Kogan, \f(CW\*(C`\*(C'\fR .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (c) 2017\-2021 California Institute of Technology (\*(L"Caltech\*(R"). U.S. Government sponsorship acknowledged. All rights reserved. .PP Licensed under the Apache License, Version 2.0 (the \*(L"License\*(R"); You may obtain a copy of the License at .PP .Vb 1 \& http://www.apache.org/licenses/LICENSE\-2.0 .Ve