Chessboard
ChessboardCorrespondenceFinder(n_rows, n_columns, square_size, flags, fast_check=True, refine=True, window_size=(5, 5), criteria=(cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001))
Bases: CorrespondenceFinderBase
Chessboard pattern correspondence finder.
Initialize a chessboard correspondence finder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_rows
|
int
|
Number of rows in the chessboard pattern. |
required |
n_columns
|
int
|
Number of columns in the chessboard pattern. |
required |
square_size
|
float
|
Size of a square in the chessboard pattern. Returned object points will be in units of this size. |
required |
flags
|
int
|
Flags to pass to cv2.findChessboardCorners. |
required |
fast_check
|
bool
|
If True, perform a fast check to see if a chessboard is present in the image. This just adds cv2.CALIB_CB_FAST_CHECK to the flags. |
True
|
refine
|
bool
|
If True, perform a refinement step on the corner locations. |
True
|
window_size
|
Tuple[int, int]
|
Size of the window to use for refinement. |
(5, 5)
|
criteria
|
tuple
|
Criteria to use for refinement. |
(TERM_CRITERIA_EPS | TERM_CRITERIA_MAX_ITER, 30, 0.001)
|
Source code in src/compas_camcal/correspondence/chessboard.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
n_columns
property
writable
Number of columns in the chessboard pattern.
n_rows
property
writable
Number of rows in the chessboard pattern.
pattern_size
property
writable
Size of the chessboard pattern.
compute_object_points(n_rows, n_columns, square_size)
staticmethod
Compute object points for a chessboard pattern.
Source code in src/compas_camcal/correspondence/chessboard.py
63 64 65 66 67 68 69 70 | |
find(image)
Find correspondences in an image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image
|
ndarray
|
Image to find correspondences in. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Correspondence]
|
Correspondence object if found, None otherwise. |
Source code in src/compas_camcal/correspondence/chessboard.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |