Corner Detection for Camera Calibration - 2022
Corner Detection for Camera Calibration - 2022
Purpose
Purpose
Obtain the pixel location of rectangle corners.
Calculate parameters for camera calibration.
(Reference: Zhengyou Zhang. "A flexible new technique for camera calibration".)
Procedure
Procedure
Use Canny edge detection in OpenCV to extract edge contour.
Use Hough transform to fit vertical lines and horizontal lines that cover all the edges.
Set a distance threshold to eliminate excessive lines and only keep one line for each edge.
Compute the corners where are the intersections of lines (cross-products of the lines in homogeneous coordinates).
Sample Input
Sample Input
Canny Edge Detection
Canny Edge Detection
Fitted Hough Lines
Fitted Hough Lines
Computed Corners
Computed Corners
LM Refinement
LM Refinement
Re-Projection
Re-Projection
Camera Calibration Parameters
Camera Calibration Parameters
Parameters calculated from this project
Parameters calculated from this project