Digital Image Processing using. MATLAB and STATISTICA. Emilia Dana Seleţchi
1, Octavian G. Duliu 1. 1University of Bucharest, Faculty of Physics,.
The 2nd International Conference on Virtual Learning, ICVL 2007
1
Digital Image Processing using MATLAB and STATISTICA Emilia Dana Seleţchi 1, Octavian G. Duliu 1 1 University of Bucharest, Faculty of Physics, Department of Atomic and Nuclear Physics, Bucharest, ROMANIA E-mail:
[email protected] Abstract By using MATLAB 7.0.1., in a wide range of applications including image processing and visualizing data we performed statistical function such as: mean median, range and standard deviation, displaying image histogram and plotting the profile of intensity values on an X-ray CT scan. The plot fits panel allowed us to visually explore multiple fits to the current histogram data. We have been also created 2-D Stem Plots, Bar Plots (Plotmatrix), Polar Plots, Contour Plot, Vector Fields Graphs(Feather Graph and Compass Graph) and 3-D Surface Plot. STATISTICA 7.0 has been used to generate Normal Probability Plots, Scatter Icon Plots, 3-D Sequential graphs (Surface Plot and Contour Plot) and to apply multiple exploratory techniques such as Cluster Analysis.
Keywords: Stem Plot, Plotmatrix, Polar Plot, Feather Graph, Compass Graph, Normal Probability Plot, Scatter Icon Plot, Cluster Analysis
1. Introduction MATLAB is a high-level technical language and interactive environment for data analysis and mathematical computing functions such as: signal processing, optimization, partial differential equation solving, etc. It provides interactive tools including: threshold, correlation, Fourier analysis, filtering, basic statistics, curve fitting,, matrix analysis, 2D and 3D plotting functions. The operations for image processing allowed us to perform noise reduction and image enhancement, image transforms, colormap manipulation, colorspace conversions, region-of interest processing, and geometric operation. The toolbox functions implemented in the open MATLAB language can be used to develop the customized algorithms. STATISTICA software provides advances linear/nonlinear models, multivariate exploratory techniques (Cluster and Canonical Analysis), Industrial Statistics and Six Sigma Methods. The digital images processing were performed on medicine studies.
2. MATLAB 7.0.1. Applications 2.1. Image Processing An X-ray Computed Tmography (CT) image is composed of pixels, whose brightness correspondsto the absorbtion of X-rays in a thin rectangular slab of the cross-secton, which is called a ’’voxel’’ [1,2]. The Pixel Region tool provided by MATLAB 7.0.1. superimposes the pixel region rectangle over the image displayed in the Image Tool, defining the group of pixels that are displayed, in extreme close-up view, in the Pixel Region tool window. The Pixel Region tool shows the pixels at high magnification, overlaying each pixel with its numeric value. For RGB images, we find three numeric values, one for each band of the image. We can also determine the current position of the pixel region in the target image by using the pixel information given at the bottom of the tool. In this way we found the x- and ycoordinates of pixels in the target image coordinate system. The current position of the pixel region rectangle is also carried out by selecting the Copy Position option from the Pixel Region tool Edit menu (Fig.1.).
The 2nd International Conference on Virtual Learning, ICVL 2007
2
Figu ure 1. – Image details, Metaddata and Pixel Region R of an X-ray X CT scan
The Image Proceessing Toolboox provide a reference-sttandard algorrithms and graphical g tools for image anaalysis tasks in ncluding: edge-detection annd image segmentation alggorithms, imaage transform mation, measuringg image featu ures, and statistical functions such as caalculating the X-ray CT im mage mean, median m standard deviation, d ran nge, etc., (Figg. 2.) displaying the imagee histogram (Fig.3) ( or plootting the proffile of intensity values v (Fig. 4.a,b). 4
a)
b) Figure 2.- Data statisstics of an X-raay CT scan perfformed by: (a) MATLAB 7.00.1. (b) STATISTICA 7.0 (Tree Clusster Analysis)
The 2nd International Conference on Virtual Learning, ICVL 2007
3
Figure 3. – The Histogram showing the number of pixels distributed on X-ray CT image (y-axis) for each level (gray value) and the plot fits (significant digits: 2)
a)
b) Figure 4. - Line Plots of X-ray CT scan: (a) on ox axes, (b) on oy axes
The Plotmatrix generates rows and columns of scatter plots (Fig. 5.a,b) The 2-D Stem Plot displays data as lines (stems) extending from a baseline along the x-axis and terminated with a marker symbol at each data value (Fig. 6. a,b). The polar coordinate system is especially useful in situations where the relationship between two points is most easily expressed in terms of angles and distance (Fig. 7. a,b).
The 2nd International Conference on Virtual Learning, ICVL 2007
a)
4
b)
Figure 5. – Bar B Plots: (a) Plotmatrix P geneerated with thee histogram vallues of X-ray CT C scan, (b) Plo otmatrix generaated with plot profile p values (on ox axes) of X-ray CT scaan
a)
b)
Figure 6. – 2-D Stem Pllots created wiith (a) histogram m values of X--ray CT scan (bb) plot profile values v (on ox axes) a of X-ray X CT scan
a)
b)
g with (a) histogram values of X-raay CT scan (b) plot profile vaalues (on ox axees) of Figure 7. – Ploar Plots generated X--ray CT scan
The 2-D Contour Graph displaay isolines of a surface reepresented byy a matrix. 2-D Filled Coontour Graph (coontourf) plot displays isoliines calculateed from matriix Z and fillss the areas beetween the isoolines using connstant colors [3]. [ The colorr of the filledd areas dependds on the currrent figure's colormap c (Figg. 8.). 3-D Contoour Graph (ccontour3) creates a 3D conntour plot of a surface deffined on a recctangular gridd (Fig. 9.). The 3-D Surface Plot display a matrix m as a suurface (Fig. 10).
The 2nd International Conference on Virtual Learning, ICVL 2007
5
a)
b)
Figure 8. – 2-D Filled Contour C Graph generated with (a) histogram m values of X-rray CT scan (bb) plot profile values v T scan (on ox axees) of X-ray CT
a a) b) Figure 9. – 3-D Contourr Graph generaated with (a) hiistogram valuees of X-ray CT scan (b) plot profile p values (on ( ox axes) of o X-ray CT scan
a)
b)
Figure 100. – 3-D Surface Plots generaated with (a) hiistogram values of X-ray CT scan (b) plot profile p values (oon ox axes) of o X-ray CT scan
Feathher Graph dissplays vectors emanating from equallyy spaced poinnts along a hoorizontal axiss (Fig. 11). The Compass graaph displays the vectors with componnents (U,V) as arrows em manating from m the origin. U,, V, and Z aree in Cartesiann coordinates and plotted on o a circular grid. g The n arrrows indicates the n number of elements in U or V. Thhe location of the base of each arrow iss the origin. The T location of the tip of eachh arrow is a point p relative to t the base annd determinedd by [U(i),V(ii)] (Fig. 12).
The 2nd International Conference on Virtual Learning, ICVL 2007
a)
6
b)
Figure 11. – Vector Fieelds-Feather Graphs G generateed with (a) histtogram values of X-ray CT scan (b) plot proofile values (on ox axes) of X-rayy CT scan
a)
b)
Figure 122. – Vector Fiellds-Compass Graphs G generatted with (a) hisstogram valuess of X-ray CT scan s (b) plot prrofile values (on ox axes) of X-rayy CT scan
3. STAT TISTICA 7.0 0. Applicatioons STAT TISTICA software providdes several methods m in which w graphss can be requuested or defined. These meethods ensure a high level of o integrationn between num mbers such ass: raw data, inntermediate results r or final reesults and prroduce highlyy customized graphical dissplays. The 2D 2 graphs innclude a very wide variety off both commo on and uniquee graphs typess. Icon Plots represeent individuall units of obsservation as particular p graaphical objectts where valuues of variables are distributed to specifiic features orr dimensions of the objeccts. The valuues of variables in circular iccon plots form mat (Polygonn Icons) are represented r b distances between by b the center c (hub) of o the icon and its i edges. Icon n plots were used u in order to find system matic patternss or clusters of o observationns and to exploree possible com mplex relationns between seeveral variables (Fig. 13.a,bb).
The 2nd International Conference on Virtual Learning, ICVL 2007
a)
7
b)
Figure 13. - Scatter Icon n Plots based onn histogram vaalues of X-ray CT image (Sellected variables for X, Y, Icoon and Weeight: 1, 1, 1-2, 1) (a) Polygoons, (b) Lines
We ca also perfo orm the obserrved cumulatiive distributioon function versus the theooretical cumuulative distributioon function in n order to esttimate the fitt of the theorretical distribuution to the observed o dataa. The Probabilitty-Probability Plots indicatte where the data points do and do not n follow thee distributionn. The theoreticaal cumulative distribution approximates ap t observed distribution well the w if all poinnts in the grapph fall onto the diagonal linee. The Norm mal Probability Plots were w used to evaluate thee normality of o the distributioon of a variablle (Fig. 14. a). The normal distribution fuunction is wriitten: (1)
⎡ 1⎛ x −μ⎞2 ⎤ 1 f(x) = exp ⎢− ⎜ ⎟ ⎥ σ 2π ⎢⎣ 2 ⎝ σ ⎠ ⎦⎥
where σ is the standaard deviationn and µ is the t mean. Thhe 2D Detreended Probaability Plots were constructeed in the sam me way as thhe standard normal n probaability plot, except e that beefore the ploot was created, thhe linear tend dency was rem moved (Fig. 14.b).
a)
b) Figure 14. 1 a,b – Normaal Probability Plot P created wiith histogram values v of X-rayy CT image, Seelected variablee: 1, Graph type: (aa) Normal (b) Detrended D
The 3D Sequentiial Graphs are a unique suubset of 3D graphs showing representtations of muultiple nd /or their vaariability. Thee Surface Ploot fits a splinee-smoothed suurface to eachh data sequencess of values an point (Figg. 15.a). The Contour Ploot represents a 2D projectiion of the splline-smoothedd surface fit to t the data, wheere successive values of each series are a plotted allong x-axis and a each succcessive seriees are representeed along the y-axis y (Fig. 155.b).
The 2nd International Conference on Virtual Learning, ICVL 2007
a a)
8
b)
Figure 155.- 3D Sequenttial Graph (Advvanced 3D Raw w Data Plot) baased on histogrram values of X-ray X CT imagge (a) Graaph Type: Surfaace (b) Graph type: t Contour
4. Conclusions MAT TLAB provid de interactive tools and coommand-line functions foor analysis off medical im maging data suchh as: basic staatistics, matriix analysis annd curve fittinng, allowing us to visualiize vectors off data with both 2-D and 3-D D plotting funnctions. STAT TISTICA has been also used to reveal the t wide varieety of graphs inccluding: Norm mal Probabiliity Plots, Scattter Icon Plotts and 3-D Seequential Grapphs generatedd with histogram m values. The Tree Clusterring Algorithm m joins togetther objects into i successivvely larger cluusters by using Euclidean distances. d Theese multivariiate exploratoory techniquees and imagee processing tools carried-ouut the variablees of a complex system.
5. Refereences [1] [2] [3] [4] [5]
Bisttriceanu, E.G G. (1996): Priincipiile Matematematice şi Fizice alee Tomografieei Computerizzate, Mattrix ROM, Bu ucureşti. Webbb, S. (1996): The Physicss of Medical Imaging, I Insttitute of Physiics Publishingg, London. Moshe Y. (2004)) – GUI with Matlab, Signnal and Imagee Processing Laboratory L MA ATLAB 7.0.1.. – The Languuage of Technnical Computting STA ATISTICA 6..0 software, STATISTICA S A Electronic Manual M