Auxilliary Tool:
A data structure that represents an image in an efficient memory layout, and manipulates that image in ways useful for efficient feature processing.
More...
#include <ImagePatch2.h>
Public Member Functions | |
ImagePatch2 () | |
Constructor. | |
~ImagePatch2 () | |
Destructor. | |
ImagePatch2 (const ImagePatch2 ©) | |
Copy Constructor. | |
ImagePatch2 & | operator= (const ImagePatch2 &rhs) |
Assignment operator. | |
void | setImage (const cv::Mat &image, int setData=1, int setIntegral=1, int setSqInt=0, int setTInt=0) |
Sets the ImagePatch to contain this image's data. | |
void | setImage (const cv::Mat &image, cv::Rect ROI, int setData=1, int setIntegral=1, int setSqInt=0, int setTInt=0) |
Sets the ImagePatch to contain this image's data contained in ROI. | |
cv::Size | getImageSize () const |
Get the size of the ImagePatch. | |
const cv::Mat | getImageHeader () const |
Get this image patch's data. | |
const cv::Mat | getIntegralHeader () const |
Get this image patch's integral data. | |
const cv::Mat | getSqIntegralHeader () const |
Get this image patch's sqared integral data. | |
const cv::Mat | getTIntegralHeader () const |
Get this image patch's tilted integral data. | |
int | hasImageRep () const |
Test whether this image patch has image data. | |
int | hasIntegralRep () const |
Test whether this image patch has integral data. | |
int | hasSqIntegralRep () const |
Test whether this image patch has sqare integral data. | |
int | hasTIntegralRep () const |
Test whether this image patch has tilted integral data. | |
void | createRepIfNeeded (int setData=1, int setIntegral=1, int setSqInt=0, int setTInt=0) |
If a representation has not previously been set, set it now. |
Auxilliary Tool:
A data structure that represents an image in an efficient memory layout, and manipulates that image in ways useful for efficient feature processing.
ImagePatch2::ImagePatch2 | ( | ) |
Constructor.
Creates an empty image patch, which can be set later using setImage.
void ImagePatch2::setImage | ( | const cv::Mat & | image, |
int | setData = 1 , |
||
int | setIntegral = 1 , |
||
int | setSqInt = 0 , |
||
int | setTInt = 0 |
||
) |
Sets the ImagePatch to contain this image's data.
Copies the whole image, so any cropping, converting, and resizing must be done prior to calling setImage. The image must be of type IPL_DEPTH_8U (8-bit, unsigned integer), with a single channel.
image | The image we want to represent. |
setData | Copy the image data. This takes some memory, and is often not needed if we are only using integral based features. However, it is necessary for visualization of ImagePatch data, and may be useful for other feature types. |
setIntegral | Compute the integral of the ImagePatch. This is required to apply BoxFeature to the ImagePatch. |
setSqInt | Compute the square integral of the ImagePatch. This is required to apply features that rely on variance. |
setTInt | Compute the tilted integral of the image patch. |
void ImagePatch2::setImage | ( | const cv::Mat & | image, |
cv::Rect | ROI, | ||
int | setData = 1 , |
||
int | setIntegral = 1 , |
||
int | setSqInt = 0 , |
||
int | setTInt = 0 |
||
) |
Sets the ImagePatch to contain this image's data contained in ROI.
Any converting, and resizing must be done prior to calling setImage. The image must be of type IPL_DEPTH_8U (8-bit, unsigned integer), with a single channel.
image | The image we want to represent. |
ROI | The region of the image we want to represent. |
setData | Copy the image data. This takes some memory, and is often not needed if we are only using integral based features. However, it is necessary for visualization of ImagePatch data, and may be useful for other feature types. |
setIntegral | Compute the integral of the ImagePatch. This is required to apply BoxFeature to the ImagePatch. |