MRCAL(1)
π MRCAL-CULL-CORNERS β section 1 of the mrcal manual π
okay bestie, welcome to the mrcal manual, the camera projection, calibration toolkit one, and today's main character is mrcal-cull-corners. she takes corners in, she throws some of them out, she's literally a bouncer for points. let's go β¨
β¨ NAME β¨
mrcal-cull-corners β she reads a corners.vnl on stdin, cuts out some of the points, and sends the survivors out on stdout. π
πΈ SYNOPSIS πΈ
$ < corners.vnl mrcal-cull-corners --cull-left-of 1000 > corners.culled.vnl
π DESCRIPTION π
So basically this tool reads a bunch of corner detections from stdin, yeets some of them, and writes what's left to stdout. It's useful for testing and for evaluating how the mrcal calibration tools are performing. ngl, it's a vibe-check tool for your calibration pipeline. π¦
What it actually does depends on which --cull-... option you hand it. And bestie, exactly one is required. no cap. π
--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
Now, --cull-left-of X and --cull-rad-off-center are the gentle ones β they throw out individual points. The way they do that is by keeping the point in the output data stream but setting its decimation level to '-'. That way the downstream tools know to ignore those points. π«Ά
But --cull-random-observations-ratio? she's different. she throws out whole object observations, not just individual points. And those removed observations don't show up in the output data stream at all. gone. deleted. π
β οΈ real talk: 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.vnl
vnl-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β shows this help message and exits. classic. π--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 you omit it, I assume a square object and just use the same value as--object-width-n. π§--imagersize IMAGERSIZE IMAGERSIZEβ size of the imager. If--cull-rad-off-centeris given: we require--imagersizeor--where. π--cull-left-of CULL_LEFT_OFβ throw out all observations withx <the given value. Exclusive with the other--cull-...options. βοΈ--cull-rad-off-center CULL_RAD_OFF_CENTERβ throw out all points that appear outside the given radius from the--whereof the imager. Exclusive with the other--cull-...options. If given: we require--imagersizeor--where. π--cull-rad-off-center-board CULL_RAD_OFF_CENTER_BOARDβ throw out all observations beyond the given radius from the center of the board. The units are "board squares". Requires--objects-width-n. π--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. Requires--objects-width-n. π²--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-centeris given: we require--imagersizeor--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. π₯
π¦ REPOSITORY π¦
<https://www.github.com/dkogan/mrcal>
π AUTHOR π
Dima Kogan, "<dima@secretsauce.net>"
β 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
and that's the whole page bestie π
this was mrcal version 2.5.2-4build1, dated 2026-03-20, manual page MRCAL(1). slay, go cull some corners, and remember: exactly one --cull-... option. periodt. πβ¨
π¦ where this page comes from
- ubuntu resolute: mrcal 2.5.2-4build1 Β· Apache-2.0
- ubuntu stonking: mrcal 2.5.2-4build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms