LibMultiSense
LibMultiSense Documentation
crl::multisense::system::FeatureDetectorConfig Class Reference

Example code showing usage of the onboard feature detector. More...

#include <MultiSenseTypes.hh>

Public Member Functions

uint32_t numberOfFeatures () const
 Query the maximum number of features applied to the camera feature detector. More...
 
bool grouping () const
 Query the status of the feature detector feature grouping. More...
 
bool motion () const
 Query the status of the feature detector motion detection. More...
 
void setNumberOfFeatures (const uint32_t &numberOfFeatures)
 Set the maximum number of features applied to the camera feature detector. More...
 
void setGrouping (const bool &g)
 Set the feature grouping capability the feature detector. More...
 
void setMotion (const uint32_t &m)
 Set the feature motion detection capability of the feature detector Functions to enable motion detection on Octave 3. More...
 
 FeatureDetectorConfig ()
 Default constructor. More...
 

Private Attributes

uint32_t m_numberOfFeatures
 numberOfFeatures The maximum features to be searched for in one image. More...
 
bool m_grouping
 grouping Enable/Disable the grouping feature in feaure detection. More...
 
uint32_t m_motion
 motion Enable / disable motion detection in the feature detector. More...
 

Detailed Description

Example code showing usage of the onboard feature detector.

Can also reference FeatureDetectorUtility.cc

Example code to set a device's feature detection parameters:

//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
channel = crl::multisense::Channel::Create("10.66.171.21");
channel->setMtu(7200);
status = channelP->getFeatureDetectorConfig(fcfg);
if (Status_Ok != status) {
std::cerr << "Failed to get feature detector config: " << Channel::statusString(status) << std::endl;
goto clean_out;
}
if (quarter_res)
fcfg.setNumberOfFeatures(1500);
else
fcfg.setNumberOfFeatures(5000);
fcfg.setGrouping(true);
fcfg.setMotion(1);
status = channelP->setFeatureDetectorConfig(fcfg);
if (Status_Ok != status) {
std::cerr << "Failed to set feature detector config\n";
goto clean_out;
}
//
// Add Image Callback
channelP->addIsolatedCallback(imageCallback, Source_Luma_Left|Source_Luma_Right, &userData);
//
// Add Feature Callback
channelP->addIsolatedCallback(featureDetectorCallback, &userData);
//
// Start streaming
status = channelP->startStreams((operatingMode.supportedDataSources & Source_Luma_Left) |
(operatingMode.supportedDataSources & Source_Luma_Right) |
(operatingMode.supportedDataSources & Source_Feature_Left)|
(operatingMode.supportedDataSources & Source_Feature_Right));
if (Status_Ok != status) {
std::cerr << "Failed to start streams: " << Channel::statusString(status) << std::endl;
goto clean_out;
} *
//
// Destroy the channel instance

Definition at line 3959 of file MultiSenseTypes.hh.

Constructor & Destructor Documentation

◆ FeatureDetectorConfig()

crl::multisense::system::FeatureDetectorConfig::FeatureDetectorConfig ( )
inline

Default constructor.

Definition at line 4065 of file MultiSenseTypes.hh.

Member Function Documentation

◆ grouping()

bool crl::multisense::system::FeatureDetectorConfig::grouping ( ) const
inline

Query the status of the feature detector feature grouping.

Returns
Return the current feature grouping status

Definition at line 4011 of file MultiSenseTypes.hh.

◆ motion()

bool crl::multisense::system::FeatureDetectorConfig::motion ( ) const
inline

Query the status of the feature detector motion detection.

Returns
Return the current feature detector motion detection status

Definition at line 4018 of file MultiSenseTypes.hh.

◆ numberOfFeatures()

uint32_t crl::multisense::system::FeatureDetectorConfig::numberOfFeatures ( ) const
inline

Query the maximum number of features applied to the camera feature detector.

Returns
Return the current maximum number of features

Definition at line 4004 of file MultiSenseTypes.hh.

◆ setGrouping()

void crl::multisense::system::FeatureDetectorConfig::setGrouping ( const bool &  g)
inline

Set the feature grouping capability the feature detector.

Parameters
gThe feature grouping to apply to this camera

Definition at line 4049 of file MultiSenseTypes.hh.

◆ setMotion()

void crl::multisense::system::FeatureDetectorConfig::setMotion ( const uint32_t &  m)
inline

Set the feature motion detection capability of the feature detector Functions to enable motion detection on Octave 3.

Parameters
mThe feature detector motion detector.

Definition at line 4060 of file MultiSenseTypes.hh.

◆ setNumberOfFeatures()

void crl::multisense::system::FeatureDetectorConfig::setNumberOfFeatures ( const uint32_t &  numberOfFeatures)
inline

Set the maximum number of features applied to the camera feature detector.

Current recommended settings. Full Resolution: 5000 Features @5FPS Quarter Resolution: 1500 Features @15FPS

Parameters
numberOfFeaturesThe maximum number of features.

Definition at line 4029 of file MultiSenseTypes.hh.

Member Data Documentation

◆ m_grouping

bool crl::multisense::system::FeatureDetectorConfig::m_grouping
private

grouping Enable/Disable the grouping feature in feaure detection.

Grouping adds scale invariance to ORB features, by detecting the same feature in multiple octaves, and grouping the feature. Grouping reduces redundant features and eliminates the need to keep track of features referencing the same corner. When grouping is enabled, the user should expect less features than descriptors, which should result in computationally easier feature matching, between consecutive frames. Although grouping does come at a slightly reduced framerate, it is recommended and verified at the recommended settings.

Definition at line 3986 of file MultiSenseTypes.hh.

◆ m_motion

uint32_t crl::multisense::system::FeatureDetectorConfig::m_motion
private

motion Enable / disable motion detection in the feature detector.

When enabled, you can check the averageXMotion, averageYMotion and motionStatus of the feaure_detector::header. averageXMotion and averageYMotion == 65535 corresponds to a failed motion detection for that feature frame.

Definition at line 3996 of file MultiSenseTypes.hh.

◆ m_numberOfFeatures

uint32_t crl::multisense::system::FeatureDetectorConfig::m_numberOfFeatures
private

numberOfFeatures The maximum features to be searched for in one image.

Current recommended settings. Full Resolution: 5000 Features @5FPS Quarter Resolution: 1500 Features @15FPS

Definition at line 3971 of file MultiSenseTypes.hh.


The documentation for this class was generated from the following file:
crl::multisense::Channel
Class which manages all communications with a MultiSense device.
Definition: MultiSenseChannel.hh:69
crl::multisense::Status_Ok
static CRL_CONSTEXPR Status Status_Ok
Definition: MultiSenseTypes.hh:98
crl::multisense::Source_Luma_Left
static CRL_CONSTEXPR DataSource Source_Luma_Left
Definition: MultiSenseTypes.hh:120
crl::multisense::Source_Feature_Right
static CRL_CONSTEXPR DataSource Source_Feature_Right
Definition: MultiSenseTypes.hh:134
crl::multisense::system::FeatureDetectorConfig::FeatureDetectorConfig
FeatureDetectorConfig()
Default constructor.
Definition: MultiSenseTypes.hh:4065
crl::multisense::Source_Luma_Right
static CRL_CONSTEXPR DataSource Source_Luma_Right
Definition: MultiSenseTypes.hh:121
crl::multisense::Channel::Destroy
static void Destroy(Channel *instanceP)
Destroy a channel instance that was created using the static member function Channel::Create().
crl::multisense::Channel::setMtu
virtual Status setMtu(int32_t mtu)=0
Set the current sensor's MTU.
crl::multisense::Channel::statusString
static const char * statusString(Status status)
Helper method used to get a string describing a specific status code.
crl::multisense::Source_Feature_Left
static CRL_CONSTEXPR DataSource Source_Feature_Left
Definition: MultiSenseTypes.hh:133
crl::multisense::Channel::Create
static Channel * Create(const std::string &sensorAddress)
Create a Channel instance, used to manage all communications with a sensor.