logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mrgingham-rotate-corners - Adjust mrgingham corner detections from rotated cameras

Author

       Dima Kogan, "<dima@secretsauce.net>"

Description

       The mrgingham chessboard detector finds a chessboard in an image, but it has no way to know whether the
       detected chessboard was upside-down or otherwise rotated: the chessboard itself has no detectable marking
       to make this clear. In the usual case, the cameras as all mounted in the same orientation, so they all
       detect the same orientation of the chessboard, and there is no problem. However, if some cameras are
       mounted sideways or upside-down, the sequence of corners will correspond to different corners between the
       cameras with different orientations. This can be addressed by this tool. This tool ingests mrgingham
       detections, and outputs them after correcting the chessboard observations produced by rotated cameras.

       Each rotation option is an awk regular expression used to select images from specific cameras. The
       regular expression is tested against the image filenames.  Each rotation option may be given multiple
       times. Any files not matched by any rotation option are passed through unrotated.

Name

       mrgingham-rotate-corners - Adjust mrgingham corner detections from rotated cameras

Repository

       <https://github.com/dkogan/mrgingham>

Synopsis

         # camera A is rightside-up
         # camera B is mounted sideways
         # cameras C,D are upside-down
         mrgingham --gridn N                \
           'frame*-cameraA.jpg'             \
           'frame*-cameraB.jpg'             \
           'frame*-cameraC.jpg'             \
           'frame*-cameraD.jpg' |           \
         mrgingham-rotate-corners --gridn N \
           --90 cameraB --180 'camera[CD]'

See Also