.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .\" ======================================================================== .\" .IX Title "MRCAL 1" .TH MRCAL 1 2024-02-04 "mrcal 2.3-4.1~exp1" "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 PROBABLY 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 .SH OPTIONS .IX Header "OPTIONS" .SS "OPTIONAL ARGUMENTS" .IX Subsection "OPTIONAL ARGUMENTS" .Vb 10 \& \-h, \-\-help show this help message and exit \& \-\-object\-width\-n OBJECT_WIDTH_N \& How many points the calibration board has per \& horizontal side. This is required if \-\-cull\-random\- \& observation\-ratio \& \-\-object\-height\-n OBJECT_HEIGHT_N \& 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 IMAGERSIZE IMAGERSIZE \& Size of the imager. If \-\-cull\-rad\-off\-center is given: \& we require \-\-imagersize or \-\-where \& \-\-cull\-left\-of CULL_LEFT_OF \& Throw out all observations with x < the given value. \& Exclusive with the other \-\-cull\-... options \& \-\-cull\-rad\-off\-center CULL_RAD_OFF_CENTER \& 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 CULL_RANDOM_OBSERVATIONS_RATIO \& Throw out a random number of board observations. The \& ratio of observations is given as the argument. 1.0 = \& throw out ALL the observations; 0.0 = throw out NONE \& of the observations. Exclusive with the other \& \-\-cull\-... options \& \-\-where WHERE WHERE Used with \-\-cull\-rad\-off\-center. Specifies the \& location of the "center" point. If omitted, we use the \& center of the imager. May NOT be given if \-\-cull\-rad\- \& off\-center < 0. If \-\-cull\-rad\-off\-center is given: we \& require \-\-imagersize or \-\-where \& \-\-filename FILENAME Apply the filtering only to observations where the \& filename matches the given regex. May be given \& multiple times: filenames that match ANY of the given \& regexen are culled. If omitted, we cull ALL the \& observations. Exclusive with \-\-cull\-random\- \& observations\-ratio .Ve .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 ("Caltech"). U.S. Government sponsorship acknowledged. All rights reserved. .PP Licensed under the Apache License, Version 2.0 (the "License"); You may obtain a copy of the License at .PP .Vb 1 \& http://www.apache.org/licenses/LICENSE\-2.0 .Ve