Questions tagged [opencv-solvepnp]

This tag is used in questions related to estimating the pose of an object. In other words, the relative orientation and position with respect to a camera

The 'PNP' in solvepnp means Perspective-n-Point.

For more details camera calibration and 3D reconstruction has a detailed explanation. And if that is not enough, Head pose estimation using OpenCV can help you further.

76 questions
0
votes
0 answers

What units does SolvePNP use?

So I am trying to use openCV's solvePNP (with python) for the first time, and I am having some troubles with the inputs. I assume that the image points are just the pixel coordinates, and the object points are a 3d list of points, in the same order,…
0
votes
0 answers

How to solve pnp problem from single image without knowledge of camera fov?

I have a model of a object and a image of the object, and tried to align the object to the image. The camera pose and fov are not known, as the image are collect from different users and taken with different camera. What I do now is assuming the fov…
heLomaN
  • 1,102
  • 2
  • 12
  • 24
0
votes
0 answers

OpenCV solvePnP: perfect coordinates with Blender are not correctly transforming

I'm trying to use OpenCV's solvePnPRansac method to locate the camera position around a 3D model loaded in Blender. However, manually putting in points gives me an incorrect t/r vector and cv2.projectPoints gets the image coordinates wrong, so I…
Almond Joy
  • 89
  • 9
0
votes
1 answer

Recovering pose from 3D triangulated points

I have a stereocamera setup where I use the OpenCV method cv::triangulatePoints to detect the checkeboard corners in 3D space. I was wondering what the method is to take these triangulated points and accurately estimate a 3D pose of the…
rman
  • 13
  • 2
0
votes
0 answers

OpenCV Camera calibration and SolvePNP translate results

I am attempting to initially calibrate a sensor using a chessboard. I make around 50 run, and after I calibrate the camera I proceed in using solvepnp to teach the coordinate system, and since I am using a well defined chessboard to actually learn…
Konstantine
  • 71
  • 1
  • 9
0
votes
1 answer

Getting wrong angle of rotation of target using opencv python

I am trying to find out the angle of rotation of an object using opencv python. For this purpose I have detected the target then I am able to find out the rotation vector and I am converting it to rotation matrix and from this matrix I am…
0
votes
1 answer

OpenCV:How to use the Euler angle to determine camera orientation

I got a question about how to use the EulerAngle to determine camera's orientation First, I used solvePnP function and got two output "rvec" and "tvec", then I use Rodrigues to convert rvec to rotation matrix "R". After that, I calculated EulerAngle…
V.Lee
  • 41
  • 6
0
votes
0 answers

Why my solvePNP() function in opencv gets wrong results but MATLAB gets more reasonable results?

Detail: I use solvePnP() in OpenCV3 in ROS Kinetic to estimate the pose of my robot by led markers. The camera resulation is 128*128. When I run my code in opencv it always return ridiculous results. It seems that I did not understand PNP but MATLAB…
0
votes
1 answer

output from solvePnP doesn't match projectPoints

I get strange data from solvePnP, so I tried to check it with projectPoints: retval, rvec, tvec=cv2.solvePnP(opts, ipts, mtx, dist, flags=cv2.SOLVEPNP_ITERATIVE) print(retval,rvec,tvec) proj, jac = cv2.projectPoints(opts, rvec, tvec, mtx,…
Stepan Yakovenko
  • 6,197
  • 19
  • 92
  • 176
0
votes
1 answer

OpenCV solvePnP get position of pattern origin relative to camera

I'm currently trying to get the relative position of two Kinect v2s by getting the position of a tracking pattern both cameras can see. Unfortunately I can't seem to get the correct position of the patterns origin. This is my current code to get the…
Jay Tea
  • 33
  • 5
0
votes
1 answer

Python: solvePnP( ) not enough values to unpack?

I'm having problem with a function called cv2.solvePnP from OpenCV. This function is used to get a pose estimation of a chess board. After the following code I get an error: for fname in glob.glob('Images/Calibragem/img1*.jpg'): img =…
0
votes
1 answer

how to calculate the inliers points from my rotation and translation matrix?

In estimate the camera pose using cv::solvePnPRansac, the input are objectPoints and imagePoints. And the output are the rotation and translation matrix, plus number of inliers points I make to use GA “Gigantic algorithm” to generate a new…
0
votes
0 answers

Match the given Coordinates from the template in the scaled and rotated image using OpenCV and Python

This is the image taken from the camera I am trying to get the camera position and yaw, pitch, roll angle of the camera. But I am stuck in pointing the deformed object in the picture. My approach is - 1) Find the matching coordinates using ORB…
Ayirus
  • 1
  • 2
0
votes
2 answers

pose estimation: determine whether rotation and transmation matrix are right

Recently I'm struggling with a pose estimation problem with a single camera. I have some 3D points and the corresponding 2D points on the image. Then I use solvePnP to get the rotation and translation vectors. The problem is, how can I determine…
dudu
  • 721
  • 1
  • 7
  • 26
0
votes
0 answers

OpenCV solvePnP method works only of a small region

When I'm trying to recognize using solvePnP algorithm I'm receiving the data that helps to calculate sizes only near the bounds of the points I put into the solvePnP function. The other sizes are incorrect. Why? Is the reason - wrong camera…
Vyacheslav
  • 23,112
  • 16
  • 96
  • 174