opencv - Homography from 3D plane to plane parallel to image plane -


i have image in there calibration target (known geometry) in scene (let's simple 2" x 2" square lying on table). perform perspective transformation (using warpperspective()) resulting image orthogonal view of table (as if camera axis parallel table normal). standard procedure computing homography general plane different general plane @ least 4 correspondences known in 2 images of same scene (using getperspectivetransform()). in case have 1 image, correct thing "make up" plane , force correspondences arbitrary position on plane? example, in this situation make correspondences between 4 detected corners (a,b,c,d) in image , 4 points of choosing (which define pixel->real world scale. example, choose a' = (0,0), b' = (20,20), c' = (0,20), d' = (20,0) indicate in resulting image there 10 pixels per inch. of course choose scale here, , choose position square target land in output (i.e. a' = (100,100), b' = (120,120), c' = (100,120), d' = (120,100) ).

is "correct" way this? there better way compute projective transform looks directly @ plane defined set of points in image known in plane?

in case have 1 image, correct thing "make up" plane , force correspondences arbitrary position on plane?

yes.

note getperspectivetransform in present implementation requires 4 correspondences. finds 3x3 perspective transform, has 8 degrees of freedom (the [3,3] element fixed 1), needs 4 non-colinear correspondences, , such correspondences enough. in contrast, findhomography uses ransac deal uncertainty , can figure out of correspondences should trusted , outliers. if prefer stick linear least squares, adopt getperspectivetransform accept >=4 pairs.

however, if apply perspective transform converts distorted square target t onto perfect square, make planes coplanar t line-parallel. other planes (e.g., perpendicular t) not line-parallel after transform.

if want remove perspective, i.e., change projection orthographic, can't perspective transform alone. you'd need know depth of objects in scene, project onto plane without perspective.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -