World imports
wasmCV is a WebAssembly guest module interface for computer vision based on OpenCV.
- Imports:
- interface
wasm:cv/types
- interface
wasm:cv/mat
- interface
wasm:cv/cv
- interface
wasm:cv/dnn
- interface
wasm:cv/objdetect
- interface
- Exports:
- interface
wasm:cv/request
- interface
Import interface wasm:cv/types
Types
record size
Record Fields
x
:s32
y
:s32
record scalar
Record Fields
val1
:f32
val2
:f32
val3
:f32
val4
:f32
record rect
Record Fields
record RGBA
Record Fields
r
:u8
g
:u8
b
:u8
a
:u8
enum border-type
Enum Cases
border-constant
border-replicate
border-reflect
border-wrap
border-reflect101
border-transparent
border-default
border-isolated
enum adaptive-threshold-type
Enum Cases
adaptive-threshold-mean
adaptive-threshold-gaussian
enum threshold-type
Enum Cases
threshold-binary
threshold-binary-inv
threshold-trunc
threshold-to-zero
threshold-to-zero-inv
threshold-mask
threshold-otsu
tthreshold-triangle
enum data-layout-type
Enum Cases
data-layout-unknown
data-layout-nd
data-layout-nchw
data-layout-ncdhw
data-layout-nhwc
data-layout-ndhwc
data-layout-planar
enum padding-mode-type
Enum Cases
padding-mode-null
padding-mode-crop-center
padding-mode-letterbox
record blob-params
Record Fields
scale-factor
:f32
size
:size
mean
:scalar
swap-RB
:bool
ddepth
:u8
data-layout
:data-layout-type
padding-mode
:padding-mode-type
border
:scalar
record mix-max-loc-result
Record Fields
enum hershey-font-type
Enum Cases
hershey-font-simplex
hershey-font-plain
hershey-font-duplex
hershey-font-complex
hershey-font-triplex
hershey-font-complex-small
hershey-font-script-simplex
hershey-font-script-complex
hershey-font-italic
enum interpolation-type
Enum Cases
interpolation-nearest
interpolation-linear
interpolation-cubic
interpolation-area
interpolation-lanczos4
enum color-coversion-type
Enum Cases
color-BGR-to-BGRA
color-RGB-to-RGBA
color-BGRA-to-BGR
color-RGBA-to-RGB
color-BGR-to-RGBA
color-RGB-to-BGRA
color-RGBA-to-BGR
color-BGRA-to-RGB
color-BGR-to-RGB
color-RGB-to-BGR
color-BGRA-to-RGBA
color-RGBA-to-BGRA
color-BGR-to-gray
color-RGB-to-gray
color-gray-to-BGR
color-gray-to-RGB
color-gray-to-BGRA
color-gray-to-RGBA
color-BGRA-to-gray
color-RGBA-to-gray
Import interface wasm:cv/mat
mat resource is a matrix of bytes, wrapper around the cv::Mat type.
Types
type mix-max-loc-result
Enum Cases
cv8u
cv8s
cv16u
cv16s
cv32s
cv32f
cv64f
resource mat
Functions
[constructor]mat: func
Create a new Mat.
Return values
- own<
mat
>
[static]mat.new-with-size: func
Create a new Mat with the specified size and type.
Params
cols
:u32
rows
:u32
mattype
:mattype
Return values
- own<
mat
>
[method]mat.clone: func
Clone returns a cloned full copy of the Mat.
Params
self
: borrow<mat
>
Return values
- own<
mat
>
[method]mat.close: func
Close the Mat
Params
self
: borrow<mat
>
[method]mat.cols: func
Cols returns the number of columns for this Mat.
Params
self
: borrow<mat
>
Return values
u32
[method]mat.rows: func
Rows returns the number of rows for this Mat.
Params
self
: borrow<mat
>
Return values
u32
[method]mat.region: func
Region returns a new Mat that points to a region of this Mat. Changes made to the region Mat will affect the original Mat, since they are pointers to the underlying OpenCV Mat object.
Params
Return values
- own<
mat
>
[method]mat.copy-to: func
CopyTo copies Mat into destination Mat.
Params
[method]mat.mattype: func
MatType returns the type of the Mat.
Params
self
: borrow<mat
>
Return values
[method]mat.size: func
Size returns an array with one element for each dimension containing the size of that dimension for the Mat.
Params
self
: borrow<mat
>
Return values
- list<
u32
>
[method]mat.empty: func
Empty returns true if the Mat is empty.
Params
self
: borrow<mat
>
Return values
bool
[method]mat.get-float-at: func
GetFloatAt returns the value at the specified row and column as a f32.
Params
self
: borrow<mat
>row
:u32
col
:u32
Return values
f32
[method]mat.set-float-at: func
SetFloatAt sets the value at the specified row and column as a f32.
Params
self
: borrow<mat
>row
:u32
col
:u32
val
:f32
[method]mat.get-uchar-at: func
GetUCharAt returns the value at the specified row and column as a u8.
Params
self
: borrow<mat
>row
:u32
col
:u32
Return values
u8
[method]mat.set-uchar-at: func
SetUCharAt sets the value at the specified row and column as a u8.
Params
self
: borrow<mat
>row
:u32
col
:u32
val
:u8
[method]mat.get-int-at: func
GetIntAt returns the value at the specified row and column as a s32.
Params
self
: borrow<mat
>row
:u32
col
:u32
Return values
s32
[method]mat.set-int-at: func
SetIntAt sets the value at the specified row and column as a s32.
Params
self
: borrow<mat
>row
:u32
col
:u32
val
:s32
[method]mat.get-float-at3: func
GetFloatAt3 returns the value at the specified x, y, z as a f32.
Params
self
: borrow<mat
>x
:u32
y
:u32
z
:u32
Return values
f32
[method]mat.set-float-at3: func
SetFloatAt3 sets the value at the specified x, y, z as a f32.
Params
self
: borrow<mat
>x
:u32
y
:u32
z
:u32
val
:f32
[method]mat.get-uchar-at3: func
GetUCharAt3 returns the value at the specified x, y, z as a u8.
Params
self
: borrow<mat
>x
:u32
y
:u32
z
:u32
Return values
u8
[method]mat.set-uchar-at3: func
SetUCharAt3 sets the value at the specified x, y, z as a u8.
Params
self
: borrow<mat
>x
:u32
y
:u32
z
:u32
val
:u8
[method]mat.get-int-at3: func
GetIntAt3 returns the value at the specified x, y, z as a s32.
Params
self
: borrow<mat
>x
:u32
y
:u32
z
:u32
Return values
s32
[method]mat.set-int-at3: func
SetIntAt3 sets the value at the specified x, y, z as a s32.
Params
self
: borrow<mat
>x
:u32
y
:u32
z
:u32
val
:s32
[method]mat.get-vecb-at: func
GetVecbAt returns a vector of bytes. Its size corresponds to the number of channels of the Mat.
Params
self
: borrow<mat
>row
:u32
col
:u32
Return values
- list<
u8
>
[method]mat.get-vecf-at: func
GetVecfAt returns a vector of floats. Its size corresponds to the number of channels of the Mat.
Params
self
: borrow<mat
>row
:u32
col
:u32
Return values
- list<
f32
>
[method]mat.get-veci-at: func
GetVeciAt returns a vector of s32. Its size corresponds to the number of channels of the Mat.
Params
self
: borrow<mat
>row
:u32
col
:u32
Return values
- list<
s32
>
[method]mat.reshape: func
Reshape changes the shape and/or the number of channels of a 2D matrix without copying the data.
For further details, please see: https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#a4eb96e3251417fa88b78e2abd6cfd7d8
Params
self
: borrow<mat
>channels
:u32
rows
:u32
Return values
- own<
mat
>
[method]mat.row-range: func
RowRange creates a matrix header for the specified row span.
For further details, please see: https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#aa6542193430356ad631a9beabc624107
Params
self
: borrow<mat
>start
:u32
end
:u32
Return values
- own<
mat
>
[method]mat.col-range: func
ColRange creates a matrix header for the specified column span.
For further details, please see: https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#aadc8f9210fe4dec50513746c246fa8d9
Params
self
: borrow<mat
>start
:u32
end
:u32
Return values
- own<
mat
>
[method]mat.min-max-loc: func
MinMaxLoc finds the global minimum and maximum in an array.
For further details, please see: https://docs.opencv.org/trunk/d2/de8/group__core__array.html#gab473bf2eb6d14ff97e89b355dac20707
Params
self
: borrow<mat
>
Return values
Import interface wasm:cv/cv
Types
type border-type
Functions
arrowed-line: func
drawing functions ArrowedLine draws a arrow segment pointing from the first point to the second one.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga0a165a3ca093fd488ac709fdf10c05b2
Params
rectangle: func
Rectangle draws a simple, thick, or filled up-right rectangle.
For further details, please see: https://docs.opencv.org/4.x/d6/d6e/group__imgproc__draw.html#ga07d2f74cadcf8e305e810ce8f3d1e1b7
Params
circle: func
Circle draws a circle.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gaf10604b069374903dbd0f0488cb43670
Params
line: func
Line draws a line segment connecting two points.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga7078a9fae8c7e7d13d24dac2520ae4a2
Params
put-text: func
PutText draws a text string. It renders the specified text string into the img Mat at the location passed in the “org” param, using the desired font face, font scale, color, and line thinkness.
For further details, please see: http://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga5126f47f883d730f633d74f07456c576
Params
img
: own<mat
>text
:string
org
:size
font-face
:hershey-font-type
font-scale
:f64
c
:RGBA
thickness
:s32
adaptive-threshold: func
imgproc functions AdaptiveThreshold applies a fixed-level threshold to each array element.
For further details, please see: https://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga72b913f352e4a1b1b397736707afcde3
Params
src
: own<mat
>max-value
:f32
adaptive-type
:adaptive-threshold-type
threshold-type
:threshold-type
block-size
:u32
c
:f32
Return values
- own<
mat
>
blur: func
Blur blurs an image Mat using a normalized box filter.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga8c45db9afe636703801b0b2e440fce37
Params
Return values
- own<
mat
>
box-filter: func
BoxFilter blurs an image using the box filter.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gad533230ebf2d42509547d514f7d3fbc3
Params
Return values
- own<
mat
>
gaussian-blur: func
GaussianBlur blurs an image using a Gaussian filter.
For further details, please see: https://docs.opencv.org/4.x/d4/d86/group__imgproc__filter.html#gae8bdcd9154ed5ca3cbc1766d960f45c1
Params
src
: own<mat
>size
:size
sigma-x
:f32
sigma-y
:f32
border
:border-type
Return values
- own<
mat
>
median-blur: func
MedianBlur blurs an image using the median filter.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga564869aa33e58769b4469101aac458f9
Params
Return values
- own<
mat
>
threshold: func
Threshold applies a fixed-level threshold to each array element.
For further details, please see: https://docs.opencv.org/3.3.0/d7/d1b/group__imgproc__misc.html#gae8a4a146d1ca78c626a53577199e9c57
Params
src
: own<mat
>thresh
:f32
max-value
:f32
threshold-type
:threshold-type
Return values
- own<
mat
>
cvt-color: func
CvtColor converts an image from one color space to another.
For further details, please see: http://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga4e0972be5de079fed4e3a10e24ef5ef0
Params
src
: own<mat
>code
:color-coversion-type
Return values
- own<
mat
>
transpose-ND: func
Transpose for n-dimensional matrices.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#gab1b1274b4a563be34cdfa55b8919a4ec
Params
src
: own<mat
>order
: list<s32
>
Return values
- own<
mat
>
resize: func
Resize resizes an image. It resizes the image src down to or up to the specified size, storing the result in dst. Note that src and dst may be the same image. If you wish to scale by factor, an empty sz may be passed and non-zero fx and fy. Likewise, if you wish to scale to an explicit size, a non-empty sz may be passed with zero for both fx and fy.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga47a974309e9102f5f08231edc7e7529d
Params
src
: own<mat
>size
:size
fx
:f32
fy
:f32
interp
:interpolation-type
Return values
- own<
mat
>
Import interface wasm:cv/dnn
Types
type mat
Enum Cases
net-backend-default
net-backend-halide
net-backend-openvino
net-backend-opencv
net-backend-vkcom
net-backend-cuda
enum net-target-type
Enum Cases
net-target-cpu
net-target-fp32
net-target-fp16
net-target-vpu
net-target-vulkan
net-target-fpga
net-target-cuda
net-target-cuda-fp16
enum data-layout-type
Enum Cases
data-layout-unknown
data-layout-nd
data-layout-nchw
data-layout-nhwc
data-layout-ndhwc
data-layout-planar
enum padding-mode-type
Enum Cases
padding-mode-null
padding-mode-crop-center
padding-mode-letterbox
resource layer
resource net
Functions
[constructor]layer: func
Return values
- own<
layer
>
[method]layer.get-name: func
GetName returns the name of the layer.
Params
self
: borrow<layer
>
Return values
string
[static]net.read: func
ReadNet read deep learning network represented in one of the supported formats.
For further details, please see: https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga138439da76f26266fdefec9723f6c5cd
Params
model
:string
config
:string
Return values
- own<
net
>
[static]net.read-from-ONNX: func
ReadNetFromONNX reads a network model stored in ONNX framework’s format.
For further details, please see: https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga9198ecaac7c32ddf0aa7a1bcbd359567
Params
model
:string
Return values
- own<
net
>
[method]net.close: func
Close the network
Params
self
: borrow<net
>
[method]net.empty: func
Empty returns true if there are no layers in the network.
For further details, please see: https://docs.opencv.org/master/db/d30/classcv_1_1dnn_1_1Net.html#a6a5778787d5b8770deab5eda6968e66c
Params
self
: borrow<net
>
Return values
bool
[method]net.set-input: func
SetInput sets the new input value for the network.
For further details, please see: https://docs.opencv.org/trunk/db/d30/classcv_1_1dnn_1_1Net.html#a672a08ae76444d75d05d7bfea3e4a328
Params
[method]net.forward: func
Forward runs forward pass to compute output of layer with name outputName.
For further details, please see: https://docs.opencv.org/trunk/db/d30/classcv_1_1dnn_1_1Net.html#a98ed94cb6ef7063d3697259566da310b
Params
self
: borrow<net
>output-name
:string
Return values
- own<
mat
>
[method]net.forward-layers: func
ForwardLayers forward pass to compute outputs of layers listed in outBlobNames.
For further details, please see: https://docs.opencv.org/4.x/db/d30/classcv_1_1dnn_1_1Net.html#afe22e099b60a2883e220645391f68d4c
Params
self
: borrow<net
>output-names
: list<string
>
Return values
- list<own<
mat
»
[method]net.get-unconnected-out-layers: func
GetUnconnectedOutLayers returns indexes of layers with unconnected outputs.
For further details, please see: https://docs.opencv.org/4.x/db/d30/classcv_1_1dnn_1_1Net.html#ae26f0c29b3733d15d0482098ef9053e3
Params
self
: borrow<net
>
Return values
- list<
u32
>
[method]net.get-layer-names: func
GetLayerNames returns names of layers in the network.
For further details, please see: hhttps://docs.opencv.org/4.x/db/d30/classcv_1_1dnn_1_1Net.html#a38e67098ae4ae5906bf8d8ea72199c2e
Params
self
: borrow<net
>
Return values
- list<
string
>
[method]net.get-layer: func
GetLayer returns layer with specified id.
For further details, please see: https://docs.opencv.org/4.x/db/d30/classcv_1_1dnn_1_1Net.html#ac944d7f2d3ead5ef9b1b2fa3885f3ff1
Params
self
: borrow<net
>id
:u32
Return values
- own<
layer
>
blob-from-image: func
BlobFromImage creates 4-dimensional blob from image. Optionally resizes and crops image from center, subtract mean values, scales values by scalefactor, swap Blue and Red channels.
For further details, please see: https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga29f34df9376379a603acd8df581ac8d7
Params
Return values
- own<
mat
>
blob-from-image-with-params: func
BlobFromImageWithParams creates 4-dimensional blob from image. Optionally resizes and crops image from center, subtract mean values, scales values by scalefactor, swap Blue and Red channels.
For further details, please see: https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga29f34df9376379a603acd8df581ac8d7
Params
image
: own<mat
>params
:blob-params
Return values
- own<
mat
>
blob-rects-to-image-rects: func
BlobRectsToImageRects converts blob rects to image rects.
For further details, please see: https://docs.opencv.org/4.4.0/d6/d0f/group__dnn.html#ga9d118d70a1659af729d01b10233213ee
Params
params
:blob-params
blob-rects
: list<rect
>image-size
:size
Return values
- list<
rect
>
NMS-boxes: func
NMSBoxes performs non maximum suppression given boxes and corresponding scores.
For futher details, please see: https://docs.opencv.org/4.4.0/d6/d0f/group__dnn.html#ga9d118d70a1659af729d01b10233213ee
Params
bboxes
: list<rect
>scores
: list<f32
>score-threshold
:f32
nms-threshold
:f32
Return values
- list<
s32
>
Import interface wasm:cv/objdetect
Types
type mat
CascadeClassifier is a cascade classifier class for object detection.
resource HOG-descriptor
HOGDescriptor is a Histogram Of Gradiants (HOG) for object detection.
For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOGDescriptor.html#a723b95b709cfd3f95cf9e616de988fc8
resource face-detector-YN
enum face-distance-type
Enum Cases
face-distance-type-cosine
face-distance-norm-l2
resource face-recognizer-SF
Functions
[constructor]cascade-classifier: func
NewCascadeClassifier returns a new CascadeClassifier.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a5f7fb43c60c95ca5ebab78483de02516
Return values
- own<
cascade-classifier
>
[method]cascade-classifier.close: func
Close the CascadeClassifier
Params
self
: borrow<cascade-classifier
>
[method]cascade-classifier.load: func
Load cascade classifier from a file.
For further details, please see: http://docs.opencv.org/master/d1/de5/classcv_1_1CascadeClassifier.html#a1a5884c8cc749422f9eb77c2471958bc
Params
self
: borrow<cascade-classifier
>file
:string
Return values
bool
[method]cascade-classifier.detect-multi-scale: func
DetectMultiScale detects objects of different sizes in the input Mat image. The detected objects are returned as a slice of image.Rectangle structs.
For further details, please see: http://docs.opencv.org/master/d1/de5/classcv_1_1CascadeClassifier.html#aaf8181cb63968136476ec4204ffca498
Params
self
: borrow<cascade-classifier
>image
: own<mat
>
Return values
- list<
rect
>
[method]cascade-classifier.detect-multi-scale-with-params: func
DetectMultiScaleWithParams detects objects of different sizes in the input Mat image. The detected objects are returned as a slice of image.Rectangle structs.
For further details, please see: http://docs.opencv.org/master/d1/de5/classcv_1_1CascadeClassifier.html#aaf8181cb63968136476ec4204ffca498
Params
self
: borrow<cascade-classifier
>image
: own<mat
>scale
:f64
min-neighbors
:u32
flags
:u32
min-size
:size
max-size
:size
Return values
- list<
rect
>
[constructor]HOG-descriptor: func
NewHOGDescriptor returns a new HOGDescriptor.
Return values
- own<
HOG-descriptor
>
[method]HOG-descriptor.close: func
Close the HOGDescriptor
Params
self
: borrow<HOG-descriptor
>
[method]HOG-descriptor.detect-multi-scale: func
DetectMultiScale detects objects of different sizes in the input Mat image. The detected objects are returned as a slice of image.Rectangle structs.
For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOGDescriptor.html#a660e5cd036fd5ddf0f5767b352acd948
Params
self
: borrow<HOG-descriptor
>image
: own<mat
>
Return values
- list<
rect
>
[method]HOG-descriptor.detect-multi-scale-with-params: func
DetectMultiScaleWithParams detects objects of different sizes in the input Mat image. The detected objects are returned as a slice of image.Rectangle structs.
For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOGDescriptor.html#a660e5cd036fd5ddf0f5767b352acd948
Params
self
: borrow<HOG-descriptor
>image
: own<mat
>hit-threshold
:f64
win-stride
:size
padding
:size
scale
:f64
final-threshold
:f64
use-meanshift-grouping
:bool
Return values
- list<
rect
>
[constructor]face-detector-YN: func
Creates an instance of face detector YN with given parameters.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a5f7fb43c60c95ca5ebab78483de02516
Params
model
:string
config
:string
input-size
:size
Return values
- own<
face-detector-YN
>
[static]face-detector-YN.new-with-params: func
new: static func(model: string, config: string, input-size: size) -> face-detector-YN; Creates an instance of face detector YN with given parameters.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a5f7fb43c60c95ca5ebab78483de02516
Params
model
:string
config
:string
input-size
:size
score-threshold
:f32
nms-threshold
:f32
top-k
:u32
backend-id
:u32
target-id
:u32
Return values
- own<
face-detector-YN
>
[method]face-detector-YN.close: func
Close the face detector
Params
self
: borrow<face-detector-YN
>
[method]face-detector-YN.detect: func
Detects faces in the input image.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#ac05bd075ca3e6edc0e328927aae6f45b
Params
self
: borrow<face-detector-YN
>input
:string
Return values
- own<
mat
>
[method]face-detector-YN.get-input-size: func
Params
self
: borrow<face-detector-YN
>
Return values
[method]face-detector-YN.get-nms-threshold: func
Params
self
: borrow<face-detector-YN
>
Return values
f32
[method]face-detector-YN.get-score-threshold: func
Params
self
: borrow<face-detector-YN
>
Return values
f32
[method]face-detector-YN.get-topk: func
Params
self
: borrow<face-detector-YN
>
Return values
u32
[method]face-detector-YN.set-input-size: func
Params
self
: borrow<face-detector-YN
>size
:size
[method]face-detector-YN.set-nms-threshold: func
Params
self
: borrow<face-detector-YN
>threshold
:f32
[method]face-detector-YN.set-score-threshold: func
Params
self
: borrow<face-detector-YN
>threshold
:f32
[method]face-detector-YN.set-topk: func
Params
self
: borrow<face-detector-YN
>topk
:u32
[constructor]face-recognizer-SF: func
Creates an instance of FaceRecognizerSF with given parameters.
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a04df90b0cd7d26d350acd92621a35743
Params
model
:string
config
:string
Return values
- own<
face-recognizer-SF
>
[static]face-recognizer-SF.new-with-params: func
Creates an instance of FaceRecognizerSF with given parameters.
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a04df90b0cd7d26d350acd92621a35743
Params
model
:string
config
:string
backend-id
:u32
target-id
:u32
Return values
- own<
face-recognizer-SF
>
[method]face-recognizer-SF.close: func
Close the face FaceRecognizerSF
Params
self
: borrow<face-recognizer-SF
>
[method]face-recognizer-SF.align-crop: func
Aligns detected face with the source input image and crops it.
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a84492908abecbc9362b4ddc8d46b8345
Params
self
: borrow<face-recognizer-SF
>src
: own<mat
>face-box
: own<mat
>
Return values
- own<
mat
>
[method]face-recognizer-SF.feature: func
Feature extracts face feature from aligned image.
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#ab1b4a3c12213e89091a490c573dc5aba
Params
self
: borrow<face-recognizer-SF
>aligned
: own<mat
>
Return values
- own<
mat
>
[method]face-recognizer-SF.match: func
Match calculates the distance between two face features.
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a2f0362ca1e64320a1f3ba7e1386d0219
Params
self
: borrow<face-recognizer-SF
>face1
: own<mat
>face2
: own<mat
>
Return values
f32
[method]face-recognizer-SF.match-with-params: func
Match calculates the distance between two face features.
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a2f0362ca1e64320a1f3ba7e1386d0219
Params
self
: borrow<face-recognizer-SF
>face1
: own<mat
>face2
: own<mat
>distance
:face-distance-type
Return values
f32
Export interface wasm:cv/request
Types
type mat
Functions
process: func
Params
image
: own<mat
>
Return values
- own<
mat
>