#include <SegmentableRecognition.h>
Public Member Functions | |
bool | AddClass (const std::string &classPath) |
CSegmentableRecognition () | |
void | DoRecognition (const CByteImage *const *ppInputImages, CByteImage **ppResultImages, int nMinPixelsPerRegion, bool bBlobsOnly=false, float fMaxEpipolarDistance=10, ObjectColor color=eNone, bool bTrack=false, bool bInputImagesAreUndistorted=false) |
void | DoRecognitionSingleObject (const CByteImage *const *ppInputImages, CByteImage **ppResultImages, const char *pObjectName, int nMinPixelsPerRegion, float fMaxEpipolarDistance=10, ObjectColor color=eNone, bool bTrack=false, bool bInputImagesAreUndistorted=false) |
const CColorParameterSet * | GetColorParameterSet () |
const Object3DList & | GetObject3DList () |
CSegmentableDatabase * | GetObjectDatabase () |
const CStereoCalibration * | GetStereoCalibration () |
bool | Init (const char *pColorParameterFile, const char *pCameraParameterFileDeprecated, const char *pCameraParameterFile, const char *pObjectDatabaseConfigurationFile, const char *pDataPathPrefix=0) |
bool | Init (CColorParameterSet *pColorParameterSet, CStereoCalibration *pStereoCalibration, const char *pObjectDatabaseConfigurationFile) |
bool | InitWithoutDatabase (CColorParameterSet *pColorParameterSet, CStereoCalibration *pStereoCalibration) |
void | SetRecognitionThresholds (float fSizeRatioThreshold, float fCorrelationThreshold) |
void | SetStereoCalibration (CStereoCalibration *pStereoCalibration) |
void | SetVerbose (bool bVerbose) |
~CSegmentableRecognition () | |
Private Member Functions | |
void | _DoRecognition (const CByteImage *const *ppInputImages, CByteImage **ppResultImages, const char *pObjectName=0, int nMinPixelsPerRegion=500, bool bBlobsOnly=false, float fMaxEpipolarDistance=10, ObjectColor color=eNone, bool bTrack=false, bool bInputImagesAreUndistorted=false) |
void | FindAndClassifyBlobs (CObjectFinderStereo *pObjectFinderStereo, const CByteImage *const *ppInputImages, CByteImage **pResultImages, CByteImage *pGrayImage, const char *pObjectName, ObjectColor color, int nMinPixelsPerRegion, bool bBlobsOnly, float fMaxEpipolarDistance, bool bInputImagesAreUndistorted) |
void | PostProcessResultList () |
bool | RecognizeAndLocalizeObject (CByteImage *pGrayImage, Object3DEntry &entry, const char *pObjectName) |
Private Attributes | |
bool | m_bVerbose |
Object3DList | m_object3DList |
CColorParameterSet * | m_pColorParameterSet |
CRegionFilterInterface * | m_pCompactRegionFilter |
CByteImage * | m_pGrayImageBig |
CByteImage * | m_pGrayImageSmall |
CObjectFinderStereo * | m_pObjectFinderStereo |
CSegmentableDatabase * | m_pSegmentableDatabase |
Definition at line 43 of file SegmentableRecognition.h.
void CSegmentableRecognition::_DoRecognition | ( | const CByteImage *const * | ppInputImages, |
CByteImage ** | ppResultImages, | ||
const char * | pObjectName = 0 , |
||
int | nMinPixelsPerRegion = 500 , |
||
bool | bBlobsOnly = false , |
||
float | fMaxEpipolarDistance = 10 , |
||
ObjectColor | color = eNone , |
||
bool | bTrack = false , |
||
bool | bInputImagesAreUndistorted = false |
||
) | [private] |
bool CSegmentableRecognition::AddClass | ( | const std::string & | classPath | ) |
Adds a object class to segmentablerecognition which is loaded from the given classPath
classPath | path to data files for sementable objects |
void CSegmentableRecognition::DoRecognition | ( | const CByteImage *const * | ppInputImages, |
CByteImage ** | ppResultImages, | ||
int | nMinPixelsPerRegion, | ||
bool | bBlobsOnly = false , |
||
float | fMaxEpipolarDistance = 10 , |
||
ObjectColor | color = eNone , |
||
bool | bTrack = false , |
||
bool | bInputImagesAreUndistorted = false |
||
) |
Perform recognition for all objects in the database
ppInputImages | left and right RGB images in the correct size |
ppResultImages | visualization images can be NULL |
nMinPixelsPerRegion | minimum number of pixels to accept region |
bBlobsOnly | only detect blobs, do not perform recognition and localization |
fMaxEpipolarDistance | maximum distance to epipolar line in order to accept match |
color | objects of which color (eNone means all colors: eRed, eRed2, eBlue, eBlue2, eGreen, eGreen2) |
bTrack | track objects over successive frames |
bInputImagesAreUndistorted | whether input images have been undistorted |
void CSegmentableRecognition::DoRecognitionSingleObject | ( | const CByteImage *const * | ppInputImages, |
CByteImage ** | ppResultImages, | ||
const char * | pObjectName, | ||
int | nMinPixelsPerRegion, | ||
float | fMaxEpipolarDistance = 10 , |
||
ObjectColor | color = eNone , |
||
bool | bTrack = false , |
||
bool | bInputImagesAreUndistorted = false |
||
) |
Perform recognition for a single object
ppInputImages | left and right RGB images in the correct size |
ppResultImages | visualization images can be NULL |
pObjectName | name of the object to recognize |
nMinPixelsPerRegion | minimum number of pixels to accept region |
bBlobsOnly | only detect blobs, do not perform recognition and localization |
fMaxEpipolarDistance | maximum distance to epipolar line in order to accept match |
color | objects of which color (eNone means all colors: eRed, eRed2, eBlue, eBlue2, eGreen, eGreen2) |
bTrack | track objects over successive frames |
bInputImagesAreUndistorted | whether input images have been undistorted |
void CSegmentableRecognition::FindAndClassifyBlobs | ( | CObjectFinderStereo * | pObjectFinderStereo, |
const CByteImage *const * | ppInputImages, | ||
CByteImage ** | pResultImages, | ||
CByteImage * | pGrayImage, | ||
const char * | pObjectName, | ||
ObjectColor | color, | ||
int | nMinPixelsPerRegion, | ||
bool | bBlobsOnly, | ||
float | fMaxEpipolarDistance, | ||
bool | bInputImagesAreUndistorted | ||
) | [private] |
const CColorParameterSet* CSegmentableRecognition::GetColorParameterSet | ( | ) | [inline] |
Retrieve current color parameter set
Definition at line 159 of file SegmentableRecognition.h.
const Object3DList& CSegmentableRecognition::GetObject3DList | ( | ) | [inline] |
Retrieve objects recognized in the last recognition step
Definition at line 145 of file SegmentableRecognition.h.
Retrieve pointer to object database
Definition at line 166 of file SegmentableRecognition.h.
Retrieve current stereo calibration
bool CSegmentableRecognition::Init | ( | const char * | pColorParameterFile, |
const char * | pCameraParameterFileDeprecated, | ||
const char * | pCameraParameterFile, | ||
const char * | pObjectDatabaseConfigurationFile, | ||
const char * | pDataPathPrefix = 0 |
||
) |
Init the segmentable recognition.
pColorParameterFile | relative or absolute path to colors file |
pCameraParameterFileDeprecated | leave empty |
pCameraParameterFile | relative or absolute path to calibration file |
pObjectDatabaseConfigurationFile | relative or absolute path to configuration file for segmentable recognition |
pDataPathPrefix | prefix added to all paths in the database configuration file. Allows to keep database file and object data in separate paths. |
bool CSegmentableRecognition::Init | ( | CColorParameterSet * | pColorParameterSet, |
CStereoCalibration * | pStereoCalibration, | ||
const char * | pObjectDatabaseConfigurationFile | ||
) |
Init the segmentable recognition.
pColorParameterSet | color parameter set |
pStereoCalibration | stereo calibration |
pObjectDatabaseConfigurationFile | relative or absolute path to configuration file for segmentable recognition |
bool CSegmentableRecognition::InitWithoutDatabase | ( | CColorParameterSet * | pColorParameterSet, |
CStereoCalibration * | pStereoCalibration | ||
) |
Init the segmentable recognition without reading database. Use this initialization if classes are to be added later with AddClass()
pColorParameterSet | color parameter set |
pStereoCalibration | stereo calibration |
void CSegmentableRecognition::PostProcessResultList | ( | ) | [private] |
bool CSegmentableRecognition::RecognizeAndLocalizeObject | ( | CByteImage * | pGrayImage, |
Object3DEntry & | entry, | ||
const char * | pObjectName | ||
) | [private] |
void CSegmentableRecognition::SetRecognitionThresholds | ( | float | fSizeRatioThreshold, |
float | fCorrelationThreshold | ||
) |
Override default recognition thresholds
fSizeRatioThreshold | size ratio between original and detected object (defaults to 0.8) |
fCorrelationThreshold | minimum correlation between segmented mask and rendered model (defaults to 0.85) |
void CSegmentableRecognition::SetStereoCalibration | ( | CStereoCalibration * | pStereoCalibration | ) |
Override stereo calibration as set in Init.
pStereoCalibration | a stereo calibration pointer |
void CSegmentableRecognition::SetVerbose | ( | bool | bVerbose | ) |
Enable verbose mode
bVerbose | make segmentable recognition verbose |
bool CSegmentableRecognition::m_bVerbose [private] |
Definition at line 201 of file SegmentableRecognition.h.
Definition at line 199 of file SegmentableRecognition.h.
Definition at line 197 of file SegmentableRecognition.h.
Definition at line 188 of file SegmentableRecognition.h.
Definition at line 194 of file SegmentableRecognition.h.
Definition at line 195 of file SegmentableRecognition.h.
Definition at line 190 of file SegmentableRecognition.h.
Definition at line 192 of file SegmentableRecognition.h.