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

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

how to apply translation vector and rotation vector of solvePnp algorithm to the three.js camera

First of All I am a new bee in 3d world and in threejs. I have a real 3D X Model as obj. Then I have the real X 2d photo that is taken from a specific angle and distance. My goal is to show the 3d X model in three js from that specific angle and…
smoothumut
  • 3,103
  • 1
  • 17
  • 30
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…
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…
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…
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
  • 756
  • 4
  • 12
0
votes
0 answers

opencv projectPoints' results do not match original points

I'm trying get square brick's transformation matrix from picture. I use SOLVEPNP_IPPE_SQUARE method, opencv solvePnP fucntion. vector objp(4); objp[0] = Point3d(-1.60, 1.60, 0.); objp[1] = Point3d(1.60, 1.60, 0.); objp[2] = Point3d(1.60,…
alma
  • 1
  • 1
  • 1
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 use the detected contour of the object into solvePnP and RANSAC for real time Pose estimation and tracking?

I have code to extract the contour of the object from prior knowledge taking into account the object is cuboid with a rectangular shape. I'm using these features because the objects are without textures so ORB or SIFT or SURF not going to work. I…
Macedon971
  • 95
  • 7
0
votes
0 answers

How to use contours and corners Functions to get 2D correspondances for 3D cad model points in solvePnP?

I have code to extract the 2D coordinates from prior knowledge, using e.g. Harris Corners and contour of the object. I'm using these features because the objects are without textures so ORB or SIFT or SURF not going to work. My goal is to get the 2D…
Macedon971
  • 95
  • 7
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
  • 95
  • 7
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
0 answers

Is there any alternative to cv.solvePnP() in javascript?

I have the objectPoints, ImagePoints, cameraMatrix and distortionCoefficients but i am unable to calculate the translation and rotation vectors because cv.solvePnP() is not available in openCV.js. Does anybody know the formula for calculating…
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…