Mat Class Reference

Class representing 1 to 4-channel matrix of float or uchar, stored on CPU and/or GPU side. More...

Functions

 Mat ()
 Default constructor. More...
 
 Mat (System.IntPtr ptr)
 Constructor. More...
 
 Mat (sl.Resolution resolution, MAT_TYPE type, MEM mem=MEM.CPU)
 Constructor. More...
 
void Create (sl.Resolution resolution, MAT_TYPE type, MEM mem=MEM.CPU)
 Creates a sl.Mat with a given sl.Resolution. More...
 
void Create (uint width, uint height, MAT_TYPE type, MEM mem=MEM.CPU)
 Creates a Mat with a given width and height. More...
 
bool IsInit ()
 Whether the sl.Mat has been initialized. More...
 
void Free (MEM mem=(MEM.GPU|MEM.CPU))
 Frees the memory of the sl.Mat. More...
 
sl.ERROR_CODE UpdateCPUFromGPU ()
 Copies data from the GPU to the CPU, if possible. More...
 
sl.ERROR_CODE UpdateGPUFromCPU ()
 Copies data from the CPU to the GPU, if possible. More...
 
string GetInfos ()
 Returns the information about the sl::Mat into a string. More...
 
sl.ERROR_CODE CopyTo (sl.Mat dest, sl.COPY_TYPE copyType=COPY_TYPE.CPU_CPU)
 Copies data from this sl.Mat to another sl.Mat (deep copy). More...
 
sl.ERROR_CODE Read (string filePath)
 Reads an image from a file. More...
 
sl.ERROR_CODE Write (string filePath, int compressionLevel=-1)
 Writes the sl.Mat into a file as an image. More...
 
int GetWidth ()
 Returns the width of the matrix. More...
 
int GetHeight ()
 Returns the height of the matrix. More...
 
int GetChannels ()
 Returns the number of values stored in one pixel. More...
 
int GetPixelBytes ()
 Returns the size of one pixel in bytes. More...
 
int GetStep (sl.MEM mem=sl.MEM.CPU)
 Returns the memory step in number of elements (size in one pixel row). More...
 
int GetStepBytes (sl.MEM mem=sl.MEM.CPU)
 Returns the memory step in bytes (size of one pixel row). More...
 
int GetWidthBytes ()
 Returns the size of a row in bytes. More...
 
MEM GetMemoryType ()
 Returns the type of memory (CPU and/or GPU). More...
 
bool IsMemoryOwner ()
 Returns whether the sl.Mat is the owner of the memory it accesses. More...
 
sl.Resolution GetResolution ()
 Returns the resolution (width and height) of the matrix. More...
 
void Alloc (uint width, uint height, MAT_TYPE matType, MEM mem=MEM.CPU)
 Allocates the sl.Mat memory. More...
 
void Alloc (sl.Resolution resolution, MAT_TYPE matType, MEM mem=MEM.CPU)
 Allocates the sl.Mat memory. More...
 
int SetFrom (Mat src, COPY_TYPE copyType=COPY_TYPE.CPU_CPU)
 Copies data from another sl.Mat into this one (deep copy). More...
 
System.IntPtr GetPtr (MEM mem=MEM.CPU)
 Returns the CPU or GPU data pointer. More...
 
void Clone (Mat source)
 Duplicates a sl.Mat by copying all its data into a new one (deep copy). More...
 
sl.ERROR_CODE GetValue (int x, int y, out float value, sl.MEM mem=sl.MEM.CPU)
 Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C1. More...
 
sl.ERROR_CODE GetValue (int x, int y, out float2 value, sl.MEM mem=sl.MEM.CPU)
 Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C2. More...
 
sl.ERROR_CODE GetValue (int x, int y, out float3 value, sl.MEM mem=sl.MEM.CPU)
 Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C3. More...
 
sl.ERROR_CODE GetValue (int x, int y, out float4 value, sl.MEM mem=sl.MEM.CPU)
 Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C4. More...
 
sl.ERROR_CODE GetValue (int x, int y, out byte value, sl.MEM mem=sl.MEM.CPU)
 Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C1. More...
 
sl.ERROR_CODE GetValue (int x, int y, out char2 value, sl.MEM mem=sl.MEM.CPU)
 Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C2. More...
 
sl.ERROR_CODE GetValue (int x, int y, out char3 value, sl.MEM mem=sl.MEM.CPU)
 Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C3. More...
 
sl.ERROR_CODE GetValue (int x, int y, out char4 value, sl.MEM mem=sl.MEM.CPU)
 Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C4. More...
 
sl.ERROR_CODE SetValue (int x, int y, ref float value, sl.MEM mem=sl.MEM.CPU)
 Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C1. More...
 
sl.ERROR_CODE SetValue (int x, int y, ref float2 value, sl.MEM mem=sl.MEM.CPU)
 Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C2. More...
 
sl.ERROR_CODE SetValue (int x, int y, ref float3 value, sl.MEM mem=sl.MEM.CPU)
 Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C3. More...
 
sl.ERROR_CODE SetValue (int x, int y, float4 value, sl.MEM mem=sl.MEM.CPU)
 Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C4. More...
 
sl.ERROR_CODE SetValue (int x, int y, ref byte value, sl.MEM mem=sl.MEM.CPU)
 Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C1. More...
 
sl.ERROR_CODE SetValue (int x, int y, ref char2 value, sl.MEM mem=sl.MEM.CPU)
 Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C2. More...
 
sl.ERROR_CODE SetValue (int x, int y, ref char3 value, sl.MEM mem=sl.MEM.CPU)
 Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C3. More...
 
sl.ERROR_CODE SetValue (int x, int y, ref char4 value, sl.MEM mem=sl.MEM.CPU)
 Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C4. More...
 
sl.ERROR_CODE SetTo (ref float value, sl.MEM mem)
 Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_32F_C1 with the given value. More...
 
sl.ERROR_CODE SetTo (ref float2 value, sl.MEM mem)
 Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_32F_C2 with the given value. More...
 
sl.ERROR_CODE SetTo (ref float3 value, sl.MEM mem)
 Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_32F_C3 with the given value. More...
 
sl.ERROR_CODE SetTo (ref float4 value, sl.MEM mem)
 Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_32F_C4 with the given value. More...
 
sl.ERROR_CODE SetTo (ref byte value, sl.MEM mem)
 Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_8U_C1 with the given value. More...
 
sl.ERROR_CODE SetTo (ref char2 value, sl.MEM mem)
 Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_8U_C2 with the given value. More...
 
sl.ERROR_CODE SetTo (ref char3 value, sl.MEM mem)
 Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_8U_C3 with the given value. More...
 
sl.ERROR_CODE SetTo (ref char4 value, sl.MEM mem)
 Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_8U_C4 with the given value. More...
 

Properties

IntPtr MatPtr [get]
 Returns the internal ptr of a Mat. More...
 

Detailed Description

Class representing 1 to 4-channel matrix of float or uchar, stored on CPU and/or GPU side.

This class is defined in a row-major order, meaning that for an image buffer, the rows are stored consecutively from top to bottom.

Note
For more info, read about the ZED SDK C++ class it mirrors: Mat

Constructor and Destructor

◆ Mat() [1/3]

Mat ( )
inline

Default constructor.

Creates an empty sl.Mat.

◆ Mat() [2/3]

Mat ( System.IntPtr  ptr)
inline

Constructor.

Creates a sl.Mat from an existing internal pointer.

Parameters
ptrInternal pointer to create the sl.Mat with.

◆ Mat() [3/3]

Mat ( sl.Resolution  resolution,
MAT_TYPE  type,
MEM  mem = MEM.CPU 
)
inline

Constructor.

Creates a sl.Mat with a given sl.Resolution.

Parameters
resolutionSize of the matrix in pixels.
typeType of the matrix. Depends on texture type (see sl.VIEW and sl.MEASURE).
memWhere the buffer will be stored (CPU or GPU memory).
Choose depending on where you'll need to access it from.

Functions

◆ Create() [1/2]

void Create ( sl.Resolution  resolution,
MAT_TYPE  type,
MEM  mem = MEM.CPU 
)
inline

Creates a sl.Mat with a given sl.Resolution.

Parameters
resolutionSize of the matrix in pixels.
typeType of the matrix. Depends on texture type (see sl.VIEW and sl.MEASURE).
memWhere the buffer will be stored (CPU or GPU memory).
Choose depending on where you'll need to access it from.

◆ Create() [2/2]

void Create ( uint  width,
uint  height,
MAT_TYPE  type,
MEM  mem = MEM.CPU 
)
inline

Creates a Mat with a given width and height.

Parameters
widthWidth of the matrix in pixels.
heightHeight of the matrix in pixels..
typeType of the matrix. Depends on texture type (see sl.VIEW and sl.MEASURE).
memWhere the buffer will be stored (CPU or GPU memory).
Choose depending on where you'll need to access it from.

◆ IsInit()

bool IsInit ( )
inline

Whether the sl.Mat has been initialized.

◆ Free()

void Free ( MEM  mem = (MEM.GPU | MEM.CPU))
inline

Frees the memory of the sl.Mat.

Parameters
memWhether the sl.Mat is on CPU or GPU memory.

◆ UpdateCPUFromGPU()

sl.ERROR_CODE UpdateCPUFromGPU ( )
inline

Copies data from the GPU to the CPU, if possible.

Returns
sl.ERROR_CODE.SUCCESS if everything went well, sl.ERROR_CODE.FAILURE otherwise.

◆ UpdateGPUFromCPU()

sl.ERROR_CODE UpdateGPUFromCPU ( )
inline

Copies data from the CPU to the GPU, if possible.

Returns
sl.ERROR_CODE.SUCCESS if everything went well, sl.ERROR_CODE.FAILURE otherwise.

◆ GetInfos()

string GetInfos ( )
inline

Returns the information about the sl::Mat into a string.

Returns
String containing the sl::Mat information.

◆ CopyTo()

sl.ERROR_CODE CopyTo ( sl.Mat  dest,
sl.COPY_TYPE  copyType = COPY_TYPE.CPU_CPU 
)
inline

Copies data from this sl.Mat to another sl.Mat (deep copy).

Parameters
destsl.Mat that the data will be copied to.
copyTypeThe to and from memory types.
Returns
sl.ERROR_CODE indicating if the copy was successful, or why it wasn't.

◆ Read()

sl.ERROR_CODE Read ( string  filePath)
inline

Reads an image from a file.

Supports .png and .jpeg.

Parameters
filePathPath of the file to read (including the name and extension).
Returns
sl.ERROR_CODE indicating if the copy was successful, or why it wasn't.
Note
Only works if sl.Mat has access to sl.MEM.CPU.

◆ Write()

sl.ERROR_CODE Write ( string  filePath,
int  compressionLevel = -1 
)
inline

Writes the sl.Mat into a file as an image.

Parameters
filePathPath of the file to write in (including the name and extension).
compression_levelCompression level used. Highest value means highest compression (smaller size). Range [0 - 100].
Returns
sl.ERROR_CODE indicating if the copy was successful, or why it wasn't.
Note
Only works if sl.Mat has access to sl.MEM.CPU.

◆ GetWidth()

int GetWidth ( )
inline

Returns the width of the matrix.

◆ GetHeight()

int GetHeight ( )
inline

Returns the height of the matrix.

Returns

◆ GetChannels()

int GetChannels ( )
inline

Returns the number of values stored in one pixel.

◆ GetPixelBytes()

int GetPixelBytes ( )
inline

Returns the size of one pixel in bytes.

◆ GetStep()

int GetStep ( sl.MEM  mem = sl.MEM.CPU)
inline

Returns the memory step in number of elements (size in one pixel row).

◆ GetStepBytes()

int GetStepBytes ( sl.MEM  mem = sl.MEM.CPU)
inline

Returns the memory step in bytes (size of one pixel row).

Returns

◆ GetWidthBytes()

int GetWidthBytes ( )
inline

Returns the size of a row in bytes.

Returns

◆ GetMemoryType()

MEM GetMemoryType ( )
inline

Returns the type of memory (CPU and/or GPU).

Returns

◆ IsMemoryOwner()

bool IsMemoryOwner ( )
inline

Returns whether the sl.Mat is the owner of the memory it accesses.

Returns

◆ GetResolution()

sl.Resolution GetResolution ( )
inline

Returns the resolution (width and height) of the matrix.

Returns

◆ Alloc() [1/2]

void Alloc ( uint  width,
uint  height,
MAT_TYPE  matType,
MEM  mem = MEM.CPU 
)
inline

Allocates the sl.Mat memory.

Parameters
widthWidth of the image/matrix in pixels.
heightHeight of the image/matrix in pixels.
matTypeType of matrix (data type and channels - see sl.MAT_TYPE)
memWhere the buffer will be stored - CPU memory or GPU memory.

◆ Alloc() [2/2]

void Alloc ( sl.Resolution  resolution,
MAT_TYPE  matType,
MEM  mem = MEM.CPU 
)
inline

Allocates the sl.Mat memory.

Parameters
resolutionSize of the image/matrix in pixels.
matTypeType of matrix (data type and channels - see sl.MAT_TYPE)
memWhere the buffer will be stored - CPU memory or GPU memory.

◆ SetFrom()

int SetFrom ( Mat  src,
COPY_TYPE  copyType = COPY_TYPE.CPU_CPU 
)
inline

Copies data from another sl.Mat into this one (deep copy).

Parameters
srcsl.Mat where the data will be copied from.
copyTypeSpecifies the memory that will be used for the copy.
Returns
sl.ERROR_CODE (as an int) indicating if the copy was successful, or why it wasn't.

◆ GetPtr()

System.IntPtr GetPtr ( MEM  mem = MEM.CPU)
inline

Returns the CPU or GPU data pointer.

Parameters
memSpecifies whether you want sl.MEM.CPU or sl.MEM.GPU.

◆ Clone()

void Clone ( Mat  source)
inline

Duplicates a sl.Mat by copying all its data into a new one (deep copy).

Parameters
sourcesl.Mat to clone.

◆ GetValue() [1/8]

sl.ERROR_CODE GetValue ( int  x,
int  y,
out float  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C1.

Parameters
xColumn of the point to get the value from.
yRow of the point to get the value from.
valueGets filled with the current value.
memWhich memory should be read.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ GetValue() [2/8]

sl.ERROR_CODE GetValue ( int  x,
int  y,
out float2  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C2.

Parameters
xColumn of the point to get the value from.
yRow of the point to get the value from.
valueGets filled with the current value.
memWhich memory should be read.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ GetValue() [3/8]

sl.ERROR_CODE GetValue ( int  x,
int  y,
out float3  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C3.

Parameters
xColumn of the point to get the value from.
yRow of the point to get the value from.
valueGets filled with the current value.
memWhich memory should be read.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ GetValue() [4/8]

sl.ERROR_CODE GetValue ( int  x,
int  y,
out float4  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C4.

Parameters
xColumn of the point to get the value from.
yRow of the point to get the value from.
valueGets filled with the current value.
memWhich memory should be read.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ GetValue() [5/8]

sl.ERROR_CODE GetValue ( int  x,
int  y,
out byte  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C1.

Parameters
xColumn of the point to get the value from.
yRow of the point to get the value from.
valueGets filled with the current value.
memWhich memory should be read.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ GetValue() [6/8]

sl.ERROR_CODE GetValue ( int  x,
int  y,
out char2  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C2.

Parameters
xColumn of the point to get the value from.
yRow of the point to get the value from.
valueGets filled with the current value.
memWhich memory should be read.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ GetValue() [7/8]

sl.ERROR_CODE GetValue ( int  x,
int  y,
out char3  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C3.

Parameters
xColumn of the point to get the value from.
yRow of the point to get the value from.
valueGets filled with the current value.
memWhich memory should be read.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ GetValue() [8/8]

sl.ERROR_CODE GetValue ( int  x,
int  y,
out char4  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Returns the value of a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C4.

Parameters
xColumn of the point to get the value from.
yRow of the point to get the value from.
valueGets filled with the current value.
memWhich memory should be read.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetValue() [1/8]

sl.ERROR_CODE SetValue ( int  x,
int  y,
ref float  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C1.

Parameters
xColumn of the point to set the value.
yRow of the point to set the value.
valueValue to which the point will be set.
memWhich memory will be updated.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetValue() [2/8]

sl.ERROR_CODE SetValue ( int  x,
int  y,
ref float2  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C2.

Parameters
xColumn of the point to set the value.
yRow of the point to set the value.
valueValue to which the point will be set.
memWhich memory will be updated.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetValue() [3/8]

sl.ERROR_CODE SetValue ( int  x,
int  y,
ref float3  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C3.

Parameters
xColumn of the point to set the value.
yRow of the point to set the value.
valueValue to which the point will be set.
memWhich memory will be updated.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetValue() [4/8]

sl.ERROR_CODE SetValue ( int  x,
int  y,
float4  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_32F_C4.

Parameters
xColumn of the point to set the value.
yRow of the point to set the value.
valueValue to which the point will be set.
memWhich memory will be updated.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetValue() [5/8]

sl.ERROR_CODE SetValue ( int  x,
int  y,
ref byte  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C1.

Parameters
xColumn of the point to set the value.
yRow of the point to set the value.
valueValue to which the point will be set.
memWhich memory will be updated.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetValue() [6/8]

sl.ERROR_CODE SetValue ( int  x,
int  y,
ref char2  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C2.

Parameters
xColumn of the point to set the value.
yRow of the point to set the value.
valueValue to which the point will be set.
memWhich memory will be updated.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetValue() [7/8]

sl.ERROR_CODE SetValue ( int  x,
int  y,
ref char3  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C3.

Parameters
xColumn of the point to set the value.
yRow of the point to set the value.
valueValue to which the point will be set.
memWhich memory will be updated.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetValue() [8/8]

sl.ERROR_CODE SetValue ( int  x,
int  y,
ref char4  value,
sl.MEM  mem = sl.MEM.CPU 
)
inline

Sets a value to a specific point in the matrix of type sl.MAT_TYPE.MAT_8U_C4.

Parameters
xColumn of the point to set the value.
yRow of the point to set the value.
valueValue to which the point will be set.
memWhich memory will be updated.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetTo() [1/8]

sl.ERROR_CODE SetTo ( ref float  value,
sl.MEM  mem 
)
inline

Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_32F_C1 with the given value.

Parameters
valueValue to be copied all over the matrix.
memWhich buffer to fill, CPU and/or GPU.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetTo() [2/8]

sl.ERROR_CODE SetTo ( ref float2  value,
sl.MEM  mem 
)
inline

Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_32F_C2 with the given value.

Parameters
valueValue to be copied all over the matrix.
memWhich buffer to fill, CPU and/or GPU.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetTo() [3/8]

sl.ERROR_CODE SetTo ( ref float3  value,
sl.MEM  mem 
)
inline

Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_32F_C3 with the given value.

Parameters
valueValue to be copied all over the matrix.
memWhich buffer to fill, CPU and/or GPU.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetTo() [4/8]

sl.ERROR_CODE SetTo ( ref float4  value,
sl.MEM  mem 
)
inline

Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_32F_C4 with the given value.

Parameters
valueValue to be copied all over the matrix.
memWhich buffer to fill, CPU and/or GPU.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetTo() [5/8]

sl.ERROR_CODE SetTo ( ref byte  value,
sl.MEM  mem 
)
inline

Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_8U_C1 with the given value.

Parameters
valueValue to be copied all over the matrix.
memWhich buffer to fill, CPU and/or GPU.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetTo() [6/8]

sl.ERROR_CODE SetTo ( ref char2  value,
sl.MEM  mem 
)
inline

Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_8U_C2 with the given value.

Parameters
valueValue to be copied all over the matrix.
memWhich buffer to fill, CPU and/or GPU.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetTo() [7/8]

sl.ERROR_CODE SetTo ( ref char3  value,
sl.MEM  mem 
)
inline

Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_8U_C3 with the given value.

Parameters
valueValue to be copied all over the matrix.
memWhich buffer to fill, CPU and/or GPU.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

◆ SetTo() [8/8]

sl.ERROR_CODE SetTo ( ref char4  value,
sl.MEM  mem 
)
inline

Fills the entire sl.Mat of type sl.MAT_TYPE.MAT_8U_C4 with the given value.

Parameters
valueValue to be copied all over the matrix.
memWhich buffer to fill, CPU and/or GPU.
Returns
sl.ERROR_CODE indicating if the get was successful, or why it wasn't.

Property Documentation

◆ MatPtr

IntPtr MatPtr
get

Returns the internal ptr of a Mat.

Referenced by Fusion.RetrieveImage(), and Fusion.RetrieveMeasure().