|
bazar
1.3.1
|
Multi-resolution pyramidal image. More...
#include <pyrimage.h>
Public Member Functions | |
| PyrImage (IplImage *im, int nblev) | |
| ~PyrImage () | |
| void | build () |
| build the pyramid from level 0 by calling cvPyrDown() | |
| void | setPixel (unsigned x, unsigned y, CvScalar &val) |
| Set a pixel a every precision level. | |
| void | set (CvScalar val=cvScalarAll(0)) |
| Set all pixels of all levels to a constant value. | |
| PyrImage * | clone () const |
| make an exact copy of this image, reallocating all memory. | |
| IplImage * | operator[] (unsigned i) |
| void | smoothLevel0 (int kernelSize=3) |
| apply a gaussian blur on level 0. | |
| void | setImageROI (CvRect rect) |
| set a region of interest using OpenCV cvSetImageROI() | |
| void | resetImageROI () |
| reset a region of interest using OpenCV cvResetImageROI() | |
Static Public Member Functions | |
| static PyrImage * | load (int level, const char *filename, int color, bool fatal=true) |
| try to load an image with cvLoadImage() and build a PyrImage. | |
| static int | convCoord (int x, int from, int to=0, unsigned method=0) |
| Convert a coordinate from one level to another. | |
| static float | convCoordf (float x, int from, int to=0) |
| Convert a subpixel coordinate from one level to another. | |
Public Attributes | |
| const int | nbLev |
| IplImage ** | images |
Multi-resolution pyramidal image.
Represent a multi-precision pyramidal image. images[0] is the largest image. images[nbLev-1] is the smallest image.
Each level is 4 times smaller than the previous one: width and height are divided by 2.
Definition at line 40 of file pyrimage.h.
| PyrImage::PyrImage | ( | IplImage * | im, |
| int | nblev | ||
| ) |
| PyrImage::~PyrImage | ( | ) |
Definition at line 39 of file pyrimage.cpp.
| void PyrImage::build | ( | ) |
build the pyramid from level 0 by calling cvPyrDown()
Definition at line 45 of file pyrimage.cpp.
Referenced by object_view::build(), object_view::build_from_image_0(), load(), and pyr_yape::pyramidBlurDetect().
| PyrImage * PyrImage::clone | ( | ) | const |
make an exact copy of this image, reallocating all memory.
Definition at line 116 of file pyrimage.cpp.
References images, nbLev, and PyrImage().
|
static |
Convert a coordinate from one level to another.
Definition at line 67 of file pyrimage.cpp.
Referenced by pyr_yape::save_image_of_detected_points(), setImageROI(), and setPixel().
|
static |
Convert a subpixel coordinate from one level to another.
Definition at line 86 of file pyrimage.cpp.
Referenced by add_detected_homography(), planar_object_recognizer::compute_support_for_affine_transformation(), planar_object_recognizer::detect_most_stable_model_points(), planar_object_recognizer::draw_input_image_points(), planar_object_recognizer::draw_matches(), planar_object_recognizer::draw_model_points(), planar_object_recognizer::estimate_affine_transformation(), planar_object_recognizer::estimate_homographic_transformation_linear_method(), planar_object_recognizer::estimate_homographic_transformation_nonlinear_method(), affine_image_generator::generate_random_examples(), geom_calib_draw(), yape::save_image_of_detected_points(), pyr_yape::save_image_of_detected_points(), planar_object_recognizer::save_image_of_model_points(), planar_object_recognizer::save_one_image_per_match(), planar_object_recognizer::save_one_image_per_match_input_to_model(), planar_object_recognizer::save_one_image_per_match_model_to_input(), and show_result().
|
static |
try to load an image with cvLoadImage() and build a PyrImage.
Definition at line 51 of file pyrimage.cpp.
References build(), and PyrImage().
|
inline |
Definition at line 83 of file pyrimage.h.
References images.
| void PyrImage::resetImageROI | ( | ) |
reset a region of interest using OpenCV cvResetImageROI()
Definition at line 136 of file pyrimage.cpp.
| void PyrImage::set | ( | CvScalar | val = cvScalarAll(0) | ) |
Set all pixels of all levels to a constant value.
Definition at line 110 of file pyrimage.cpp.
| void PyrImage::setImageROI | ( | CvRect | rect | ) |
set a region of interest using OpenCV cvSetImageROI()
Definition at line 124 of file pyrimage.cpp.
References convCoord(), images, and nbLev.
| void PyrImage::setPixel | ( | unsigned | x, |
| unsigned | y, | ||
| CvScalar & | val | ||
| ) |
Set a pixel a every precision level.
Compute coordinates for each precision level, and call cvSet2d() on it. This method is slow.
| x | x coordinate for level 0 |
| y | y coordinate for level 0 |
| val | pixel value to change. |
Definition at line 97 of file pyrimage.cpp.
References convCoord(), images, and nbLev.
|
inline |
apply a gaussian blur on level 0.
Definition at line 86 of file pyrimage.h.
References images.
Referenced by object_view::build_from_image_0().
| IplImage** PyrImage::images |
Definition at line 98 of file pyrimage.h.
Referenced by build(), clone(), pyr_yape::detect(), operator[](), pyr_yape::pyramidBlurDetect(), PyrImage(), resetImageROI(), pyr_yape::select_level(), set(), setImageROI(), setPixel(), smoothLevel0(), and ~PyrImage().
| const int PyrImage::nbLev |
Definition at line 97 of file pyrimage.h.
Referenced by build(), clone(), object_view::comp_gradient(), pyr_yape::detect(), pyr_yape::pyramidBlurDetect(), PyrImage(), resetImageROI(), set(), setImageROI(), setPixel(), pyr_yape::stat_points(), pyr_yape::~pyr_yape(), and ~PyrImage().
1.8.1.2