c++ - conversion from meter to pixels knowing the depth -


i have problem creation of regions of interests onto image plane. set of points in ground plane, project fixed size windows (for instance 1x2 meters) scaled respect depth. this, use function uses projection matrix 3d points of space 2d image coordinates. create roi projecting

 point1 << x3d-width/2,y3d,height,1; // respect laser ref frame  point2 << x3d+width/2,y3d,optimalbottom,1; // respect laser ref frame 

which 2 extrema points of rectangle , can assume optimalbottom = 0.0.

problem if use projection, computed parameters of fisheye camera, lead windows not positioned onto rectified image (i need use rectified image).
thought remapping (with opencv remap) remap extrema coordinates lead distortion due fisheye effect on image. instance position of rectangles but, on lateral side of image width , height of such rectngles distorted.
turned in mind remap original points generate rectangles , adding fixed values width , height directly expressed in pixels.

the problem is:

knowing dimensions of rectangle , depth, possible conversion meters pixels?

for instance, have correct values in pixels
center(projected, in pixels)-width/2(fixed, in pixels)
center(projected, in pixels)+width/2(fixed, in pixels)

to find total width of rectangle such width must not fixed must depend on depth/distance of rectangle. maybe stupid problem cannot figure out workaround this.
thank you


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -