use of boofcv.abst.fiducial.calib.ConfigECoCheckMarkers.MarkerShape in project BoofCV by lessthanoptimal.
the class ECoCheck_to_FiducialDetector method getControl3D.
@Override
protected List<Point2D3D> getControl3D(int which) {
Objects.requireNonNull(pixelToNorm);
ECoCheckFound found = foundIndexToFound(which);
MarkerShape marker = markerShapes.get(found.markerID);
points2D3D.resetResize(found.corners.size);
ECoCheckUtils utils = detector.getUtils();
// length of the longest side on the marker
double markerLength = Math.max(marker.getWidth(), marker.getHeight());
for (int i = 0; i < found.corners.size; i++) {
PointIndex2D_F64 corner = found.corners.get(i);
Point2D3D p23 = points2D3D.get(i);
utils.cornerToMarker3D(found.markerID, corner.index, p23.location);
pixelToNorm.compute(corner.p.x, corner.p.y, p23.observation);
// Convert the units
p23.location.scale(markerLength);
}
return points2D3D.toList();
}
use of boofcv.abst.fiducial.calib.ConfigECoCheckMarkers.MarkerShape in project BoofCV by lessthanoptimal.
the class ECoCheck_to_FiducialDetector method getWidth.
@Override
public double getWidth(int which) {
int markerID = foundIndexToFound(which).markerID;
MarkerShape marker = markerShapes.get(markerID);
return (marker.getWidth() + marker.getHeight()) / 2.0;
}
Aggregations