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

Strange behavior in Head pose estimation algorithm when face is moved away from center of image

I am trying to perform head pose estimation (determine the yaw, pitch, and roll of a face image). I first do face and landmark detection to obtain the 2D face landmark coordinates. Using these coordinates, along with 3D reference face landmark…
cyrusbehr
  • 1,100
  • 1
  • 12
  • 32
0
votes
0 answers

OpenCV camera pose estimation gives different results between distorted and undistorted image

I'm trying to estimate my camera position with OpenCV's solvePnp() and Rodrigues() methods. Reference for below code: obj_points: 3d real world points img_points: 2d camera pixel points took from the original (not undistorted) image mtx: intrinsic…
0
votes
0 answers

E-PnP results different between OpenCV and Matlab

I'm trying to use the PnP implementation from this repository: https://github.com/cvlab-epfl/EPnP Someone before me was using the matlab implementation, and used the code below to test it. My task now is to use OpenCV in Python instead in our…
0
votes
0 answers

solvePnP function in python without opencv !? for Autodesk Maya Python

I am currently writing a script that helps me translate points to camera data in Autodesk Maya 2023. You can install python libraries like numpy and scipy into Maya like this: "C:\Program Files\Autodesk\Maya2023\bin\mayapy.exe" -m pip install --user…
nasun
  • 1
  • 2
0
votes
1 answer

Correct Camera Position from Vectors from solvePnP [python][opencv]

I am a hobbiest so excuse my question if it might be too basic. For a test I am currently trying to recreate a camera that I created in 3D looking at a plane with 4 variable points. The camera has a value of: Tx 53 TY 28 Tz 69 Rx -5 Ry 42 Rz 0 with…
nasun
  • 1
  • 2
0
votes
1 answer

Get the relative position of the camera with extrinsic parameter but z-axis not facing to the camera

Object: I'm trying to get the relative position of the two camera's with calibration. I'm using openCV to achieve this goal. criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) if ret == True: corners2 =…
0
votes
1 answer

Distance Error between two camera center by using pose estimation

First Pose Second Pose Two cameras are fixed to rod. Distance is constant between two cameras. These two cameras are not the identical, so they should not be considered as a stereo. I measure distance between two cameras center by using…
0
votes
1 answer

Absolute Pose of Cameras for two opposite views

I am following this Opencv Pose Estimation official tutorial to get absolute poses for two views, which are attached following. As you can see, in this case, they are totally opposite to each other, therefore I am having a hard time getting the…
Muhammad Naufil
  • 2,420
  • 2
  • 17
  • 48
0
votes
0 answers

After Pose Estimation 3D Coordinate Axes Misplaced

As a newbie I'm trying calculate pose of an planar object using OpenCV's solvePnP. Howeve, I see a weird output. The axes I draw always draws axes on the corner of my frame. To draw my axis I use: drawFrameAxes(frame_copy, cameraMatrix,…
0
votes
0 answers

How to combine non linear methods of PnP, ICP and direct method?

I'm currently working on some visual odometry algorithms, I found out that there are non linear and linear methods in solving problems such as PnP and ICP, while the direct methods minimizes the intensity errors between two points. The nonlinear…
0
votes
1 answer

How to solve Assertion Error when using solvePnP?

I'm newbie in Visual Odometry and is following the tutorial of solving VO using PnP. However when I run the program, I get the following error: terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.3.0)…
Peter24
  • 71
  • 1
  • 7
0
votes
1 answer

Can solvePnP handle points outside of the Image-frame?

Kontext: I have a soccer field, and I am building a Pipeline for Camera calibration (far from actual implementing). The camera is static and has an overview of the field. After some preparation I want to take the crossings of the field-lines to…
0
votes
1 answer

Find the translation between two origins based on the camera positions

I have determined the camera position based on two origins in the field of view of the camera. Let's say origin 1 is located at (140,200) and origin 2 is located at (70,180). Following are the camera positions with respect to origin 1 and origin…
Mr. Randy Tom
  • 311
  • 5
  • 13
0
votes
0 answers

Is solvepnp giving the camera position with respect to the object the absolute camera position?

I would like to find the camera position based on the marker and use it as a ground truth. I use the following code to find the pose with solvepnp. retval, rvec, tvec, inliers = cv2.solvePnPRansac(objPoints, imgPoints, K, None, None, None, False…
Mr. Randy Tom
  • 311
  • 5
  • 13
0
votes
0 answers

How to align the external RGB camera with Azure Kinect depth sensor

I am going to set up my RGBD camera with Panasonic LUMIX GH5 and azure Kinect like a depthkit cinema. The depthkit does not provide raw depth data but the obj sequence files. I require the depth buffer which aligns with an RGB image. So I started to…