DNCFind (CVDNCFind.dll) 15.0
CVDNCFind

Functions for Match3D DNC (CAD-based 3D-object recognition). More...

Data Structures

struct  CVDNCResult
 Definition of a specific detection result. More...
 
struct  CVDNCSearchParams
 Definition of search parameters. More...
 
struct  CVDNCTeachParams
 Definition of teach parameters which are used to create a DNC-classifier from a CVDNCSAMPLES object. More...
 

Typedefs

typedef void * CVDNCFINDER
 Definition of DNC-classifier object. More...
 
typedef void * CVDNCRESULTS
 Definition of DNC-results object. More...
 
typedef cvbbool_t(* CVDNCTeachCallback) (cvbint32_t Done, cvbint32_t Total, void *pPrivate)
 Callback definition for teach-process. More...
 

Functions

cvbres_t CVDNCCreateFromFile (const char *FileName, CVDNCFINDER &Dncf)
 Create an instance of DNC-classifier from file (ASCII string version). More...
 
cvbres_t CVDNCCreateFromFileW (const wchar_t *FileName, CVDNCFINDER &Dncf)
 Create an instance of DNC-classifier from file (UNICODE string version). More...
 
cvbres_t CVDNCCreateFromSamples (CVDNCSAMPLES Dncs, CVDNCTeachParams Params, CVDNCFINDER &Dncf, CVDNCTeachCallback CallbackFunc, void *pPrivate)
 Create a DNC-classifier from an instance of DNC-samples. More...
 
cvbres_t CVDNCFind (CVDNCFINDER Dncf, CVCOMPOSITE DenseCloud, CVDNCRESULTS &Results)
 Perform a search task. More...
 
cvbint32_t CVDNCGetNumResults (CVDNCRESULTS Results)
 Read size of result list. More...
 
cvbres_t CVDNCGetResult (CVDNCRESULTS Results, cvbdim_t Index, CVDNCResult &Result)
 Get values for an individual search result. More...
 
cvbres_t CVDNCGetSearchParams (CVDNCFINDER Dncf, CVDNCSearchParams &params)
 Retrieve search parameters. More...
 
cvbres_t CVDNCGetTeachParams (CVDNCFINDER Dncf, double &Resolution, double &Fringe, CVDNCTeachParams &Params)
 Retrieve the teach parameters of the classifier. More...
 
cvbres_t CVDNCSaveClassifier (CVDNCFINDER Dncf, const char *FileName)
 Write current classifier to file (ASCII string version). More...
 
cvbres_t CVDNCSaveClassifierW (CVDNCFINDER Dncf, const wchar_t *FileName)
 Write current classifier to file (UNICODE string version). More...
 
cvbres_t CVDNCSetSearchParams (CVDNCFINDER Dncf, CVDNCSearchParams params)
 Specify search parameters. More...
 

Detailed Description

Functions for Match3D DNC (CAD-based 3D-object recognition).

Note, that this library allows only finding 3D objects using a given DNC finder.The DNC finder must be created via the CVB Teachbench.exe first.The Teachbench.exe can be found in cvb%/Applications.

Typedef Documentation

◆ CVDNCFINDER

Definition of DNC-classifier object.

There are various functions to create a DNC-classifier object, see CVDNCCreateFromSamples, CVDNCCreateFromFile, CVDNCCreateFromFileW. Each of these functions return a pointer of type CVDNCFINDER, which is used in subsequent function calls to address this object.

When the object is no longer used, it must be released with a call to ReleaseObject.

See also
CVDNCCreateFromSamples, CVDNCCreateFromFile, CVDNCCreateFromFileW

◆ CVDNCRESULTS

Definition of DNC-results object.

A (successful) call of CVDNCFind returns a pointer to a DNC-results object. This object represents a list of individual results. Special functions give access to these results, e.g. CVDNCGetNumResults and CVDNCGetResult.

When the object is no longer used, it must be released with a call to ReleaseObject.

See also
CVDNCFind, CVDNCGetNumResults, CVDNCGetResult, CVDNCResult

◆ CVDNCTeachCallback

CVDNCTeachCallback

Callback definition for teach-process.

During teaching (see CVDNCCreateFromSamples) a callback will be executed repeatedly, indicating progress. At each call, the number of samples to teach (Total) and the number of already teached samples (Done) will be given. The first call (initialization) gives 0 for both Done and Total.

You can control the termination of the teaching process by setting the return value of this callback to false. In this case, teaching will terminate and CVDNCCreateFromSamples will return an error.

Parameters
[in]DoneAmount of progress (0 for initialization, 1..Total otherwise).
[in]TotalNumber of samples to teach. (0 for initialization, >0 otherwise).
[in]pPrivateAddress of callback's owner object.
Returns
  • Teaching will be stopped if return value is false.
  • Teaching will continue if return value is true.
See also
CVDNCCreateFromSamples

Function Documentation

◆ CVDNCCreateFromFile()

cvbres_t CVDNCCreateFromFile ( const char *  FileName,
CVDNCFINDER Dncf 
)

Create an instance of DNC-classifier from file (ASCII string version).

This function loads a previously stored DNC-classifier file and returns a pointer to a CVDNCFINDER object.

Parameters
[in]FileNamePath to classifier file.
[out]DncfPointer to DNC-classifier object.
Returns
See also
CVDNCCreateFromFileW

◆ CVDNCCreateFromFileW()

cvbres_t CVDNCCreateFromFileW ( const wchar_t *  FileName,
CVDNCFINDER Dncf 
)

Create an instance of DNC-classifier from file (UNICODE string version).

This function loads a previously stored DNC classifier file and returns a pointer to a CVDNCFINDER object.

Parameters
[in]FileNamePath to classifier file.
[out]DncfPointer to DNC-classifier object.
Returns
See also
CVDNCCreateFromFile

◆ CVDNCCreateFromSamples()

cvbres_t CVDNCCreateFromSamples ( CVDNCSAMPLES  Dncs,
CVDNCTeachParams  Params,
CVDNCFINDER Dncf,
CVDNCTeachCallback  CallbackFunc,
void *  pPrivate 
)

Create a DNC-classifier from an instance of DNC-samples.

This function converts a set of examples created from a CAD model into a CVDNCFINDER object that can be used to search for the model in a point cloud. The examples are given in the form of the CVDNCSAMPLES object Dncs.

Classifier creation is controlled by the teach parameters Params and the callback function CallbackFunc. If CallbackFunc is set and returns false, the classifier creation is terminated immediately.

If you do not want or need a callback mechanism, you can set CallbackFunc and pPrivate to Null.

Parameters
[in]DncsPointer to existing DNC-samples object.
[in]ParamsTeach parameters.
[out]DncfPointer to newly created DNC-classifier object.
[in]CallbackFuncTeach callback function.
[in]pPrivatePointer to CallbackFunc's owner.
Returns
See also
CVDNCTeachParams, CVDNCTeachCallback

◆ CVDNCFind()

cvbres_t CVDNCFind ( CVDNCFINDER  Dncf,
CVCOMPOSITE  DenseCloud,
CVDNCRESULTS Results 
)

Perform a search task.

Detect objects in the given point cloud and return a list of results. Try to adjust the search parameters if there are too few results or the result list contains false positives.

The result list must be released after use by calling ReleaseObject.

The point cloud DenseCloud must be of dense format, otherwise an error is returned. It must also either be orientated in sensor frame coordinates, or the point cloud must be extrinsically calibrated such that the direction of the Z-axis points to the sensor.

Parameters
[in]DncfPointer to DNC-classifier object.
[in]DenseCloudThe point cloud in which objects are to be detected.
[out]ResultsPointer to result list.
Returns
See also
CVDNCGetNumResults, CVDNCGetResult, CVDNCSetSearchParams

◆ CVDNCGetNumResults()

cvbint32_t CVDNCGetNumResults ( CVDNCRESULTS  Results)

Read size of result list.

This function returns the number of CVDNCResult-entries contained in the given result list Results.

Parameters
[in]ResultsPointer to result list.
Returns
See also
CVDNCGetResult

◆ CVDNCGetResult()

cvbres_t CVDNCGetResult ( CVDNCRESULTS  Results,
cvbdim_t  Index,
CVDNCResult Result 
)

Get values for an individual search result.

Retrieve specific information of an individual result in Results.

Parameters
[in]ResultsPointer to result list.
[in]IndexIndex of result entry.
[out]ResultA CVDNCResult structure filled with the corresponding data.
Returns
See also
CVDNCGetNumResults

◆ CVDNCGetSearchParams()

cvbres_t CVDNCGetSearchParams ( CVDNCFINDER  Dncf,
CVDNCSearchParams params 
)

Retrieve search parameters.

This function returns the current search parameters.

Parameters
[in]DncfPointer to DNC-classifier object.
[out]paramsSearch parameters.
Returns
See also
CVDNCSetSearchParams

◆ CVDNCGetTeachParams()

cvbres_t CVDNCGetTeachParams ( CVDNCFINDER  Dncf,
double &  Resolution,
double &  Fringe,
CVDNCTeachParams Params 
)

Retrieve the teach parameters of the classifier.

This function returns the parameters with which the classifier was trained. The values for Resolution and Fringe are not teach parameters in the strict sense - they rather concern the sample generation itself -, but they are given for the sake of completeness.

Parameters
[in]DncfPointer to DNC-classifier object.
[out]ResolutionSampling resolution in pixels per millimeter.
[out]FringeFringe around object during sampling in mm.
[out]ParamsTeach parameters.
Returns
See also
DNCSSetResolution, DNCSSetFringe CVDNCCreateFromSamples

◆ CVDNCSaveClassifier()

cvbres_t CVDNCSaveClassifier ( CVDNCFINDER  Dncf,
const char *  FileName 
)

Write current classifier to file (ASCII string version).

Parameters
[in]DncfPointer to DNC-classifier object.
[in]FileNamePath to classifier file.
Returns
See also
CVDNCSaveClassifierW

◆ CVDNCSaveClassifierW()

cvbres_t CVDNCSaveClassifierW ( CVDNCFINDER  Dncf,
const wchar_t *  FileName 
)

Write current classifier to file (UNICODE string version).

Parameters
[in]DncfPointer to DNC-classifier object.
[in]FileNamePath to classifier file.
Returns
See also
CVDNCSaveClassifier

◆ CVDNCSetSearchParams()

cvbres_t CVDNCSetSearchParams ( CVDNCFINDER  Dncf,
CVDNCSearchParams  params 
)

Specify search parameters.

This function specifies the search parameters for subsequent calls of CVDNCFind.

Parameters
[in]DncfPointer to DNC-classifier object.
[in]paramsSearch parameters.
Returns
See also
CVDNCGetSearchParams