Package boofcv.abst.fiducial
Class CalibrationFiducialDetector<T extends ImageGray<T>>
java.lang.Object
boofcv.abst.fiducial.FiducialDetectorPnP<T>
boofcv.abst.fiducial.CalibrationFiducialDetector<T>
- All Implemented Interfaces:
FiducialDetector<T>
Wrapper which allows a calibration target to be used like a fiducial for pose estimation. The
origin of the coordinate system depends on the default for the calibration target.
-
Field Summary
Fields inherited from class boofcv.abst.fiducial.FiducialDetectorPnP
pixelToNorm -
Constructor Summary
ConstructorsConstructorDescriptionCalibrationFiducialDetector(@Nullable ConfigChessboardBinary configDet, ConfigGridDimen configGrid, Class<T> imageType) Configure it to detect chessboard style targetsCalibrationFiducialDetector(@Nullable ConfigChessboardX configDet, ConfigGridDimen configGrid, Class<T> imageType) Configure it to detect chessboard style targetsCalibrationFiducialDetector(@Nullable ConfigCircleHexagonalGrid configDet, ConfigGridDimen configGrid, Class<T> imageType) CalibrationFiducialDetector(@Nullable ConfigCircleRegularGrid configDet, ConfigGridDimen configGrid, Class<T> imageType) CalibrationFiducialDetector(@Nullable ConfigSquareGrid configDet, ConfigGridDimen configGrid, Class<T> imageType) Configure it to detect square-grid style targets -
Method Summary
Modifier and TypeMethodDescriptionvoidDetects fiducials inside the image.getBounds(int which, @Nullable Polygon2D_F64 storage) Used to retrieve the bounds around a marker in the image.voidgetCenter(int which, Point2D_F64 location) Returns the detection point average location.getControl3D(int which) 3D location of control points in the fiducial reference framegetDetectedControl(int which) Returns a list of detected control points in the image for the specified fiducial.longgetId(int which) If applicable, returns the ID of the fiducial found.Type of input imagegetMessage(int which) If applicable, returns a message associated with the fiducial.doublegetSideHeight(int which) Height of the fiducial.doublegetSideWidth(int which) Width of the fiducial.doublegetWidth(int which) Returns the width of the fiducial in world units.booleanhasID()If true thenFiducialDetector.getId(int)returns a valid unique numberbooleanIf true thenFiducialDetector.getMessage(int)returns a valid messageprotected voidinit(DetectSingleFiducialCalibration detector, double width, Class<T> imageType) protected voidSelects points which will be the corners in the boundary.voidsetLensDistortion(@Nullable LensDistortionNarrowFOV distortion, int width, int height) Specifies how to remove lens distortion from the input image and how to convert pixels into normalized image coordinates.intThe total number of fiducial foundMethods inherited from class boofcv.abst.fiducial.FiducialDetectorPnP
computeStability, estimatePose, getFiducialToCamera, getLensDistortion, is3D
-
Constructor Details
-
CalibrationFiducialDetector
public CalibrationFiducialDetector(@Nullable @Nullable ConfigChessboardBinary configDet, ConfigGridDimen configGrid, Class<T> imageType) Configure it to detect chessboard style targets -
CalibrationFiducialDetector
public CalibrationFiducialDetector(@Nullable @Nullable ConfigChessboardX configDet, ConfigGridDimen configGrid, Class<T> imageType) Configure it to detect chessboard style targets -
CalibrationFiducialDetector
public CalibrationFiducialDetector(@Nullable @Nullable ConfigSquareGrid configDet, ConfigGridDimen configGrid, Class<T> imageType) Configure it to detect square-grid style targets -
CalibrationFiducialDetector
public CalibrationFiducialDetector(@Nullable @Nullable ConfigCircleHexagonalGrid configDet, ConfigGridDimen configGrid, Class<T> imageType) -
CalibrationFiducialDetector
public CalibrationFiducialDetector(@Nullable @Nullable ConfigCircleRegularGrid configDet, ConfigGridDimen configGrid, Class<T> imageType)
-
-
Method Details
-
init
-
getSideWidth
public double getSideWidth(int which) Description copied from class:FiducialDetectorPnPWidth of the fiducial. used to compute stability- Specified by:
getSideWidthin classFiducialDetectorPnP<T extends ImageGray<T>>- Parameters:
which- specifies which fiducial- Returns:
- the width
-
getSideHeight
public double getSideHeight(int which) Description copied from class:FiducialDetectorPnPHeight of the fiducial. used to compute stability- Specified by:
getSideHeightin classFiducialDetectorPnP<T extends ImageGray<T>>- Parameters:
which- specifies which fiducial- Returns:
- the height
-
selectBoundaryCorners
protected void selectBoundaryCorners()Selects points which will be the corners in the boundary. Finds the convex hull. -
detect
Description copied from interface:FiducialDetectorDetects fiducials inside the image. Each call to this function only depends upon the input image. The previous calls do not affect it's outcome.- Parameters:
input- Input image. Not modified.
-
setLensDistortion
public void setLensDistortion(@Nullable @Nullable LensDistortionNarrowFOV distortion, int width, int height) Description copied from interface:FiducialDetectorSpecifies how to remove lens distortion from the input image and how to convert pixels into normalized image coordinates.- Specified by:
setLensDistortionin interfaceFiducialDetector<T extends ImageGray<T>>- Overrides:
setLensDistortionin classFiducialDetectorPnP<T extends ImageGray<T>>- Parameters:
distortion- Lens distortion model. null if you want to remove a lens distortion model that had previously been set.width- Input image's width.height- Input image's height
-
getCenter
Returns the detection point average location. This will NOT be the same as the geometric center.- Parameters:
which- Fiducial's indexlocation- (output) Storage for the transform. modified.
-
getBounds
Description copied from interface:FiducialDetectorUsed to retrieve the bounds around a marker in the image. How the bounds are defined is left up the implementation. It could be a simple rectangle or it could be corner features.- Parameters:
which- Which fiducial.storage- (Optional) Storage for fiducials.- Returns:
- Found marker. Points are owned by the caller and will not be modified in the future.
-
totalFound
public int totalFound()Description copied from interface:FiducialDetectorThe total number of fiducial found- Returns:
- number of targets found
-
getId
public long getId(int which) Description copied from interface:FiducialDetectorIf applicable, returns the ID of the fiducial found. CallFiducialDetector.hasID()to see if this function returns a valid value.- Parameters:
which- Detected fiducial's index- Returns:
- ID of the fiducial
-
getMessage
Description copied from interface:FiducialDetectorIf applicable, returns a message associated with the fiducial. CallFiducialDetector.hasMessage()()} to see if this function returns a valid value.- Parameters:
which- Detected fiducial's index- Returns:
- Encoded message
-
getInputType
Description copied from interface:FiducialDetectorType of input image -
getCalibrationPoints
-
getCalibDetector
-
getPoints2D3D
-
getWidth
public double getWidth(int which) Description copied from interface:FiducialDetectorReturns the width of the fiducial in world units. If not square then it returns a reasonable approximation. Intended for use in visualization and not precise calculations.- Parameters:
which- Fiducial's index- Returns:
- Fiducial's width.
-
hasID
public boolean hasID()Description copied from interface:FiducialDetectorIf true thenFiducialDetector.getId(int)returns a valid unique number- Returns:
- boolean
-
hasMessage
public boolean hasMessage()Description copied from interface:FiducialDetectorIf true thenFiducialDetector.getMessage(int)returns a valid message- Returns:
- boolean
-
getDetectedControl
Description copied from class:FiducialDetectorPnPReturns a list of detected control points in the image for the specified fiducial. Observations will be in distorted image pixels.- Specified by:
getDetectedControlin classFiducialDetectorPnP<T extends ImageGray<T>>
-
getControl3D
Description copied from class:FiducialDetectorPnP3D location of control points in the fiducial reference frame- Specified by:
getControl3Din classFiducialDetectorPnP<T extends ImageGray<T>>- Returns:
- 3D location of control points
-