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.
Static Public Member Functions | Public Attributes | List of all members
OpenCVForUnity.ObjdetectModule.Objdetect Class Reference

Static Public Member Functions

static void groupRectangles (MatOfRect rectList, MatOfInt weights, int groupThreshold, double eps)
 
static void groupRectangles (MatOfRect rectList, MatOfInt weights, int groupThreshold)
 
static void drawDetectedMarkers (Mat image, List< Mat > corners, Mat ids, Scalar borderColor)
 Draw detected markers in image. More...
 
static void drawDetectedMarkers (Mat image, List< Mat > corners, Mat ids)
 Draw detected markers in image. More...
 
static void drawDetectedMarkers (Mat image, List< Mat > corners)
 Draw detected markers in image. More...
 
static void generateImageMarker (Dictionary dictionary, int id, int sidePixels, Mat img, int borderBits)
 Generate a canonical marker image. More...
 
static void generateImageMarker (Dictionary dictionary, int id, int sidePixels, Mat img)
 Generate a canonical marker image. More...
 
static Dictionary getPredefinedDictionary (int dict)
 Returns one of the predefined dictionaries referenced by DICT_*. More...
 
static Dictionary extendDictionary (int nMarkers, int markerSize, Dictionary baseDictionary, int randomSeed)
 Extend base dictionary by new nMarkers. More...
 
static Dictionary extendDictionary (int nMarkers, int markerSize, Dictionary baseDictionary)
 Extend base dictionary by new nMarkers. More...
 
static Dictionary extendDictionary (int nMarkers, int markerSize)
 Extend base dictionary by new nMarkers. More...
 
static void drawDetectedCornersCharuco (Mat image, Mat charucoCorners, Mat charucoIds, Scalar cornerColor)
 Draws a set of Charuco corners. More...
 
static void drawDetectedCornersCharuco (Mat image, Mat charucoCorners, Mat charucoIds)
 Draws a set of Charuco corners. More...
 
static void drawDetectedCornersCharuco (Mat image, Mat charucoCorners)
 Draws a set of Charuco corners. More...
 
static void drawDetectedDiamonds (Mat image, List< Mat > diamondCorners, Mat diamondIds, Scalar borderColor)
 Draw a set of detected ChArUco Diamond markers. More...
 
static void drawDetectedDiamonds (Mat image, List< Mat > diamondCorners, Mat diamondIds)
 Draw a set of detected ChArUco Diamond markers. More...
 
static void drawDetectedDiamonds (Mat image, List< Mat > diamondCorners)
 Draw a set of detected ChArUco Diamond markers. More...
 

Public Attributes

const int CASCADE_DO_CANNY_PRUNING = 1
 
const int CASCADE_SCALE_IMAGE = 2
 
const int CASCADE_FIND_BIGGEST_OBJECT = 4
 
const int CASCADE_DO_ROUGH_SEARCH = 8
 
const int DetectionBasedTracker_DETECTED_NOT_SHOWN_YET = 0
 
const int DetectionBasedTracker_DETECTED = 1
 
const int DetectionBasedTracker_DETECTED_TEMPORARY_LOST = 2
 
const int DetectionBasedTracker_WRONG_OBJECT = 3
 
const int CORNER_REFINE_NONE = 0
 
const int CORNER_REFINE_SUBPIX = 1
 
const int CORNER_REFINE_CONTOUR = 2
 
const int CORNER_REFINE_APRILTAG = 3
 
const int DICT_4X4_50 = 0
 
const int DICT_4X4_100 = 0 + 1
 
const int DICT_4X4_250 = 0 + 2
 
const int DICT_4X4_1000 = 0 + 3
 
const int DICT_5X5_50 = 0 + 4
 
const int DICT_5X5_100 = 0 + 5
 
const int DICT_5X5_250 = 0 + 6
 
const int DICT_5X5_1000 = 0 + 7
 
const int DICT_6X6_50 = 0 + 8
 
const int DICT_6X6_100 = 0 + 9
 
const int DICT_6X6_250 = 0 + 10
 
const int DICT_6X6_1000 = 0 + 11
 
const int DICT_7X7_50 = 0 + 12
 
const int DICT_7X7_100 = 0 + 13
 
const int DICT_7X7_250 = 0 + 14
 
const int DICT_7X7_1000 = 0 + 15
 
const int DICT_ARUCO_ORIGINAL = 0 + 16
 
const int DICT_APRILTAG_16h5 = 0 + 17
 
const int DICT_APRILTAG_25h9 = 0 + 18
 
const int DICT_APRILTAG_36h10 = 0 + 19
 
const int DICT_APRILTAG_36h11 = 0 + 20
 
const int DICT_ARUCO_MIP_36h12 = 0 + 21
 

Member Function Documentation

◆ drawDetectedCornersCharuco() [1/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedCornersCharuco ( Mat  image,
Mat  charucoCorners,
Mat  charucoIds,
Scalar  cornerColor 
)
static

Draws a set of Charuco corners.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
charucoCornersvector of detected charuco corners
charucoIdslist of identifiers for each corner in charucoCorners
cornerColorcolor of the square surrounding each corner

This function draws a set of detected Charuco corners. If identifiers vector is provided, it also draws the id of each corner.

◆ drawDetectedCornersCharuco() [2/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedCornersCharuco ( Mat  image,
Mat  charucoCorners,
Mat  charucoIds 
)
static

Draws a set of Charuco corners.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
charucoCornersvector of detected charuco corners
charucoIdslist of identifiers for each corner in charucoCorners
cornerColorcolor of the square surrounding each corner

This function draws a set of detected Charuco corners. If identifiers vector is provided, it also draws the id of each corner.

◆ drawDetectedCornersCharuco() [3/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedCornersCharuco ( Mat  image,
Mat  charucoCorners 
)
static

Draws a set of Charuco corners.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
charucoCornersvector of detected charuco corners
charucoIdslist of identifiers for each corner in charucoCorners
cornerColorcolor of the square surrounding each corner

This function draws a set of detected Charuco corners. If identifiers vector is provided, it also draws the id of each corner.

◆ drawDetectedDiamonds() [1/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedDiamonds ( Mat  image,
List< Mat diamondCorners,
Mat  diamondIds,
Scalar  borderColor 
)
static

Draw a set of detected ChArUco Diamond markers.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
diamondCornerspositions of diamond corners in the same format returned by detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
diamondIdsvector of identifiers for diamonds in diamondCorners, in the same format returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). Optional, if not provided, ids are not painted.
borderColorcolor of marker borders. Rest of colors (text color and first corner color) are calculated based on this one.

Given an array of detected diamonds, this functions draws them in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

◆ drawDetectedDiamonds() [2/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedDiamonds ( Mat  image,
List< Mat diamondCorners,
Mat  diamondIds 
)
static

Draw a set of detected ChArUco Diamond markers.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
diamondCornerspositions of diamond corners in the same format returned by detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
diamondIdsvector of identifiers for diamonds in diamondCorners, in the same format returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). Optional, if not provided, ids are not painted.
borderColorcolor of marker borders. Rest of colors (text color and first corner color) are calculated based on this one.

Given an array of detected diamonds, this functions draws them in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

◆ drawDetectedDiamonds() [3/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedDiamonds ( Mat  image,
List< Mat diamondCorners 
)
static

Draw a set of detected ChArUco Diamond markers.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
diamondCornerspositions of diamond corners in the same format returned by detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
diamondIdsvector of identifiers for diamonds in diamondCorners, in the same format returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). Optional, if not provided, ids are not painted.
borderColorcolor of marker borders. Rest of colors (text color and first corner color) are calculated based on this one.

Given an array of detected diamonds, this functions draws them in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

◆ drawDetectedMarkers() [1/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedMarkers ( Mat  image,
List< Mat corners,
Mat  ids,
Scalar  borderColor 
)
static

Draw detected markers in image.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
cornerspositions of marker corners on input image. (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
idsvector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted.
borderColorcolor of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization.

Given an array of detected marker corners and its corresponding ids, this functions draws the markers in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

◆ drawDetectedMarkers() [2/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedMarkers ( Mat  image,
List< Mat corners,
Mat  ids 
)
static

Draw detected markers in image.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
cornerspositions of marker corners on input image. (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
idsvector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted.
borderColorcolor of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization.

Given an array of detected marker corners and its corresponding ids, this functions draws the markers in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

◆ drawDetectedMarkers() [3/3]

static void OpenCVForUnity.ObjdetectModule.Objdetect.drawDetectedMarkers ( Mat  image,
List< Mat corners 
)
static

Draw detected markers in image.

Parameters
imageinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
cornerspositions of marker corners on input image. (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
idsvector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted.
borderColorcolor of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization.

Given an array of detected marker corners and its corresponding ids, this functions draws the markers in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

◆ extendDictionary() [1/3]

static Dictionary OpenCVForUnity.ObjdetectModule.Objdetect.extendDictionary ( int  nMarkers,
int  markerSize,
Dictionary  baseDictionary,
int  randomSeed 
)
static

Extend base dictionary by new nMarkers.

Parameters
nMarkersnumber of markers in the dictionary
markerSizenumber of bits per dimension of each markers
baseDictionaryInclude the markers in this dictionary at the beginning (optional)
randomSeeda user supplied seed for theRNG()
This function creates a new dictionary composed by nMarkers markers and each markers composed
by markerSize x markerSize bits. If baseDictionary is provided, its markers are directly
included and the rest are generated based on them. If the size of baseDictionary is higher
than nMarkers, only the first nMarkers in baseDictionary are taken and no new marker is added.

◆ extendDictionary() [2/3]

static Dictionary OpenCVForUnity.ObjdetectModule.Objdetect.extendDictionary ( int  nMarkers,
int  markerSize,
Dictionary  baseDictionary 
)
static

Extend base dictionary by new nMarkers.

Parameters
nMarkersnumber of markers in the dictionary
markerSizenumber of bits per dimension of each markers
baseDictionaryInclude the markers in this dictionary at the beginning (optional)
randomSeeda user supplied seed for theRNG()
This function creates a new dictionary composed by nMarkers markers and each markers composed
by markerSize x markerSize bits. If baseDictionary is provided, its markers are directly
included and the rest are generated based on them. If the size of baseDictionary is higher
than nMarkers, only the first nMarkers in baseDictionary are taken and no new marker is added.

◆ extendDictionary() [3/3]

static Dictionary OpenCVForUnity.ObjdetectModule.Objdetect.extendDictionary ( int  nMarkers,
int  markerSize 
)
static

Extend base dictionary by new nMarkers.

Parameters
nMarkersnumber of markers in the dictionary
markerSizenumber of bits per dimension of each markers
baseDictionaryInclude the markers in this dictionary at the beginning (optional)
randomSeeda user supplied seed for theRNG()
This function creates a new dictionary composed by nMarkers markers and each markers composed
by markerSize x markerSize bits. If baseDictionary is provided, its markers are directly
included and the rest are generated based on them. If the size of baseDictionary is higher
than nMarkers, only the first nMarkers in baseDictionary are taken and no new marker is added.

◆ generateImageMarker() [1/2]

static void OpenCVForUnity.ObjdetectModule.Objdetect.generateImageMarker ( Dictionary  dictionary,
int  id,
int  sidePixels,
Mat  img,
int  borderBits 
)
static

Generate a canonical marker image.

Parameters
dictionarydictionary of markers indicating the type of markers
ididentifier of the marker that will be returned. It has to be a valid id in the specified dictionary.
sidePixelssize of the image in pixels
imgoutput image with the marker
borderBitswidth of the marker border.

This function returns a marker image in its canonical form (i.e. ready to be printed)

◆ generateImageMarker() [2/2]

static void OpenCVForUnity.ObjdetectModule.Objdetect.generateImageMarker ( Dictionary  dictionary,
int  id,
int  sidePixels,
Mat  img 
)
static

Generate a canonical marker image.

Parameters
dictionarydictionary of markers indicating the type of markers
ididentifier of the marker that will be returned. It has to be a valid id in the specified dictionary.
sidePixelssize of the image in pixels
imgoutput image with the marker
borderBitswidth of the marker border.

This function returns a marker image in its canonical form (i.e. ready to be printed)

◆ getPredefinedDictionary()

static Dictionary OpenCVForUnity.ObjdetectModule.Objdetect.getPredefinedDictionary ( int  dict)
static

Returns one of the predefined dictionaries referenced by DICT_*.

◆ groupRectangles() [1/2]

static void OpenCVForUnity.ObjdetectModule.Objdetect.groupRectangles ( MatOfRect  rectList,
MatOfInt  weights,
int  groupThreshold,
double  eps 
)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ groupRectangles() [2/2]

static void OpenCVForUnity.ObjdetectModule.Objdetect.groupRectangles ( MatOfRect  rectList,
MatOfInt  weights,
int  groupThreshold 
)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Data Documentation

◆ CASCADE_DO_CANNY_PRUNING

const int OpenCVForUnity.ObjdetectModule.Objdetect.CASCADE_DO_CANNY_PRUNING = 1

◆ CASCADE_DO_ROUGH_SEARCH

const int OpenCVForUnity.ObjdetectModule.Objdetect.CASCADE_DO_ROUGH_SEARCH = 8

◆ CASCADE_FIND_BIGGEST_OBJECT

const int OpenCVForUnity.ObjdetectModule.Objdetect.CASCADE_FIND_BIGGEST_OBJECT = 4

◆ CASCADE_SCALE_IMAGE

const int OpenCVForUnity.ObjdetectModule.Objdetect.CASCADE_SCALE_IMAGE = 2

◆ CORNER_REFINE_APRILTAG

const int OpenCVForUnity.ObjdetectModule.Objdetect.CORNER_REFINE_APRILTAG = 3

◆ CORNER_REFINE_CONTOUR

const int OpenCVForUnity.ObjdetectModule.Objdetect.CORNER_REFINE_CONTOUR = 2

◆ CORNER_REFINE_NONE

const int OpenCVForUnity.ObjdetectModule.Objdetect.CORNER_REFINE_NONE = 0

◆ CORNER_REFINE_SUBPIX

const int OpenCVForUnity.ObjdetectModule.Objdetect.CORNER_REFINE_SUBPIX = 1

◆ DetectionBasedTracker_DETECTED

const int OpenCVForUnity.ObjdetectModule.Objdetect.DetectionBasedTracker_DETECTED = 1

◆ DetectionBasedTracker_DETECTED_NOT_SHOWN_YET

const int OpenCVForUnity.ObjdetectModule.Objdetect.DetectionBasedTracker_DETECTED_NOT_SHOWN_YET = 0

◆ DetectionBasedTracker_DETECTED_TEMPORARY_LOST

const int OpenCVForUnity.ObjdetectModule.Objdetect.DetectionBasedTracker_DETECTED_TEMPORARY_LOST = 2

◆ DetectionBasedTracker_WRONG_OBJECT

const int OpenCVForUnity.ObjdetectModule.Objdetect.DetectionBasedTracker_WRONG_OBJECT = 3

◆ DICT_4X4_100

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_4X4_100 = 0 + 1

◆ DICT_4X4_1000

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_4X4_1000 = 0 + 3

◆ DICT_4X4_250

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_4X4_250 = 0 + 2

◆ DICT_4X4_50

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_4X4_50 = 0

◆ DICT_5X5_100

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_5X5_100 = 0 + 5

◆ DICT_5X5_1000

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_5X5_1000 = 0 + 7

◆ DICT_5X5_250

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_5X5_250 = 0 + 6

◆ DICT_5X5_50

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_5X5_50 = 0 + 4

◆ DICT_6X6_100

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_6X6_100 = 0 + 9

◆ DICT_6X6_1000

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_6X6_1000 = 0 + 11

◆ DICT_6X6_250

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_6X6_250 = 0 + 10

◆ DICT_6X6_50

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_6X6_50 = 0 + 8

◆ DICT_7X7_100

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_7X7_100 = 0 + 13

◆ DICT_7X7_1000

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_7X7_1000 = 0 + 15

◆ DICT_7X7_250

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_7X7_250 = 0 + 14

◆ DICT_7X7_50

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_7X7_50 = 0 + 12

◆ DICT_APRILTAG_16h5

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_APRILTAG_16h5 = 0 + 17

◆ DICT_APRILTAG_25h9

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_APRILTAG_25h9 = 0 + 18

◆ DICT_APRILTAG_36h10

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_APRILTAG_36h10 = 0 + 19

◆ DICT_APRILTAG_36h11

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_APRILTAG_36h11 = 0 + 20

◆ DICT_ARUCO_MIP_36h12

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_ARUCO_MIP_36h12 = 0 + 21

◆ DICT_ARUCO_ORIGINAL

const int OpenCVForUnity.ObjdetectModule.Objdetect.DICT_ARUCO_ORIGINAL = 0 + 16

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