BingyaoHuang / single-shot-pro-cam-calib

[TASE & ISMAR'18] A Fast and Flexible Projector-Camera Calibration System
http://vision.cs.stonybrook.edu/~bingyao/pub/calibration_TASE
Other
153 stars 39 forks source link

Obtain homography between camera and projector from calibration #18

Closed RDKKKKKK closed 10 months ago

RDKKKKKK commented 11 months ago

Hi, thanks for the amazing software, the error is quite acceptable, really solved my trouble. But when I use the calibration result to calculate the homography between camera plane and projector plane, the outcome is not desired. I wonder is there an accurate way to obtain the homography from the calibration? Also I notice the nodePairs.yml in the output, I'm a little confused about the format in it.

BingyaoHuang commented 11 months ago

The homography may be inaccurate if your projector or camera has significant lens distortions. nodePairs.yml stores the color grid nodes' coordinates in projector and camera image spaces.

RDKKKKKK commented 11 months ago

Thanks, i check the distortion but find it not significant. Maybe my method is not correct, currently i simply project some random 3D points onto camera and projector planes respectively, and use cv2.findHomography and cv2.warpPerspective to warp my camera image to projector view, may i ask is there a better way to do this?

BingyaoHuang commented 11 months ago

It may work if both images/2D points are undistorted, and the random points are correctly matched.