vil_resample_bicub.h
Go to the documentation of this file.
1 // This is core/vil/vil_resample_bicub.h
2 #ifndef vil_resample_bicub_h_
3 #define vil_resample_bicub_h_
4 //:
5 // \file
6 // \brief Sample grid of points with bicubic interpolation in one image and place in another
7 //
8 // The vil bicub source files were derived from the corresponding
9 // vil bilin files, thus the vil bilin/bicub source files are very
10 // similar. If you modify something in this file, there is a
11 // corresponding bilin file that would likely also benefit from
12 // the same change.
13 
14 #include <vil/vil_image_view.h>
15 
16 //: Sample grid of points in one image and place in another, using bicubic interpolation.
17 // dest_image(i,j,p) is sampled from the src_image at
18 // (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1]
19 // dest_image resized to (n1,n2,src_image.nplanes())
20 // Points outside image return zero.
21 // \sa vil_resample_bilin
22 // \relatesalso vil_image_view
23 template <class sType, class dType>
24 void vil_resample_bicub(const vil_image_view<sType>& src_image,
25  vil_image_view<dType>& dest_image,
26  double x0, double y0, double dx1, double dy1,
27  double dx2, double dy2, int n1, int n2);
28 
29 //: Resample image to a specified width (n1) and height (n2)
30 // \sa vil_resample_bilin
31 // \relatesalso vil_image_view
32 template <class sType, class dType>
33 void vil_resample_bicub(const vil_image_view<sType>& src_image,
34  vil_image_view<dType>& dest_image,
35  int n1, int n2);
36 
37 //: Sample grid of points in one image and place in another, using bicubic interpolation.
38 // dest_image(i,j,p) is sampled from the src_image at
39 // (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1]
40 // dest_image resized to (n1,n2,src_image.nplanes())
41 // Points outside image return the nearest valid value.
42 // \sa vil_resample_bilin
43 // \relatesalso vil_image_view
44 template <class sType, class dType>
46  vil_image_view<dType>& dest_image,
47  double x0, double y0, double dx1, double dy1,
48  double dx2, double dy2, int n1, int n2);
49 
50 //: Resample image to a specified width n1 and height n2
51 // Points outside image return the nearest valid value.
52 // \sa vil_resample_bilin
53 // \relatesalso vil_image_view
54 template <class sType, class dType>
56  vil_image_view<dType>& dest_image,
57  int n1, int n2);
58 
59 #endif // vil_resample_bicub_h_
Concrete view of image data of type T held in memory.
Definition: vil_fwd.h:13
void vil_resample_bicub_edge_extend(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 bicubic interpolation.
void vil_resample_bicub(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 bicubic interpolation.
A base class reference-counting view of some image data.