![]() |
Perception Tool Kit (PTK) API Guide
|
|
Data Structures | |
| struct | PTK_GridCircleIter |
| Grid circle iterators are intended to be mostly opaque structures which can produce a sequence of (x,y) pairs covering the interior of a circle using a minimal number of operations aggregated across the entire iteration. It does not produce any points outside the circle. Grid circle iterators operates on cell coordinates. More... | |
| struct | PTK_GridIter_PhysBox |
| Grid box (rectangle) iterators produce a sequence of the cell coordinates which lie inside a rectangle defined in physical grid coordinates. More... | |
Functions | |
| void | PTK_GridCircleIterInit (PTK_GridCircleIter *iter, const PTK_Grid *grid, const PTK_GridRoi *roi, int32_t cx, int32_t cy, uint32_t r) |
| Initializes the grid iterator. More... | |
| uint32_t | PTK_GridCircleIterNext (PTK_GridCircleIter *iter, uint32_t *cellX, uint32_t *cellY) |
| Returns the next cell inside the region of interest. More... | |
| void | PTK_GridIter_PhysBoxInit (PTK_GridIter_PhysBox *iter, const PTK_Grid *grid, const PTK_GridRoi *roi) |
| Initialize the iterator. More... | |
| uint32_t | PTK_GridIter_PhysBoxGetNext (PTK_GridIter_PhysBox *iter, uint32_t *cellX, uint32_t *cellY) |
| Get next cell from iterator. When no more cells are available, return 0. More... | |
| void PTK_GridCircleIterInit | ( | PTK_GridCircleIter * | iter, |
| const PTK_Grid * | grid, | ||
| const PTK_GridRoi * | roi, | ||
| int32_t | cx, | ||
| int32_t | cy, | ||
| uint32_t | r | ||
| ) |
Initializes the grid iterator.
| [out] | iter | Iterator context. |
| [in] | grid | Grid configuration. |
| [in] | roi | ROI configuration. |
| [in] | cx | Center x coordinate of the circle. |
| [in] | cy | Center y coordinate of the circle. |
| [in] | r | Circle radius in pixels. |
| uint32_t PTK_GridCircleIterNext | ( | PTK_GridCircleIter * | iter, |
| uint32_t * | cellX, | ||
| uint32_t * | cellY | ||
| ) |
Returns the next cell inside the region of interest.
| [out] | iter | Iterator context. |
| [out] | cellX | Center x coordinate of the cell found. |
| [out] | cellY | Center y coordinate of the cell found. |
| void PTK_GridIter_PhysBoxInit | ( | PTK_GridIter_PhysBox * | iter, |
| const PTK_Grid * | grid, | ||
| const PTK_GridRoi * | roi | ||
| ) |
Initialize the iterator.
| [out] | iter | Pointer to iterator |
| [in] | grid | Pointer to grid |
| [in] | roi | Pointer to ROI defining the box in physical grid coordinates |
| uint32_t PTK_GridIter_PhysBoxGetNext | ( | PTK_GridIter_PhysBox * | iter, |
| uint32_t * | cellX, | ||
| uint32_t * | cellY | ||
| ) |
Get next cell from iterator. When no more cells are available, return 0.
| [in,out] | iter | Pointer to iterator |
| [out] | cellX | Pointer to next cell's index in x |
| [out] | cellY | Pointer to next cell's index in y |