Skip to content

fisheye_solvePnPRansac

geometryfunctionOpenCV 5.0.0
import { fisheye_solvePnPRansac } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSobjectPoints, imagePoints, cameraMatrix, distCoeffs
FUNCTIONfisheye_solvePnPRansac
RETURN TYPEboolean
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Finds an object pose from 3D-2D point correspondences using the RANSAC scheme for fisheye camera moodel.

fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, iterationsCount: number, reprojectionError: number, confidence: number, inliers: Mat, flags: number, criteria: TermCriteria): boolean;
8 available overloads
fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat): boolean;
fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean): boolean;
fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, iterationsCount: number): boolean;
fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, iterationsCount: number, reprojectionError: number): boolean;
fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, iterationsCount: number, reprojectionError: number, confidence: number): boolean;
fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, iterationsCount: number, reprojectionError: number, confidence: number, inliers: Mat): boolean;
fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, iterationsCount: number, reprojectionError: number, confidence: number, inliers: Mat, flags: number): boolean;
fisheye_solvePnPRansac(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, useExtrinsicGuess: boolean, iterationsCount: number, reprojectionError: number, confidence: number, inliers: Mat, flags: number, criteria: TermCriteria): boolean;
objectPoints

Array 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 be also passed here.

imagePoints

Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. vector<Point2d> can be also passed here.

cameraMatrix

Input camera intrinsic matrix \cameramatrix{A} .

distCoeffs

Input vector of distortion coefficients (4x1/1x4).

rvec

Output 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.

tvec

Output destination, filled by the native operation. Output translation vector.

useExtrinsicGuess

Parameter 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.

iterationsCount

Number of iterations.

reprojectionError

Inlier threshold value used by the RANSAC procedure. The parameter value is the maximum allowed distance between the observed and computed point projections to consider it an inlier.

confidence

The probability that the algorithm produces a useful result.

inliers

Output destination, filled by the native operation. Output vector that contains indices of inliers in objectPoints and imagePoints .

flags

Method for solving a PnP problem: see calib3d_solvePnP_flags

criteria

Termination criteria for internal undistortPoints call. The function interally undistorts points with undistortPoints and call cv::solvePnP, thus the input are very similar. More information about Perspective-n-Points is described in calib3d_solvePnP for more information.

Returns

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.