Научная статья на тему 'A method of image segmentation with the help of areas growinand multiscale analisys'

A method of image segmentation with the help of areas growinand multiscale analisys Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
105
55
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
SEGMENTATION / IMAGE / GROWING / WAVELET

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Palamar I. N., Sizov P. V.

In this article we analyzed advantages and disadvantages of existing methods of image segmentation. The development of an original algorithm of segmentation which uses the method of areas growing and multi scale analysis is presented. The capabilities of this method in different images segmentation are researched.

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

Текст научной работы на тему «A method of image segmentation with the help of areas growinand multiscale analisys»

oscillations are oscillations the period of which exceeds the IP by an integer of times [3]. Fig. 4 shows schedules of processes in a digital electric drive system for two cases:

- feedbacks with variable factors in the function of pure delay (fig. 4, a);

- feedbacks with constant factors calculated in the assumption of an average value of pure delay equal to one IP [3] (fig. 4, b). It is obvious, that in the second case in the process of performing the task there appear converging subharmonic oscillations as a result of which the speed of a system decreases approximately in one and a half time. If the speed of a system increases considerably subharmonic oscillations can even increase. In any case their occurrence is extremely undesirable, as they are badly filtered by flyweights because of their low frequency and it leads to additional losses of energy.

I 1(x)

\ °°w

a b

Fig. 4

Conclusions:

- the analysis of time delays introduced by a microcomputer together with the PWC is made and the principle of their account is established in the process of calculation of the discrete state equations of a control object;

- the technique of numerical calculation of modal state regulators is developed in view of the influence of variable pure delay in a microprocessor system with several periods of discreteness;

- the account of variable character of pure delay allows to remove subharmonic oscillations typical for high-speed closed digital systems;

- there is an opportunity to decrease a static mistake (to its full compensation) and to reduce a dynamic mistake significantly if disturbing influence in a system can be supervised and measured.

References

1. Volkov A. I. Algorythms and structures of microprocessor systems of high-dynamic electric drives control // Electrical engineering. 1999. № 8. P. 10-16.

2. Synthesis of microprocessor systems of asynchronous electric drives control applying the method of polynomial equations / I. Ya. Braslavsky, A. M. Zyuzev, Z. Sh. Ishmatov, S. I. Shilin // Electrical engineering. 1998. № 6. P. 20-24.

3. Zalyaleyev S. R. Design of microprocessor regulators of industrial electric drives : Tutorial. Krasnoyarsk : KSTU, 1995.

4. Zalyaleyev S. R., Pakhomov A. N. Equations of the state of a direct curent electric drives microprocessor system taking into account pure time delay in a control channel // Proceedings of higher educational institiutions. Electromechanics. 2002. № 3. P. 35-41.

5. Zalyaleyev S. R., Pakhomov A. N. Mathematical description of a control object of a digital system with two periods of discreteness and delay // Optimization of an operating mode of electric drives systems : Interacademic collection of scientific papers / editor-in-chief S. R. Zalyaleyev . Krasnoyarsk : KSTU, 2002. P. 157-168.

6. Kuo B. Theory and designing of digital control systems : translate from English. M., 1986.

© Pakhomov A. N., Krivenkov M. V., Ivanchura V. I., 2010

I. N. Palamar, P. V. Sizov Rybinsk State Aviation Technological Academy named after P. A. Solovyev, Russia, Rybinsk

A METHOD OF IMAGE SEGMENTATION WITH THE HELP OF AREAS GROWING

AND MULTISCALE ANALISYS

In this article we analyzed advantages and disadvantages of existing methods of image segmentation. The development of an original algorithm of segmentation which uses the method of areas growing and multi scale analysis is presented. The capabilities of this method in different images segmentation are researched.

Keywords: segmentation, image, growing, wavelet.

Segmentation means selection of homogeneous fields in original digital images. It is one of the most important problems in modern systems of computer vision, which are used in many scientific and industrial spheres: medicine, metallography, air-photography, robotics, safety systems and others. It is at this stage of processing

that conversion of an image from a set of pixels into a set of segments suitable for further recognition of scene objects takes place.

Nowadays there is a number of formalized methods of segmentation [1], which can be divided into two groups according to the basic principle of working:

- methods which initially select area boundaries (contours) as the drops of some feature of an image;

- methods which select segments having a homogeneous feature.

The first group includes methods which calculate the first and the second derivatives of the image function with the help of different masks (Roberts operator, Previtt operator, Laplace operator, Marr-Hildreth operator, etc.), supplemented with methods of contour binding (local binding, Hough’s transformation, analysis with the help of graph theory). The main problem of these contours determination methods is that the derivable borders of an object are disconnected. It is understandable because the basic algorithms of segmentation are not set up to produce connected closed contours, and methods of binding are a superstructure for these algorithms and can solve this problem only at the expense of great computational burden.

The second group of segmentation methods includes first of all the method of threshold transformation. This method is rather wide-spread because it is quite easy and has simple characteristics. But though it was improved several times it has a defect which is also present in the above mentioned methods of contours selection. All of them do not use information about segments connection. This defect is absent in methods of segments selection because initially they were formed to produce connected areas meeting some requirement of homogeneity, that is, areas growing, division and fusion of areas, segmentation according to morphologic divide.

The method of areas growing in its basic version can be described as following:

- some points (cores of crystallization) are chosen on the original image; it is supposed that they belong to the selected areas, for example, these could be points with the highest level of brightness;

- then the areas growing starts from these points, that is, surrounding points are added to the selected points according to a criterion of their closeness, for example, difference in brightness;

- the growing stops when some condition is satisfied, for example, the peak declination of new point’s brightness from the brightness of crystallization center.

It is obvious from the description that this algorithm takes into account the connection of areas and in practice can solve many problems much more successfully than the algorithms that use threshold transformation. The only drawback is an increased calculative complexity and the main difficulty is to find centers of crystallization and define the moment when an area stops growing.

From the given presentation of segmentation methods we can draw a conclusion that it is necessary to use the information about elements (contours) connection during image segmentation. So the modification of areas growing method seems to be the most perspective idea. Its aim is to get full segmentation rather than separate chosen objects from the background.

Let’s define the requirements to a new method of segmentation:

- it should be very precise and reliable in image segmentation and should be able to work with rather complex images;

- it should implement the full image segmentation;

- it should pick out connected homogeneous areas;

- it should use information about textures, not only about brightness;

- it should be highly automated; operator’s work during segmentation should be minimal.

First of all when describing the method of segmentation we should define the way of presenting the original data. Let’s specify the original image as a vector-function f (x, y) that is defined on the two-dimensional space of integer as f (x, y) = px , where vector P = [pR, PG, PB] defines pixel’s color in threedimensional space RGB.

First of all, it’s necessary to solve the problem of crystallization centers searching globally. The property of growth centers to be inside homogeneous areas prompts the way to find them - the method of differential transformation. Then in the transformed image the points of local minimums will correspond to the points with the lowest change of brightness in the neighborhood, that is, to the crystallization centers. For the majority of transformations used in this case (Previtt, Sobell, etc.) the radius of differentiation will not be more than one pixel. But in order to get more information about pixel’s value variation near a scanned point one can use multi scale representation of immediate neighborhood with the help of wavelet-transformation.

It’s known that wavelet analysis presents the original image as two pyramids. These are approximations and details representing the local changes of an image in different scales. Hence it follows that using wavelet-details it is possible to select the information about the behavior of an image function in the neighborhood of the explored point in different scales (frequencies) instead of selecting it only on the highest level as in differential operators. At the same time the method of filtering with a floating mask should be used, because it calculates wavelet-details of neighborhood for every point of an image.

So, any pixel can be connected with a neighborhood on the original image (fig. 1), which is used to calculate coefficients of multi scale analysis.

^zrnrrrn

Fig. 1

Then for a chosen point of an image one can calculate several values of specification (in fig. 1 there are three of

them). Their number depends on the level of transformation. For a deeper analysis level a bigger neighborhood is used. But as it’s seen from the example, this neighborhood covers only one square around the pixel. The rest of the squares will be covered by reflection of the transformation template. As a result we’ll get a quantitative measure of variability for an image function on a definite scale (let us call it wavelet-statistics) as a

sum Wxl,y = Viy + V?j + VxmyJ + VVJ, where l is the level of analysis; V*y , Vxnyl, Vx,1, are components

of wavelet-statistics which are calculated if four quadrants around the basic point. These summands differ by the vector of their calculation on the plane of an image. To

----Q,l

define them let’s introduce an auxiliary vector mwx,y of the average value on the l-level for a square of pixels with side 2 l. This vector is calculated with the help of recursive formulas:

-IV, l Wx, y

( IV ,l-1 IV ,l -1 IV ,l-1 IV ,l - 1

{mwx y , mw , 1 , mw l 1, mw l 1 l 1

( x+T , y x, y+2l-1' x+T - 1, y+2 1

( iii ,l-1 III ,l -1 III ,l-1 III ,l - 1

mwx, y , mw , x +2' M,y, mw l,, x, y -2 5 mw l x +2l 1 y _2/_1

(—11 ,l-1 II ,l - 1 II ,l-1 II ,l-1

mwx, y , mw l 5 x - 2 -1, y, mw l,, x,y- 2 5 mw 2/_ 1, y _2/_1

(—i ,l-1 {mwxy , 1 ,l-1 , mw l 1 ,l-1 mw l,, 1 ,l-1 mw l j

,t - x- 2 i, y, x, y + 2 5 x- 2 , y + 2 1

Q,0 mwx, y = Px, y , Q = : {I, II, III, ST I

mwx,y = M

where M is an operator for calculating the middle point in three dimensional RGB-area in the set P={ pl, p2, ...

pN }.

Now with the help of these formulas we can describe the calculation of wavelet-statistic components for l scale as

W l I-----------IV,l ------IVl-

Vx,,’ = D mwx y , mw

IV,l ---------V,l-1 \

mwx,y , mwx+2l-1,y j +

-----IV,l ------IVJ-l \ I---IV,l -------IVJ-l \

mwx,y , mwxy+2l- ) + D (mwx,y , mwx+2-1 y+2l-^,

TTT l /-III ,l ------III ,l-1 \

Vx y, = D Imwx y , mw , , ) +

x,y \ x+2l-1,y /

-----III ,l ----III ,l-1 \ /---IV,l -------IV,l-1 \

mwx,y , mwxy-2l_! j + D (mwx,y , mwx+2-1 y-2l

II l i-II,l -----II,l-1 \

Vx,y = D (mwx,y, mwx-2l-1 y ) +

-----II ,l -----II ,l-1 \ /--II ,l -------II ,l-1 \

mwx,y, mwxy-2l-^ + D (mwx,y, mwx_^-1 y-2l-^ ,

I l (-1,l ------1,l-1 \

Vx,y = DI mwx,y, mwx-2l-1 \ +

/----I,l -------1 ,l -1 \ /----I,l -------1 ,l -1 \

D (mwx,y , mwx,y+2l-1 ) + D (mwx,y , mwx-2l-1,y+2l-1 ) ,

where D is an operator for calculating Euclidean distance in RGB-area.

As a result after the calculation we’ll get an array of

numbers where a sequence of values Wlxy reflecting the

variation degree of an original function for different scales l in the nearest neighborhood the size of which is

not constant and depend on the analysis level will correspond to every point px y. By adding all numbers

from the sequence one can get a single value and then count a two-dimensional function of total wavelet-statistics:

Z

UW Z(x, y) =X W‘x,y , Z < Llog 2(min^^, 7})J, l=1

where Z - is the depth of wavelet-statistics calculation; X, Y - are the total number of lines and columns on the original image. When the function is ready, one should start defining the centers of crystallization by way of searching for local minimums on it.

The use of common methods of optimization for a function with several variables is inefficacious because the studied function UW Z(x, y) is determined on a twodimensional discrete space. Here one can use the method of suppression of non-maximums [2] as applied to the problem of minimization. It means scanning the image with the help of mask 3 x 3 in order to find points surrounded by pixels with biggest values. But in this case the points of inexact local minimums will be lost. And on the other hand according to the requirements imposed for the problem of crystallization centers searching in the area of equal minimums there should be one minimal point situated in the center of this area. So when the point is found one should start morphological filling of the connected area of the same level in order to define and save the middle point of the selected component as a center of crystallization. Usually morphological operations are described with the help of theory of sets [1]. In morphology dilatation © is used to determine the component of connection. Dilatation means widening the set on its borders. So, if point c is inside the researched area, the operation of defining the component of connection Ck for a set of values of function UW Z(x, y) looks like Ck = (Ck-1 © B) n A; k = 0, 1, ...; A = { UW Z(x, y)

I (UW Z(x, y) = c)}; C0 = c; where B is a dilatation primitive, in this case it is a square 3 x 3.

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

The filling is finished when Ck = Ck-1. Elements from the set Ck represent the image of the connected area of equal values for which it is necessary to determine a center of gravity. A center of gravity for the area with equal values can be determined as a point inside a rectangle that limits the area. Horizontal and vertical lines cross in this point in such a way that on the both sides they have the equal subsets of the studied area Ck. Then one should find the point closest to the center of gravity (because an area can be a ring, for example) belonging to Ck and define it as s new center of growth.

On determining the centers of crystallization one should start growing areas. In order to get the full and correct segmentation one should develop an integrated approach instead of using the described method many times for each segment. It means that the algorithm on each step should consider all the growing segments of the image, that is, it must be connected. Then, probably, it is worth choosing the full filling of the image by the segment as the best criterion to stop segmentation. But

y

y

instead of adding a pixel to each area on each step one should add the only pixel closest to one of areas at the moment. By this the irregular segments growing can be reached. It corresponds to the real situation and thus we can solve the problem of choice of the criterion of the growing process stopping.

Of course, all the candidate-pixels, that can be included in a segment, should be adjacent to their areas. It means they should be situated on an outer border, which can be easily calculated with the help of morphological methods. The outer border Gr of area Reg (Gr and Reg are sets of pixels) can be determined as Gr = (Reg © B) \ Reg.

Then one should search for only one pixel among the chosen boundary pixels. This pixel should be the closest to the neighboring area according to some feature. The closeness between a pixel and a chosen area can be determined by two methods:

- first one is the distance a between the value of a pixel’s color and the average value of an area,

a x,y = D( gx,y, M (Reg ^ gx,y = px, y, gx, yeGr;

- second is the distance p in Z-dimensional area of wavelet-statistics Wlrv, l = 1, 2, ... Z between vector

w,

Gr xy , that belongs to a boundary pixel and the average

value of a corresponding area. Let’s extend the operations of finding a mean and Euclidean distance in case of the Z-dimensional area :

Px,y = D(,x,y ,M({wReg,x,y

WxZ, y = [ Wlv, Wlv, .

Px,y e Reg})) ,

wZ.. l.

So, as a result of the analysis of the areas and adjoining pixels we’ll get such point gx,y , that distance a

or distance P for it will be minimal among all the pixels from the set G. This point should be united with the appropriate segment. The process of area growing stops when all the pixels of the image will be included into a set of pixels of all areas.

Probably in general case the described method will not let us have the correct segmentation, because there will be more centers of crystallization in the gradient image of wavelet statistics and, consequently, more segments than areas which a man can perceive. It will inevitably lead to excessive segmentation. This problem can be solved with the help of areas union on the segmented image. Let’s use the same method as in area growing. That means we’ll search for two closest areas on each step. Any two neighboring areas can be joined. Distance (a or P) be can be calculated with the help of the same equations as in growing. The only difference is that in both cases one should use average values of the areas instead of a parameter value for one pixel. Those two areas which will have the smallest distance dk on k-step of union should be united. This process should be repeated until there is only one area left and it is equal to the whole image. But then there comes a question when to stop, which criterion should be used. When will the segmented image best

correspond to a man’s perception or give enough information that makes further distinction easier? One can figure out this moment while analyzing a sequence of allowed deviation of areas characteristics during their uniting. One can suggest that this function will steadily grow as in the process of areas uniting one has to allow greater and greater deviations of their parameters. In this case by differentiating this sequence we can define the moment after which in uniting the next pair one had to make an admission greatly differing from neighboring one s. In other words it is necessary to calculate the global maximum of the first derivative of the sequence of variations dk. Then the moment t when an uniting should be stopped can be calculated as:

t = arg(max{Adk, k = 1, 2,...}), Ad k = dk+1- dk.

k

In the end it is necessary to go back to step t and finish the work.

Let ’s present the described method of segmentation as an algorithm (fig. 2).

Fig. 2

Let’s consider the results of the work of the suggested method for different images. At first let’s take a simple two-colored image (fig. 3, left) in order to see how the method of searching for centers of crystallization works. There is also an image for wavelet-statistics (fig. 3, middle) and centers of crystallization (fig. 3, right).

It’s obvious from fig. 3 that one center of crystallization (contrast crosses) was chosen for every homogeneous area. Every marked point is in the center of

gravity of its area, though the value of wavelet-statistics (gradient) inside the area is zero. Such result was achieved due to the use of the morphologic algorithm of filling along with the minimization of wavelet statistic function UW Z(x, y).

Now let’s apply the algorithm to a rather simple from the point of view of areas extraction image of blood cells (fig. 4, left).

The segmented images shown in fig. 4 (center) were got fully automatically. Every segment which is shown in fig. 4 on the right has an individual set of values of descriptors. It goes without saying that the main method settings (wavelet-statistics of the first level, growing and uniting according to color) were introduced. But they do not influence the result as much as, for example, the value of color in threshold transformation or in a simple areas growing. It is sufficient to say that variations of object’s colors in fig. 4, left and small distortions will not influence the result of segmentation. Consequently the suggested method of segmentation has a high level of stability and automation.

Now let’s check the capacity of the method in working with texture mapping (fig. 5, left). For this image one can successfully apply a deep multi scale analysis (for example, down to the fourth level) and wavelet-statistics in segmentation. In this case frequency information about the image will be used.

In this example (fig. 5, middle) automatic stop of uniting worked incorrectly. But the image that was got on an earlier step of areas uniting (fig. 5, right) shows the capacity of the method to work with texture mapping.

In conclusion let’s figure out the progressive features of the suggested method of segmentation and its advantages:

- the method uses information about areas connection;

- it is a complex method; it combines dynamics, adaptivity of area growing and areas uniting with an opportunity to use different information about a studied scene;

- the method uses frequency information which gives an opportunity to work with texture mapping;

- high level of automation.

Fig. 3

Fig. 4

Fig. 5

Disadvantages:

- algorithms are complicated;

- there are high system requirements.

Except for the algorithm of segmentation itself in this work there were described some other new ideas:

- the method of multi scale analysis with extraction of frequency information;

- the algorithm of two-dimensional function minimization which uses morphological filling;

- combination of areas growing and areas uniting;

- the criterion of the definition of the optimal moment to stop uniting.

References

1. Gonzalez R. C., Woods R. E. Digital Image Processing. N. Y. : Prentice Hall, 2002.

2. Steinbrecher R. Bildverarbeitung in der Praxis

[Electronic resource]. URL: http://www.rst-

software.de/dbv/download.html.

© Palamar I. N., Sizov P. V., 2010

Y. S. Petrov, V. E. Raspopov Siberian Federal University, Russia, Krasnoyarsk

RESULTS OF COMPUTING EXPERIMENTS FOR WATER ECOLOGICAL SYSTEM

MATHEMATICAL MODELING

The point-wise imitation and one-dimensional mathematical models of aquatic ecosystems have been overlooked. The developed models are intended for studying ecosystems in the Krasnoyarsk aquatic basin and in separate locations on the Yenisei River. The results of the computing experiments are presented.

Keywords: mathematical model, mathematical modeling of aquatic ecosystems, computing experiment.

Environmental issues have a designated place in the general list of issued for which mathematical modeling is used. The increase of the anthropogenic environmental impact, caused by intense exploitation of natural resources and the growth of industry leads to an ecological balance disruption. This is happening both on local (in separate areas of globe) and on planetary scale. The importance of struggling against anthropogenic eutrophication of reservoirs and their pollution is understood everywhere in the world. There had been a great amount of researches in limnology, mathematical modeling, and economy, connected with problems of preservation, restoration, and the effective exploitation of natural resources, such as lakes and manmade reservoirs. The ecological condition of the water bodies depends on a number of various factors and processes: hydrophysical, hydrobiological, hydrochemical, meteorological, and anthropogenic. Hydrophysical processes appreciably form a habitat of hydrobionts, define the transferred and sedimentation of substances, the intensity of pollution, and the self-cleaning of reservoirs.

The problem of water quality is complicated. Water bodies are complex physical, biochemical and ecological systems. To be able to predict the consequence of one decision or another, the corresponding tool by dint of which it is possible to analyze the sufficiency of information is required. Such a tool is the computing experiment based on mathematical modeling and numerical methods. An effective means of the arising problem objective analysis in the field of hydrobiology problems are the methods based on constructing and studying mathematical models of water ecosystems. The using of mathematical modeling and carrying out computing experiments allows us to predict the dynamics

of water ecosystem development, and also to estimate the consequences of realizing various projects, connected with influence on the ecosystem.

A number of general claims to each mathematical model are known: the corresponding system of the equations should be closed and consistent; the model should describe a variety of physical phenomena and suppose the designing of realized numerical algorithm.

In the given work, some results of the calculations, carried out with a mathematical model of the water ecosystem (being an improvement of the model considered in [1]) are presented. The model is modified by the separation of green algae as independent components of a mathematical model and the introduction of an additional equation, describing the change in algae concentration.

As dynamic variables of model, the concentrations of green algae (CA0), of blue-green algae (CA1), of diatoms (CA2), of zooplankton (CZ), of bacteria (CB), of detritus (CD), of the inorganic phosphorus dissolved in water (PS), of the inorganic nitrogen dissolved in water (NS), of the organic matter dissolved in water (POB), and of the oxygen dissolved in water (02) are taken.

In model the following processes are considered:

- growth of microorganisms;

- outflow of products of a metabolism;

- death rate of microorganisms;

- processes of settling;

- transitions on a trophic chain;

- decomposition processes;

- atmospheric reaeration (isolation of oxygen from water);

- denitrification (process of restoration of nitrates to the molecular nitrogen, caused by bacteria);

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