Hacker News new | ask | show | jobs
by globalnode 41 days ago
can this be done manually by setting constants till the images look rectified? last time i played with opencv for this it didnt do a very good job at automatically calculating the k's. im hoping an algo comes out that lets me do disparity without calibration one day :)
5 comments

Depends on how much accuracy you want in your results. You can do chessboardless calibration and stereo today, but you need lot of data and careful error propagation that nobody does. The mrcal project does does high-precision calibration and streo with boards. I've a boardless method mostly done now, and will run experiments soon. The conclusion might be that you need unreasonable input data to get good results :)
You can use structure from motion for this. Walk around and capture some video. It’s the same way that drone photogrammetry works, ie bundle adjustment. It’ll give you the intrinsics at least.

But with a high res sensor, even flex in the PCB will invalidate the calibration. Only takes a few microns for a pixel to be in the wrong place.

While I wouldn't say opencv makes it simple they do provide functions like findChessboardCorners, CharucoDetector, stereoCalibrate - even code to generate printable calibration patterns.

And these days, you can get an LLM to stitch those functions together

I've fed like 1s interval mp4 screenshots from Vive Flow into a Gemini vibecoded Python cv2 script for one of my failed project and that part seemed to work fine, though it was a stereo camera specifically designed and validated for SLAM and also there was a catch that the entirety of the board is clearly visible for a single image to be usable. Maybe try reducing square counts and adjusting illumination if it's not working out.

btw K is scale factor right? If other parameters were good, maybe you can calculate that from sensor dimensions and focal length if scale was only the problem.

lots of “world models” are pretty good at “stereo with zero calibration”

but if you want to calibrate, try printing out a board https://calib.io/pages/camera-calibration-pattern-generator