ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CorrespondenceMatching Class Reference

Correspondence Matching. More...

#include <CorrespondenceMatching.h>

Inheritance diagram for CorrespondenceMatching:
[legend]
Collaboration diagram for CorrespondenceMatching:
[legend]

Public Member Functions

 CorrespondenceMatching ()
 
virtual ~CorrespondenceMatching ()
 
virtual int compute ()
 Performs the actual filter job. More...
 
- Public Member Functions inherited from BasePclModule
 BasePclModule (PclModuleDescription desc=PclModuleDescription(), ccPluginInterface *parent_plugin=0)
 Default constructor. More...
 
QAction * getAction ()
 Get the action associated with the button used in menu and toolbar creation. More...
 
QString getStatusTip () const
 Returns the status tip. More...
 
QString getModuleName () const
 Returns the name of the filter. More...
 
QString getEntryName () const
 Returns the entry name. More...
 
QIcon getIcon () const
 Returns the icon associated with the button. More...
 
void setShowProgressBar (bool status)
 Sets whether to show a progressbar while computing or not. More...
 
std::vector< std::string > getSelectedAvailableScalarFields ()
 
ccPointCloud * getSelectedEntityAsCCPointCloud () const
 Returns the first selected entity as a ccPointCloud. More...
 
ccHObject * getSelectedEntityAsCCHObject () const
 Returns the first selected entity as a ccHObject. More...
 
ccHObject::Container getSelectedThatHaveMetaData (const QString key) const
 Get selected object that also have the provided metadata key. More...
 
void getAllEntitiesOfType (CV_CLASS_ENUM type, ccHObject::Container &entities)
 Returns all the objects in db tree of type "type". More...
 
void getAllEntitiesThatHaveMetaData (QString key, ccHObject::Container &entities)
 
void getSelectedEntitiesThatAreCCPointCloud (ccHObject::Container &entities)
 get all entities that are selected and that also are cc_point_cloud More...
 
void getSelectedEntitiesThatAre (CV_CLASS_ENUM kind, ccHObject::Container &entities)
 
int hasSelectedRGB ()
 Returns 1 if the first selected entity has RGB info. More...
 
int hasSelectedScalarField ()
 Returns 1 if the first selected entity has at least one scalar field. More...
 
int hasSelectedScalarField (std::string field_name)
 
int isFirstSelectedCcPointCloud ()
 Returns 1 if the first selected object is a ccPointCloud. More...
 
virtual void updateSelectedEntities (const ccHObject::Container &selectedEntities)
 Updates the internal copy of selected entities. More...
 
void setMainAppInterface (ecvMainAppInterface *app)
 Sets associated CC application interface (to access DB) More...
 
ecvMainAppInterface * getMainAppInterface ()
 
ccPluginInterface * getParentPlugin () const
 Returns the associated parent plugin interface. More...
 

Protected Member Functions

virtual int checkSelected ()
 Checks if current selection is compliant with the filter. More...
 
virtual int openInputDialog ()
 
virtual void getParametersFromDialog ()
 Collects parameters from the filter dialog (if openDialog is successful) More...
 
virtual int checkParameters ()
 
virtual QString getErrorMessage (int errorCode)
 Returns the error message corresponding to a given error code. More...
 
void applyTransformation (ccHObject *entity, const ccGLMatrixd &mat)
 
- Protected Member Functions inherited from BasePclModule
virtual int openOutputDialog ()
 
virtual int start ()
 Starts computation. More...
 
virtual void initAction ()
 Initializes the corresponding action. More...
 
void throwError (int errCode)
 

Protected Attributes

ccPointCloud * m_sceneCloud
 
CorrespondenceMatchingDialog * m_dialog
 
float m_leafSize
 
bool m_useVoxelGrid
 
bool m_gcMode
 
bool m_verification
 
int m_maxThreadCount
 
float m_modelSearchRadius
 
float m_sceneSearchRadius
 
float m_shotDescriptorRadius
 
int m_normalKSearch
 
float m_consensusResolution
 
float m_gcMinClusterSize
 
float m_lrfRadius
 
float m_houghBinSize
 
float m_houghThreshold
 
int m_icpMaxIterations
 
float m_icpCorrDistance
 
float clusterReg = 5.0f
 
float inlierThreshold = 0.005f
 
float occlusionThreshold = 0.01f
 
float radiusClutter = 0.03f
 
float regularizer = 3.0f
 
float radiusNormals = 0.05f
 
bool detectClutter = true
 
std::vector< float > m_scales
 
std::vector< ccPointCloud * > m_modelClouds
 
- Protected Attributes inherited from BasePclModule
QAction * m_action
 Forces the Ui to be updated. More...
 
ccHObject::Container m_selected
 Pointer to the main window. More...
 
PclModuleDescription m_desc
 Associated dialog. More...
 
ecvMainAppInterface * m_app
 Associated application interface. More...
 
ccPluginInterface * m_parent_plugin
 associated parent plugin of the filter More...
 
bool m_show_progress
 Do we want to show a progress bar when the filter works? More...
 

Additional Inherited Members

- Signals inherited from BasePclModule
void entityHasChanged (ccHObject *)
 Signal emitted when an entity is (visually) modified. More...
 
void newEntity (ccHObject *)
 Signal emitted when a new entity is created by the filter. More...
 
void newErrorMessage (QString)
 Signal emitted when a new error message is produced. More...
 
- Protected Slots inherited from BasePclModule
int performAction ()
 Returns is called when the dialog window is accepted. More...
 

Detailed Description

Correspondence Matching.

Constructor & Destructor Documentation

◆ CorrespondenceMatching()

CorrespondenceMatching::CorrespondenceMatching ( )

◆ ~CorrespondenceMatching()

CorrespondenceMatching::~CorrespondenceMatching ( )
virtual

References m_dialog.

Member Function Documentation

◆ applyTransformation()

void CorrespondenceMatching::applyTransformation ( ccHObject *  entity,
const ccGLMatrixd &  mat 
)
protected

◆ checkParameters()

int CorrespondenceMatching::checkParameters ( )
protectedvirtual

Checks that the parameters retrieved by getParametersFromDialog are valid Automatically called by performAction. Does nothing by default. Must be overridden if necessary.

Returns
1 if parameters are valid (error code otherwise)

Reimplemented from BasePclModule.

References m_modelClouds, and m_sceneCloud.

◆ checkSelected()

int CorrespondenceMatching::checkSelected ( )
protectedvirtual

Checks if current selection is compliant with the filter.

If not, an error is returned and computation stops. By default, baseclass method simply checks that selection is composed of one and only one ccPointCloud. This method should be overridden if necessary.

Returns
1 if selection is compliant (error code otherwise)

Reimplemented from BasePclModule.

References BasePclModule::isFirstSelectedCcPointCloud().

◆ compute()

◆ getErrorMessage()

QString CorrespondenceMatching::getErrorMessage ( int  errorCode)
protectedvirtual

Returns the error message corresponding to a given error code.

Each filter have a set of possible error message to be used given bt getFilterErrorMessage() Baseclass implementation provides some generic messages.

Note
These messages can be replaced by re-implementing this method and handling the same codes BEFORE calling the baseclass method

Reimplemented from BasePclModule.

References BasePclModule::getErrorMessage().

◆ getParametersFromDialog()

void CorrespondenceMatching::getParametersFromDialog ( )
protectedvirtual

◆ openInputDialog()

int CorrespondenceMatching::openInputDialog ( )
protectedvirtual

Opens the input dialog window. Where the user can supply parameters for the computation Automatically called by performAction. Does nothing by default. Must be overridden if a dialog must be displayed.

Returns
1 if dialog has been successfully executed, 0 if canceled, negative error code otherwise

Reimplemented from BasePclModule.

References BasePclModule::m_app, m_dialog, CorrespondenceMatchingDialog::refreshCloudComboBox(), and CorrespondenceMatchingDialog::saveParamsToPersistentSettings().

Member Data Documentation

◆ clusterReg

float CorrespondenceMatching::clusterReg = 5.0f
protected

◆ detectClutter

bool CorrespondenceMatching::detectClutter = true
protected

◆ inlierThreshold

float CorrespondenceMatching::inlierThreshold = 0.005f
protected

◆ m_consensusResolution

float CorrespondenceMatching::m_consensusResolution
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_dialog

CorrespondenceMatchingDialog* CorrespondenceMatching::m_dialog
protected

◆ m_gcMinClusterSize

float CorrespondenceMatching::m_gcMinClusterSize
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_gcMode

bool CorrespondenceMatching::m_gcMode
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_houghBinSize

float CorrespondenceMatching::m_houghBinSize
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_houghThreshold

float CorrespondenceMatching::m_houghThreshold
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_icpCorrDistance

float CorrespondenceMatching::m_icpCorrDistance
protected

Referenced by compute().

◆ m_icpMaxIterations

int CorrespondenceMatching::m_icpMaxIterations
protected

Referenced by compute().

◆ m_leafSize

float CorrespondenceMatching::m_leafSize
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_lrfRadius

float CorrespondenceMatching::m_lrfRadius
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_maxThreadCount

int CorrespondenceMatching::m_maxThreadCount
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_modelClouds

std::vector<ccPointCloud*> CorrespondenceMatching::m_modelClouds
protected

◆ m_modelSearchRadius

float CorrespondenceMatching::m_modelSearchRadius
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_normalKSearch

int CorrespondenceMatching::m_normalKSearch
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_scales

std::vector<float> CorrespondenceMatching::m_scales
protected

Referenced by getParametersFromDialog().

◆ m_sceneCloud

ccPointCloud* CorrespondenceMatching::m_sceneCloud
protected

◆ m_sceneSearchRadius

float CorrespondenceMatching::m_sceneSearchRadius
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_shotDescriptorRadius

float CorrespondenceMatching::m_shotDescriptorRadius
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_useVoxelGrid

bool CorrespondenceMatching::m_useVoxelGrid
protected

Referenced by compute(), and getParametersFromDialog().

◆ m_verification

bool CorrespondenceMatching::m_verification
protected

Referenced by compute(), and getParametersFromDialog().

◆ occlusionThreshold

float CorrespondenceMatching::occlusionThreshold = 0.01f
protected

◆ radiusClutter

float CorrespondenceMatching::radiusClutter = 0.03f
protected

◆ radiusNormals

float CorrespondenceMatching::radiusNormals = 0.05f
protected

◆ regularizer

float CorrespondenceMatching::regularizer = 3.0f
protected

The documentation for this class was generated from the following files: