Skip to content

gapi_LUT

gapifunctionOpenCV 5.0.0
import { gapi_LUT } from '@banou/opencv-wasm'

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

ARGUMENTSsrc, lut
FUNCTIONgapi_LUT
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Performs a look-up table transform of a matrix.

The function LUT fills the output matrix with values from the look-up table. Indices of the entries are taken from the input matrix. That is, the function processes each element of src as follows:

\texttt{dst} (I)  \leftarrow \texttt{lut(src(I))}

Supported matrix data types are CV_8UC1. Output is a matrix of the same size and number of channels as src, and the same depth as lut.

Note: Function textual ID is "org.opencv.core.transform.LUT"

gapi_LUT(src: GMat, lut: Mat): GMat;
src

input matrix of 8-bit elements.

lut

look-up table of 256 elements; in case of multi-channel input array, the table should either have a single channel (in this case the same table is used for all channels) or the same number of channels as in the input matrix.

Returns

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

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.