projectPointsSepJ
import { projectPointsSepJ } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Projects 3D points to an image plane.
The function computes the 2D projections of 3D points to the image plane, given intrinsic and
extrinsic camera parameters. Optionally, the function computes Jacobians -matrices of partial
derivatives of image points coordinates (as functions of all the input parameters) with respect to
the particular parameters, intrinsic and/or extrinsic. The Jacobians are used during the global
optimization in calibrateCamera, solvePnP, and stereoCalibrate. The function itself
can also be used to compute a re-projection error, given the current intrinsic and extrinsic
parameters.
Note: Coordinate Systems:
- Input (
objectPoints): 3D points in the world coordinate frame. - Output (
imagePoints): 2D projections in pixel coordinates of the image plane, with distortion applied. The coordinates(u, v)are measured in pixels from the top-left corner of the image.
The transformation chain is: World coordinates → Camera coordinates (via rvec/tvec) → Normalized camera coordinates → Distortion applied → Pixel coordinates (via cameraMatrix).
Note: By setting rvec = tvec = [0, 0, 0], or by setting cameraMatrix to a 3x3 identity matrix,
or by passing zero distortion coefficients, one can get various useful partial cases of the
function. This means, one can compute the distorted coordinates for a sparse set of points or apply
a perspective transformation (and also compute the derivatives) in the ideal zero-distortion setup.
projectPointsSepJ(objectPoints: Mat, rvec: Mat, tvec: Mat, cameraMatrix: Mat, distCoeffs: Mat, imagePoints: Mat, dpdr: Mat, dpdt: Mat, dpdf: Mat, dpdc: Mat, dpdk: Mat, dpdo: Mat, aspectRatio: number): void;6 available overloads
projectPointsSepJ(objectPoints: Mat, rvec: Mat, tvec: Mat, cameraMatrix: Mat, distCoeffs: Mat, imagePoints: Mat, dpdr: Mat, dpdt: Mat): void;projectPointsSepJ(objectPoints: Mat, rvec: Mat, tvec: Mat, cameraMatrix: Mat, distCoeffs: Mat, imagePoints: Mat, dpdr: Mat, dpdt: Mat, dpdf: Mat): void;projectPointsSepJ(objectPoints: Mat, rvec: Mat, tvec: Mat, cameraMatrix: Mat, distCoeffs: Mat, imagePoints: Mat, dpdr: Mat, dpdt: Mat, dpdf: Mat, dpdc: Mat): void;projectPointsSepJ(objectPoints: Mat, rvec: Mat, tvec: Mat, cameraMatrix: Mat, distCoeffs: Mat, imagePoints: Mat, dpdr: Mat, dpdt: Mat, dpdf: Mat, dpdc: Mat, dpdk: Mat): void;projectPointsSepJ(objectPoints: Mat, rvec: Mat, tvec: Mat, cameraMatrix: Mat, distCoeffs: Mat, imagePoints: Mat, dpdr: Mat, dpdt: Mat, dpdf: Mat, dpdc: Mat, dpdk: Mat, dpdo: Mat): void;projectPointsSepJ(objectPoints: Mat, rvec: Mat, tvec: Mat, cameraMatrix: Mat, distCoeffs: Mat, imagePoints: Mat, dpdr: Mat, dpdt: Mat, dpdf: Mat, dpdc: Mat, dpdk: Mat, dpdo: Mat, aspectRatio: number): void;objectPointsArray of object points expressed wrt. the world coordinate frame. A 3xN/Nx3 1-channel or 1xN/Nx1 3-channel (or vector<Point3f> ), where N is the number of points in the view.
rvecThe rotation vector (
Rodrigues) that, together with tvec, performs a change of basis from world to camera coordinate system, seecalibrateCamerafor details.tvecThe translation vector, see parameter description above.
cameraMatrixCamera intrinsic matrix
\cameramatrix{A}.distCoeffsInput vector of distortion coefficients
\distcoeffs. If the vector is empty, the zero distortion coefficients are assumed.imagePointsOutput destination, filled by the native operation. Output array of image points in pixel coordinates, 1xN/Nx1 2-channel, or vector<Point2f> .
dpdrOutput destination, filled by the native operation. dpdr argument (Mat).
dpdtOutput destination, filled by the native operation. dpdt argument (Mat).
dpdfOutput destination, filled by the native operation. dpdf argument (Mat).
dpdcOutput destination, filled by the native operation. dpdc argument (Mat).
dpdkOutput destination, filled by the native operation. dpdk argument (Mat).
dpdoOutput destination, filled by the native operation. dpdo argument (Mat).
aspectRatioOptional "fixed aspect ratio" parameter. If the parameter is not 0, the function assumes that the aspect ratio (
f_x / f_y) is fixed and correspondingly adjusts the jacobian matrix.
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.