mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
[Calibration] Fix iterator bound while creating object points (#188)
Fixes mismatched iterator bounds while creating object points. This addresses calibration failing for non square boards.
This commit is contained in:
@@ -88,7 +88,7 @@ public class FindBoardCornersPipe
|
||||
if (params.type == UICalibrationData.BoardType.CHESSBOARD) {
|
||||
// Here we can create an NxN grid since a chessboard is rectangular
|
||||
for (int heightIdx = 0; heightIdx < patternSize.height; heightIdx++) {
|
||||
for (int widthIdx = 0; widthIdx < patternSize.height; widthIdx++) {
|
||||
for (int widthIdx = 0; widthIdx < patternSize.width; widthIdx++) {
|
||||
double boardYCoord = heightIdx * params.gridSize;
|
||||
double boardXCoord = widthIdx * params.gridSize;
|
||||
objectPoints.push_back(new MatOfPoint3f(new Point3(boardXCoord, boardYCoord, 0.0)));
|
||||
|
||||
Reference in New Issue
Block a user