|
Fawkes API
Fawkes Development Version
|
Wraps an image so that access to (0, 0) is mapped to the middle of the image and so on. More...
Public Member Functions | |
| CartesianImage (const StepResult &res, PolarAngle phi, PixelPoint center, const unsigned char *mask=0) | |
| Constructor. More... | |
| CartesianImage (const StepResult &res, PolarAngle phi, const unsigned char *mask=0) | |
| Constructor. More... | |
| CartesianImage (const unsigned char *buf, int width, int height, PolarAngle phi, const PixelPoint ¢er) | |
| Constructor. More... | |
| CartesianImage (unsigned char *buf, int width, int height, PolarAngle phi, const PixelPoint ¢er) | |
| Constructor. More... | |
| CartesianImage (const unsigned char *buf, int width, int height, PolarAngle phi) | |
| Constructor. More... | |
| CartesianImage (unsigned char *buf, int width, int height, PolarAngle phi) | |
| Constructor. More... | |
| unsigned char * | buf () |
| Get Buffer. More... | |
| const unsigned char * | mask () const |
| Mask. More... | |
| const unsigned char * | buf () const |
| Buffer. More... | |
| const PixelPoint & | center () const |
| Center of buffer. More... | |
| int | width () const |
| Width of buffer. More... | |
| int | height () const |
| Height of buffer. More... | |
| PolarAngle | phi () const |
| Phi angle. More... | |
| PixelPoint | to_pixel (const CartesianPoint &p) const |
| Converts a cartesian point to a pixel point. More... | |
| CartesianPoint | to_cartesian (const PixelPoint &p) const |
| Converts a pixel point to a cartesian point. More... | |
| bool | contains (const PixelPoint &p) const |
| Indicates whether the image contains a pixel point. More... | |
| bool | contains (const CartesianPoint &p) const |
| Indicates whether the image contains a cartesian point. More... | |
| unsigned char | get (const CartesianPoint &p) const |
| Get luminance at a given point. More... | |
| int | max_x () const |
| Get Maximum cartesian X coordinate of the image. More... | |
| int | max_y () const |
| Get Maximum cartesian Y coordinate of the image. More... | |
| PolarRadius | max_radius () const |
| Maximum polar radius of the image. More... | |
| void | set_color (const PixelPoint &p, unsigned char luma, unsigned char chrominance) |
| Sets the luminance Y and chrominance U at a given pixel point. More... | |
| void | set_color (const CartesianPoint &p, unsigned char luma, unsigned char chrominance) |
| Sets the luminance Y and chrominance U at a given cartesian point. More... | |
| float | bright_fraction (const CartesianPoint &from, const CartesianPoint &to) const |
| Get relative amount of bright pixels. More... | |
| bool | is_line (const CartesianPoint &p, int length) const |
| Indicates whether at pixel point p there is a highlighted line. More... | |
| void | highlight_line (const CartesianPoint &p, int length) |
| Highlightes a line at pixel point p. More... | |
| void | draw_line (const PixelPoint &p, const PixelPoint &q) |
| Draws a line from p to q. More... | |
| void | draw_line (const CartesianPoint &p, const CartesianPoint &q) |
| Draws a line from p to q. More... | |
| void | highlight_pixel (const PixelPoint &p) |
| Highlights a pixel, i.e. More... | |
| void | highlight_point (const CartesianPoint &p) |
| Highlights a point, i.e. More... | |
Wraps an image so that access to (0, 0) is mapped to the middle of the image and so on.
The result is a cartesian coordinate system with X and Y axis.
Definition at line 337 of file mirror_calib.cpp.
|
inline |
Constructor.
| res | The step result that contains the base image. |
| phi | The angle by which the image is rotated counter-clockwise. |
| center | The center of the image from the robot's point of view; i.e. the center of the cone mirror. |
| mask | The mask that indicates which pixels should be ignored. |
Definition at line 354 of file mirror_calib.cpp.
|
inline |
Constructor.
| res | The step result that contains the base image. |
| phi | The angle by which the image is rotated counter-clockwise. |
| mask | The mask that indicates which pixels should be ignored. |
Definition at line 371 of file mirror_calib.cpp.
|
inline |
Constructor.
| buf | The base YUV buffer. |
| width | Image width. |
| height | Image height. |
| phi | The angle by which the image is rotated counter-clockwise. |
| center | The center of the image from the robot's point of view; i.e. the center of the cone mirror. |
Definition at line 388 of file mirror_calib.cpp.
|
inline |
Constructor.
| buf | The base YUV buffer. |
| width | Image width. |
| height | Image height. |
| phi | The angle by which the image is rotated counter-clockwise. |
| center | The center of the image from the robot's point of view; i.e. the center of the cone mirror. |
Definition at line 409 of file mirror_calib.cpp.
|
inline |
Constructor.
| buf | The base YUV buffer. |
| width | Image width. |
| height | Image height. |
| phi | The angle by which the image is rotated counter-clockwise. |
Definition at line 423 of file mirror_calib.cpp.
|
inline |
Constructor.
| buf | The base YUV buffer. |
| width | Image width. |
| height | Image height. |
| phi | The angle by which the image is rotated counter-clockwise. |
Definition at line 438 of file mirror_calib.cpp.
|
inline |
Get relative amount of bright pixels.
| from | One point of the rectangle. |
| to | Opposite point of the rectangle. |
Definition at line 627 of file mirror_calib.cpp.
References fawkes::contains(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
|
inline |
|
inline |
|
inline |
|
inline |
Indicates whether the image contains a cartesian point.
| p | The point. |
Definition at line 542 of file mirror_calib.cpp.
References fawkes::contains().
|
inline |
Indicates whether the image contains a pixel point.
| p | The point. |
Definition at line 532 of file mirror_calib.cpp.
References firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
Referenced by firevision::MirrorCalibTool::draw_crosshair(), firevision::MirrorCalibTool::draw_line(), and firevision::MirrorCalibTool::draw_mark_lines().
|
inline |
Draws a line from p to q.
| p | First point of the line. |
| q | First point of the line. |
Definition at line 693 of file mirror_calib.cpp.
References firevision::MirrorCalibTool::Point::atan(), fawkes::contains(), firevision::MirrorCalibTool::Point::length(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
|
inline |
Draws a line from p to q.
| p | First point of the line. |
| q | First point of the line. |
Definition at line 684 of file mirror_calib.cpp.
|
inline |
Get luminance at a given point.
| p | The point. |
Definition at line 552 of file mirror_calib.cpp.
References fawkes::contains(), firevision::YUV_t_struct::U, firevision::YUV_t_struct::V, firevision::MirrorCalibTool::Point::x, firevision::MirrorCalibTool::Point::y, and firevision::YUV_t_struct::Y.
|
inline |
|
inline |
Highlightes a line at pixel point p.
| p | The center point of the line. |
| length | The length of the line. |
Definition at line 672 of file mirror_calib.cpp.
References firevision::MirrorCalibTool::Point::atan(), fawkes::deg2rad(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
|
inline |
Highlights a pixel, i.e.
sets the luminance and chrominance to MARK_LUMA and MARK_CHROMINANCE.
| p | The pixel. |
Definition at line 709 of file mirror_calib.cpp.
References fawkes::contains(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
Referenced by firevision::MirrorCalibTool::next_step().
|
inline |
Highlights a point, i.e.
sets the luminance and chrominance to MARK_LUMA and MARK_CHROMINANCE.
| p | The point. |
Definition at line 726 of file mirror_calib.cpp.
References fawkes::contains(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
Referenced by firevision::MirrorCalibTool::next_step().
|
inline |
Indicates whether at pixel point p there is a highlighted line.
| p | The assumed center point of the line. |
| length | The length of the line |
Definition at line 655 of file mirror_calib.cpp.
References firevision::MirrorCalibTool::Point::atan(), fawkes::deg2rad(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
|
inline |
|
inline |
Maximum polar radius of the image.
Definition at line 592 of file mirror_calib.cpp.
Referenced by firevision::MirrorCalibTool::draw_crosshair(), firevision::MirrorCalibTool::draw_line(), and firevision::MirrorCalibTool::draw_mark_lines().
|
inline |
Get Maximum cartesian X coordinate of the image.
Definition at line 576 of file mirror_calib.cpp.
|
inline |
Get Maximum cartesian Y coordinate of the image.
Definition at line 584 of file mirror_calib.cpp.
|
inline |
|
inline |
Sets the luminance Y and chrominance U at a given cartesian point.
| p | The point whose luminance Y and chrominance U is changed. |
| luma | The luminance Y. |
| chrominance | The chrominance U. |
Definition at line 616 of file mirror_calib.cpp.
|
inline |
Sets the luminance Y and chrominance U at a given pixel point.
| p | The point whose luminance Y and chrominance U is changed. |
| luma | The luminance Y. |
| chrominance | The chrominance U. |
Definition at line 602 of file mirror_calib.cpp.
References fawkes::contains(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
Referenced by firevision::MirrorCalibTool::draw_crosshair(), firevision::MirrorCalibTool::draw_line(), and firevision::MirrorCalibTool::draw_mark_lines().
|
inline |
Converts a pixel point to a cartesian point.
| p | The point. |
Definition at line 521 of file mirror_calib.cpp.
References firevision::MirrorCalibTool::CartesianPoint::rotate(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
|
inline |
Converts a cartesian point to a pixel point.
| p | The point. |
Definition at line 510 of file mirror_calib.cpp.
References firevision::MirrorCalibTool::CartesianPoint::rotate(), firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.
Referenced by firevision::MirrorCalibTool::next_step().
|
inline |