Homography Matrix in Matlab, warped image to straight image. I have a rectangula
ID: 663496 • Letter: H
Question
Homography Matrix in Matlab, warped image to straight image.
I have a rectangular frame of 35x15 cm drawn on a white wall and a camera facing this wall. The camera is located below the midpoint of the frame and the image of the rectangular is therefore warped. I am suppose to estimate the positions of laser dots within this rectangular and I am therefore mapping the drawn rectangle with the image coordinates in Matlab to get a Homography Matrix. So the Homographic Matrix computes the planar homography between the point coordinates on the plane (M) and the image point coordinates (m), where m = H*M.
Now I would like to warp the image to see if it results in a straight rectangular, so I'd like to see if
inv(H)*(image coordinates) = (rectangular with size 35x15). Is this something that can be achieved in Matlab?
Explanation / Answer
function v = homography_solve(pin, pout) % HOMOGRAPHY_SOLVE finds a homography from point pairs % V = HOMOGRAPHY_SOLVE(PIN, POUT) takes a 2xN matrix of input vectors and % a 2xN matrix of output vectors, and returns the homogeneous % transformation matrix that maps the inputs to the outputs, to some % approximation if there is noise. % % This uses the SVD method of % http://www.robots.ox.ac.uk/%7Evgg/presentations/bmvc97/criminispaper/node3.html
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.