public class Board extends Object
Modifier and Type | Field and Description |
---|---|
protected long |
nativeObj |
Modifier | Constructor and Description |
---|---|
|
Board(List<Mat> objPoints,
Dictionary dictionary,
Mat ids)
Common Board constructor
|
protected |
Board(long addr) |
Modifier and Type | Method and Description |
---|---|
static Board |
__fromPtr__(long addr) |
protected void |
finalize() |
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)
|
long |
getNativeObjAddr() |
List<MatOfPoint3f> |
getObjPoints()
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()
|
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()
|
protected Board(long addr)
public Board(List<Mat> objPoints, Dictionary dictionary, Mat ids)
objPoints
- array of object points of all the marker corners in the boarddictionary
- the dictionary of markers employed for this boardids
- vector of the identifiers of the markers in the boardpublic long getNativeObjAddr()
public static Board __fromPtr__(long addr)
public Dictionary getDictionary()
public List<MatOfPoint3f> getObjPoints()
public MatOfInt getIds()
public Point3 getRightBottomCorner()
public void matchImagePoints(List<Mat> detectedCorners, Mat detectedIds, Mat objPoints, Mat imgPoints)
detectedCorners
- List 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).detectedIds
- List of identifiers for each marker or charuco corner.
For any Board class the method expects std::vector<int> or Mat.objPoints
- Vector of marker points in the board coordinate space.
For any Board class the method expects std::vector<cv::Point3f> objectPoints or cv::MatimgPoints
- Vector of marker points in the image coordinate space.
For any Board class the method expects std::vector<cv::Point2f> objectPoints or cv::Mat
SEE: solvePnPpublic void generateImage(Size outSize, Mat img, int marginSize, int borderBits)
outSize
- size of the output image in pixels.img
- output image with the board. The size of this image will be outSize
and the board will be on the center, keeping the board proportions.marginSize
- minimum margins (in pixels) of the board in the output imageborderBits
- width of the marker borders.
This function return the image of the board, ready to be printed.public void generateImage(Size outSize, Mat img, int marginSize)
outSize
- size of the output image in pixels.img
- output image with the board. The size of this image will be outSize
and the board will be on the center, keeping the board proportions.marginSize
- minimum margins (in pixels) of the board in the output image
This function return the image of the board, ready to be printed.public void generateImage(Size outSize, Mat img)
outSize
- size of the output image in pixels.img
- output image with the board. The size of this image will be outSize
and the board will be on the center, keeping the board proportions.
This function return the image of the board, ready to be printed.Copyright © 2024. All rights reserved.