RgbdNormals
import { RgbdNormals } 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.
Object that can compute the normals in an image. It is an object as it can cache data for speed efficiency The implemented methods are either:
- FALS (the fastest) and SRI from
Fast and Accurate Computation of Surface Normals from Range Imagesby H. Badino, D. Huber, Y. Park and T. Kanade - the normals with bilateral filtering on a depth image from
Gradient Response Maps for Real-Time Detection of Texture-Less Objectsby S. Hinterstoisser, C. Cagniart, S. Ilic, P. Sturm, N. Navab, P. Fua, and V. Lepetit
Constructors and members
static create
Creates new RgbdNormals object
create(rows: number, cols: number, depth: number, K: Mat, window_size: number, diff_threshold: number, method: number): RgbdNormals | null;8 available overloads
create(): RgbdNormals | null;create(rows: number): RgbdNormals | null;create(rows: number, cols: number): RgbdNormals | null;create(rows: number, cols: number, depth: number): RgbdNormals | null;create(rows: number, cols: number, depth: number, K: Mat): RgbdNormals | null;create(rows: number, cols: number, depth: number, K: Mat, window_size: number): RgbdNormals | null;create(rows: number, cols: number, depth: number, K: Mat, window_size: number, diff_threshold: number): RgbdNormals | null;create(rows: number, cols: number, depth: number, K: Mat, window_size: number, diff_threshold: number, method: number): RgbdNormals | null;rowsthe number of rows of the depth image normals will be computed on
colsthe number of cols of the depth image normals will be computed on
depththe depth of the normals (only CV_32F or CV_64F)
Kthe calibration matrix to use
window_sizethe window size to compute the normals: can only be 1,3,5 or 7
diff_thresholdthreshold in depth difference, used in LINEMOD algirithm
methodone of the methods to use: RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_METHOD_FALS
The RgbdNormals | 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;The this result.
apply
Given a set of 3d points in a depth image, compute the normals at each point.
apply(points: Mat, normals: Mat): void;pointsa rows x cols x 3 matrix of CV_32F/CV64F or a rows x cols x 1 CV_U16S
normalsOutput destination, filled by the native operation. a rows x cols x 3 matrix
cache
Prepares cached data required for calculation If not called by user, called automatically at first calculation
cache(): void;getRows
Return the rows configured on this RgbdNormals object.
getRows(): number;The number result.
setRows
Set the rows used by this RgbdNormals object.
setRows(val: number): void;valval argument (number).
getCols
Return the cols configured on this RgbdNormals object.
getCols(): number;The number result.
setCols
Set the cols used by this RgbdNormals object.
setCols(val: number): void;valval argument (number).
getWindowSize
Return the window size configured on this RgbdNormals object.
getWindowSize(): number;The number result.
setWindowSize
Set the window size used by this RgbdNormals object.
setWindowSize(val: number): void;valval argument (number).
getDepth
Return the depth configured on this RgbdNormals object.
getDepth(): number;The number result.
getK
Return the k configured on this RgbdNormals object.
getK(val: Mat): void;valOutput destination, filled by the native operation. val argument (Mat).
setK
Set the k used by this RgbdNormals object.
setK(val: Mat): void;valval argument (Mat).
getMethod
Return the method configured on this RgbdNormals object.
getMethod(): number;The number 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.