Научная статья на тему 'Image processing with structural lines'

Image processing with structural lines Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
70
39
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
COMPRESSION / VIDEO DATA / IMAGE / SEGMENTATION / STRUCTURAL LINES / VIDEO CODEC / EDGE DETECTION / SHARR FILTER / JPEG / MPEG / BMP

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Tashmanov Erjan Baymatovich, Vinogradov Aleksandr Sergeevich

The article deals with the approach to compress video images with losses. An idea of the approach is image segmentation based on separation of a structural lines in the simplified image and further data compression of segments by conventional methods. There are a quantization of the original signal, an edge detection in the image, transmitting and receiving the compressed image, filling the interior space of contours with matching colors, smoothing the contours for quality improving of reconstructed image in a developed codec schematic diagram.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Image processing with structural lines»

Tashmanov Erjan Baymatovich, professor Military Technical Institute of the National Guard, Tashkent, Uzbekistan Vinogradov Aleksandr Sergeevich, The senior teacher, Military Technical Institute of the National Guard, Tashkent, Uzbekistan E-mail: tashmanov0781@mail.ru

IMAGE PROCESSING WITH STRUCTURAL LINES

Abstract: The article deals with the approach to compress video images with losses. An idea of the approach is image segmentation based on separation of a structural lines in the simplified image and further data compression of segments by conventional methods. There are a quantization of the original signal, an edge detection in the image, transmitting and receiving the compressed image, filling the interior space of contours with matching colors, smoothing the contours for quality improving of reconstructed image in a developed codec schematic diagram.

Keywords: compression, video data, image, segmentation, structural lines, video codec, edge detection, Sharr filter, JPEG, MPEG, BMP.

I. Introduction

Currently there are a large number of image compression techniques based on many kinds of algorithms, such as used in JPEG, MPEG 1,2,4 and other standard. But the feature of the developed algorithm is an image compression method based on the formation of structural lines, that is an alloca-

tion of some critical points in image and tale-to-tale joint by structural lines.

The main purpose ofthe work is development of new methods of image processing for data transmission in a communication system that is a relevant and practically important task.

II. Main part

Figure 1 shows a developed codec schematic diagram.

Figure 1. The Video Compression Codec Schematic Diagram Basis on an Allocation of Structural Lines

Figure 2. The Test Image "a Squirrel "

Section 15. Technical science

The image in BMP format (resolution 640 x 352, volume 660 KB) was used to evaluate the performance of the algorithm (Figure 2).

Image transformation process to the palette YCbCr exercises in the Image Transformation Block, where each image point is transformed from RGB to YCbCr palette by the following formulas:

Y = 0.299 x R + 0.587 x G + 0.114 x B;

Cb = 128-0.168736 x R - 0.331264 x G + 0.5 x B;

Cr = 128 + 0.5 x R - 0.418688 x G - 0.081312 x B.

All subsequent operations will be performed only in the luminance plane - Y.

A quantizing process of luminance plane pixel to 5-7 bits exercises in the The Quantization Block (the purpose is obtaining a large number of levels of identical image brightness). This step is necessary because the next step is the edge detection, and the contours can be identified only for sections of the same brightness. Typically, the image is stored in the eight-digit form, that is all three primary colors, or all three YCbCr component is allocated 8 bits, thus the range of values for one element is from 0 to 25. And usually it is too small areas with the same brightness in a real image.

A step changes in the standard form for a given range of values is equal to 1, and when the quantization in the developed scheme, step increase, so although values themselves occupy the whole range 0.255, but their number is significantly reduced. Thus large areas with the same brightness appear in the image.

The imposing Sharr matrix process on an image is the basis of the image compression. It exercises in the the Edge Detection Block. Imposing an any matrix on any image (in other words, the image filtering) is as follows: all the points of the image are moving starting from the point with coordinates (0, 0) sequentially. For each point the following operations exercise (steps for the matrix size of 3x3 points): we take a new matrix having the same dimensions as the filter matrix and fill it with the brightness points of the image that way the current point has been in the center of the matrix and then calculated response of the matrix using the formula:

X = F[i-1,j-1] x A[0,0] + F[i, j-1] x A[1,0] + F[i+1,j-1] x x A[2,0] + F[i-1, j] x A[0,1] + F[i, j]xA[i,i]+ F[i+1, j]x xA[2,1] + F[i-1,j+1]xA[0,2]+ F[i,j+1]xA[1,2] + F[i+1, j+1]x x A[2,2], (1)

where F - the brightness matrix of image, i and j - coordinates of the current point, A - filter matrix.

If the value of X (1) is above (below) a certain number, a filter is considered as triggered and the point with coordinates (i, j) is marked as important (or unimportant). The contours of the image marked as an outline regardless of the filter triggering.

In this article we applied a Sharr filter that uses two matrices:

Table 1. - Sharr Filter

-3 0 3 -3 - 10 -3

- 10 0 10 0 0 0

-3 0 3 3 10 3

Matrix A1 Matrix A2

The triggering of the filter determines by the following formula:

Vx 12 + X22 < K, (2)

where K - operation threshold, X1 and X2 - response of matrices A1 and A2, respectively.

As a result of this stage, only those points which form contours are marked in the image.

The parameter of a step is the operation threshold of the filter. The points, which have the result after formula (2) calculation less than the operation threshold are recognized as not belonging to any contour and aren't saved. According to the results of experiments, the most effective operation threshold is 8.

An illustrative example of an image after the edge detection shown in (Figure 3).

Figure 3. Example image after filtering, on which images are visible contours

The result contours transmite to the receiver as a stream of bytes, using the following notation in Broadcast Images Block: the values of the image points are recorded in a flow by line (first line of the image, then the second one and so on). But all three components is written just for the points belonging to the contours, and instead of "empty" points it is recorded their number. For example, we have an image line (asterisks are the contours, the dashs are an "empty" points):

****—*---**** is the line, which will be written as

[YCbCr][YCbCr][YCbCr][YCbCr][-5][YCbCr][-6] [YCbCr][YcbCr][YCbCr][YCbCr]

So the amount of transmitted information is considerably reduced (a test image compression ratio has reached 55%).

Number of "empty" points is recorded by negative numbers to distinguish them from the color component values that are only positive.

This format was designed specifically for compressed by structural lines (contours) images.

In the test program the transfer medium is the computer's file system and the transmission and reception of image are executed like file reading and writing.The reading of input compressed stream and decoding it with line-by-line image filling exercises in the Image Reception Block (YCbCr palette), where the saved contours automatically restore.

The filling of interior space contours with matching colors exercises in the Filling Contours Block. The picture is incomplete, because the compressed information stream has only the contours without their inner parts. To redress it, we simply fill in each contour with the same color, which is set for its borders, ie. for each point within the contour we set the same color as contour has.

The edge smear exercises in the Smoothing the Contours Block. As the real images have smooth brightness transitions [2], than sudden changes in the restored image should be smoothed. For smoothing we use following formula (3):

= (zi-i, j + Z+i, j + , j-i + Z +i) 14 (3) which has matrix form as shown in Table 2.

Table 2. - The smoothing filter matrix of coefficients

0 1 0

1 v4 1

0 i 0

To smooth the image we apply this matrix. However, for the best results we use a specially developed, in which the size of the matrix depends on density of contours location. There are 4 sizes in adaptive method: 3 x 3, 5 x 5, 7 x 7 and 9 x 9. These dimensions are as follows: the matrix of 9 x 9 centers at the current point of the image and filled with brightness values: if more than 75% of the pixels belong to the contours in this matrix, than 3 x 3 matrix is used; if less than 75% do, than 5 x 5 matrix is; if less than 50% do, than 7 x 7 matrix is; if less than 25% do, than 9 x 9 matrix is.

The response of each matrix is divided by the number of its active elements, i.e. 4, 8, 12 or 16, and assigned as the new value of brightness of the current point. This step takes the longest processing time, because it depends on the number of iterations. The experiments showed that satisfactory quality is obtained by 5 passes for the majority of images.

Each image point is translated from YCbCr to RGB palette in the Transformation YCbCr ■ RGB Block using the following formulas:

R = Y + 1.402 x (Cr - 128);

G = Y - 0.34414 x (Cb - 128) - 0.71414 x (Cr - 128); B = Y + 1.772 x (Cb - 128).

The example for test image after the conversion to RGB palette is shown in (Figure 4).

Figure 4. The image after conversion into RGB palette

III. Conclusion

To evaluate the effectiveness of this method of image compression it was performed experimental evaluation of compression for images of different themes and genres. The research results show proposed method works the better, as more homogeneous areas in the image. A good example is the above "a Squirrel" image. The sky's background in this image is sufficiently uniform and can be highly compressed, unlike the Squirrel, which is transmitted completely.

Since real images are usually small homogeneous areas, this method will be able apply first of all to the artificial image: computer graphics, drawings, diagrams, charts, satellite images, heat maps, etc. On such images its effectiveness will be maximized.

References:

1. Gonzalez R., Woods R., Digital Image Processing.- M., Technosphere,- 2005.- 1072 p.

2. Sadovnichy V. A., Antonio J., Musin O. R, Seleznev O. V, Staroverov V M. Structural Lines and Critical Points of the Digital Image // Selected Topics ofMathematics, Mechanics and Their Applications.- M.: Publishing House of Moscow. University Press,- 1999.- P. 438-462.

3. Tashmanov E. B. Control Parameters of the Algorithm Compression of Video Information Using Its Structural Lines // Actual Problems of the Humanities and Natural Sciences.- Moscow.- 2011.- No. 9.- P. 37-40.

4. Samara A. A., Nikolaev E. S. Methods for Solving Grid Equations.- M.: Nauka,- 1978.- 570 p.

i Надоели баннеры? Вы всегда можете отключить рекламу.