|
Jafar
|
Active search tesselation grid for segments. More...
Active search tesselation grid for segments.
Definition at line 38 of file activeSegmentSearch.hpp.
#include <activeSegmentSearch.hpp>
Public Types | |
|
typedef std::vector < std::vector < observation_ptr_t > > | Grid |
Public Member Functions | |
| ActiveSegmentSearchGrid (const int &imgSize_h, const int &imgSize_v, const int &nCells_h, const int &nCells_v, const int &margin=0, const int &separation=0) | |
| Constructor. | |
| void | clear () |
| Clear grid. | |
| void | renew () |
| Clear grid and position it at a new random location. | |
| void | addObs (const vec4 &pix, observation_ptr_t obsPtr) |
| Add a projected segment to the grid. | |
| bool | getRoi (image::ConvexRoi &roi) |
| Get ROI of a random empty cell. | |
| void | setFailed (const image::ConvexRoi &roi) |
| Call this after getRoi if no point was found in the roi in order to avoid searching again in it. | |
Public Attributes | |
| Grid | projections |
Private Member Functions | |
| template<class Vec > | |
| veci4 | pix2cell (const Vec &pix) |
| Get cell corresponding to pixel. | |
| veci2 | cellOrigin (const veci2 &cell) |
| Get cell origin (exact pixel) | |
| vec2 | cellCenter (const veci2 &cell) |
| Get cell center (can be decimal if size of cell is an odd number of pixels) | |
| bool | pickEmptyCell (veci2 &cell) |
| Get one random empty cell. | |
| void | cell2roi (const veci2 &cell, image::ConvexRoi &roi) |
| Get the region of interest, reduced by a margin. | |
Private Attributes | |
| veci2 | imgSize |
| veci2 | gridSize |
| veci2 | cellSize |
| veci2 | offset |
| mati | projectionsCount |
| mati | emptyCellsTile_tmp |
| int | separation |
| int | margin |
| int | cells_h |
Friends | |
| std::ostream & | operator<< (std::ostream &s, ActiveSegmentSearchGrid const &grid) |
| jafar::rtslam::ActiveSegmentSearchGrid::ActiveSegmentSearchGrid | ( | const int & | imgSize_h, |
| const int & | imgSize_v, | ||
| const int & | nCells_h, | ||
| const int & | nCells_v, | ||
| const int & | margin = 0, |
||
| const int & | separation = 0 |
||
| ) |
Constructor.
| imgSize_h | horizontal image size, in pixels. |
| imgSize_v | vertical image size. |
| nCells_h | horizontal number of cells per image width. |
| nCells_v | vertical number of cells per image height. |
| separation | minimum separation between existing and new points. |
| void jafar::rtslam::ActiveSegmentSearchGrid::addObs | ( | const vec4 & | pix, |
| observation_ptr_t | obsPtr | ||
| ) |
Add a projected segment to the grid.
| pix | the segment to add. |
Clear grid.
Sets all cell counters to zero.
Get ROI of a random empty cell.
| roi | the resulting ROI |
Clear grid and position it at a new random location.
Sets all cell counters to zero and sets a new random grid position.
| void jafar::rtslam::ActiveSegmentSearchGrid::setFailed | ( | const image::ConvexRoi & | roi | ) |
Call this after getRoi if no point was found in the roi in order to avoid searching again in it.
| roi | the ROI where nothing was found |
| Generated on Wed Oct 15 2014 00:37:44 for Jafar by doxygen 1.7.6.1 |
|