Skip to content

sfm_SFMLibmvEuclideanReconstruction

sfmclassOpenCV 5.0.0
import { sfm_SFMLibmvEuclideanReconstruction } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSsfm_SFMLibmvEuclideanReconstruction
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits sfm_BaseSFM.

SFMLibmvEuclideanReconstruction class provides an interface with the Libmv Structure From Motion pipeline.

Constructors and members

static create

Creates an instance of the SFMLibmvEuclideanReconstruction class. Initializes Libmv.

create(camera_instrinsic_options: sfm_libmv_CameraIntrinsicsOptions, reconstruction_options: sfm_libmv_ReconstructionOptions): sfm_SFMLibmvEuclideanReconstruction | null;
3 available overloads
create(): sfm_SFMLibmvEuclideanReconstruction | null;
create(camera_instrinsic_options: sfm_libmv_CameraIntrinsicsOptions): sfm_SFMLibmvEuclideanReconstruction | null;
create(camera_instrinsic_options: sfm_libmv_CameraIntrinsicsOptions, reconstruction_options: sfm_libmv_ReconstructionOptions): sfm_SFMLibmvEuclideanReconstruction | null;
camera_instrinsic_options

camera instrinsic options argument (sfm_libmv_CameraIntrinsicsOptions).

reconstruction_options

reconstruction options argument (sfm_libmv_ReconstructionOptions).

Returns

The sfm_SFMLibmvEuclideanReconstruction | null result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

run

Calls the pipeline in order to perform Eclidean reconstruction.

Note: - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them.

run(points2d: MatVector): void;
points2d

Input vector of vectors of 2d points (the inner vector is per image).

run1

Calls the pipeline in order to perform Eclidean reconstruction.

Note: - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them.

run1(points2d: MatVector, K: Mat, Rs: MatVector, Ts: MatVector, points3d: MatVector): void;
points2d

Input vector of vectors of 2d points (the inner vector is per image).

K

Input/output value, modified by the native operation. Input/Output camera matrix K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}. Input parameters used as initial guess.

Rs

Output destination, filled by the native operation. Output vector of 3x3 rotations of the camera.

Ts

Output destination, filled by the native operation. Output vector of 3x1 translations of the camera.

points3d

Output destination, filled by the native operation. Output array with estimated 3d points.

getError

Returns the computed reprojection error.

getError(): number;
Returns

The number result.

getPoints

Returns the estimated 3d points.

getPoints(points3d: MatVector): void;
points3d

Output destination, filled by the native operation. Output array with estimated 3d points.

getIntrinsics

Returns the refined camera calibration matrix.

getIntrinsics(): Mat;
Returns

The Mat result. Release returned native handles with using or delete(), including handles nested in results.

getCameras

Returns the estimated camera extrinsic parameters.

getCameras(Rs: MatVector, Ts: MatVector): void;
Rs

Output destination, filled by the native operation. Output vector of 3x3 rotations of the camera.

Ts

Output destination, filled by the native operation. Output vector of 3x1 translations of the camera.

setReconstructionOptions

Setter method for reconstruction options.

setReconstructionOptions(libmv_reconstruction_options: sfm_libmv_ReconstructionOptions): void;
libmv_reconstruction_options

struct with reconstruction options such as initial keyframes, automatic keyframe selection, parameters to refine and the verbosity level.

setCameraIntrinsicOptions

Setter method for camera intrinsic options.

setCameraIntrinsicOptions(libmv_camera_intrinsics_options: sfm_libmv_CameraIntrinsicsOptions): void;
libmv_camera_intrinsics_options

struct with camera intrinsic options such as camera model and the internal camera parameters.

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.