NAME
mrcal-cull-corners - Filters a corners.vnl on stdin to cut out some points
SYNOPSIS
$ < corners.vnl mrcal-cull-corners --cull-left-of 1000 > corners.culled.vnl
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.
The specific operation of this tool is defined on which --cull-... option is given. Exactly one is required:
--cull-left-of X: throw away all corner observations to the left of the givenX coordinate--cull-rad-off-center D: throw away all corner observations further than Daway from the center. --imagersize or --where must be given also so that weknow where the center is. If D < 0: we cull the points -D or closer to thecorners: we use a radius of sqrt(width^2 + height^2)/2. - abs(D)--cull-random-observations-ratio R: throws away a ratio R object observationsat 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 parsingwork
--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
--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
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:
mrcal-cull-corners ... > culled-raw.vnlvnl-join --vnl-sort - -j filename culled-raw.vnl \<(< culled-raw.vnl vnl-filter -p filename --has level |vnl-uniq -c |vnl-filter 'count > 20' -p filename ) \> culled.vnl
OPTIONS
OPTIONAL ARGUMENTS
-h, --help show this help message and exit--object-width-n OBJECT_WIDTH_NHow many points the calibration board has perhorizontal side. This is required if --cull-random-observation-ratio--object-height-n OBJECT_HEIGHT_NHow many points the calibration board has per verticalside. If omitted, I assume a square object and use thesame value as --object-width-n--imagersize IMAGERSIZE IMAGERSIZESize of the imager. If --cull-rad-off-center is given:we require --imagersize or --where--cull-left-of CULL_LEFT_OFThrow out all observations with x < the given value.Exclusive with the other --cull-... options--cull-rad-off-center CULL_RAD_OFF_CENTERThrow out all observations with dist_from_center > thegiven 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_RATIOThrow out a random number of board observations. Theratio of observations is given as the argument. 1.0 =throw out ALL the observations; 0.0 = throw out NONEof the observations. Exclusive with the other--cull-... options--where WHERE WHERE Used with --cull-rad-off-center. Specifies thelocation of the "center" point. If omitted, we use thecenter of the imager. May NOT be given if --cull-rad-off-center < 0. If --cull-rad-off-center is given: werequire --imagersize or --where--filename FILENAME Apply the filtering only to observations where thefilename matches the given regex. May be givenmultiple times: filenames that match ANY of the givenregexen are culled. If omitted, we cull ALL theobservations. Exclusive with --cull-random-observations-ratio
REPOSITORY
<https://www.github.com/dkogan/mrcal>
AUTHOR
Dima Kogan, "<[email protected]>"
LICENSE AND COPYRIGHT
Copyright (c) 2017-2023 California Institute of Technology ("Caltech"). U.S. Government sponsorship acknowledged. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0