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
1
vote
0 answers

openCV solvePnP returns wrong results

With cv2.solvePnP I try to do pose a estimation in pyvista, which is a python wrapper for vtk. The results of solvePnP seem wrong to me, i.e. the resulting translation and rotation. For simplicity I try to "undo" a translation of the camera. I…
dba
  • 325
  • 1
  • 6
  • 16
1
vote
0 answers

OpenCV - Correcting Image for Mis Alignment

I discovered the other day that my camera lens or perhaps tilted sensor is causing an object centered in front of the camera to appear off center in the captured image. As close as I can get it, the red circle is the point that should be aligned…
1
vote
0 answers

OpenCV ProjectPoints keeps plotting all image points at top left of screen

I am trying to project 3D (x,y,z) axes via the openCV projectPoints function onto a chessboard after calibration, but every time I run my code, the axes all point to a specific projected image point on the screen. example output image The…
1
vote
0 answers

cv2 findchessboardcorners order of corners not consistent

I am going to use solvepnp function to get the rotation and translation matrices for target to camera cordinate transformation. However, when I run the same chessborad image (multiple poses), I realized the order of corners found by the…
1
vote
0 answers

How do I transform a point cloud from the camera frame to the world frame using QR/Aruco code (Python CV)?

I want to merge point clouds from several depth cameras together. In order to achieve this, I am trying to convert the point cloud from each camera frame to a single world frame, defined by an aruco code (similar to a QR code). Right now, I am just…
1
vote
1 answer

OpenCV camera calibration within unknown intrinsic and extrinsic parameters: combined algorithm DLT and SolvePNP

I am attempting to estimate absolute camera position for uncalibrated image, i.e. on a single image. I have 2 sets of key points: on 3d model (object coordinates) and 2d image (uv cooordinates). Let's assume the key points are accurate. Then I…
1
vote
0 answers

How do I get the pose velocity and acceleration via the poses (rotation matrix and translation vector) obtained from solvePnP()?

I am currently getting the pose of an apriltag object via solvePnP() and projecting the points with projectPoints() This is called on a videoStream, so to try to optimise solvePnP(), I am trying to get the previous pose (pose of object in the…
Zoe
  • 31
  • 5
1
vote
0 answers

How can I estimate the pose of an object with tags attached, and always display the entire object, with known rotation and translation vectors?

I have been able to detect multiple apriltags on a board of apriltags like this: This was done using the AprilTag library: https://github.com/swatbotics/apriltag. I used OpenCV solvePnP() and projectPoints() to get the rotation and translation…
Zoe
  • 31
  • 5
1
vote
0 answers

Assertion error when using SolvePnP in OpenCv

I am trying to find the calibration from I was following the type of inputs described here, but i am having this error: error: OpenCV(4.4.0) /tmp/pip-req-build-6amqbhlx/opencv/modules/calib3d/src/solvepnp.cpp:753: error: (-215:Assertion failed) (…
1
vote
0 answers

OpenCV Image Coordinates to World Coordinates Conversion Issue

I am trying to capture an image of an object with a monocular camera and with : First a normal calibration of the camera And then a perspective calibration of the camera using known object coordinates in both the world-system and…
1
vote
0 answers

exception_catching is disabled - This exception cannot be caught

I am using the mjyc/opencv.js version and when i run the cv.solvePnP fucntion, I get this /home/madhan/solvingpnp/node_modules/@mjyc/opencv.js/opencv.js:85 throw ex ^ 6410192 - Exception catching is disabled, this…
madhan01
  • 117
  • 5
1
vote
0 answers

How to improve precision of object pose estimation solvePnP with two cameras?

Currently, I am using two cameras to estimate the pose of an object (CharucoBoard). I have tried solvePnP to get the pose of the CharucoBoard using one camera. However, there is still a linear trend of the back-front translation axis. Therefore, I…
1
vote
0 answers

SolvePnp doesn't give the same result with four points and more points

I'm computing the pose of the camera using SolvePnP function of OpenCv library and I'm facing the issue that when I give four point it gives me slightly better result than if I give more points. Here is an example of the code with some points as an…
Ja_cpp
  • 2,426
  • 7
  • 27
  • 49
1
vote
1 answer

Is there a pnp solver exposed in ARKit, or how to use opencv's SolvePnP function within a Unity3D project using the EmguCV c# wrapper

High-level context: In a Unity3D AR project, using machine learning the system provides correspondence between a set of 2D pixel coordinates in an Image, and the same set of 3D points in world coordinate. From the correspondence between these two…
Daveloper
  • 748
  • 4
  • 13
1
vote
0 answers

Solvepnp CPP function gives different results

I am trying to undersatand how solvepnp works. I tried giving 8 corner points of an object (its 2D - 3D correspondence) and intrinsics of camera. I get the result as rvec -1.59 -1.6 -0.89 Tvec -18 3000 1400 When i tried reprojecting using output…