fisheye_solvePnP
import { fisheye_solvePnP } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Finds an object pose from 3D-2D point correspondences for fisheye camera model.
fisheye_solvePnP(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, flags: number, criteria: TermCriteria): boolean;4 available overloads
fisheye_solvePnP(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat): boolean;fisheye_solvePnP(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean): boolean;fisheye_solvePnP(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, flags: number): boolean;fisheye_solvePnP(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, flags: number, criteria: TermCriteria): boolean;objectPointsArray of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. vector<Point3d> can also be passed here.
imagePointsArray of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. vector<Point2d> can also be passed here.
cameraMatrixInput camera intrinsic matrix
\cameramatrix{A}.distCoeffsInput vector of distortion coefficients (4x1/1x4).
rvecOutput destination, filled by the native operation. Output rotation vector (see
Rodrigues) that, together with tvec, brings points from the model coordinate system to the camera coordinate system.tvecOutput destination, filled by the native operation. Output translation vector.
useExtrinsicGuessParameter used for #SOLVEPNP_ITERATIVE. If true (1), the function uses the provided rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further optimizes them.
flagsMethod for solving a PnP problem: see
calib3d_solvePnP_flagsThis function returns the rotation and the translation vectors that transform a 3D point expressed in the object coordinate frame to the camera coordinate frame, using different methods:- P3P methods (
SOLVEPNP_P3P,SOLVEPNP_AP3P): need 4 input points to return a unique solution. SOLVEPNP_IPPEInput points must be >= 4 and object points must be coplanar.SOLVEPNP_IPPE_SQUARESpecial case suitable for marker pose estimation. Number of input points must be 4. Object points must be defined in the following order:- point 0: [-squareLength / 2, squareLength / 2, 0]
- point 1: [ squareLength / 2, squareLength / 2, 0]
- point 2: [ squareLength / 2, -squareLength / 2, 0]
- point 3: [-squareLength / 2, -squareLength / 2, 0]
- for all the other flags, number of input points must be >= 4 and object points can be in any configuration.
- P3P methods (
criteriaTermination criteria for internal undistortPoints call. The function internally undistorts points with
undistortPointsand callcv::solvePnP, thus the input are very similar. Check there and Perspective-n-Points is described incalib3d_solvePnPfor more information.
The boolean result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.