Ask Your Question
0

OpenCV Relationship between image matrix and results of solvePnP in AR application

asked 2019-07-24 20:00:15 -0600

liam1135 gravatar image

updated 2019-07-25 00:06:38 -0600

Hey, I want to better understand how the results of solvePnP are affected by image input. If I'm displaying a 1080 x 2220 camera image to the user in an AR app do I need to send the same image to opencv to run through solvePnP or can I send a much lower resolution version for speed reasons? I'm having troubles with translation returned by solvePnP and I get the impression this is due to the fact I send a 480x640 image to openCV. Would I need to scale the resulting pose matrix in same way to align the calculation with the higher resolution camera image in the app?

My object in Unity appears to always position itself in the bottom left of the marker. If the marker is rotated in 90 degree increments it rotates itself around the centerpoint of the marker to find the bottom left.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-07-27 13:30:07 -0600

YM.H gravatar image

Hi Liam, I'm curious about why your aspect ratio is changed?(1080 : 2220 not equal to 480:640) If the aspect ratio changed, this means the image has deformation or cropping. And that is hard to define the new image coordinate system. Another thing, I think you should concern is solvePnP will use camera matrix. Sine you resize the resolution, the camera matrix will change. In my experience, solvePnP depends on good calibration of camera intrinsic(camera matrix + distortion coefficients) and you will get better result of object pose (rotation vector and translation vector). The definition of object point(Especially the origin point) for solvePnP are also important, sine you will map it to Unity. Hope this suggestion can help you.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-07-24 19:58:20 -0600

Seen: 451 times

Last updated: Jul 25 '19