Package boofcv.abst.fiducial
Class SquareBase_to_FiducialDetector<T extends ImageGray<T>,Detector extends BaseDetectFiducialSquare<T>>
java.lang.Object
boofcv.abst.fiducial.FiducialDetectorPnP<T>
boofcv.abst.fiducial.SquareBase_to_FiducialDetector<T,Detector>
- All Implemented Interfaces:
FiducialDetector<T>
- Direct Known Subclasses:
SquareBinary_to_FiducialDetector
,SquareHamming_to_FiducialDetector
,SquareImage_to_FiducialDetector
public abstract class SquareBase_to_FiducialDetector<T extends ImageGray<T>,Detector extends BaseDetectFiducialSquare<T>>
extends FiducialDetectorPnP<T>
Wrapper around
BaseDetectFiducialSquare
for FiducialDetector
-
Field Summary
Fields inherited from class boofcv.abst.fiducial.FiducialDetectorPnP
pixelToNorm
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Detects fiducials inside the image.protected boolean
estimatePose
(int which, List<Point2D3D> points, Se3_F64 fiducialToCamera) Given the mapping of 2D observations to known 3D points estimate the pose of the fiducial.getBounds
(int which, @Nullable Polygon2D_F64 storage) Used to retrieve the bounds around a marker in the image.void
getCenter
(int which, Point2D_F64 location) Return the intersection of two lines defined by opposing corners.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.long
getId
(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.boolean
hasID()
If true thenFiducialDetector.getId(int)
returns a valid unique numberboolean
If true thenFiducialDetector.getMessage(int)
returns a valid messagevoid
setLensDistortion
(@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.int
The total number of fiducial foundMethods inherited from class boofcv.abst.fiducial.FiducialDetectorPnP
computeStability, getFiducialToCamera, getLensDistortion, getSideHeight, getSideWidth, is3D
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface boofcv.abst.fiducial.FiducialDetector
getWidth
-
Constructor Details
-
SquareBase_to_FiducialDetector
-
-
Method Details
-
detect
Description copied from interface:FiducialDetector
Detects 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.
-
getCenter
Return the intersection of two lines defined by opposing corners. This should also be the geometric center- Parameters:
which
- Fiducial's indexlocation
- (output) Storage for the transform. modified.
-
estimatePose
Description copied from class:FiducialDetectorPnP
Given the mapping of 2D observations to known 3D points estimate the pose of the fiducial. This solves the P-n-P problem. Do a simple form of robust estimation. Prune points which are greater than 3 standard deviations and likely noise the recompute the pose- Overrides:
estimatePose
in classFiducialDetectorPnP<T extends ImageGray<T>>
-
setLensDistortion
public void setLensDistortion(@Nullable @Nullable LensDistortionNarrowFOV distortion, int width, int height) Description copied from interface:FiducialDetector
Specifies how to remove lens distortion from the input image and how to convert pixels into normalized image coordinates.- Specified by:
setLensDistortion
in interfaceFiducialDetector<T extends ImageGray<T>>
- Overrides:
setLensDistortion
in 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
-
totalFound
public int totalFound()Description copied from interface:FiducialDetector
The total number of fiducial found- Returns:
- number of targets found
-
getId
public long getId(int which) Description copied from interface:FiducialDetector
If 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:FiducialDetector
If 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
-
hasID
public boolean hasID()Description copied from interface:FiducialDetector
If true thenFiducialDetector.getId(int)
returns a valid unique number- Returns:
- boolean
-
hasMessage
public boolean hasMessage()Description copied from interface:FiducialDetector
If true thenFiducialDetector.getMessage(int)
returns a valid message- Returns:
- boolean
-
getInputType
Description copied from interface:FiducialDetector
Type of input image -
getAlgorithm
-
getDetectedControl
Description copied from class:FiducialDetectorPnP
Returns a list of detected control points in the image for the specified fiducial. Observations will be in distorted image pixels.- Specified by:
getDetectedControl
in classFiducialDetectorPnP<T extends ImageGray<T>>
-
getControl3D
Description copied from class:FiducialDetectorPnP
3D location of control points in the fiducial reference frame- Specified by:
getControl3D
in classFiducialDetectorPnP<T extends ImageGray<T>>
- Returns:
- 3D location of control points
-
getBounds
Description copied from interface:FiducialDetector
Used 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.
-