Functions to create, access and modify IPixelList PIXELLIST handles. More...
Modules | |
IPixelList Interface | |
Dynamic pixel data list. | |
Typedefs | |
typedef void * | PIXELLIST |
CVB dynamic pixel data list handle. More... | |
Functions | |
PIXELLIST | ConcatenatePixelLists (PIXELLIST PixelListA, PIXELLIST PixelListB) |
Creates a new IPixelList by concatenating two pixel lists. More... | |
cvbbool_t | CopyPixelList (PIXELLIST Source, PIXELLIST &Target) |
Copy a complete pixel list. More... | |
PIXELLIST | CreatePixelList (cvbdim_t Dimension) |
Creates a new empty IPixelList object. More... | |
cvbbool_t | SeparatePixels (PIXELLIST PixelList, const double *ProjectionVector, double Locality) |
Thin-out the PixelList in-place based on the given Locality prioritized by the ProjectionVector. More... | |
cvbbool_t | SortPixelsByPosition (PIXELLIST PixelList, cvbval_t X, cvbval_t Y) |
Sorts the PixelList in-place in a direction defined by the unit vector (X, Y). More... | |
cvbbool_t | SortPixelsByValue (PIXELLIST PixelList) |
Sorts the PixelList in-place in descending order of gray scale values. More... | |
cvbbool_t | SortPixelsEx (PIXELLIST PixelList, const double *ProjectionVector) |
Sort the PixelList in-place using a ProjectionVector. More... | |
cvbbool_t | TransformPixelListCoordinates (PIXELLIST PixelList, TCoordinateMap CS) |
Transforms the PixelList in-place using the provided coordinate map CS. More... | |
cvbbool_t | TransformPixelListMatrix (PIXELLIST PixelList, TMatrix A, double OffsetX, double OffsetY) |
Transforms the PixelList in-place using a provided matrix A and offset vector (OffsetX, OffsetY). More... | |
Functions to create, access and modify IPixelList PIXELLIST handles.
CVB dynamic pixel data list handle.
The PIXELLIST is a reference counted OBJ handle. PIXELLIST objects normally only provide the IPixelList interface.
Creates a new IPixelList by concatenating two pixel lists.
This function creates a new IPixelList with the the size of both pixel lists combined and copies the Pixel elements first from PixelListA into the new one and then the Pixel elements from PixelListB.
[in] | PixelListA | First pixel list handle. |
[in] | PixelListB | Second pixel list handle. |
Copy a complete pixel list.
If Target contains a valid handle to a IPixelList object, the list is checked for dimensional compatibility. If the dimensions match (PixelListDimension), then Target is cleared (RemoveAllPixels). The __Pixel__s from Source are copied to Target. If Target is not a valid IPixelList, then a new list will be created and filled.
[in] | Source | Source pixel list to copy. |
[in,out] | Target | Pixel list to copy into or newly created pixel list. |
PIXELLIST CreatePixelList | ( | cvbdim_t | Dimension | ) |
Creates a new empty IPixelList object.
An IPixelList contains __Pixel__s defined through at least a coordinate pair (x and y). It may also contain up to 254 custom __Component__s with arbitrary interpretation.
[in] | Dimension | Number of Pixel __Component__s each pixel element has. Valid values are in the range [2 .. 256]. |
cvbbool_t SeparatePixels | ( | PIXELLIST | PixelList, |
const double * | ProjectionVector, | ||
double | Locality | ||
) |
Thin-out the PixelList in-place based on the given Locality prioritized by the ProjectionVector.
First the PixelList is sorted via SortPixelsEx(PixelList, ProjectionVector). __Pixel__s coming first in the sorted IPixelList are prioritized. All __Pixel__s lying inside the Locality of a prioritized Pixel are removed from the PixelList.
[in] | PixelList | Pixel list handle of object to be thinned-out. |
[in] | ProjectionVector | Pointer to array of double Components of the sort-direction vector; must have at least PixelListDimension elements. |
[in] | Locality | Positive minimum L1 distance in pixels between two neighboring __Pixel__s. |
cvbbool_t SortPixelsByPosition | ( | PIXELLIST | PixelList, |
cvbval_t | X, | ||
cvbval_t | Y | ||
) |
Sorts the PixelList in-place in a direction defined by the unit vector (X, Y).
Sort Direction | X | Y |
---|---|---|
Y axis ascending | 0 | 1 |
45° from top/left to right bottom | 1 | 1 |
[in] | PixelList | Pixel list handle of object to be sorted. |
[in] | X | X sort direction vector. |
[in] | Y | Y sort direction vector. |
cvbbool_t SortPixelsByValue | ( | PIXELLIST | PixelList | ) |
Sorts the PixelList in-place in descending order of gray scale values.
In other words the PixelList is sorted based on its third Component.
[in] | PixelList | Pixel list handle of object to be sorted. |
cvbbool_t SortPixelsEx | ( | PIXELLIST | PixelList, |
const double * | ProjectionVector | ||
) |
Sort the PixelList in-place using a ProjectionVector.
The list's Pixel elements are sorted by their inner product using the ProjectionVector. This is the generalized variant of SortPixelsByPosition which only sorts by the first two components x and y and SortPixelsByValue which sorts by the third component.
Sort Direction | ProjectionVector |
---|---|
Rising X axis | [1, 0, .. ] |
Falling Z axis | [0, 0, -1, .. ] |
45° from top/left to right bottom | [1, 1, .. ] |
[in] | PixelList | Pixel list handle of object to be sorted. |
[in] | ProjectionVector | Pointer to array of double __Component__s of the vector; must have at least PixelListDimension elements. |
cvbbool_t TransformPixelListCoordinates | ( | PIXELLIST | PixelList, |
TCoordinateMap | CS | ||
) |
Transforms the PixelList in-place using the provided coordinate map CS.
Only the first two components of PixelList are updated (x and y). Any other remaining components are not affected.
[in] | PixelList | Pixel list handle of object to be transformed. |
[in] | CS | Coordinate system to be used for the transformation. |
cvbbool_t TransformPixelListMatrix | ( | PIXELLIST | PixelList, |
TMatrix | A, | ||
double | OffsetX, | ||
double | OffsetY | ||
) |
Transforms the PixelList in-place using a provided matrix A and offset vector (OffsetX, OffsetY).
See TransformPixelListCoordinates for detailed information on the calculation (where CS consists of A and (OffsetX and OffsetY)).
[in] | PixelList | Pixel list handle of object to be transformed. |
[in] | A | Matrix (2x2) to be used for the transformation. |
[in] | OffsetX | X component for translation. |
[in] | OffsetY | Y component for translation. |