mp_traversals
Terrible Traversals
|
Namespace containing everything required for an image traversal. More...
Classes | |
class | ImageTraversal |
A base class for traversal algorithms on images. More... | |
Typedefs | |
typedef void(* | add_function) (std::deque< Point > &, const Point &) |
This defines the expected types for an add function for a traversal The first parameter is the deque which stores the list of points to be processed The second parameter is the new point which needs to be added to the deque. More... | |
typedef Point(* | pop_function) (std::deque< Point > &) |
This defines the expected types for an add function for a traversal The first parameter is the deque which stores the list of points to be processed The function then returns the next point to be processed (and removes it from the deque) More... | |
Functions | |
double | calculateDelta (const HSLAPixel &p1, const HSLAPixel &p2) |
Calculates a metric for the difference between two pixels, used to calculate if a pixel is within a tolerance. More... | |
void | bfs_add (std::deque< Point > &work_list, const Point &point) |
Adds a Point for the bfs traversal to visit at some point in the future. More... | |
void | dfs_add (std::deque< Point > &work_list, const Point &point) |
Adds a Point for the dfs traversal to visit at some point in the future. More... | |
Point | bfs_pop (std::deque< Point > &work_list) |
Removes and returns the current Point in the bfs traversal. More... | |
Point | dfs_pop (std::deque< Point > &work_list) |
Removes and returns the current Point in the dfs traversal. More... | |
double | calculateDelta (const HSLAPixel &p1, const HSLAPixel &p2) |
Namespace containing everything required for an image traversal.
This defines the expected types for an add function for a traversal The first parameter is the deque which stores the list of points to be processed The second parameter is the new point which needs to be added to the deque.
This defines the expected types for an add function for a traversal The first parameter is the deque which stores the list of points to be processed The function then returns the next point to be processed (and removes it from the deque)
double Traversals::calculateDelta | ( | const HSLAPixel & | p1, |
const HSLAPixel & | p2 | ||
) |
Calculates a metric for the difference between two pixels, used to calculate if a pixel is within a tolerance.
p1 | First pixel |
p2 | Second pixel |