• No results found

Evaluation of fractal dimensions from bitmap image (Part: Algorithms)

N/A
N/A
Protected

Academic year: 2020

Share "Evaluation of fractal dimensions from bitmap image (Part: Algorithms)"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

EVALUATIoN oF FRACTAL DIMENSIoNS FRoM

BITMAp IMAGE

(PART: ALGORITHMS)

P. Koňas

Received: May 20, 2003

Abstract

KOŇAS, P.: evaluation of fractal dimensions from bitmap image (Part: Algorithms). Acta univ. agric. et silvic. Mendel. Brun., 2004, LII, No. 1, pp. 175-182

The work assembled the complex application for evaluation of main fractal characteristics from input image. New simple modifications of evaluation of positive cells according to appropriate scale were implemented. Detail description of theory for each method and description of evaluation process was included. Filtration modification (which is able to estimate the structure which belongs only to speci

-fied scale) was introduced together with volumetric modification that allows selecting of optional ratio for determination of positive cells. Also, Richardson method and Slit-Island method were converted to algorithm form. Program was compiled for processing of the following projects about influence between fractal dimensions and mechanical properties of tested materials.

fractal dimension, algorithm, wood, program application

Ročník LII 19 Číslo 1, 2004

175 Evaluation of fractal characteristics is usually very complicated and time-consuming activity. For our purposes we need to form automatic process of image analysis, which will be able to automatically treat the image and provide sufficient amount of information about fracture character of image. The main aim of the work is description of the main procedures and graphical user interface of application, which was compiled for that object.

MATERIAL AND METHODS

In the work we focused on evaluation of the base fractal characteristics of fractal geometry. We used three different methods of assembling of fractal di

-mensions and we added other modifications to these common methods.

Box-counting method

Method is based on dividing of area into regular boxes with the same length of box edge equals to

δ (Ref.[2]). The length of edge depends on scale ε, whereas

ε = 2−n for n Z [1]

The length of edge is equal to product:

δ = εl0 [2]

Whereas L0 is equal to the total length of analysed

image. In real conditions the n is limited by density of records (count of pixels) in the image. For simple evaluation of minimal scale we can assume the fol

-lowing relation: ln L0

n = , [3]

ln 2

where L0 is length of image in pixels and provides maximal value of edge size possible for image scaling

(2)

For each scale ε the appropriate pair of ln N (ε) and ln (δ) can be obtained. Fractal dimension is estimated in form of slope of fitted functions for those pairs.

ln Ni (ε) ≈ D ln δi [4]

D is obtained by least-square method, which is used for fitting of linear function of mentioned pairs.

N (ε) is count of positive boxes in grid divided image. Positivity of box means that checked box satisfies con

-ditions of existence of checked fractal structure (or its part) within the box. Determination of box positivity is general and it is not connected strictly to B-C method. Common way of evaluation of positivity governs by any occurrence of the structure within the image. Usu

-ally no testing of shape is realized and only existence of colour, which is different than background is sufficient reason for classification of the checked box as positive. In the following paragraphs we describe our modifica

-tion in evalua-tion of positive boxes.

Filtration method

The method is based on requirement of sufficient visibility of tested structure in the checked box. The condition of visibility is satisfied when object crosses the box from one side to opposite side or from one corner to opposite corner of the box on diagonal.

volumetric method

The condition of visibility is satisfied in this method when sufficient part of box includes any structure. Size of part is optional and we proposed the following relation:

Vip 2

k = —– = — , [5]

ViB 3

where, Vip is positive area (volume) and V

iB is area (volume) of the whole i-th box.

robust method

The method is on the other side of “sensitivity” of determination of the structure within the image. There is box considered as positive when the full checked box includes the structure. The method can be useful in problems with lined structure, which has decreas

-ing thickness of lines, and when structures from specified scale to all higher scales are accepted.

Slit island method

In our work we used the fractal dimension in form

of fractal dimensional increment according to the Mandellbrot (Ref. [1]) as:

n log ∑ At

D's= in – 1 [6] log ∑ Pt

i

For better comparison with other methods we used the method in form (it is comparison in sense of range it is regardless to physical background):

Ds = D's+ 1 [7]

Where Ai is area of the i-th island and Piis perimeter of the i-th island from all n such islands.

The problem of measuring of perimeter with a scal

-ing length leads to problem of signal noise within the image. The problem is similar with noise of lower scales, which we mentioned in paragraph Introduc

-tion. From that reason the filtration modification was implemented in perimeter evaluation.

richardson method

The method (Ref.[2, 3]) is representative of profilo

-metric method which is focused on measuring of the profile length of the tested curve or profile. Estimation of fractal dimension is made by the relation:

log Lt L0

D'R = 1 ——– [8]

log η

For better comparison with other methods we used the method in form (it is comparison in sense of range it is regardless to physical background):

DR = |D'R 1| [9]

Where Lt is true length of profile measured with a scaling length η and L0 is its projected length on the plane of anatomical slice.

The problem of measuring of the true length with a scaling length leads to problem of signal noise within the image again. From that reason the filtration modi

-fication was implemented in length evaluation.

RESULTS

Before the image processing the input file of pic

-ture has to be converted into 1-bit format (black and white)1. Conversion provides the one layer matrix of

negative (white = 0) and positive (black = 1) points.

 

 

 

(3)

For each scale we can obtain an array with the area [δ · δ]. The area can be signed as M. Crucial point is evaluation of count of positive matrices within the whole matrix.

common Box-counting method

Conventional procedure analyse each cell (pixel) of

input matrix (with size according to specified scale) and when any positive pixel is found then cycle of evaluation is interrupted and analyzed matrix M is considered as positive and the global counter Count is increased. The method is very quick and suitable for very large images.

1: Diagram of evaluation of count of positive cells in common Box-counting method

The global counter Count is equal to N(ε) in men

-tioned way of evaluation of estimation of fractal dimension by Box-Counting method (Eq. [4]) in paragraph Methods and materials.

volumetric method

Volumetric method rises from common Box-Count

-ing method. On the contrary, there is summed the total count of positive cells m within the matrix M if the ratio of positive cells and rank of regular matrix M is greater equal than specified value k, the whole matrix

M is considered as positive and the global counter

Count is increased.

2: Diagram of evaluation of count of positive cells in volumetric method

The global counter Count is equal to N(ε) in men

-tioned way of evaluation of estimation of fractal dimension by Box-Counting method (Eq. [4]) in paragraph Methods and materials.

Filtration method

In filtration method is the first column filled by third status (except the white and black status) (e.g. red = 2). The new state was introduced only for identification of checked parts of matrix M. The Fig. [3] shows only diagram of detection of crossing structure from left side of matrix M to right side of matrix. Evalu

-ation of crossing from top to the bottom is made by

simple exchange of matrix indexes (m = n n = m). Diagram has two parts. First, solves problem of con

-tinuity across the columns (red circle). Second, solves problem when positive sequence on next column was found, but lower cells (in the same row on the top or on the bottom according to the checked position) were not identified as positive points. Procedure checks the nearest neighbours in specified point M [i, j]. If positive neighbour is found then red point is placed there. The whole matrix is positive when the continue path of red points from one side to opposite side is found.

The global counter Count is equal to N (ε) in men

(4)

-mension by Box-Counting method (Eq. [4]) and equal

to Lt by Richardson method (Eq. [9]) in paragraph Methods and materials.

richardson method

Evaluation of Richardson method is combination of mentioned procedures. Filtration process provides count of positive cells within the whole image and fractal dimension is computed due to Eq. [9].

Slit-island method

First, positive cell within the image is found and

array for the first island is established (I[island, 0]). Next, neighboring positive cells are added to that island. Positions of all positive cells within the island are saved in record I[island, Cnt] . i and I[island,

Cnt] . j. All checked cells are marked by another status for excluding from the following seeking. Checked points for actual island are saved in variable

(Points) and total count of points within the island is saved to vector A[island]. Finally, next separated island is found (counter island is increased) and proc

(5)

Perimeters of island m are derived by checking of all points within the specified island. If they have some negative neighbours they are considered as part of island perimeter. When negative neighbours

are found then counter i of island perimeter m is increased. Finally, each island m has determined ap

-propriate perimeter P[m] = i (Fig.[5]). 4: evaluation of stress of all separated islands

Where

Cnt is counter of actual processed points of island with no. island

I[island, Cnt] is matrix of positions of point Cnt which belongs to the island. gm is global matrix of the whole image

Points are total count of actually processed island. L is length of the whole image.

(6)

From mentioned procedures (Fig. [4] and Fig. [5]) we will obtain areas of islands (A) and perimeters of those islands (P) which are sufficient for computing of fractal dimension according to the Eq. [7].

GRAPHICAL USER INTERFACE

User-friendly application for evaluation of all mentioned fractal characteristics was created. User can only define the input image(s) and application will process the appropriate image analysis without any intervention. On the contrary, user need to be educated in fractal (image) analysis and provide suffi

-cient (appropriate) input file. Thus, some preliminary modifications have to be done before evaluation of fractal dimensions (e.g. conversion into 1-bitmap

code, edge smoothing, inversion of colors for high

-lighting of investigated structures etc.).

Application environment (Fig.[6]) offers several active items and mostly passive information compo

-nents.

SUMMARy

Assembled application is able to compute the frac

-tal dimensions by several methods with significant decreasing of user effort. Concurrently, evaluation of reliability of fitted function by least-square method for estimation of fractal dimension was implemented. Included modifications allow new improvement of classification of self-similar structure.

(7)

6: Application environment

1 – User can select methods, which will be used for computation of fractal dimensions Box-Counting is common Box-Counting method without any modification Box-Counting (grid) is method with filtration modification

Box-Counting (ratio) is method with volumetric modification Island is Slit-island method with filtration modification

Only small areas – when it is checked only areas smaller than average area of islands will be in

-cluded

Richardson (grid) is method with filtration modification

Silent mode – allows silent mode in batch processing of large amount of images. When it is checked no window will appear and no user interaction will be requested

2, 13 – When the button is pressed the window dialog will be opened and user can select directory where image for batch processing are saved.

3, 14 – When the button is pressed the main code will be run.

4 – Output window informs about phase of computation. (Informs about finished procedures) 5 – Result window includes computed characteristics

6 – List of image files for batch processing 7, 8 – Image preview

9 – Output graph of ln N (ε) and ln (1/ε). It is used for fractal dimension is evaluation by least-square method. It actualizes for each running method.

10 – Output graph of coefficient of determination, which determines the relationship between the wellness of model fit and appropriate scale 1/ε. It actualizes for each running method.

11 – Output graph of relation between estimation of fractal dimension on specified scale and scale 1/ε

(8)

Address

Ing. Petr Koňas, Ph.D., Ústav nauky o dřevě, Mendelova zemědělská a lesnická univerzita v Brně, Zeměděl

-ská 3, 613 00 Brno, Če-ská republika

SOUHRN

Vyhodnocení fraktálových dimenzí z bitmapové předlohy (Část: Algoritmy)

Vytvořená aplikace je schopna vyhodnotit fraktálové dimenze pomocí několika základních metod fraktálové geometrie za výrazného snížení uživatelova vstupu do obrazové analýzy. Současně bylo za-žení uživatelova vstupu do obrazové analýzy. Současně bylo za-ení uživatelova vstupu do obrazové analýzy. Současně bylo za-živatelova vstupu do obrazové analýzy. Současně bylo za-ivatelova vstupu do obrazové analýzy. Současně bylo za-časně bylo za-asně bylo za-ě bylo za- bylo za

-hrnuto vyhodnocení spolehlivosti proložené funkce metodou nejmenších čtverců pro odhad fraktálové dimenze. Implementované modifikace výpočtu fraktálové dimenze umožňují nové zlepší klasifikace sobě podobných struktur.

fraktálová dimenze, algoritmy, dřevo, programová aplikace

Acknowledgement

The MSM 43410004 Project from Ministry of Education, Youth and Sport, Czech Republic supported this work.

REFERENCES

MANDELBROT, B. B., PASSOJA, D.E., PULLAY, A. J.: Nature, Land 308, 721 (1984)

BORODICH, F. M.: Some fractal models of fracture, J. Mech. Phys. Solids, Vol. 45, No. 2, pp. 239-259,

(1997)

References

Related documents

Midazolam infusion significantly increased pulse pressure variation (PPV) and stroke volume variation (SVV) compared to the values in Control group, and MAP, central venous

Yang, “An Optimum Allocation Method of Power Quality Monitors by Considering Voltage Dip,” IEEE, pp. Mohamed, “Optimal Placement of Voltage Sag Monitors Based on

Analysis of the data from the Ferti PROTEKT network revealed for the first time both the counselling indications, age distribution and parity of the counselled and treated patients

If No External SCSI Devices Are Connected 7-5 If External SCSI Devices Are Connected 7-9 Setting the Scanner SCSI Identification Number 7-19 KODAK TWAIN Driver 7-21.. Installing

Trend analysis of the metabolic risk factors is a sub-component of National and Sub-nation Burden of Diseases, Injuries, and Risk Factors from 1990 to 2013 (NASBOD) study in Iran, 20

This study explored the perceptions of nurses in decision-making process in palliative care for patients with cancer. Eight themes emerged from this study included

The basic strong management factors are integration relations between farms and milk processors, price forming in region, cooperative societies, productivity,