OpenCV for Unity  2.6.3
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 Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.ObjdetectModule.CharucoDetector Class Reference
Inheritance diagram for OpenCVForUnity.ObjdetectModule.CharucoDetector:
OpenCVForUnity.CoreModule.Algorithm OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

 CharucoDetector (CharucoBoard board, CharucoParameters charucoParams, DetectorParameters detectorParams, RefineParameters refineParams)
 Basic CharucoDetector constructor. More...
 
 CharucoDetector (CharucoBoard board, CharucoParameters charucoParams, DetectorParameters detectorParams)
 Basic CharucoDetector constructor. More...
 
 CharucoDetector (CharucoBoard board, CharucoParameters charucoParams)
 Basic CharucoDetector constructor. More...
 
 CharucoDetector (CharucoBoard board)
 Basic CharucoDetector constructor. More...
 
CharucoBoard getBoard ()
 
void setBoard (CharucoBoard board)
 
CharucoParameters getCharucoParameters ()
 
void setCharucoParameters (CharucoParameters charucoParameters)
 
DetectorParameters getDetectorParameters ()
 
void setDetectorParameters (DetectorParameters detectorParameters)
 
RefineParameters getRefineParameters ()
 
void setRefineParameters (RefineParameters refineParameters)
 
void detectBoard (Mat image, Mat charucoCorners, Mat charucoIds, List< Mat > markerCorners, Mat markerIds)
 detect aruco markers and interpolate position of ChArUco board corners More...
 
void detectBoard (Mat image, Mat charucoCorners, Mat charucoIds, List< Mat > markerCorners)
 detect aruco markers and interpolate position of ChArUco board corners More...
 
void detectBoard (Mat image, Mat charucoCorners, Mat charucoIds)
 detect aruco markers and interpolate position of ChArUco board corners More...
 
void detectDiamonds (Mat image, List< Mat > diamondCorners, Mat diamondIds, List< Mat > markerCorners, Mat markerIds)
 Detect ChArUco Diamond markers. More...
 
void detectDiamonds (Mat image, List< Mat > diamondCorners, Mat diamondIds, List< Mat > markerCorners)
 Detect ChArUco Diamond markers. More...
 
void detectDiamonds (Mat image, List< Mat > diamondCorners, Mat diamondIds)
 Detect ChArUco Diamond markers. More...
 
- Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
IntPtr getNativeObjAddr ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty ()
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
void save (string filename)
 
virtual string getDefaultName ()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new CharucoDetector __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
static Algorithm __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Constructor & Destructor Documentation

◆ CharucoDetector() [1/4]

OpenCVForUnity.ObjdetectModule.CharucoDetector.CharucoDetector ( CharucoBoard  board,
CharucoParameters  charucoParams,
DetectorParameters  detectorParams,
RefineParameters  refineParams 
)

Basic CharucoDetector constructor.

Parameters
boardChAruco board
charucoParamscharuco detection parameters
detectorParamsmarker detection parameters
refineParamsmarker refine detection parameters

◆ CharucoDetector() [2/4]

OpenCVForUnity.ObjdetectModule.CharucoDetector.CharucoDetector ( CharucoBoard  board,
CharucoParameters  charucoParams,
DetectorParameters  detectorParams 
)

Basic CharucoDetector constructor.

Parameters
boardChAruco board
charucoParamscharuco detection parameters
detectorParamsmarker detection parameters
refineParamsmarker refine detection parameters

◆ CharucoDetector() [3/4]

OpenCVForUnity.ObjdetectModule.CharucoDetector.CharucoDetector ( CharucoBoard  board,
CharucoParameters  charucoParams 
)

Basic CharucoDetector constructor.

Parameters
boardChAruco board
charucoParamscharuco detection parameters
detectorParamsmarker detection parameters
refineParamsmarker refine detection parameters

◆ CharucoDetector() [4/4]

OpenCVForUnity.ObjdetectModule.CharucoDetector.CharucoDetector ( CharucoBoard  board)

Basic CharucoDetector constructor.

Parameters
boardChAruco board
charucoParamscharuco detection parameters
detectorParamsmarker detection parameters
refineParamsmarker refine detection parameters

Member Function Documentation

◆ __fromPtr__()

static new CharucoDetector OpenCVForUnity.ObjdetectModule.CharucoDetector.__fromPtr__ ( IntPtr  addr)
static

◆ detectBoard() [1/3]

void OpenCVForUnity.ObjdetectModule.CharucoDetector.detectBoard ( Mat  image,
Mat  charucoCorners,
Mat  charucoIds,
List< Mat markerCorners,
Mat  markerIds 
)

detect aruco markers and interpolate position of ChArUco board corners

Parameters
imageinput image necesary for corner refinement. Note that markers are not detected and should be sent in corners and ids parameters.
charucoCornersinterpolated chessboard corners.
charucoIdsinterpolated chessboard corners identifiers.
markerCornersvector of already detected markers corners. For each marker, its four corners are provided, (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. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
markerIdslist of identifiers for each marker in corners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function receives the detected markers and returns the 2D position of the chessboard corners from a ChArUco board using the detected Aruco markers.

If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.

If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography. Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.

See also
findChessboardCorners
Note
After OpenCV 4.6.0, there was an incompatible change in the ChArUco pattern generation algorithm for even row counts. Use cv::aruco::CharucoBoard::setLegacyPattern() to ensure compatibility with patterns created using OpenCV versions prior to 4.6.0. For more information, see the issue: https://github.com/opencv/opencv/issues/23152

◆ detectBoard() [2/3]

void OpenCVForUnity.ObjdetectModule.CharucoDetector.detectBoard ( Mat  image,
Mat  charucoCorners,
Mat  charucoIds,
List< Mat markerCorners 
)

detect aruco markers and interpolate position of ChArUco board corners

Parameters
imageinput image necesary for corner refinement. Note that markers are not detected and should be sent in corners and ids parameters.
charucoCornersinterpolated chessboard corners.
charucoIdsinterpolated chessboard corners identifiers.
markerCornersvector of already detected markers corners. For each marker, its four corners are provided, (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. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
markerIdslist of identifiers for each marker in corners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function receives the detected markers and returns the 2D position of the chessboard corners from a ChArUco board using the detected Aruco markers.

If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.

If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography. Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.

See also
findChessboardCorners
Note
After OpenCV 4.6.0, there was an incompatible change in the ChArUco pattern generation algorithm for even row counts. Use cv::aruco::CharucoBoard::setLegacyPattern() to ensure compatibility with patterns created using OpenCV versions prior to 4.6.0. For more information, see the issue: https://github.com/opencv/opencv/issues/23152

◆ detectBoard() [3/3]

void OpenCVForUnity.ObjdetectModule.CharucoDetector.detectBoard ( Mat  image,
Mat  charucoCorners,
Mat  charucoIds 
)

detect aruco markers and interpolate position of ChArUco board corners

Parameters
imageinput image necesary for corner refinement. Note that markers are not detected and should be sent in corners and ids parameters.
charucoCornersinterpolated chessboard corners.
charucoIdsinterpolated chessboard corners identifiers.
markerCornersvector of already detected markers corners. For each marker, its four corners are provided, (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. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
markerIdslist of identifiers for each marker in corners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function receives the detected markers and returns the 2D position of the chessboard corners from a ChArUco board using the detected Aruco markers.

If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.

If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography. Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.

See also
findChessboardCorners
Note
After OpenCV 4.6.0, there was an incompatible change in the ChArUco pattern generation algorithm for even row counts. Use cv::aruco::CharucoBoard::setLegacyPattern() to ensure compatibility with patterns created using OpenCV versions prior to 4.6.0. For more information, see the issue: https://github.com/opencv/opencv/issues/23152

◆ detectDiamonds() [1/3]

void OpenCVForUnity.ObjdetectModule.CharucoDetector.detectDiamonds ( Mat  image,
List< Mat diamondCorners,
Mat  diamondIds,
List< Mat markerCorners,
Mat  markerIds 
)

Detect ChArUco Diamond markers.

Parameters
imageinput image necessary for corner subpixel.
diamondCornersoutput list of detected diamond corners (4 corners per diamond). The order is the same than in marker corners: top left, top right, bottom right and bottom left. Similar format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
diamondIdsids of the diamonds in diamondCorners. The id of each diamond is in fact of type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the diamond.
markerCornerslist of detected marker corners from detectMarkers function. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
markerIdslist of marker ids in markerCorners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function detects Diamond markers from the previous detected ArUco markers. The diamonds are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters are provided, the diamond search is based on reprojection. If not, diamond search is based on homography. Homography is faster than reprojection, but less accurate.

◆ detectDiamonds() [2/3]

void OpenCVForUnity.ObjdetectModule.CharucoDetector.detectDiamonds ( Mat  image,
List< Mat diamondCorners,
Mat  diamondIds,
List< Mat markerCorners 
)

Detect ChArUco Diamond markers.

Parameters
imageinput image necessary for corner subpixel.
diamondCornersoutput list of detected diamond corners (4 corners per diamond). The order is the same than in marker corners: top left, top right, bottom right and bottom left. Similar format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
diamondIdsids of the diamonds in diamondCorners. The id of each diamond is in fact of type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the diamond.
markerCornerslist of detected marker corners from detectMarkers function. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
markerIdslist of marker ids in markerCorners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function detects Diamond markers from the previous detected ArUco markers. The diamonds are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters are provided, the diamond search is based on reprojection. If not, diamond search is based on homography. Homography is faster than reprojection, but less accurate.

◆ detectDiamonds() [3/3]

void OpenCVForUnity.ObjdetectModule.CharucoDetector.detectDiamonds ( Mat  image,
List< Mat diamondCorners,
Mat  diamondIds 
)

Detect ChArUco Diamond markers.

Parameters
imageinput image necessary for corner subpixel.
diamondCornersoutput list of detected diamond corners (4 corners per diamond). The order is the same than in marker corners: top left, top right, bottom right and bottom left. Similar format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
diamondIdsids of the diamonds in diamondCorners. The id of each diamond is in fact of type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the diamond.
markerCornerslist of detected marker corners from detectMarkers function. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
markerIdslist of marker ids in markerCorners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function detects Diamond markers from the previous detected ArUco markers. The diamonds are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters are provided, the diamond search is based on reprojection. If not, diamond search is based on homography. Homography is faster than reprojection, but less accurate.

◆ Dispose()

override void OpenCVForUnity.ObjdetectModule.CharucoDetector.Dispose ( bool  disposing)
protectedvirtual

◆ getBoard()

CharucoBoard OpenCVForUnity.ObjdetectModule.CharucoDetector.getBoard ( )

◆ getCharucoParameters()

CharucoParameters OpenCVForUnity.ObjdetectModule.CharucoDetector.getCharucoParameters ( )

◆ getDetectorParameters()

DetectorParameters OpenCVForUnity.ObjdetectModule.CharucoDetector.getDetectorParameters ( )

◆ getRefineParameters()

RefineParameters OpenCVForUnity.ObjdetectModule.CharucoDetector.getRefineParameters ( )

◆ setBoard()

void OpenCVForUnity.ObjdetectModule.CharucoDetector.setBoard ( CharucoBoard  board)

◆ setCharucoParameters()

void OpenCVForUnity.ObjdetectModule.CharucoDetector.setCharucoParameters ( CharucoParameters  charucoParameters)

◆ setDetectorParameters()

void OpenCVForUnity.ObjdetectModule.CharucoDetector.setDetectorParameters ( DetectorParameters  detectorParameters)

◆ setRefineParameters()

void OpenCVForUnity.ObjdetectModule.CharucoDetector.setRefineParameters ( RefineParameters  refineParameters)

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