Mirrors the sl::Mat class used in the ZED C++ SDK to store images. Can be used to retrieve individual images from GPU or CPU memory: see Camera.RetrieveImage() and Camera.RetrieveMeasure(). More...
Functions | |
| Mat () | |
| Creates an empty Mat. More... | |
| Mat (System.IntPtr ptr) | |
| Creates a mat from an existing internal ptr. More... | |
| Mat (sl.Resolution resolution, MAT_TYPE type, MEM mem=MEM.CPU) | |
| Creates a Mat with a given resolution. More... | |
| void | Create (sl.Resolution resolution, MAT_TYPE type, MEM mem=MEM.CPU) |
| Creates a Mat with a given 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 () |
| True if the Mat has been initialized. More... | |
| void | Free (MEM mem=(MEM.GPU|MEM.CPU)) |
| Frees the memory of the 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 information about the Mat. More... | |
| sl.ERROR_CODE | CopyTo (sl.Mat dest, sl.COPY_TYPE copyType=COPY_TYPE.CPU_CPU) |
| Copies data from this Mat to another Mat (deep copy). More... | |
| sl.ERROR_CODE | Read (string filePath) |
| Reads an image from a file. Supports .png and .jpeg. Only works if Mat has access to MEM_CPU. More... | |
| sl.ERROR_CODE | Write (string filePath, int compressionLevel=-1) |
| Writes the Mat into a file as an image. Only works if Mat has access to MEM_CPU. 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/channels stored in each pixel. More... | |
| int | GetPixelBytes () |
| Returns the size in bytes of one pixel. More... | |
| int | GetStep (sl.MEM mem=sl.MEM.CPU) |
| Returns the memory 'step' in number/length of elements - how many values make up each row of pixels. More... | |
| int | GetStepBytes (sl.MEM mem=sl.MEM.CPU) |
| Returns the memory 'step' in bytes - how many bytes make up each row of pixels. More... | |
| int | GetWidthBytes () |
| Returns the size of each row in bytes. More... | |
| MEM | GetMemoryType () |
| Returns the type of memory (CPU and/or GPU). More... | |
| bool | IsMemoryOwner () |
| Returns whether the Mat is the owner of the memory it's accessing. More... | |
| sl.Resolution | GetResolution () |
| Returns the resolution of the image that this Mat holds. More... | |
| void | Alloc (uint width, uint height, MAT_TYPE matType, MEM mem=MEM.CPU) |
| Allocates memory for the Mat. More... | |
| void | Alloc (sl.Resolution resolution, MAT_TYPE matType, MEM mem=MEM.CPU) |
| Allocates memory for the Mat. More... | |
| int | SetFrom (Mat src, COPY_TYPE copyType=COPY_TYPE.CPU_CPU) |
| Copies data from another Mat into this one(deep copy). More... | |
| System.IntPtr | GetPtr (MEM mem=MEM.CPU) |
| void | Clone (Mat source) |
| Duplicates a 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. (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. (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. (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. (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. (MAT_TYPE_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. (MAT_TYPE_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. (MAT_TYPE_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. (MAT_TYPE_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. (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. (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. (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. (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. (MAT_TYPE_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. (MAT_TYPE_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. (MAT_TYPE_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. (MAT_TYPE_8U_C4) More... | |
| sl.ERROR_CODE | SetTo (ref float value, sl.MEM mem) |
| Fills the entire Mat with the given value. (MAT_32F_C1) More... | |
| sl.ERROR_CODE | SetTo (ref float2 value, sl.MEM mem) |
| Fills the entire Mat with the given value. (MAT_32F_C2) More... | |
| sl.ERROR_CODE | SetTo (ref float3 value, sl.MEM mem) |
| Fills the entire Mat with the given value. (MAT_32F_C3) More... | |
| sl.ERROR_CODE | SetTo (ref float4 value, sl.MEM mem) |
| Fills the entire Mat with the given value. (MAT_32F_C4) More... | |
| sl.ERROR_CODE | SetTo (ref byte value, sl.MEM mem) |
| Fills the entire Mat with the given value. (MAT_TYPE_8U_C1) More... | |
| sl.ERROR_CODE | SetTo (ref char2 value, sl.MEM mem) |
| Fills the entire Mat with the given value. (MAT_TYPE_8U_C2) More... | |
| sl.ERROR_CODE | SetTo (ref char3 value, sl.MEM mem) |
| Fills the entire Mat with the given value. (MAT_TYPE_8U_C3) More... | |
| sl.ERROR_CODE | SetTo (ref char4 value, sl.MEM mem) |
| Fills the entire Mat with the given value. (MAT_TYPE_8U_C4) More... | |
Properties | |
| IntPtr | MatPtr [get] |
| Returns the internal ptr of a Mat. More... | |
Mirrors the sl::Mat class used in the ZED C++ SDK to store images. Can be used to retrieve individual images from GPU or CPU memory: see Camera.RetrieveImage() and Camera.RetrieveMeasure().
For more information on the Mat class it mirrors, see: https://www.stereolabs.com/docs/api_3.X/classsl_1_1Mat.html
|
inline |
Creates a mat from an existing internal ptr.
| ptr | IntPtr to create the material with. |
|
inline |
Creates a Mat with a given resolution.
| resolution | Resolution for the new Mat. |
| type | Data type and number of channels the Mat will hold. Depends on texture type: see sl.VIEW and sl.MEASURE in ZEDCommon.cs. |
| mem | Whether Mat should exist on CPU or GPU memory. Choose depending on where you'll need to access it from. |
|
inline |
Creates a Mat with a given resolution.
| resolution | Resolution for the new Mat. |
| type | Data type and number of channels the Mat will hold. Depends on texture type: see sl.VIEW and sl.MEASURE in ZEDCommon.cs. |
| mem | Whether Mat should exist on CPU or GPU memory. Choose depending on where you'll need to access it from. |
Creates a Mat with a given width and height.
|
inline |
True if the Mat has been initialized.
|
inline |
Copies data from the GPU to the CPU, if possible.
|
inline |
Copies data from the CPU to the GPU, if possible.
|
inline |
|
inline |
|
inline |
Reads an image from a file. Supports .png and .jpeg. Only works if Mat has access to MEM_CPU.
| filePath | File path, including file name and extension. |
|
inline |
Writes the Mat into a file as an image. Only works if Mat has access to MEM_CPU.
| filePath | File path, including file name and extension. |
| compression_level | Compression level used. Highest value means highest compression (smaller size). Range : [0 - 100]. |
|
inline |
Returns the width of the matrix.
|
inline |
Returns the height of the matrix.
|
inline |
Returns the number of values/channels stored in each pixel.
|
inline |
Returns the size in bytes of one pixel.
|
inline |
Returns the memory 'step' in number/length of elements - how many values make up each row of pixels.
|
inline |
Returns the memory 'step' in bytes - how many bytes make up each row of pixels.
|
inline |
Returns the size of each row in bytes.
|
inline |
Returns the type of memory (CPU and/or GPU).
|
inline |
Returns whether the Mat is the owner of the memory it's accessing.
|
inline |
Returns the resolution of the image that this Mat holds.
Allocates memory for the Mat.
| width | Width of the image/matrix in pixels. |
| height | Height of the image/matrix in pixels. |
| matType | Type of matrix (data type and channels; see sl.MAT_TYPE) |
| mem | Where the buffer will be stored - CPU memory or GPU memory. |
|
inline |
Allocates memory for the Mat.
| resolution | Size of the image/matrix in pixels. |
| matType | Type of matrix (data type and channels; see sl.MAT_TYPE) |
| mem | Where the buffer will be stored - CPU memory or GPU memory. |
|
inline |
|
inline |
Duplicates a Mat by copying all its data into a new one (deep copy).
| source |
|
inline |
Returns the value of a specific point in the matrix. (MAT_32F_C1)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Gets filled with the current value. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Returns the value of a specific point in the matrix. (MAT_32F_C2)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Gets filled with the current value. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Returns the value of a specific point in the matrix. (MAT_32F_C3)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Gets filled with the current value. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Returns the value of a specific point in the matrix. (MAT_32F_C4)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Gets filled with the current value. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Returns the value of a specific point in the matrix. (MAT_TYPE_8U_C1)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Gets filled with the current value. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Returns the value of a specific point in the matrix. (MAT_TYPE_8U_C2)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Gets filled with the current value. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Returns the value of a specific point in the matrix. (MAT_TYPE_8U_C3)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Gets filled with the current value. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Returns the value of a specific point in the matrix. (MAT_TYPE_8U_C4)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Gets filled with the current value. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Sets a value to a specific point in the matrix. (MAT_32F_C1)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Value to which the point will be set. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Sets a value to a specific point in the matrix. (MAT_32F_C2)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Value to which the point will be set. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Sets a value to a specific point in the matrix. (MAT_32F_C3)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Value to which the point will be set. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Sets a value to a specific point in the matrix. (MAT_32F_C4)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Value to which the point will be set. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Sets a value to a specific point in the matrix. (MAT_TYPE_8U_C1)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Value to which the point will be set. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Sets a value to a specific point in the matrix. (MAT_TYPE_8U_C2)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Value to which the point will be set. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Sets a value to a specific point in the matrix. (MAT_TYPE_8U_C3)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Value to which the point will be set. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
Sets a value to a specific point in the matrix. (MAT_TYPE_8U_C4)
| x | Column the point is in. |
| y | Row the point is in. |
| value | Value to which the point will be set. |
| mem | Whether point is on CPU memory or GPU memory. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
get |
Returns the internal ptr of a Mat.