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.
Loading...
Searching...
No Matches
OpenCVForUnity.ObjdetectModule.Board Class Reference

Board of ArUco markers. More...

Public Member Functions

 Board (List< Mat > objPoints, Dictionary dictionary, Mat ids)
 Common Board constructor.
 
void generateImage (in Vec2d outSize, Mat img)
 Draw a planar board.
 
void generateImage (in Vec2d outSize, Mat img, int marginSize)
 Draw a planar board.
 
void generateImage (in Vec2d outSize, Mat img, int marginSize, int borderBits)
 Draw a planar board.
 
void generateImage (in(double width, double height) outSize, Mat img)
 Draw a planar board.
 
void generateImage (in(double width, double height) outSize, Mat img, int marginSize)
 Draw a planar board.
 
void generateImage (in(double width, double height) outSize, Mat img, int marginSize, int borderBits)
 Draw a planar board.
 
void generateImage (Size outSize, Mat img)
 Draw a planar board.
 
void generateImage (Size outSize, Mat img, int marginSize)
 Draw a planar board.
 
void generateImage (Size outSize, Mat img, int marginSize, int borderBits)
 Draw a planar board.
 
Dictionary getDictionary ()
 return the Dictionary of markers employed for this board
 
MatOfInt getIds ()
 vector of the identifiers of the markers in the board (should be the same size as objPoints)
 
IntPtr getNativeObjAddr ()
 
List< MatOfPoint3fgetObjPoints ()
 return array of object points of all the marker corners in the board.
 
Point3 getRightBottomCorner ()
 get coordinate of the bottom right corner of the board, is set when calling the function create()
 
double double double z getRightBottomCornerAsValueTuple ()
 
Vec3d getRightBottomCornerAsVec3d ()
 get coordinate of the bottom right corner of the board, is set when calling the function create()
 
void matchImagePoints (List< Mat > detectedCorners, Mat detectedIds, Mat objPoints, Mat imgPoints)
 Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static Board __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Public Attributes

double x
 get coordinate of the bottom right corner of the board, is set when calling the function create()
 
double double y
 

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

Board of ArUco markers.

A board is a set of markers in the 3D space with a common coordinate system. The common form of a board of marker is a planar (2D) board, however any 3D layout can be used. A Board object is composed by:

  • The object points of the marker corners, i.e. their coordinates respect to the board system.
  • The dictionary which indicates the type of markers of the board
  • The identifier of all the markers in the board.

Constructor & Destructor Documentation

◆ Board()

OpenCVForUnity.ObjdetectModule.Board.Board ( List< Mat > objPoints,
Dictionary dictionary,
Mat ids )

Common Board constructor.

Parameters
objPointsarray of object points of all the marker corners in the board
dictionarythe dictionary of markers employed for this board
idsvector of the identifiers of the markers in the board

Member Function Documentation

◆ __fromPtr__()

static Board OpenCVForUnity.ObjdetectModule.Board.__fromPtr__ ( IntPtr addr)
static

◆ Dispose()

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

◆ generateImage() [1/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( in Vec2d outSize,
Mat img )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ generateImage() [2/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( in Vec2d outSize,
Mat img,
int marginSize )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ generateImage() [3/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( in Vec2d outSize,
Mat img,
int marginSize,
int borderBits )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ generateImage() [4/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( in(double width, double height) outSize,
Mat img )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ generateImage() [5/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( in(double width, double height) outSize,
Mat img,
int marginSize )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ generateImage() [6/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( in(double width, double height) outSize,
Mat img,
int marginSize,
int borderBits )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ generateImage() [7/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( Size outSize,
Mat img )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ generateImage() [8/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( Size outSize,
Mat img,
int marginSize )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ generateImage() [9/9]

void OpenCVForUnity.ObjdetectModule.Board.generateImage ( Size outSize,
Mat img,
int marginSize,
int borderBits )

Draw a planar board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the board, ready to be printed.

◆ getDictionary()

Dictionary OpenCVForUnity.ObjdetectModule.Board.getDictionary ( )

return the Dictionary of markers employed for this board

◆ getIds()

MatOfInt OpenCVForUnity.ObjdetectModule.Board.getIds ( )

vector of the identifiers of the markers in the board (should be the same size as objPoints)

Returns
vector of the identifiers of the markers

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.ObjdetectModule.Board.getNativeObjAddr ( )

◆ getObjPoints()

List< MatOfPoint3f > OpenCVForUnity.ObjdetectModule.Board.getObjPoints ( )

return array of object points of all the marker corners in the board.

Each marker include its 4 corners in this order:

  • objPoints[i][0] - left-top point of i-th marker
  • objPoints[i][1] - right-top point of i-th marker
  • objPoints[i][2] - right-bottom point of i-th marker
  • objPoints[i][3] - left-bottom point of i-th marker

Markers are placed in a certain order - row by row, left to right in every row. For M markers, the size is Mx4.

◆ getRightBottomCorner()

Point3 OpenCVForUnity.ObjdetectModule.Board.getRightBottomCorner ( )

get coordinate of the bottom right corner of the board, is set when calling the function create()

◆ getRightBottomCornerAsValueTuple()

double double double z OpenCVForUnity.ObjdetectModule.Board.getRightBottomCornerAsValueTuple ( )

◆ getRightBottomCornerAsVec3d()

Vec3d OpenCVForUnity.ObjdetectModule.Board.getRightBottomCornerAsVec3d ( )

get coordinate of the bottom right corner of the board, is set when calling the function create()

◆ matchImagePoints()

void OpenCVForUnity.ObjdetectModule.Board.matchImagePoints ( List< Mat > detectedCorners,
Mat detectedIds,
Mat objPoints,
Mat imgPoints )

Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP()

Parameters
detectedCornersList of detected marker corners of the board. For cv::Board and cv::GridBoard the method expects std::vector<std::vector<Point2f>> or std::vector<Mat> with Aruco marker corners. For cv::CharucoBoard the method expects std::vector<Point2f> or Mat with ChAruco corners (chess board corners matched with Aruco markers).
detectedIdsList of identifiers for each marker or charuco corner. For any Board class the method expects std::vector<int> or Mat.
objPointsVector of marker points in the board coordinate space. For any Board class the method expects std::vector<cv::Point3f> objectPoints or cv::Mat
imgPointsVector of marker points in the image coordinate space. For any Board class the method expects std::vector<cv::Point2f> objectPoints or cv::Mat
See also
solvePnP

Member Data Documentation

◆ x

double OpenCVForUnity.ObjdetectModule.Board.x

get coordinate of the bottom right corner of the board, is set when calling the function create()

◆ y

double double OpenCVForUnity.ObjdetectModule.Board.y

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