Foundation (TextOut.dll) 14.0
Advanced Projection Functions

Functions

cvbbool_t CopyDoubleBuffer (PROJECTIONEX Projection, pDoubleProjection pBuffer)
 Copies the content of the projection buffer of the given Projection object to the given pBuffer array. More...
 
cvbbool_t CopyLongBuffer (PROJECTIONEX Projection, pLongProjection pBuffer)
 Copies the content of the projection buffer of the given Projection object to the given pBuffer array. More...
 
cvbbool_t Derivation (PROJECTIONEX Pin, PROJECTIONEX &Pout)
 Calculates the derivation of the given projection Pin. More...
 
cvbbool_t Filter (PROJECTIONEX Pin, cvbval_t *kernel, size_t lSize, PROJECTIONEX &Pout)
 Applies a n x 1 filter kernel to the projection. More...
 
cvbbool_t GetLength (PROJECTIONEX Projection, size_t &Length)
 Gets the length of the projection buffer of the given projection object. More...
 
cvbbool_t GetNormProjectionEx (IMG Image, cvbdim_t Index, cvbdensity_t Density, TArea Area, PROJECTIONEX &Projection)
 Calculates the advanced normalized projection of an area. More...
 
cvbbool_t GetProjectionEx (IMG Image, cvbdim_t Index, cvbdensity_t Density, TArea Area, PROJECTIONEX &Projection)
 Calculates the advanced projection of an area. More...
 
cvbbool_t IsProjection (PROJECTIONEX Projection)
 Checks whether the given object handle points to a PROJECTIONEX object or not.
More...
 
cvbbool_t Normalize (PROJECTIONEX Pin, PROJECTIONEX &Pout)
 Calculates the normalized projection. More...
 
cvbbool_t ReleaseProjection (PROJECTIONEX Projection)
 Decreases the reference count of an projection object. More...
 
cvbbool_t ShareProjection (PROJECTIONEX Projection)
 Increments the reference counter for the projection object. More...
 
cvbbool_t ZeroCrossings (PROJECTIONEX Projection, size_t lMaxCount, EDGERESULTS &Results)
 Detects the zero crossings in the given projection. More...
 

Detailed Description

Function Documentation

◆ CopyDoubleBuffer()

cvbbool_t CopyDoubleBuffer ( PROJECTIONEX  Projection,
pDoubleProjection  pBuffer 
)

Copies the content of the projection buffer of the given Projection object to the given pBuffer array.

Use this function to access the projection data directly. The given pBuffer must be large enough to contain the whole length. Use GetLength to retrieve the length of the projection you want to copy.

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

Parameters
[in]ProjectionHandle of projection object to be processed.
[in]pBufferPointer to an array of TDoubleProjection objects with at least GetLength entries.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
GetProjectionEx, GetNormProjectionEx, CopyLongBuffer

◆ CopyLongBuffer()

cvbbool_t CopyLongBuffer ( PROJECTIONEX  Projection,
pLongProjection  pBuffer 
)

Copies the content of the projection buffer of the given Projection object to the given pBuffer array.

Use this function to access the projection data directly. The given pBuffer must be large enough to contain the whole length. Use GetLength to retrieve the length of the projection you want to copy.

This function is thread safe.

Parameters
[in]ProjectionHandle of projection object to be processed.
[in]pBufferPointer to an array of TLongProjection objects with at least GetLength entries.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
GetProjectionEx, GetNormProjectionEx, CopyDoubleBuffer

◆ Derivation()

cvbbool_t Derivation ( PROJECTIONEX  Pin,
PROJECTIONEX Pout 
)

Calculates the derivation of the given projection Pin.

To calculate the second derivation call this function twice.

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

Attention
Release the Pout via ReleaseProjection if not needed anymore.
Parameters
[in]PinHandle of projection object to be processed.
[out]PoutNewly created, derived projection.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
GetProjectionEx, GetNormProjectionEx

◆ Filter()

cvbbool_t Filter ( PROJECTIONEX  Pin,
cvbval_t *  kernel,
size_t  lSize,
PROJECTIONEX Pout 
)

Applies a n x 1 filter kernel to the projection.

The filter kernel and its size is defined by the user.

This function is thread safe as long as no thread unsafe function is run in parallel to this one on the given Pin.

Attention
Release the Pout via ReleaseProjection if not needed anymore.
Parameters
[in]PinHandle of projection object to be processed.
[in]kernelPointer to the kernel to be used.
[in]lSizeWidth of the kernel.
[out]PoutNewly created, filtered projection.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
GetProjectionEx, GetNormProjectionEx

◆ GetLength()

cvbbool_t GetLength ( PROJECTIONEX  Projection,
size_t &  Length 
)

Gets the length of the projection buffer of the given projection object.

This function is thread safe.

Parameters
[in]ProjectionHandle of projection object to be processed.
[out]LengthLength of the buffer.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
GetProjectionEx, GetNormProjectionEx

◆ GetNormProjectionEx()

cvbbool_t GetNormProjectionEx ( IMG  Image,
cvbdim_t  Index,
cvbdensity_t  Density,
TArea  Area,
PROJECTIONEX Projection 
)

Calculates the advanced normalized projection of an area.

The orientation of the Area defines the direction of edge detection. The coordinate system of the Image is used to transform the Area, but the resulting edge is returned in pixel coordinates (ignoring the coordinate system).

This function works with unsigned integer image planes (also with bit depths higher than eight).

This function is thread safe as long as the given Image is not changed while this function is running.

Attention
Release the Projection via ReleaseProjection if not needed anymore.
Parameters
[in]ImageHandle of image object to be processed.
[in]IndexPlane index to be used.
[in]DensityDefines the processing density (0 < density <= 1000).
[in]AreaArea in the image where an edge is to be searched for.
[out]ProjectionPointer to an PROJECTIONEX object that will be generated by the function.
Attention: The object needs to be released afterwards.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Linux
Related Topics:
ShareProjection, ReleaseProjection, GetProjectionEx, ZeroCrossings, CopyDoubleBuffer

◆ GetProjectionEx()

cvbbool_t GetProjectionEx ( IMG  Image,
cvbdim_t  Index,
cvbdensity_t  Density,
TArea  Area,
PROJECTIONEX Projection 
)

Calculates the advanced projection of an area.

To normalize the projection use the function Normalize or call GetNormProjectionEx instead.

The orientation of the Area defines the direction of edge detection. The coordinate system of the Image is used to transform the Area, but the resulting edge is returned in pixel coordinates (ignoring the coordinate system).

This function works with unsigned integer image planes (also with bit depths higher than eight).

This function is thread safe as long as the given Image is not changed while this function is running.

Attention
Release the Projection via ReleaseProjection if not needed anymore.
Parameters
[in]ImageHandle of image object to be processed.
[in]IndexImage plane index to be used.
[in]DensityDefines the processing density (0 < density <= 1000).
[in]AreaArea in the image where an edge is to be searched for.
[out]ProjectionThis variable will contain a newly created PROJECTIONEX object.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
ShareProjection, ReleaseProjection, GetNormProjectionEx, Normalize, ZeroCrossings, CopyDoubleBuffer

◆ IsProjection()

cvbbool_t IsProjection ( PROJECTIONEX  Projection)

Checks whether the given object handle points to a PROJECTIONEX object or not.

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

◆ Normalize()

cvbbool_t Normalize ( PROJECTIONEX  Pin,
PROJECTIONEX Pout 
)

Calculates the normalized projection.

To normalize a projection each projection value is divided by the number of pixels used to generate the projection value (divided by the height of the area).

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

Attention
Release the Pout via ReleaseProjection if not needed anymore.
Parameters
[in]PinHandle of projection object to be processed.
[out]PoutNew normalized PROJECTIONEX object.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
GetProjectionEx, GetNormProjectionEx

◆ ReleaseProjection()

cvbbool_t ReleaseProjection ( PROJECTIONEX  Projection)

Decreases the reference count of an projection 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]ProjectionHandle of PROJECTIONEX object to release.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
ShareProjection, IsProjection

◆ ShareProjection()

cvbbool_t ShareProjection ( PROJECTIONEX  Projection)

Increments the reference counter for the projection object.

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

This function is thread safe.

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

◆ ZeroCrossings()

cvbbool_t ZeroCrossings ( PROJECTIONEX  Projection,
size_t  lMaxCount,
EDGERESULTS Results 
)

Detects the zero crossings in the given projection.

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

Attention
Release the Results via ReleaseEdgeResults if not needed anymore.
Parameters
[in]ProjectionHandle of projection object to be processed.
[in]lMaxCountDefines the maximum number of zero-crossings returned by the function; size_t(-1) to detect all.
[out]ResultsNewly created EDGERESULTS object.
Returns
TRUE if succeeded, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
GetProjectionEx, GetNormProjectionEx