Classes | |
class | Image |
Wrapper of old C-style OpenCV IplImage with some processing functionalities. More... | |
class | ImageRoi |
2D roi More... | |
Functions | |
void | backProject (const cv::Mat &image, const cv::MatND &hist, int threshold, cv::Mat &result, int dilateIterations=0, int dilateSize=3, int erodeIterations=0, int erodeSize=3) |
backProject generate a binary image resulting of thresholding the per-pixel backprojection of a H-S histogram to a color image | |
void | calcHSVHist (const cv::Mat &src, cv::MatND &histogram) |
calcHSVHist compute and return a Hue-Saturation histogram of a given image | |
void | calcHSVHist (const std::vector< cv::Mat > &src, std::vector< cv::MatND > &histograms) |
calcHSVHist compute a Hue-Saturation for each given image | |
void | calcHSVHist (const std::vector< cv::Mat > &src, cv::MatND &histogram) |
calcHSVHist compute and return Hue-Saturation histogram of a given set of images | |
void | dctNormalization (const Image &img, Image &normalizedImg, int coefficientsToCancel, const ImageRoi &roi=ImageRoi(0, 0, 0, 0)) |
illumination normalization using the discrete cosine transform (DCT). | |
void | dctNormalization (const cv::Mat &img, cv::Mat &normalizedImg, int coefficientsToCancel, const ImageRoi &roi=ImageRoi(0, 0, 0, 0)) |
void | getConnectedComponents (const cv::Mat &binaryImage, std::vector< std::vector< cv::Point2i > > &components, std::vector< cv::Rect > &boundingBoxes) |
getConnectedComponents finds connected components in the given binary image | |
void | getLab (const Image &img, Image &L, Image &a, Image &b) |
return the Lab components of the given image | |
cv::Mat | histogramImage (const cv::MatND &hist) |
void | setLab (const Image &L, const Image &a, const Image &b, Image &img) |
build up a new image from the three Lab components provided. | |
void | showHist (const cv::MatND &hist, bool waitKey=true) |
showHist visualize a Hue-Saturation histogram |
void pal_vision_util::backProject | ( | const cv::Mat & | image, |
const cv::MatND & | hist, | ||
int | threshold, | ||
cv::Mat & | result, | ||
int | dilateIterations = 0 , |
||
int | dilateSize = 3 , |
||
int | erodeIterations = 0 , |
||
int | erodeSize = 3 |
||
) |
backProject generate a binary image resulting of thresholding the per-pixel backprojection of a H-S histogram to a color image
image | the input BGR image |
hist | the input H-S histogram |
result | the resulting 1 channel 8 bit image corresponding so that a pixel is 255 if the result of its back-projection is > threshold, otherwise the pixel is set to 0. |
Definition at line 146 of file histogram.cpp.
void pal_vision_util::calcHSVHist | ( | const cv::Mat & | src, |
cv::MatND & | histogram | ||
) |
calcHSVHist compute and return a Hue-Saturation histogram of a given image
src | |
histogram |
Definition at line 47 of file histogram.cpp.
void pal_vision_util::calcHSVHist | ( | const std::vector< cv::Mat > & | src, |
std::vector< cv::MatND > & | histograms | ||
) |
calcHSVHist compute a Hue-Saturation for each given image
src | |
histogram |
Definition at line 71 of file histogram.cpp.
void pal_vision_util::calcHSVHist | ( | const std::vector< cv::Mat > & | src, |
cv::MatND & | histogram | ||
) |
calcHSVHist compute and return Hue-Saturation histogram of a given set of images
src | |
histograms |
Definition at line 83 of file histogram.cpp.
void pal_vision_util::dctNormalization | ( | const Image & | img, |
Image & | normalizedImg, | ||
int | coefficientsToCancel, | ||
const ImageRoi & | roi = ImageRoi(0,0,0,0) |
||
) |
illumination normalization using the discrete cosine transform (DCT).
[in] | img | input image |
[out] | normalizedImg | resulting normalized image |
[in] | coefficientsToCancel | number of DCT coefficients that will be truncated |
[in] | ImageRoi | optional. Image region in which normalization will be carried on. |
Definition at line 324 of file image_processing.cpp.
void pal_vision_util::dctNormalization | ( | const cv::Mat & | img, |
cv::Mat & | normalizedImg, | ||
int | coefficientsToCancel, | ||
const ImageRoi & | roi = ImageRoi(0,0,0,0) |
||
) |
Definition at line 458 of file image_processing.cpp.
void pal_vision_util::getConnectedComponents | ( | const cv::Mat & | binaryImage, |
std::vector< std::vector< cv::Point2i > > & | components, | ||
std::vector< cv::Rect > & | boundingBoxes | ||
) |
getConnectedComponents finds connected components in the given binary image
[in] | binaryImage. | Pixels set at 0 will be considered background, otherwise foreground. |
[out] | components | for every connected component found this vector contains a vector of pixel coordinates that belong to the component (non black pixels). |
[out] | boundingBoxes | bounding rectangle of every connected component |
Definition at line 45 of file image_processing.cpp.
void pal_vision_util::getLab | ( | const Image & | img, |
Image & | L, | ||
Image & | a, | ||
Image & | b | ||
) |
return the Lab components of the given image
Definition at line 293 of file image_processing.cpp.
cv::Mat pal_vision_util::histogramImage | ( | const cv::MatND & | hist | ) |
Definition at line 112 of file histogram.cpp.
void pal_vision_util::setLab | ( | const Image & | L, |
const Image & | a, | ||
const Image & | b, | ||
Image & | img | ||
) |
build up a new image from the three Lab components provided.
Definition at line 311 of file image_processing.cpp.
void pal_vision_util::showHist | ( | const cv::MatND & | hist, |
bool | waitKey = true |
||
) |
showHist visualize a Hue-Saturation histogram
hist | |
waitKey | if true, the user has to press a key on the image to continue |
Definition at line 136 of file histogram.cpp.