So far our discussion has been on image
sampling on a rectangular grid. This is the most commonly used sampling grid
structure because many display systemssuch as TV use raster scanning, that is,
scanning from left to right and top to bottom. Also, most digital cameras have
their sensors built in rectangular grid arrays.However, it is possible to use
nonrectangular grids, such as hexagonal sampling grid, to acquire a digital
image. An advantage of using hexagonal sampling grid is that the acquired image
has 13.4% less data than that acquired using the rectangular sampling grid [2].
It has also been found that edge detection is more efficient with hexagonally
sampled images. Hexagonal sampling is used widely in machine vision and
biomedicalimaging.
Although the compression standards such as Moving Picture
Experts Group (MPEG) use rectangular grid structure for coding still and moving
imagesespecially for motion estimation and compensation, it may be more
efficient to employ hexagonal grids for such purposes for better accuracy in
motion estimation and higher compression
ratio.
Figure
1Effect of nonideal sampling: (a) a 64 × 64 BW image, (b)
rectangular sampling
image
of size 32 × 32
pixels, (c) sampled image, (d) 2D Fourier transform of (a), (e) 2D Fourier
transform of (b), (f) 2D Fourier transform of the sampled image in (b), (g) 2D
Fourier transform of an ideal impulse, (h) 2D Fourier transform of (a) sampled
by impulse, and (i) image in (c) obtained by filtering by an ideal lowpass
filter.
The
Barbara image from the originalrectangular sampling to hexagonal sampling grid
using equation and displaythem. Figure 3.a is the cropped
image of Barbara using rectangular sampling grid. The corresponding hexagonally
sampled image is shown in Figure 3.b. If M and N are the number
of rows and columns, respectively, of an image, then the size of the
hexagonally sampled image will be M + N
− 1 × M
+ N. In the MATLAB code
listed below, conversion from hexagonal grid back to rectangular grid is also included.
The code reads the specified image, converts to hexagonal grid, displays the
respective images, converts hexagonal to rectangular grid, and displays the
valid region.
Figure
2 Converting from rectangular to hexagonal sampling grids: (a)
pixels on a rectangular grid with unit spacing in both horizontal and vertical
directions, (b) pixels on hexagonal grids after applying the transformation in
equation, (c) zoomed version of (a), and (d) zoomed version of (b). In both (c)
and (d), the zoom factor is 4.
Figure 3
Converting a real image from rectangular to hexagonal grids: (a) cropped
original
More Matlab Codes:
No comments:
Post a Comment