sfm_BaseSFM
import { sfm_BaseSFM } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods.
base class BaseSFM declares a common API that would be used in a typical scene reconstruction scenario
Constructors and members
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;The this result.
run
Run structure-from-motion reconstruction from tracked 2D points and update the stored cameras and 3D points.
run(points2d: MatVector): void;points2dpoints2d argument (MatVector).
run1
Reconstruct tracked 2D points, refine the input intrinsic matrix and fill the output rotations, translations and 3D points.
run1(points2d: MatVector, K: Mat, Rs: MatVector, Ts: MatVector, points3d: MatVector): void;points2dpoints2d argument (MatVector).
KInput/output value, modified by the native operation. k argument (Mat).
RsOutput destination, filled by the native operation. rs argument (MatVector).
TsOutput destination, filled by the native operation. ts argument (MatVector).
points3dOutput destination, filled by the native operation. points3d argument (MatVector).
getError
Return the error configured on this sfm_BaseSFM object.
getError(): number;The number result.
getPoints
Return the points configured on this sfm_BaseSFM object.
getPoints(points3d: MatVector): void;points3dOutput destination, filled by the native operation. points3d argument (MatVector).
getIntrinsics
Return the intrinsics configured on this sfm_BaseSFM object.
getIntrinsics(): Mat;The Mat result. Release returned native handles with using or delete(), including handles nested in results.
getCameras
Return the cameras configured on this sfm_BaseSFM object.
getCameras(Rs: MatVector, Ts: MatVector): void;RsOutput destination, filled by the native operation. rs argument (MatVector).
TsOutput destination, filled by the native operation. ts argument (MatVector).
setReconstructionOptions
Set the reconstruction options used by this sfm_BaseSFM object.
setReconstructionOptions(libmv_reconstruction_options: sfm_libmv_ReconstructionOptions): void;libmv_reconstruction_optionslibmv reconstruction options argument (sfm_libmv_ReconstructionOptions).
setCameraIntrinsicOptions
Set the camera intrinsic options used by this sfm_BaseSFM object.
setCameraIntrinsicOptions(libmv_camera_intrinsics_options: sfm_libmv_CameraIntrinsicsOptions): void;libmv_camera_intrinsics_optionslibmv camera intrinsics options argument (sfm_libmv_CameraIntrinsicsOptions).
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.