OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
Public Types | Static Public Member Functions | List of all members
OpenCVForUnity.UnityUtils.DebugMatUtils Class Reference

Public Types

enum  LayoutType { LayoutType.TOP, LayoutType.LEFT, LayoutType.RIGHT, LayoutType.BOTTOM }
 

Static Public Member Functions

static void clear ()
 
static void setup (LayoutType type=LayoutType.RIGHT)
 
static void imshow (string winname, Mat img, bool dump=false, CoreModule.Rect roi=null, string debugText=null)
 
static void imshow (string winname, string debugText)
 
static void destroyWindow (string winname)
 
static void destroyAllWindows ()
 

Member Enumeration Documentation

◆ LayoutType

LayoutType

Enumerator
TOP 
LEFT 
RIGHT 
BOTTOM 

Member Function Documentation

◆ clear()

static void OpenCVForUnity.UnityUtils.DebugMatUtils.clear ( )
static

Destroys the DebugMatUtils GameObjects.

The method clear destroys DebugMatUtils-related GameObjects from the hierarchy.

◆ destroyAllWindows()

static void OpenCVForUnity.UnityUtils.DebugMatUtils.destroyAllWindows ( )
static

Destroys all of the windows.

The method destroyAllWindows destroys all of the opened windows.

◆ destroyWindow()

static void OpenCVForUnity.UnityUtils.DebugMatUtils.destroyWindow ( string  winname)
static

Destroys the specified window.

The method destroyWindow destroys the window with the given name.

Parameters
winnameName of the window to be destroyed.

◆ imshow() [1/2]

static void OpenCVForUnity.UnityUtils.DebugMatUtils.imshow ( string  winname,
Mat  img,
bool  dump = false,
CoreModule.Rect  roi = null,
string  debugText = null 
)
static

Displays an image in the specified window.

The method imshow displays an image in the specified window.

If the image is 8-bit unsigned, it is displayed as is. If the image is 16-bit unsigned, the pixels are divided by 256. That is, the value range [0,255*256] is mapped to [0,255]. If the image is 32-bit or 64-bit floating-point, the pixel values are multiplied by 255. That is, the value range [0,1] is mapped to [0,255]. 32-bit integer images are not processed anymore due to ambiguouty of required transform. Convert to 8-bit unsigned matrix using a custom preprocessing specific to image's context.

Parameters
winnameName of the window.
matImage to be shown.
dumpWhether to display the result of mat.dump() method?
roiExtract the intersecting rectangle of img and roi.
debugTextDisplays the specified string in the InputField.

◆ imshow() [2/2]

static void OpenCVForUnity.UnityUtils.DebugMatUtils.imshow ( string  winname,
string  debugText 
)
static

Displays debug text in the specified window.

The method imshow displays debug text in the specified window.

Parameters
winnameName of the window.
debugTextDisplays the specified string in the InputField.

◆ setup()

static void OpenCVForUnity.UnityUtils.DebugMatUtils.setup ( LayoutType  type = LayoutType.RIGHT)
static

Setup the DebugMatUtils GameObject.

The method setup sets up DebugMatUtils-related GameObjects to the hierarchy. By calling this method, the initialization process that occurs when the imshow() method is called for the first time can be performed in advance.

Parameters
typeLayoutType

The documentation for this class was generated from the following file: