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
2
votes
0 answers

solvePnP results differ too much from expected results (Python, OpenCV)

I have a car with a camera, an imu and a gps on top of it. The camera takes pictures while driving around. The pictures and the gps coordinates are synchronized. Now, I am trying to get the camera pose from the pictures (relative to the imu), but…
2
votes
0 answers

Camera position in world coordinate is not working but object pose in camera co ordinate system is working properly

I am working on the camera (iphone camera) pose estimation for head mount device (Hololens) using LEDs as a marker, using the solvepnp. I have calibrated the camera below is the camera intrinsic parameters /* approx model*/ double focal_length =…
2
votes
0 answers

Where is the returning values of cv2.solvePnP actually holding the camera's position?

There's a cube and a camera in the real world. Each point coordinates are shown in the following figure. It is clear that the camera's coordinate is at [0,0,1]. We can calculate each position's displayed coordinates on screen. import numpy as…
2
votes
0 answers

OpenCV to WebGL

I'm trying to use OpenCV with WebGL. In OpenCV, I'm looking for a projection (a priori the projection matrix of the camera) that I get using SolvePnp. When I display the projection obtained in OpenCV with the 'projectPoints' function, everything is…
kopacabana
  • 407
  • 3
  • 15
2
votes
1 answer

OpenCV : SolvePnP is giving different results for same input parameters

I am trying to estimate the 3D Pose of an object using solvePnP in python. But the problem is even if I kept both the camera and object static, the output of solvePnP (rvec and tvec) are changing. The world coordinates system is centered on the…
My Spy
  • 1,221
  • 17
  • 50
1
vote
0 answers

C++ OpenCV 4.4.0 solvePnP error: (-215:Assertion failed)

I am trying to write a simple augmented reality program that, given and output video and the camera intrinsic parameters, projects 3 lines into each video frame. These lines are the x,y and z axis. I'm asking for help not for the program itself but…
kerkeplank
  • 23
  • 2
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
  • 73
  • 3
1
vote
1 answer

How can I solvePnP with fisheye camera parameters?

I saw that OpenCV's solvePnP() function assume that your camera parameters are from a pinhole model. But I calibrated my camera using cv.fisheye module, so I wanted to know how to use solvePnP with parameters obtained from that fisheye module. How…
off99555
  • 2,671
  • 2
  • 24
  • 36
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

Building OpenCV.js with wrappers for projectPoints + solvePnP

Porting to JavaScript: "Cannot register public name 'projectPoints' twice" I did the following: git clone https://github.com/opencv/opencv.git git clone https://github.com/opencv/opencv_contrib.git I added the following in def get_build_flags(self)…
KaviKrish
  • 11
  • 1
  • 3
1
vote
0 answers

Pose Estimation - cv::SolvePnP with Scenekit - Coordinate System Question

I have been working on Pose Estimation (rectifying key points on a 3D model with 2D points on an image to match pose) via OpenCV's cv::solvePNP, using features / key points from Apples Vision framework. TL-DR: My scene kit model is being translated…
vade
  • 406
  • 2
  • 16
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,038
  • 6
  • 20
  • 38
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
  • 533
  • 2
  • 12