Gradient
Calibration and cropping
- 95%crop success
- 0.2sinference

This is a calibration system I designed to align two Sony A7R IV cameras to the scanner reference frame. A homography transformation generates a matrix between the scanner and camera images, and sets the AprilTag constellation in place at that time. Any movement after that is corrected via AprilTag pose.

This ended up being the backend to a more complex system: the classical vision cropper. I used a cv2 CLAHE to emphasize edges, then ran Hough lines at different settings and kept the top K highest-signal lines. I paired edges on parallelness and aspect ratio and picked the ones that formed the most perfect rectangle possible. That got me 95% accurate crops, until another engineer surpassed it with an extremely good segmentation model.

I also wrote a container to control the cameras, with gphoto2 as the backend. It ran a state machine per camera and surfaced an API for the machine to acquire images.
← Back to Gradient