OpenCV for Unity 2.6.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
Public Types | |
enum | DumpMode { GetRawTextureDataMode , GetPixels32Mode } |
Enum representing the methods for dumping texture data. More... | |
enum | LayoutType { TOP , LEFT , RIGHT , BOTTOM } |
Enum representing layout positions for displaying a group of images using the imshow method. More... | |
Static Public Member Functions | |
static void | clear () |
Destroys the DebugMatUtils GameObjects. | |
static void | destroyAllWindows () |
Destroys all opened windows. | |
static void | destroyWindow (string winname) |
Destroys the specified window. | |
static void | imshow (string winname, Mat img, bool dump, in Vec4i roi, string debugText=null, bool isDataSRGB=true) |
Displays a Mat image. | |
static void | imshow (string winname, Mat img, bool dump, in(int x, int y, int width, int height) roi, string debugText=null, bool isDataSRGB=true) |
Displays a Mat image. | |
static void | imshow (string winname, Mat img, bool dump=false, CoreModule.Rect roi=null, string debugText=null, bool isDataSRGB=true) |
Displays a Mat image. | |
static void | imshow (string winname, Mat img, bool isDataSRGB) |
Displays a Mat image. | |
static void | imshow (string winname, string debugText) |
Displays debug text. | |
static void | imshow (string winname, Texture img, bool dump, DumpMode dumpMode, in Vec4i roi, string debugText=null) |
Displays a Texture image. | |
static void | imshow (string winname, Texture img, bool dump, DumpMode dumpMode, in(int x, int y, int width, int height) roi, string debugText=null) |
Displays a Texture image. | |
static void | imshow (string winname, Texture img, bool dump=false, DumpMode dumpMode=DumpMode.GetRawTextureDataMode, CoreModule.Rect roi=null, string debugText=null) |
Displays a Texture image. | |
static void | setup (LayoutType type=LayoutType.RIGHT) |
Sets up the DebugMatUtils GameObject. | |
|
static |
Destroys the DebugMatUtils GameObjects.
The clear method destroys GameObjects related to DebugMatUtils from the hierarchy.
|
static |
Destroys all opened windows.
The destroyAllWindows method removes all windows that are currently open. This is useful for cleaning up the display when no longer needed.
|
static |
Destroys the specified window.
The destroyWindow method removes the window identified by the provided name from the display.
winname | The name of the window to be destroyed. |
|
static |
Displays a Mat image.
This method displays a Mat image.
If the image is 8-bit unsigned, it is displayed as is. If the image is 16-bit unsigned, the pixel values are divided by 256, mapping the value range [0, 255*256] to [0, 255]. If the image is 32-bit or 64-bit floating-point, the pixel values are multiplied by 255, mapping the value range [0, 1] to [0, 255]. 32-bit integer images are not supported due to ambiguity in the required transformation. If necessary, please preprocess the image to convert it to an 8-bit unsigned matrix. A new window will not be created if the number of image windows exceeds 50. Additionally, if a LayoutType is specified, please call the setup method() before the imshow method() is invoked for the first time.
winname | The name of the window. If the same name is already added, it will be overwritten. |
img | The Mat image to be displayed. |
dump | Specifies whether to display the result of the mat.dump() method. |
roi | The part of the image to be displayed (extracts the intersecting area of img and roi). |
debugText | The debug text to be displayed in the InputField. |
isDataSRGB | The isDataSRGB property of the Texture2D used when displaying the Mat image. If true, the data is assumed to be in sRGB color space. |
|
static |
Displays a Mat image.
This method displays a Mat image.
If the image is 8-bit unsigned, it is displayed as is. If the image is 16-bit unsigned, the pixel values are divided by 256, mapping the value range [0, 255*256] to [0, 255]. If the image is 32-bit or 64-bit floating-point, the pixel values are multiplied by 255, mapping the value range [0, 1] to [0, 255]. 32-bit integer images are not supported due to ambiguity in the required transformation. If necessary, please preprocess the image to convert it to an 8-bit unsigned matrix. A new window will not be created if the number of image windows exceeds 50. Additionally, if a LayoutType is specified, please call the setup method() before the imshow method() is invoked for the first time.
winname | The name of the window. If the same name is already added, it will be overwritten. |
img | The Mat image to be displayed. |
dump | Specifies whether to display the result of the mat.dump() method. |
roi | The part of the image to be displayed (extracts the intersecting area of img and roi). |
debugText | The debug text to be displayed in the InputField. |
isDataSRGB | The isDataSRGB property of the Texture2D used when displaying the Mat image. If true, the data is assumed to be in sRGB color space. |
|
static |
Displays a Mat image.
This method displays a Mat image.
If the image is 8-bit unsigned, it is displayed as is. If the image is 16-bit unsigned, the pixel values are divided by 256, mapping the value range [0, 255*256] to [0, 255]. If the image is 32-bit or 64-bit floating-point, the pixel values are multiplied by 255, mapping the value range [0, 1] to [0, 255]. 32-bit integer images are not supported due to ambiguity in the required transformation. If necessary, please preprocess the image to convert it to an 8-bit unsigned matrix. A new window will not be created if the number of image windows exceeds 50. Additionally, if a LayoutType is specified, please call the setup method() before the imshow method() is invoked for the first time.
winname | The name of the window. If the same name is already added, it will be overwritten. |
img | The Mat image to be displayed. |
dump | Specifies whether to display the result of the mat.dump() method. |
roi | The part of the image to be displayed (extracts the intersecting area of img and roi). |
debugText | The debug text to be displayed in the InputField. |
isDataSRGB | The isDataSRGB property of the Texture2D used when displaying the Mat image. If true, the data is assumed to be in sRGB color space. |
|
static |
Displays a Mat image.
This method displays a Mat image.
If the image is 8-bit unsigned, it is displayed as is. If the image is 16-bit unsigned, the pixel values are divided by 256, mapping the value range [0, 255*256] to [0, 255]. If the image is 32-bit or 64-bit floating-point, the pixel values are multiplied by 255, mapping the value range [0, 1] to [0, 255]. 32-bit integer images are not supported due to ambiguity in the required transformation. If necessary, please preprocess the image to convert it to an 8-bit unsigned matrix. A new window will not be created if the number of image windows exceeds 50. Additionally, if a LayoutType is specified, please call the setup method() before the imshow method() is invoked for the first time.
winname | The name of the window. If the same name is already added, it will be overwritten. |
img | The Mat image to be displayed. |
isDataSRGB | The isDataSRGB property of the Texture2D used when displaying the Mat image. If true, the data is assumed to be in sRGB color space. |
|
static |
Displays debug text.
The imshow method displays the provided debug text in the InputField.
winname | The name of the window. |
debugText | The debug text to be displayed in the InputField. |
|
static |
Displays a Texture image.
This method displays a Texture image.
The supported texture classes are Texture2D and RenderTexture. A new window will not be created if the number of image windows exceeds 50. Additionally, if a LayoutType is specified, please call the setup method to initialize before invoking the imshow method for the first time.
winname | The name of the window. If the same name is already added, it will be overwritten. |
img | The Texture to be displayed. |
dump | Specifies whether to dump the pixel data of the Texture. The pixel data will be reordered to match the format returned by the mat.dump() method, with the origin located at the top-right corner. |
dumpMode | Specifies the dump mode (default is GetRawTextureDataMode). In GetRawTextureDataMode, if the TextureFormat is a compressed format, the raw byte data from the GetRawTextureData() method will be dumped as-is. Otherwise, the data will be reordered and dumped as pixel data with the origin in the top-right corner. In GetTexture32Mode, the Color32 array obtained via the GetPixels32() method will be reordered and dumped as pixel data with the origin in the top-right corner. If RenderTexture is specified for img, dumpMode is ignored and the data is always dumped in 4 channels per pixel. |
roi | The part of the image to be displayed (extracts the intersecting area of img and roi). |
debugText | The debug text to be displayed in the InputField. |
|
static |
Displays a Texture image.
This method displays a Texture image.
The supported texture classes are Texture2D and RenderTexture. A new window will not be created if the number of image windows exceeds 50. Additionally, if a LayoutType is specified, please call the setup method to initialize before invoking the imshow method for the first time.
winname | The name of the window. If the same name is already added, it will be overwritten. |
img | The Texture to be displayed. |
dump | Specifies whether to dump the pixel data of the Texture. The pixel data will be reordered to match the format returned by the mat.dump() method, with the origin located at the top-right corner. |
dumpMode | Specifies the dump mode (default is GetRawTextureDataMode). In GetRawTextureDataMode, if the TextureFormat is a compressed format, the raw byte data from the GetRawTextureData() method will be dumped as-is. Otherwise, the data will be reordered and dumped as pixel data with the origin in the top-right corner. In GetTexture32Mode, the Color32 array obtained via the GetPixels32() method will be reordered and dumped as pixel data with the origin in the top-right corner. If RenderTexture is specified for img, dumpMode is ignored and the data is always dumped in 4 channels per pixel. |
roi | The part of the image to be displayed (extracts the intersecting area of img and roi). |
debugText | The debug text to be displayed in the InputField. |
|
static |
Displays a Texture image.
This method displays a Texture image.
The supported texture classes are Texture2D and RenderTexture. A new window will not be created if the number of image windows exceeds 50. Additionally, if a LayoutType is specified, please call the setup method to initialize before invoking the imshow method for the first time.
winname | The name of the window. If the same name is already added, it will be overwritten. |
img | The Texture to be displayed. |
dump | Specifies whether to dump the pixel data of the Texture. The pixel data will be reordered to match the format returned by the mat.dump() method, with the origin located at the top-right corner. |
dumpMode | Specifies the dump mode (default is GetRawTextureDataMode). In GetRawTextureDataMode, if the TextureFormat is a compressed format, the raw byte data from the GetRawTextureData() method will be dumped as-is. Otherwise, the data will be reordered and dumped as pixel data with the origin in the top-right corner. In GetTexture32Mode, the Color32 array obtained via the GetPixels32() method will be reordered and dumped as pixel data with the origin in the top-right corner. If RenderTexture is specified for img, dumpMode is ignored and the data is always dumped in 4 channels per pixel. |
roi | The part of the image to be displayed (extracts the intersecting area of img and roi). |
debugText | The debug text to be displayed in the InputField. |
|
static |
Sets up the DebugMatUtils GameObject.
The setup method adds DebugMatUtils-related GameObjects to the hierarchy. By calling this method, the initialization process that normally occurs when the imshow() method is called for the first time can be performed in advance.
type | The layout type for the setup. |