2 #ifndef vil_dog_pyramid_h_ 3 #define vil_dog_pyramid_h_ 14 # include <vcl_msvc_warnings.h> 38 unsigned n = std::min(src_image.
ni(),src_image.
nj());
40 while (n>min_size) { nL++; n=(2*n)/3; }
42 smooth_pyramid.resize(nL);
43 dog_pyramid.resize(nL);
57 unsigned n_planes = src_image.
nplanes();
62 for (
unsigned i=1;i<nL;++i)
68 unsigned ni = smooth_pyramid[i-1].ni();
69 unsigned nj = smooth_pyramid[i-1].nj();
72 sub_sampled_image.
set_size(ni,nj,n_planes);
74 0.0,0.0, scaling,0.0, 0.0,scaling, ni,nj);
Various mathematical manipulations of 2D images.
Concrete view of image data of type T held in memory.
void vil_gauss_filter_5tap(const srcT *src_im, std::ptrdiff_t src_ystep, unsigned ni, unsigned nj, destT *dest_im, std::ptrdiff_t dest_ystep, const vil_gauss_filter_5tap_params ¶ms, destT *work)
Smooth a single plane src_im to produce dest_im.
void set_size(unsigned ni, unsigned nj) override
resize current planes to ni x nj.
Sample grid of points with bilinear interpolation in one image and place in another.
unsigned ni() const
Width.
unsigned nj() const
Height.
unsigned nplanes() const
Number of planes.
void vil_math_image_difference(const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< sumT > &im_sum)
Compute difference of two images (im_sum = imA-imB).
void vil_resample_bilin(const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
Sample grid of points in one image and place in another, using bilinear interpolation.
void vil_dog_pyramid(const vil_image_view< T > &src_image, std::vector< vil_image_view< T > > &smooth_pyramid, std::vector< vil_image_view< T > > &dog_pyramid, unsigned min_size)
Compute a pyramid of difference of gaussian images.