grid smoothing based image compression - prasaprasa.org/proceedings/2012/prasa2012-19.pdf · image...

5
Grid Smoothing Based Image Compression Jenny Bashala Electrical Engineering French South African Institute, Tshwane University of technology Private Bag X680, Pretoria 0001, South Africa Email: jennybashala@ gmail.com Karim Djouani Electrical Engineering French South African Institute, Tshwane University of Technology Private bag X680, Pretoria 0001, South Africa Email: [email protected] Yskandar Hamam Electrical Engineering French South African Institute, Tshwane University of Technology Private Bag X680, Pretoria 0001, South Africa Email : [email protected] Guillaume Noel Setsebi Consulting, Bagnols, Ceze, 30200, France Email: [email protected] Abstract—The lossy image compression method described in this paper uses a graph-based approach to reduce the image size. The presented method is based on the assumption that any image may be decomposed into a structure and detailed components. The detail part is compressed with a frequency- based scheme (transform coding used in JPEG and JPEG2000 for example) while the structure component is processed with a grid smoothing assisted by a graph decimation technique. The performance of the compression method is demonstrated on few popular images. Keywords—Bilateral Mesh filtering, Grid smoothing, Mesh decimation I. INTRODUCTION Digital images usually contain a large amount of data. The facility to save, transmit and retrieve digital images efficiently becomes more and more important in this cutting edge technology. In today's world, where exchange of images is part of our daily life, everyone has experienced the benefit of reducing the size of a file containing images. The existing image compression techniques reduce the number of bits representing the image by exploiting the redundancies in the original image while preserving the resolution and the visual quality of the reconstructed image as close to the original image as possible. The compression method can be either lossy or lossless. The well-known lossy compression methods make use of transform coding, vector quantization, image compression by linear splines over adaptive triangulation, fractals, or subband wavelet coding schemes for removing psychovisual and statistical image redundancies [5]. However, as the bit rate is decreased and the compression ratio increased, each compression technique introduces artifact, creating blocky, blurry, patchy or smudgy images [5]. Most of these methods operate on pixels values of the original image and only few methods operate on the graph of the image to reduce its size. The main idea of our compression technique is to capitalize on the advantages of the pixel-based and graph-based methods. The algorithm uses bilateral mesh filtering to split the input image into structure and detail components. The structure component is the resulting filtered image which contains the large scale features while the detailed component corresponds to the residual image obtained by subtracting the image structure from the input image. In figure 1, it is shown that the grid smoothing is applied on the filtered image S I in order to extract the non-uniform grid reflecting the image structure. The structure of an image I can be seen as a set of points in which the first two coordinates represent the row x and the column y determining the position y x, of a pixel. The third coordinate corresponds to the pixel value y x I , at the given position. The neighborhood of a pixel contains either four or eight pixels. Four pixels create four connectivity while eight pixels create eight connectivity. The set of points and the connectivity associated to the image helps to associate an image with a graph. The image is seen as a collection of vertices or nodes where a vertex represents a pixel. The edges are represented by the connectivity of the neighborhood pixels. Uniformly distributed position coordinates y x, leads to a uniform mesh or uniform grid. Meshes or graphs with non-uniformly distributed coordinates (x, y) will be named non-uniform grids or meshes. During the grid smoothing process, vertices are moved from small variances regions to large variance regions since the regions with small variance require fewer points than the regions with large variance [9]. The output of the grid smoothing contains a set of coordinates combined together to form the non-uniform grid. Delaunay triangulation is performed on the set of coordinate’s points to generate triangular faces. The resulting triangular mesh is decimated through mesh simplification process. The simplification lies in eliminating elements of the mesh such as vertices, edges and faces [4, 2]. The simplification exploited is the mesh decimation [11]. The decimation process removes vertices and faces from a mesh. Since we are working on a triangular mesh, the mesh decimation will reduce the number of triangles (faces) in the mesh without losing the overall structure. The number of vertices of the simplified mesh corresponds to number of pixels of the compressed image. The reconstruction process is based on

Upload: others

Post on 12-Jul-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Grid Smoothing Based Image Compression - PRASAprasa.org/proceedings/2012/prasa2012-19.pdf · image compression by linear splines over adaptive triangulation, fractals, or subband

Grid Smoothing Based Image Compression

Jenny Bashala

Electrical Engineering

French South African

Institute, Tshwane

University of

technology Private Bag

X680, Pretoria 0001,

South Africa

Email: jennybashala@

gmail.com

Karim Djouani

Electrical Engineering

French South African

Institute, Tshwane

University of

Technology Private

bag X680, Pretoria

0001, South Africa

Email:

[email protected]

Yskandar Hamam

Electrical Engineering

French South African

Institute, Tshwane

University of

Technology Private

Bag X680, Pretoria

0001, South Africa

Email :

[email protected]

Guillaume Noel

Setsebi Consulting,

Bagnols, Ceze, 30200,

France

Email:

[email protected]

Abstract—The lossy image compression method described in

this paper uses a graph-based approach to reduce the image

size. The presented method is based on the assumption that

any image may be decomposed into a structure and detailed

components. The detail part is compressed with a frequency-

based scheme (transform coding used in JPEG and JPEG2000

for example) while the structure component is processed with a

grid smoothing assisted by a graph decimation technique. The

performance of the compression method is demonstrated on

few popular images.

Keywords—Bilateral Mesh filtering, Grid smoothing, Mesh

decimation

I. INTRODUCTION

Digital images usually contain a large amount of data.

The facility to save, transmit and retrieve digital images

efficiently becomes more and more important in this cutting

edge technology. In today's world, where exchange of

images is part of our daily life, everyone has experienced the

benefit of reducing the size of a file containing images. The

existing image compression techniques reduce the number of

bits representing the image by exploiting the redundancies in

the original image while preserving the resolution and the

visual quality of the reconstructed image as close to the

original image as possible. The compression method can be

either lossy or lossless. The well-known lossy compression

methods make use of transform coding, vector quantization,

image compression by linear splines over adaptive

triangulation, fractals, or subband wavelet coding schemes

for removing psychovisual and statistical image

redundancies [5]. However, as the bit rate is decreased and

the compression ratio increased, each compression technique

introduces artifact, creating blocky, blurry, patchy or smudgy

images [5]. Most of these methods operate on pixels values

of the original image and only few methods operate on the

graph of the image to reduce its size.

The main idea of our compression technique is to capitalize

on the advantages of the pixel-based and graph-based

methods. The algorithm uses bilateral mesh filtering to split

the input image into structure and detail components. The

structure component is the resulting filtered image which

contains the large scale features while the detailed

component corresponds to the residual image obtained by

subtracting the image structure from the input image. In

figure 1, it is shown that the grid smoothing is applied on

the filtered image SI in order to extract the non-uniform

grid reflecting the image structure. The structure of an

image I can be seen as a set of points in which the first two

coordinates represent the row x and the column

y determining the position yx, of a pixel. The third

coordinate corresponds to the pixel value yxI , at the

given position. The neighborhood of a pixel contains either

four or eight pixels. Four pixels create four connectivity

while eight pixels create eight connectivity. The set of

points and the connectivity associated to the image helps to

associate an image with a graph. The image is seen as a

collection of vertices or nodes where a vertex represents a

pixel. The edges are represented by the connectivity of the

neighborhood pixels. Uniformly distributed position

coordinates yx, leads to a uniform mesh or uniform grid.

Meshes or graphs with non-uniformly distributed

coordinates (x, y) will be named non-uniform grids or

meshes. During the grid smoothing process, vertices are

moved from small variances regions to large variance

regions since the regions with small variance require fewer

points than the regions with large variance [9]. The output

of the grid smoothing contains a set of coordinates

combined together to form the non-uniform grid. Delaunay

triangulation is performed on the set of coordinate’s points

to generate triangular faces. The resulting triangular mesh is

decimated through mesh simplification process. The

simplification lies in eliminating elements of the mesh such

as vertices, edges and faces [4, 2]. The simplification

exploited is the mesh decimation [11]. The decimation

process removes vertices and faces from a mesh. Since we

are working on a triangular mesh, the mesh decimation will

reduce the number of triangles (faces) in the mesh without

losing the overall structure. The number of vertices of the

simplified mesh corresponds to number of pixels of the

compressed image. The reconstruction process is based on

Page 2: Grid Smoothing Based Image Compression - PRASAprasa.org/proceedings/2012/prasa2012-19.pdf · image compression by linear splines over adaptive triangulation, fractals, or subband

mapping the color values associated to the each vertex of

the simplified mesh. In our case, we map the associated gray

level of each vertex (pixel) by interpolation since we are

working in gray scale.

The lines below of this paper will give more details

on the components used to implement our lossy image

compression algorithm. Section 2 gives the notion of

bilateral mesh filtering and grid smoothing in image

processing. Section 3 describes the use of mesh

simplification to reduce the size of an image. Section 4

illustrates the proposed lossy image compression method.

Section 5 shows the results. A conclusion is given in section

6.

Input Image Bilateral Mesh filtering

Image structure

(Is)

Image details (Id)

Compression with

grid smoothing

Compression with

JPEG2000

Figure 1. Image Preprocessing

II. BILATERAL MESH FILTERING AND GRID SMOOTHING

A. Bilateral Mesh Filtering

Bilateral mesh filtering corresponds to a bilateral filter

implemented using graph-based approach. It imitates the

behavior of the classical bilateral and mesh filtering; whilst

presenting some properties of mesh smoothing [10]. The

graph used in the bilateral mesh filtering process consists of

a set of vertices that are correlated with the image pixels

values. The link between vertices is identified as edges

characterizing the relationship between pixels. This new

filtering is implemented via an energy function based on the

mesh smoothing model of Hamam and Couprie. The cost

function is developed as a graph and minimized. This

function is expressed as a sum of data fidelity and

smoothing terms based on the node-edge incidence [10].

The filter defines a weight based on the difference in

grayscale of the extremities of the connection and makes use

of an exponential law. It takes into account the luminance

proximity and computes the distance between the luminance

of two vertices iz and jz as in [10]:

2

2, exp

jil

ji

zzd (1)

With: -l

jid , : represents the distance between the vertices

i and j .

- 2ji zz represents the 2L norm between the

grey levels.

- represents the variance parameter of the

Gaussian distribution.

The objective function of the first order bilateral mesh filter

is defined as:

CZCZZZZZJ ttt

Z ˆˆ (2)

The optimal solution of the first order is given by:

ZCCIZ t ˆ1

(3)

The optimal solution of the second order is given by

ZCCCCIZ tt ˆ1

(4)

The diagonal square matrix Lwwdiag ,...,1 of size

LL (L: number of connections in the graph) has its

lw diagonal elements defined by:

2

2

00

expji

l

zzw

(5)

Where i is the sending end of the connection l and j is the

receiving end. 0

z represents the initial grey level of

node .

The model of the bilateral mesh filtering is defined from

equation (1) to (5). From these expressions, it is understood

that the performance of the new filter depends on the

parameters and which corresponds to d and

r respectively when compared the classical bilateral filter

[12].

Figure 2. Result of Bilateral Mesh filtering

B. Grid Smoothing

The grid smoothing is a new graph-based technique

for image processing and analysis developed by Guillaume

Noel, Karim Djouani, and Yskandar Hamam. This

technique presents a general outline analogous to the mesh

smoothing in which a cost function is defined and

optimized. The method is interpreted as projection of the

grey levels of the input image onto the sampling grid; and

enhances the edges of the input image while preserving the

number of nodes. The Grid smoothing operates on the

theory where regions with small variance necessitate fewer

points than regions with a large variance. Points with small

variance regions are moved to large variance regions. The

grid smoothing method changes the coordinates of the

points in the grid to match the entities in the image. This

graph based technique is formulated as an optimization

problem defined in [9] as:

(a)Original Image (b)Image structure (c)Image details

Page 3: Grid Smoothing Based Image Compression - PRASAprasa.org/proceedings/2012/prasa2012-19.pdf · image compression by linear splines over adaptive triangulation, fractals, or subband

YXJKK RRYX

,min,

(6)

Where YXJ , represents the cost function of

variables KK RRYX , . YX , represents the

coordinates of nodes in the mesh, and K represents the

number of pixels images.

Figure 3. Grid smoothing of a portion of the image structure

III. MESH SIMPLIFICATION TECHNIQUES

Mesh simplification consists of eliminating the

elements of a mesh (vertices, edges or faces) while

preserving the original shape and appearance [3]. Several

mesh simplification algorithms have been developed [2].

Most algorithms reduce the complexity of the mesh by

merging elements of the mesh, by resampling the vertices

[1, 2]. Depending on the desired output mesh, some

algorithms preserve the input mesh while others alter it

illogically [4].

One category of mesh simplification referred to as mesh

decimation simplifies meshes by removing vertices and

faces from a mesh [11]. The main idea is to reduce the

number of faces in the mesh by iterative vertex decimation,

edge collapse or contraction without losing the overall

structure. . Most faces are triangles. The iteration process is

terminated when the required percentage of reduction of the

mesh is reached or when some decimation criteria are

reached. Most mesh decimation approaches are based on

iterative edge collapse or edge contraction [8]. An edge

collapse is an operation that reduces an edge into a single

vertex. When this is done all edges and faces connected to

the removed vertices has to be reconnected to the new

vertex. Several theories have been developed on how to

efficiently collapse edges while preserving the original

topology and a good approximation to the original

geometry. Some techniques have been more complex than

others. The essential difference between these techniques

lies in how they choose an edge to contract.

One of the well-known techniques of mesh decimation

is the Surface Simplification Using quadratic error metrics

developed by Garland and Heckbert. The base operation of

their technique is the edge collapse where an edge is

reduced into a single vertex by merging the two vertices of

the edge. The contraction of the pairs is performed by

repositioning the two vertices to a new selected location.

The change in vertices location results in deletion of

vertices, while all the edges and faces connected to the

removed vertices are reconnected to the new vertex. This

process might degenerates few faces or edges which will be

removed from the mesh. The approximation produced by

the algorithm maintains high fidelity to the original mesh

[6]. The algorithm of Surface simplification using

quadratics error metrics of Garland and Heckbert is

implemented based on the norm stating that the validity of

the vertex pair 21,vv chosen for contraction focus on

either:

21,vv is an edge or

tvv 21 , where t is a threshold parameter.

The choice of the contraction is based on the cost function

of contraction. The characteristic of the error at each vertex

helps to define the contraction cost. Garland and Heckbert

defined the error at a vertex Tzyx vvvv 1 using

the quadratic form:

2

22141312

2

11 222 yqzqxzqxyqxqQvvv T

4434

2

332423 222 qzqzqyqyzq (7)

Where Q is a symmetric 4x4 matrix associated with each

vertex. A new matrix Q must be derived at each vertex pair

contraction to approximate the error at new vertex v . The

new matrix Q is defined as:

21 QQQ (8)

The contracted vertex pair 21,vv is placed at either 1v ,

2v or 221 vv depending on the lowest value of the

error v produced by either of the selected location. The

ideal location would the one that minimize v . The

minimum is found by solving for v (homogenous vector):

0

zyx Or

1

0

0

0

1000

34333231

24232221

14131211

vqqqq

qqqq

qqqq

(9)

With

(a)Image structure (b)Grid smoothing

Page 4: Grid Smoothing Based Image Compression - PRASAprasa.org/proceedings/2012/prasa2012-19.pdf · image compression by linear splines over adaptive triangulation, fractals, or subband

1

0

0

0

1000

1

34333231

24232221

14131211

qqqq

qqqq

qqqq

v

The performance of decimation method developed by

Garland and Heckbert is similar to a MATLAB function

reducepatch. The operation of the function consists in

reducing the number of faces of the triangular mesh while

preserving the overall shape of the original mesh. For details

on the reducepatch function see MathWorks.com.

0 20 40 60 80 100

10

20

30

40

50

60

70

80

90

100

(a) Initail Triangular Mesh

0 20 40 60 80 100

10

20

30

40

50

60

70

80

90

100

(b)Decimated triangular Mesh

0 20 40 60 80 100

10

20

30

40

50

60

70

80

90

100

(c)Decimated triangular Mesh Figure 4. (a)Initial triangular mesh of an image structure; (b)Mesh

decimated to 50%; (c) Mesh decimated to 10%

IV. PROPOSED COMPRESSION METHOD

The proposed lossy compression scheme concentrates on

the data reduction of the image structure using the grid

smoothing to extract the image structure graph. The vertices

of resulting image graph are rearranged using Delaunay

triangulation to create triangular faces. The resultant mesh

with triangular faces is decimated using a triangulated mesh

simplification technique. The resulting decimated mesh is

used to retrieve the vertices coordinates’ and convert the set

of coordinates to a matrix of pixels. The number of vertices

equals the number of pixels in the image. The

reconstruction process is based on mapping the gray values

associated to the vertices of the decimated mesh into a set of

gray values associated to a uniform grid. Each vertex is

associated with a gray level indicating the color of the

vertex. The objective of the reconstruction is to allocate

gray levels to the pixels. The approach used for the

reconstruction is the triangle based interpolation of the gray

levels and the resampling of the interpolated surface.

V. RESULTS

(c)Image structure (d)Compressed Image structure using Grid

smoothing by 50% of mesh decimation

PSNR = 29.6049 dB

(e)Image structure (f)Compressed Image structure using

Grid smoothing by 20 % of mesh

decimation PSNR = 38.7868 dB

(a)Image structure (b) Compressed Image structure

with 40 % of the mesh decimated (PSNR= 41.9303 dB)

Page 5: Grid Smoothing Based Image Compression - PRASAprasa.org/proceedings/2012/prasa2012-19.pdf · image compression by linear splines over adaptive triangulation, fractals, or subband

Figure 5. Simulation results

VI. CONCLUSION

The lossy image compression scheme presented in this

paper proposes a new graph-based approach to compress

images. It shows the efficiency of graph-based approach in

image compression. The reconstructed image displays a

good visual quality with a good peak signal to noise ratio

which makes this new technique an alternative lossy image

compression scheme. The developed method is centered on

image data reduction. A study has to be done on the

encoding of the reduced image data.

REFERENCES

[1] Chen, H., Yin, G., & Zhang, J. (2008). A real time mesh

simplification algorithm based on half-edge collapse.

Control and Decision Conference, 2008. CCDC2008 (pp.

1896-1899). Chinese: IEEE.

[2] Cignoni, P., Montani, C., & Scopigno, a. R. (1997). A

comparison of Mesh Simplification Algorithms. Computers

& Graphics, 37-54.

[3] Cohen, J., Olano, M., & Manocha, a. D. (1998).

Appearance preserving simplification. SIGGRAPH'98

Proceedings of the 25th annual conference on Computer

graphics and interactive techniques (pp. 115-122). New

York: ACM New York.

[4] Erikson, C. (1996). Polygonal Simplification: An

overview. UNC Chapel Hill Computer Science.

[5] Eskicioglu, A. (2000). Quality measurement for

monochrome compressed images in the past 25 years.

Acoustics, Speech, and Signal Processing, 2000,

ICASSP'00, Proceedings, 2000 IEEE International

Conference (pp. 1907-1910 vol.4). IEEE.

[6] Garland, M., & Heckbert, P. S. (1997). Surface

simplification using quadratic error metric. SIGGRAPH'97

Proceedings of the 24th annual conference on Computer

graphics and interactive techniques (pp. 209-216). New

York: ACM Press/Addison-Wesley Publishing Co.

[7] Hoppe, H. (1996). Progressive Meshes. SIGGRAPH'96

Proceedings of the annual conference on computer graphics

and interactive techniques (pp. 99-108). New York: ACM

New York.

[8] Hoppe, H., DeRose, T., Duchamp, T., McDonal, J., &

Stuetzle, a. W. (1993). Mesh optimization. SIGGRAPH'93

Proceedings of the 20th annual conference on computer

graphics and interactive techniques (pp. 19-26). New York:

ACM New York.

[9] Noel, G., Djouani, K., & Hamam, a. Y. (2011). Graph-

based Image Sharpening Filter Applied to Image Denoising.

International Journal of Smart Home, Vol.5, No.2.

[10] Noel, G., Djouani, K., Wyk, B. V., & Hamam, a. Y.

(2012, July 1). Bilateral Mesh filtering. Pattern Recognition

Letters, pp. 1101-1107.

[11] Schroeder, W. J., Zarge, J. A., & Lorensen, a. W.

(1992). Decimation of triangle meshes. SIGGRAPH'92

Proceedings of the 19th annual conference on Computer

graphics and interactive techniques (pp. 65-70). New York:

ACM SIGGRAPH Computer Graphics.

[12] Tomasi, C., & Manduchi, R. (1998). Bilateral Filtering

for gray and color images. Computer Vision, 1998, Sixth

International Conference (pp. 839-846). IEEE.

(g)Image structure (h)Compressed Image structure by 60%

of mesh decimation Grid smoothing

(PSNR = 39.2764 dB)