ImFusion SDK 4.3
ShiTomasiFeatureDetector Class Reference

#include <ImFusion/Vision/FeatureDetection.h>

Implementation of the Shi-Tomasi corner detection algorithm. More...

+ Inheritance diagram for ShiTomasiFeatureDetector:

Detailed Description

Implementation of the Shi-Tomasi corner detection algorithm.

Public Member Functions

 ShiTomasiFeatureDetector ()
 Default constructor.
 
 ~ShiTomasiFeatureDetector ()
 Destructor.
 
std::string name () const override
 Return name of detector.
 
std::vector< Keypointdetect (SharedImage &img) override
 Detect keypoints from a SharedImage.
 
std::vector< Keypointextract (const TypedImage< unsigned char > &img)
 Detect keypoints from a TypedImage.
 
std::vector< Keypointextract (const TypedImage< unsigned char > &img, const std::vector< Keypoint > &keypointsAlreadyExtracted)
 Detect keypoints from a TypedImage with already extracted keypoints.
 
std::vector< Keypointextract (const TypedImage< unsigned char > &img, const TypedImage< unsigned char > &mask)
 Detect keypoints from a TypedImage with additional mask.
 
std::vector< Keypointextract (const TypedImage< unsigned char > &img, const std::vector< Keypoint > &keypointsAlreadyExtracted, const TypedImage< unsigned char > &mask)
 Detect keypoints from a TypedImage with already extracted keypoints and mask.
 
std::vector< KeypointapplyMask (const std::vector< Keypoint > &keypoints, const TypedImage< unsigned char > &mask)
 Filter out the keypoints inside the surfical tool mask.
 
- Public Member Functions inherited from Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
 
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Public Attributes

Parameter< int > p_nFeatures = {"Max features", 1024, this}
 Maximum number of features.
 
Parameter< int > p_blockSize = {"Block size", 3, this}
 Block size for corner detection.
 
Parameter< int > p_gradientSize = {"Gradient size", 3, this}
 Gradient size.
 
Parameter< double > p_qualityLevel = {"Quality level", 0.01, this}
 Quality level parameter.
 
Parameter< double > p_minDist = {"Min distance", 10, this}
 Minimum distance between keypoints.
 
Parameter< double > p_k = {"Harris detector free param", 0.04, this}
 Harris detector parameter.
 
Parameter< bool > p_useHarrisDetector = {"Use Harris detector", false, this}
 Use Harris detector flag.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Additional Inherited Members

- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ name()

std::string name ( ) const
inlineoverridevirtual

Return name of detector.

Implements FeatureDetector.

◆ detect()

std::vector< Keypoint > detect ( SharedImage & img)
overridevirtual

Detect keypoints from a SharedImage.

Parameters
imgSharedImage to detect features in.
Returns
Vector of detected keypoints.

Implements FeatureDetector.

◆ extract() [1/4]

std::vector< Keypoint > extract ( const TypedImage< unsigned char > & img)

Detect keypoints from a TypedImage.

Parameters
imgInput image.
Returns
Vector of detected keypoints.

◆ extract() [2/4]

std::vector< Keypoint > extract ( const TypedImage< unsigned char > & img,
const std::vector< Keypoint > & keypointsAlreadyExtracted )

Detect keypoints from a TypedImage with already extracted keypoints.

After detection, the old keypoints remain and new keypoints won't be too close to the old ones.

Parameters
imgInput image.
keypointsAlreadyExtractedExisting keypoints.
Returns
Vector of detected keypoints.

◆ extract() [3/4]

std::vector< Keypoint > extract ( const TypedImage< unsigned char > & img,
const TypedImage< unsigned char > & mask )

Detect keypoints from a TypedImage with additional mask.

Parameters
imgInput image.
maskMask image.
Returns
Vector of detected keypoints.

◆ extract() [4/4]

std::vector< Keypoint > extract ( const TypedImage< unsigned char > & img,
const std::vector< Keypoint > & keypointsAlreadyExtracted,
const TypedImage< unsigned char > & mask )

Detect keypoints from a TypedImage with already extracted keypoints and mask.

Parameters
imgInput image.
keypointsAlreadyExtractedExisting keypoints.
maskMask image.
Returns
Vector of detected keypoints.

◆ applyMask()

std::vector< Keypoint > applyMask ( const std::vector< Keypoint > & keypoints,
const TypedImage< unsigned char > & mask )

Filter out the keypoints inside the surfical tool mask.

Parameters
keypointsInput keypoints.
maskMask image.
Returns
Filtered keypoints.

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close