Foundation (CVCEdge.dll) 14.0
Edge Results Functions

Functions

cvbbool_t AppendResults (EDGERESULTS In1, EDGERESULTS In2, EDGERESULTS &Out)
 Appends the results of two EDGERESULTS objects to the new object Out. More...
 
cvbbool_t EdgeResult (EDGERESULTS Results, size_t index, double &x, double &y, double &q)
 Gets an edge result from the given Result object handle. More...
 
size_t EdgeResultsCount (EDGERESULTS Results)
 Returns the number of edge results stored in the EDGERESULTS object. More...
 
cvbbool_t IsEdgeResults (EDGERESULTS Results)
 Checks whether the given object handle points to an EDGERESULTS object or not. More...
 
cvbbool_t ReleaseEdgeResults (EDGERESULTS Results)
 Decreases the reference count of an EDGERESULTS object. More...
 
cvbbool_t ShareEdgeResults (EDGERESULTS Results)
 Increments the reference counter for an EDGERESULTS object. More...
 
cvbbool_t SortResultsByAbsQuality (EDGERESULTS In)
 Sorts the In results by their absolute quality value in descent order. More...
 
cvbbool_t SortResultsByPosition (EDGERESULTS In, double px, double py)
 Sorts the In results by a direction vector px, py. More...
 
cvbbool_t SortResultsByQuality (EDGERESULTS In)
 Sorts the In results by their quality value in descending order. More...
 
cvbbool_t ThresholdResults (EDGERESULTS In, double Min, double Max, EDGERESULTS &Out)
 Creates a new EDGERESULTS object by thresholding the quality of the edge results in an input EDGERESULTS object. More...
 

Detailed Description

Function Documentation

◆ AppendResults()

cvbbool_t AppendResults ( EDGERESULTS  In1,
EDGERESULTS  In2,
EDGERESULTS Out 
)

Appends the results of two EDGERESULTS objects to the new object Out.

Use this function if you want to concatenate the results of two different processing results into a single edge result.

This function is thread safe.

Attention
If the Out object is not longer needed, release the object using ReleaseEdgeResults.
Parameters
[in]In1Handle of first EDGERESULTS object to be concatenated.
[in]In2Handle of second EDGERESULTS object to be concatenated.
[out]OutNew EDGERESULTS object containing the union of results from In1 and In2.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
EdgeResult, EdgeResultsCount, ReleaseEdgeResults

◆ EdgeResult()

cvbbool_t EdgeResult ( EDGERESULTS  Results,
size_t  index,
double &  x,
double &  y,
double &  q 
)

Gets an edge result from the given Result object handle.

Index access is zero based (range from 0 to EdgeResultsCount - 1).

This function is thread safe.

Parameters
[in]ResultsHandle of EDGERESULTS object.
[in]indexZero based index.
[out]xX-position of the edge.
[out]yY-position of the edge.
[out]qQuality of the edge.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
EdgeResultsCount
Example
Please refer to ZeroCrossings for an example.

◆ EdgeResultsCount()

size_t EdgeResultsCount ( EDGERESULTS  Results)

Returns the number of edge results stored in the EDGERESULTS object.

Use EdgeResult to get the actual results.

This function is thread safe.

Parameters
[in]ResultsHandle of EDGERESULTS object.
Returns
Number of results stored in the EDGERESULTS object; 0 if empty or on error.
Supported platforms:
Win32
Win64
Related Topics:
EdgeResult
Example
Please refer to ZeroCrossings for an example.

◆ IsEdgeResults()

cvbbool_t IsEdgeResults ( EDGERESULTS  Results)

Checks whether the given object handle points to an EDGERESULTS object or not.

Attention
This method should be used with caution as it cannot be guaranteed to work properly with random input.
Parameters
[in]ResultsHandle of object to be checked.
Returns
TRUE if object is an EDGERESULTS handle, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
ShareEdgeResults, ReleaseEdgeResults

◆ ReleaseEdgeResults()

cvbbool_t ReleaseEdgeResults ( EDGERESULTS  Results)

Decreases the reference count of an EDGERESULTS object.

When the counter reaches zero the object will be destroyed and the memory is released.

The return value is different to the ReleaseObject function: it always states TRUE if the function call succeeded. It does necessary mean that the object is destroyed.

This function is thread safe.

Parameters
[in]ResultsHandle of EDGERESULTS object to release.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
ShareEdgeResults

◆ ShareEdgeResults()

cvbbool_t ShareEdgeResults ( EDGERESULTS  Results)

Increments the reference counter for an EDGERESULTS object.

You share a Results object if want to share ownership. Call ReleaseEdgeResults if your component doesn't need the resource anymore.

This function is thread safe.

Attention
When the Results object is not needed anymore call ReleaseEdgeResults to decrement the reference counter to prevent memory leaks. When the counter reaches zero the memory is automatically deallocated.
Parameters
[in]ResultsHandle of EDGERESULTS object to share.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
ReleaseEdgeResults

◆ SortResultsByAbsQuality()

cvbbool_t SortResultsByAbsQuality ( EDGERESULTS  In)

Sorts the In results by their absolute quality value in descent order.

As the sorting is done with the absolute value of the quality, positive and negative edges are not separated as in the SortResultsByQuality function.

This function is only thread safe if only one thread works on the In object.

Parameters
[in]InHandle of EDGERESULTS object to sort.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
SortResultsByQuality, #SortResultsByPosition

◆ SortResultsByPosition()

cvbbool_t SortResultsByPosition ( EDGERESULTS  In,
double  px,
double  py 
)

Sorts the In results by a direction vector px, py.

The vector used to compare the position is passed by its two components

Examples calculations:
  • To sort the results from left to right use 0,1.
  • To sort them from bottom to top use 0,-1.
  • To sort them in 45° direction use 1,1.
  • To sort them in 225° direction use 1,-1.
This function is only thread safe if only one thread works on the In object.
Parameters
[in]InHandle of EDGERESULTS object.
[in]pxX-component of the sort vector.
[in]pyY-component of the sort vector.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
SortResultsByQuality, SortResultsByAbsQuality

◆ SortResultsByQuality()

cvbbool_t SortResultsByQuality ( EDGERESULTS  In)

Sorts the In results by their quality value in descending order.

As negative edges have a negative gradient they also have a negative quality. Positive edges thus have a positive quality. This means that positive edges are followed by negative edges in the sorted range. If you don't want to have that behavior use the SortResultsByAbsQuality function.

This function is only thread safe if only one thread works on the In object.

Parameters
[in]InHandle of EDGERESULTS object to sort.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
SortResultsByAbsQuality, SortResultsByPosition

◆ ThresholdResults()

cvbbool_t ThresholdResults ( EDGERESULTS  In,
double  Min,
double  Max,
EDGERESULTS Out 
)

Creates a new EDGERESULTS object by thresholding the quality of the edge results in an input EDGERESULTS object.

All results within Min >= EdgeQuality and EdgeQuality <= Max are copied to the Out object.

This function is thread safe.

Attention
If the Out object is not longer needed, release the object using ReleaseEdgeResults.
Parameters
[in]InHandle of EDGERESULTS object to threshold.
[in]MinMinimum threshold.
[in]MaxMaximum threshold.
[out]OutNew EDGERESULTS object containing all thresholded results.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
EdgeResult, EdgeResultsCount