1 #ifndef vil_grid_merge_h_ 2 #define vil_grid_merge_h_ 11 # include <vcl_msvc_warnings.h> 23 unsigned box_ni,
unsigned box_nj)
25 unsigned ni = image1.
ni();
26 unsigned nj = image1.
nj();
28 assert(image2.
ni()==ni && image2.
nj()==nj && image2.
nplanes()==np);
32 for (
unsigned p=0;p<np;++p)
33 for (
unsigned j=0;j<nj;++j)
34 for (
unsigned i=0;i<ni;++i)
36 if ( ((i/box_ni)+(j/box_nj))%2 == 0)
37 dest_image(i,j,p)=image1(i,j,p);
39 dest_image(i,j,p)=image2(i,j,p);
43 #endif // vil_grid_merge_h_ Concrete view of image data of type T held in memory.
void set_size(unsigned ni, unsigned nj) override
resize current planes to ni x nj.
unsigned ni() const
Width.
unsigned nj() const
Height.
A base class reference-counting view of some image data.
unsigned nplanes() const
Number of planes.
void vil_grid_merge(const vil_image_view< T > &image1, const vil_image_view< T > &image2, vil_image_view< T > &dest_image, unsigned box_ni, unsigned box_nj)
Merge two images in a chequer-board pattern.