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.

98 questions
0
votes
1 answer

Determine Field Of View using known distance between points on image and its perspective (OpenCV python)

Got an image with a chessboard of known size (the cyan line is 2cm long) the naive way of determining the FOV would be like this: catX = x1 - x0 catY = y1 - y0 hypoPx = sqrt(catX ** 2 + catY ** 2) pxRatio = hypoPx / 200 #…
mderk
  • 796
  • 4
  • 13
0
votes
0 answers

how to cast ray from camera origin along optical axis, passing through prinicple point and perpendicular to image plane in Opencv

I have rvec, tvec from solve-PnP and RMat (from Rodriques) in OpenCV framework for a given camera. The tvec (z) is accurate as far as depth, that I can tell. Remaining values are from extensive camera calibration (K) routines and the general setup…
0
votes
0 answers

How to get 2d correspondances for 3d cad model points for non textured objects?

I have to estimate a very accurate 6D Pose of regular shape objects (like blocks for construction ) without any textured. I have the 3D CAD model of the object, and I know roughly the coordinates of the blocks. So the camera is pointing down to the…
Macedon971
  • 303
  • 2
  • 11
0
votes
0 answers

Is it possible to use only the subpart of a module in javascript?

For my project, I need only the calib3d subpart of the opencv.js module. Since I am trying to create this file for a website, the whole file/folder cannot be more than 2 MB, where as opencv.js itself is around 13 MB. Specifically, I need only…
0
votes
1 answer

Estimating the pose of a rectangular object is unstable

I'm using the following code to find the rotational and translation vector of a rectangular object. The height and the width of the rectangular object are 33 and 44 cm respectively. So I'm using the following code to create the object points. width…
user6038900
0
votes
1 answer

Pose Estimation with SolvePNP

I am attempting to solve for the pose of several time-lapse cameras that are overlooking a glacier in Alaska. So far, all estimated pose's have been wildly inaccurate. The units I am using for real world coordinates are UTM's (Easting/Northing) and…
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,634
  • 2
  • 22
  • 33
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
  • 119
  • 12
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
  • 51
  • 1
  • 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
  • 8,670
  • 28
  • 113
  • 206