Skip to content

RgbdNormals

ptcloudclassOpenCV 5.0.0
import { RgbdNormals } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSRgbdNormals
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.

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 Images by 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 Objects by 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;
rows

the number of rows of the depth image normals will be computed on

cols

the number of cols of the depth image normals will be computed on

depth

the depth of the normals (only CV_32F or CV_64F)

K

the calibration matrix to use

window_size

the window size to compute the normals: can only be 1,3,5 or 7

diff_threshold

threshold in depth difference, used in LINEMOD algirithm

method

one of the methods to use: RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_METHOD_FALS

Returns

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;
Returns

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;
points

a rows x cols x 3 matrix of CV_32F/CV64F or a rows x cols x 1 CV_U16S

normals

Output 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;
Returns

The number result.

setRows

Set the rows used by this RgbdNormals object.

setRows(val: number): void;
val

val argument (number).

getCols

Return the cols configured on this RgbdNormals object.

getCols(): number;
Returns

The number result.

setCols

Set the cols used by this RgbdNormals object.

setCols(val: number): void;
val

val argument (number).

getWindowSize

Return the window size configured on this RgbdNormals object.

getWindowSize(): number;
Returns

The number result.

setWindowSize

Set the window size used by this RgbdNormals object.

setWindowSize(val: number): void;
val

val argument (number).

getDepth

Return the depth configured on this RgbdNormals object.

getDepth(): number;
Returns

The number result.

getK

Return the k configured on this RgbdNormals object.

getK(val: Mat): void;
val

Output destination, filled by the native operation. val argument (Mat).

setK

Set the k used by this RgbdNormals object.

setK(val: Mat): void;
val

val argument (Mat).

getMethod

Return the method configured on this RgbdNormals object.

getMethod(): number;
Returns

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.