#include <mrpt/utils/CMappedImage.h>
Public Member Functions | |
| CMappedImage (CMRPTImagePtr img, double x0=0, double x1=-1, double y0=0, double y1=-1, mrpt::vision::TInterpolationMethod method=mrpt::vision::imBILINEAR) | |
| Constructor: Must pass an image (as a smart pointer) and the coordinates of the border. | |
| void | changeCoordinates (double x0, double x1, double y0, double y1) |
| Changes the coordinates of the image (see constructor for the meaning). | |
| double | getPixel (double x, double y) const |
| Returns the interpolated pixel at the coordinates (x,y), in the range [0,255] (grayscale) If the point is out of the image, 0 is returned. | |
Protected Attributes | |
| CMRPTImagePtr | m_img |
| double | m_x0 |
| double | m_x1 |
| double | m_y0 |
| double | m_y1 |
| double | m_pixel_size |
| width * pixel_size = (x1-x0) | |
| mrpt::vision::TInterpolationMethod | m_method |
Only work with graylevels (for convenience), so if a color image is passed it'll be passed first to grayscale.
Definition at line 43 of file CMappedImage.h.
| mrpt::utils::CMappedImage::CMappedImage | ( | CMRPTImagePtr | img, | |
| double | x0 = 0, |
|||
| double | x1 = -1, |
|||
| double | y0 = 0, |
|||
| double | y1 = -1, |
|||
| mrpt::vision::TInterpolationMethod | method = mrpt::vision::imBILINEAR | |||
| ) |
Constructor: Must pass an image (as a smart pointer) and the coordinates of the border.
| img | The image. A copy of the smart pointer is kept internally to this object. | |
| x0 | Coordinate X of the left side (default: 0) | |
| x1 | Coordinate X of the right side (or -1 to IMAGE_WIDTH-1) | |
| y0 | Coordinate Y of the top side (default: 0) | |
| y1 | Coordinate Y of the bottom side (or -1 to IMAGE_HEIGHT-1) | |
| method | The interpolation method: It can be imNEAREST, imBILINEAR or imBICUBIC. |
| void mrpt::utils::CMappedImage::changeCoordinates | ( | double | x0, | |
| double | x1, | |||
| double | y0, | |||
| double | y1 | |||
| ) |
Changes the coordinates of the image (see constructor for the meaning).
| double mrpt::utils::CMappedImage::getPixel | ( | double | x, | |
| double | y | |||
| ) | const |
Returns the interpolated pixel at the coordinates (x,y), in the range [0,255] (grayscale) If the point is out of the image, 0 is returned.
CMRPTImagePtr mrpt::utils::CMappedImage::m_img [protected] |
Definition at line 46 of file CMappedImage.h.
Definition at line 49 of file CMappedImage.h.
double mrpt::utils::CMappedImage::m_pixel_size [protected] |
double mrpt::utils::CMappedImage::m_x0 [protected] |
Definition at line 47 of file CMappedImage.h.
double mrpt::utils::CMappedImage::m_x1 [protected] |
Definition at line 47 of file CMappedImage.h.
double mrpt::utils::CMappedImage::m_y0 [protected] |
Definition at line 47 of file CMappedImage.h.
double mrpt::utils::CMappedImage::m_y1 [protected] |
Definition at line 47 of file CMappedImage.h.
| Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:07:47 EST 2009 |