opencv - Calculating distance between 2 homography planes that have shared ground plane -


i think easiest explain problem image: two cubes

i have 2 cubes (same size) laying on table. 1 of side marked green color (for easy tracking). want calculate relative position (x,y) of left cube right cube (red line on picture) in cube size unit.

is possible? know problem simple if 2 green sides have common plane - top side of cube can't use tracking. calculate homography 1 square , multiply other cube corner.

should 'rotate' homography matrix multiplying 90deegre rotation matrix 'ground' homography? plan processing in smartphone scenario maybe gyroscope, camera intrinsic params can of value.

this possible. let's assume (or state) table z=0-plane , first box @ origin of plane. means green corners of left box have (table-)coordinates (0,0,0),(1,0,0),(0,0,1) , (1,0,1). (your box has size 1). have pixel coordinates of these points. if give these 2d , 3d-values (as intrinsics , distortion of camera) cv::solvepnp, relative pose of camera box (and plane).

in next step, have intersect table-plane ray goes camera's center through lower right corner pixels of second green box. intersection (x,y,0) , [x-1,y] translation between right corners of boxes.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -