Using Spectral Fractal Dimension in Image

0 downloads 0 Views 126KB Size Report
definition and process described above gives (enough) ... Establish spectral histogram in the above space. 3. .... The above statement in the present case: ),(. ),(. ) ...
Using Spectral Fractal Dimension in Image Classification J. Berke Dennis Gabor Applied University H-1115, Budapest, Etele street. 68. HUNGARY Abstract-There were great expectations in the 1980s in connection with the practical applications of mathematical processes which were built mainly upon Fractal Dimension (FD) mathematical basis. Significant results were achieved in the 1990s in practical applications in the fields of information technology, certain image processing areas, data compression, and computer classification. In the present publication the so far well known algorithms calculating fractal dimension in a simple way will be introduced (CISSE SCSS 2005), [6] as well as the new mathematical concept named by the author ’Spectral Fractal Dimension - SFD’. Thus it will be proven that the SFD metrics can directly be applied to classify digital images as an independent parameter. Independent classification methods will be established based on SFD (SSFD – Supervised classification based on Spectral Fractal Dimension, USFD - Unsupervised classification based on Spectral Fractal Dimension). Using mathematical methods, estimation will be given to a maximum real (finite geometric resolution) SFD value measurable on digital images, thus proving the connection between FD and SFD as well as their practical dependence.

I.

INTRODUCTION

In the IT-aimed research-developments of present days there are more and more processes that derive from fractals, programs containing fractal based algorithms as well as their practical results. Our topic is the introduction of ways of application of fractal dimension, together with the spectral fractal dimension, the possibilities of the new mathematical concept, and the introduction of its practical applications in image processing and remote sensing.

II.

THE FRACTAL DIMENSION

Fractal dimension is a mathematical concept which belongs to fractional dimensions. Among the first mathematical descriptions of self similar formations can be found von Koch’s descriptions of snowflake curves (around 1904) [20]. With the help of fractal dimension it can be defined how irregular a fractal curve is. In general, lines are one dimensioned, surfaces are two dimensioned and bodies are three dimensioned. Let us take a very irregular curve however which wanders to and from on a surface (e.g. a sheet of paper) or in the three dimension space. In practice [1-3], [9-24] we know several curves like this: the roots of plants, the branches of trees, the branching network of blood vessels in the human body, the lymphatic system, a network of roads etc. Thus,

irregularity can also be considered as the extension of the concept of dimension. The dimension of an irregular curve is between 1 and 2, that of an irregular surface is between 2 and 3. The dimension of a fractal curve is a number that characterises how the distance grows between two given points of the curve while increasing resolution. That is, while the topological dimension of lines and surfaces is always 1 or 2, fractal dimension can also be in between. Real life curves and surfaces are not real fractals, they derive from processes that can form configurations only in a given measure. Thus dimension can change together with resolution. This change can help us characterize the processes that created them. The definition of a fractal, according to Mandelbrot is as follows: A fractal is by definition a set for which the Hausdorff-Besicovitch dimension strictly exceeds the topological dimension [20]. The theoretical determination of the fractal dimension [1]: Let ( X , d ) be a complete metric space. Let A  H ( X ) . Let N ( ) denote the minimum number of balls of radius  needed to cover A . If

   LnN ( ) FD  Lim Sup  :   (0,  )   0    Ln(1 /  ) 

(1)

exists, then FD is called the fractal dimension of A . The general measurable definition of fractal dimension (FD) is as follows: L log 2 L1 (2) FD  S1 log S2 where L1 and L2 are the measured length on the curve, S1 and S2 are the size of the used scales (that is, resolution). III.

SPECTRAL FRACTAL DIMENSION

Nearly all of the practical methods measure structure, the definition and process described above gives (enough) information on the (fractal) characteristics of colours, or shades of colours. Fig. 1 bellow gives an example.

Fig. 1 The fractal dimension measured with the help of the Box counting of the two images is the same (FD=1.99), although the two images are different in shades of colour. The measured SFD of the two images show an unambiguous difference (SFD left side image=1.21, SFD right side image=2.49)

Measuring with the help of the Box counting the image on the right and the one on the left have the same fractal dimension (FD=1.99) although the one on the left is a black and white (8 bit) image whereas the other one on the right is a 24-bit coloured image containing shades as well - the original images can be found at http://www.digkep.hu/sfd/index.htm/, [24] -, so there is obviously a significant difference in the information they contain. How could the difference between the two images be proven using measurement on the digital images? Let spectral fractal dimension (SFD) be [6], [7]: L log S 2 LS 1 (3) SFD  S S1 log SS 2 where LS1 and LS2 are measured spectral length on Ndimension colour space, SS1 and SS2 are spectral metrics (spectral resolution of the image). In practice, N={1, 3, 4, 6, 8, 10, 12, 32, 60, 79, 126, 224, 242, 254, 488, 498, …}, see Table 1. TABLE 1 NUMBER OF LAYERS OR BANDS IN PRACTICAL IMAGES Type of images Number of layers or bands in practice /N/ Black and white or greyscale image 1 RGB, YCC, HSB, IHS colour space image 3 Traditional colour printer CMYK space 4 image Landsat TM, Landsat ETM satellite images 6 Professional photo printers space image 6, 8, 10, 12 DAIS7915 VIS_NIR or DAIS7915 SWIP32 2 airborne sensors COIS VNIR satellite sensor 60 DAIS 7915 all airborne sensor 79 HyMap airborne sensor 126 AVIRIS airborne sensor 224 Hyperion satellite sensor 242 AISA Hawk airborne sensor 254 AISA Eagle airborne sensor 488 AISA Dual airborne sensor 498

In practice the measure of spectral resolution can be equalled with the information theory concept of {Si=1, …, Si=16, where i=1 or i=2} bits. Typical spectral resolution: (4)  Threshold image -1 bit  Greyscale image - 2-16 bits  Colour image - 8-16 bits/bands On this basis, spectral computing is as follows: 1. Identify which colour space the digital image is 2. Establish spectral histogram in the above space 3. Half the image as spectral axis 4. Examine valuable pixels in the given N-dimension space part (N-dimension spectral box) 5. Save the number of the spectral boxes that contain valuable pixels 6. Repeat steps 3-5 until one (the shortest) spectral side is only one (bit). In order to compute dimension (more than two image layers or bands and equal to spectral resolution), the definition of spectral fractal dimension can be applied to the measured data like a function (number of valuable spectral boxes in proportion to the whole number of boxes), computing with simple mathematical average as follows [7]:

SFDmeasured 

S 1

log( BM j )

j 1

log( BT j )

n

(5)

S 1

where  n – number of image layers or bands  S - spectral resolution of the layer, in bits – see Eq. 4  BMj - number of spectral boxes containing valuable pixels in case of j-bits  BTj - total number of possible spectral boxes in case of j-bits The number of possible spectral boxes (BTj) in case of j-bits as follows: BT j  (2 S ) n (6) With Eqs. (5) and (6) the general measurable definition of spectral fractal dimension is as follows, if the spectral resolution is equal to all bands (SFD Equal Spectral Resolution – SFDESR), [7]: S 1 log( BM ) j n S n log(( 2 ) ) j 1 (7) SFDESR  S 1 If the spectral resolution is different in bands/layers, the general measurable definition of spectral fractal dimension (SFD Different Spectral Resolution – SFDDSR) is as follows [7]:

n SFDDSR 

(min( Si )) 1

log( BM j )

j 1

(



n

 Sk )

log(2 k 1 (min( Si ))  1

)

(8)

where,  Si - spectral resolution of the layer i, in bits During computing: 1. Establish the logarithm of the ratio of BM/BT to each spectral halving 2. Multiply the gained values with n (number of image layers or bands) 3. Find the mathematical average of the previously gained values A computer program that measures SFD parameter has been developed in order to apply the algorithm above. The measuring program built on this method has been developed in C++ environments. The SFD results measured by the program are invariant for identical scale pixels with different geometric positions in case the number of certain scales is the same and shade of colour is constant. Successful practical application of SFD at present [4-12], [1618], [24]:  Measurement of spectral characteristics of multispectral and hyperspectral satellite images  Measurement of spectral characteristics of multispectral and hyperspectral airborne images  Psychovisual examination of image compressing methods  Temporal examination of damage of plant parts  Classification of natural objects in multispectral and hyperspectral satellite and/or airborne images  Virtual Reality based 3D terrain simulation IV.

SFD AS METRICS

Beneath it will be proven that spectral fractal dimension-SFD generally defined above (3) and the SFDESR és SFDDSR introduced for different spectral resolutions are metrics, that is, it satisfies the following conditions: 1. non-negative definite, that is

Then, if P  A that is, the value or intensity of P (N dimension) equals a value or intensity of a point in set A, then

 SFD  A, P   0 , as  SFD  A   SFD  A  P  .  P1 , P2   0 condition is also satisfied, as SFD defined by (3) monotonously grows with the same S and n. Statement 2 - SFD according to (3) is symmetric This condition in the present case means that

 SFD  A, P    SFD P, A is satisfied. Let then

2.

if P1  P2

symmetric, that is

 P1 , P2    P2 , P1  3.

 SFD : SFD A  P   SFD A

If P  A then

SFD A  SFD A  P  that is  SFD  0 If P  A , but P  K , where K is the set of points of the image plane SFD( A  P)  SFD( A) that is

 SFD  SFD A  P   SFD A  0 ! Statement 3 - SFD according to (3) satisfies triangle inequality The above statement in the present case:

 SFD ( A, P2 )   SFD ( A, P1 )   SFD ( A, P2 )

(3.3)

Let according to 3.1

 SFD : SFD A  P   SFD A

 P1 , P2   0

 P1 , P2   0

(3.2)

Then,

SFD ( A, P2 )  SFD( A  P1 )  SFD( A)  SFD( A, P2 )  SFD( A) that is

SFD( A, P2 )  SFD( A)  SFD( A  P1 )  SFD( A, P2 )  2SFD( A)

satisfies triangle inequality, that is

 P1 , P3    P1 , P2    P2 , P3  Statement 1 - SFD according to (3) is non-negative definite Let  SFD : SFD A  P   SFD A (3.1) where A is an obtional subset of N dimension image plane, whereas P is an optional point of N dimension image plane.

Simplified:

0  SFD( A  P1 )  SFD ( A) which does satisfy, as SFD defined by (3) monotonously grows with the same S and n. Another condition to be satisfied by metrics is regularity. This means that the points of a discreet image plane are to be evenly dense. This condition, in the case of digital images, is usually fulfilled, or can be considered so. Based on the above calculations we have accepted that the

correspondence (3) as well as (7) and (8) give metrics, thus can directly be used for classifying digital images. V.

ESTIMATION OF SFD FOR DIGITAL IMAGES WITH FINITE SPATIAL RESOLUTION

Bellow, practical correspondence will be given for SFD measurements applicable for finite spatial resolution images (images supplied by CCD and CMOS sensors are all such). In the case of correspondence (3), (7) or (8), it can be directly identified that

0  SFD  n

that is, the value of SFD can be between 0 and the number of channels/layers used in the measurement. For further estimation, let us make use of the fact that the number of pixels in a digital image is known, let it be K,

K  X Y

THE CHANGE OF max(SFD) WITH FIXED K (K=21mp) S /bit/

16

14

12

10

8

max (SFD)

2,5078

2,6416

2,7812

2,9135

3,0000

Thus, SFD in itself is not a characteristic parameter of a sensor. Only K or only S are also not characteristic of the sensor independently. If correspondence (10) is multiplied by (S-1), the following value will be gained: (11)

The value of this quantity monotonously grows, if any two of S, K, or n are fixed and the third value grows. (11) includes all three characteristic parameters, so it can by itself be a characteristic value of any digital image sensors.

K  BT j that (9)

but if

K  BT j then the maximum of different spectral pixels is the number of pixels, then  S 1 log( BM j )   ( Z  1)  n    S n  j  Z log((2 ) )  (10) SFDESR  MAX  S 1 where it is true that

TABLE 3

 S 1 log( BM j )  SSRRCCD CMOS  n     ( Z  1)  S n  j  Z log((2 ) ) 

where K – is the number of pixels of the image X - is the width of the image in pixels Y - is the length of the image in pixels If

SFDmax  n

Based on (10), SFD depends on S, n and K, thus its value is different depending on CCD/CMOS sensor type. In the case of 2-dimension sensors n=3, thus SFD will be dependent on only 2 parameters (S, K). With fixed pixel images (K=21MP), with increase in the value of S, that of SFD will decrease (Table 3.).

1  Z  S 1

and Z is selected so that in the case of Z  1 , K  BT j be true. Let us see what correspondence (10) means in some practical cases (Table 2.): TABLE 2 SPATIAL AND SPECTRAL RESOLUTION IN PRACTICAL IMAGES Human eye Human Phase One Hasselblad EOS 1Ds 1. eye 2. P65+ H3DII-50 MIII x 8984 8176 5616 y 6732 6132 3744 S 21 bit 21 bit 16 bit 16 bit 14 bit K 120000000 2000000 60480288 50135232 21026304 n 3 3 3 3 3 SFD 2,3282 2,0486 2,5710 2,5597 2,6416 SSRR 48,8927 43,0207 41,1352 40,9558 36,9827

VI.

CONCLUSION

When examining digital images where scales can be of great importance (image compressing, psychovisual examinations, printing, chromatic examinations, etc.) SSRR is suggested to be taken among the so far usual (eg. sign/noise, intensity, size, resolution) types of parameters (eg. compression, general characterization of images). Useful information on structure as well as shades can be obtained applying the SSRR parameter. Several basic image data (aerial and space photographs) consisting of more than three bands are being used in practice. There are hardly any accepted parameters to characterize them together. I think SSRR can perfectly be used to characterize (multi-, hyper spectral) images that consist of more than three bands. On the basis of present and previous measurements it can be stated that SFD are significant parameter in the classification of digital images as well (SSFD – Supervised classification based on Spectral Fractal Dimension, USFD Unsupervised classification based on Spectral Fractal Dimension). SFD can be an important and digitally easily measurable parameter of natural processes and spatial structures [7], [16], [24]. The applied method has proven that with certain generalization of the Box method fractal dimension based measurements – choosing appropriate measures- give practically applicable results in case of optional number of dimension. It is therefore suggested that, in the case of digital image sensing devices, (S-1)*max(SFD) value, as Spatial and Spectral Resolution Range - SSRR, which includes all three

important parameters (number of sensor pixels, spectral resolution, number of channels), be launched. In the case of multispectral or hyperspectral images, the SFD value can be identified by bands/layers. Drawing a graph from these values, unique curve(s) can be obtained of the original images or the objects on them. These curves can be used independently as well, e.g. in the case of plants and minerals directories can be set up, similarly to spectrum directories based on reflectance. An advantage is that it gives information directly on the image recorded by the detector, as well as that analysing the curves (Fig. 2), information on image noises caused by the atmosphere can be obtained in the case of remote sensing aerial and space devices [17]. SFD value

16 bits SFD fingerprints by AISA DUAL /2007. 06. 19./ hyperspectral images

0,9100

0,8900

0,8700

0,8500

0,8300

0,8100

0,7900

0,7700

0,7500 401 427 453 480 507 534 561 589 617 645 672 700 728 757 785 814 842 871 899 928 956 99410321069110711451183122012581296133313711409144714841522156015981635167317111748178618241862189919371975201320502088212621632201223922772314235223902427

Wavelength /nm/ Uncultivated land SFD 16 bit

Wood SFD 16 bit

Road SFD 16 bit

Fig. 2 SFD wavelength-based 16-bit spectral curves “fingerprints” of uncultivated land, wood and road based on AISA Dual aerial data

REFERENCES [1] Barnsley, M. F., Fractals everywhere, Academic Press, 1998. [2] Barnsley, M. F. and Hurd, L. P., Fractal image compression, AK Peters, Ltd., Wellesley, Massachusetts, 1993. [3] Batty, M. and Longley, P. Fractal cities, Academic Press, 1994. [4] Berke, J., Fractal dimension on image processing, 4th KEPAF Conference on Image Analysis and Pattern Recognition, Vol.4, 2004, pp.20. [5] Berke, J., The Structure of dimensions: A revolution of dimensions (classical and fractal) in education and science, 5th International Conference for History of Science in Science Education, July 12 – 16, 2004. [6] Berke, J., Measuring of Spectral Fractal Dimension, Advances in Systems, Computing Sciences and Software Engineering, Springer pp. 397-402., ISBN 10 1-4020-5262-6, 2006. [7] Berke, J., Measuring of Spectral Fractal Dimension, Journal of New Mathematics and Natural Computation, ISSN: 1793-0057, 3/3: 409-418, 2007. [8] Berke, J. and Busznyák, J., Psychovisual Comparison of Image Compressing Methods for Multifunctional Development under Laboratory Circumstances, WSEAS Transactions on Communications, Vol.3, 2004, pp.161-166. [9] Berke, J., Spectral fractal dimension, Proceedings of the 7th WSEAS Telecommunications and Informatics (TELE-INFO ’05), Prague, 2005, pp.23-26, ISBN 960 8457 11 4. [10] Berke, J., Wolf, I. and Polgar, Zs., Development of an image processing method for the evaluation of detached leaf tests, Eucablight Annual General Meeting, 24-28 October, 2004. [11] Berke, J. and Kozma-Bognár V., Fernerkundung und Feldmessungen im Gebiet des Kis-Balaton I., Moorschutz im Wald / Renaturierung von Braunmoosmooren, Lübben, 2008. [12] Berke, J., Polgár, Zs., Horváth, Z. and Nagy, T., Developing on Exact Quality and Classification System for Plant Improvement, Journal of Universal Computer Science, Vol.XII/9, 2006, pp. 1154-1164. [13] Burrough, P.A., Fractal dimensions of landscapes and other environmental data, Nature, Vol.294, 1981, pp. 240-242. [14] Buttenfield, B., Treatment of the cartographic line, Cartographica, Vol. 22, 1985, pp.1-26. [15] Encarnacao, J. L., Peitgen, H.-O., Sakas, G. and Englert, G. eds. Fractal geometry and computer graphics, Springer-Verlag, Berlin Heidelberg 1992.

[16] Kozma-Bognár, V., Hegedűs, G., and Berke, J., Fractal texture based image classification on hyperspectral data, AVA 3 International Conference on Agricultural Economics, Rural Development and Informatics, Debrecen, 20-21 March, 2007. [17] Kozma-Bognár, V. and Berke, J., New Applied Techniques in Evaluation of Hyperspectral Data, Georgikon for Agriculture, a multidisciplinary journal in agricultural sciences, Vol. 12./2., 2008, preprint. [18] Kozma-Bognár, V., Hermann, P., Bencze, K., Berke, J. and Busznyák, J. 2008. Possibilities of an Interactive Report on Terrain Measurement. Journal of Applied Multimedia. No. 2/III./2008. pp. 33-43., ISSN 17896967. http://www.jampaper.eu/Jampaper_ENG/Issue_files/JAM080202e.pdf. [19] Lovejoy, S., Area-perimeter relation for rain and cloud areas, Science, Vol.216, 1982, pp.185-187. [20] Mandelbrot, B. B., The fractal geometry of nature, W.H. Freeman and Company, New York, 1983. [21] Peitgen, H-O. and Saupe, D. eds. The Science of fractal images, SpringerVerlag, New York, 1988. [22] Schowengerdt, R. A. 2007. Remote Sensing Models and Methods for Image Processing. Elsevier. ISBN 13: 978-0-12-369407-2. [23] Turner, M. T., Blackledge, J. M. and Andrews, P. R., Fractal Geometry in Digital Imaging, Academic Press, 1998. [24] Authors Internet site of parameter SFD http://www.digkep.hu/sfd/index.htm.