Medical Image Enhancement by Using Cellular Neural Networks
Total Page:16
File Type:pdf, Size:1020Kb
Medical Image Enhancement by using Cellular Neural Networks A Gacsádi, C Grava, A Grava University of Oradea, Romania z Abstract U • xij xij yij The paper presents a medical image enhancement uij B + ∫dt f(x) method taking the noise reduction and the contrast xij enhancement into consideration, as well as the possibility of implementation on an existing cellular neural network A Y universal chip (CNN-UC), in a single step, by using only linear templates of 3×3 dimensions. Due to complete parallel processing, computing-time reduction is Figure 1. System structure of a cell Cij. achieved. In Figure 2, the signal flow structure of a CNN with a 3×3 neighborhood [2]. 1. Introduction z The problem of medical image enhancement, became more and more important in the last decade. Another A challenging in medical imaging is to obtain real-time B applications. In this paper we propose a fully-parallel f(x) solution to achieve the medical image enhancement. The method, based on Cellular Neural Networks U (INPUT) X (STATE) Y (OUTPUT) (CNN) [1], is suitable for real-time processing. Figure 2. Signal flow structure of a CNN with a 3×3 Cellular Neural Networks (CNN) [1], CNN-Universal neighborhood. Machine’s (CNN-UM) [2] architecture and CNN Universal-Chip (CNN-UC) [3] has proved to be a 2. PDE image processing competing alternative to classical computational techniques. A Cellular Neural Network is a 2-dimensional Generally, the image processing tasks could be rectangular structure, composed by identical analogical described by a PDE (Partial Differential Equation). non-linear processors, named cells [2]. The CNN allows Whatever the image processing described by a PDE is, a fully-parallel image processing, a given processing being considerable computing power is necessary. Regarding executed simultaneously for the entire image. this problem, the Cellular Neural Networks (CNN [1]) The state equation of a cell is [1]: proved to be very helpful regarding the real-time image processing, as well as solving some partial differential • dxij x = = −x + ∑ A ⋅ y + ∑ B ⋅u +z (1) equations [4,5]. Reduction in computing time due to dt ij lk,ij lk lk,ij lk ij Clk ∈Nr Clk ∈Nr parallel processing, can be obtained only if the processing where xij represent the state, uij is the input, yij is the algorithm can be implemented on a Cellular Neural output and zij is the threshold of the cell (i,j). Aij,kl is the Networks-Universal Chip (CNN-UC [3]), having the feed-back operator and Bij,kl is the input operator. The architecture of a Cellular Neural Networks-Universal ensemble (A, B, z) is named template. Clk are the cells Machine (CNN-UM [2]). from a r-order neighborhood Nr of the cell (i,j): Recently, the interest in using partial differential N ( j,i ) = { C ( k,l ) max{ l − k,i − j }≤ r} (2) equations (PDE-s) has grown in the field of image r processing and analysis [6,10]. Let us consider a gray- with 1≤i,l≤L, 1≤j,k≤K, r≤min(L,K). K and L are the 2 scale image Φ0(x,y), Φ0: R →R. The processing of this dimensions of the network. image, according to an algorithm based on an operator, The structure of a cell Cij is presented in Figure 1: can be described by the following partial differential equation: 0276−6547/05 $20.00 © 2005 IEEE 821 Computers in Cardiology 2005;32:821−824. ∂Φ and that the characteristics obtained from the initial image = F []Φ()t,y,x , (3) ∂t are predominant. The image enhancement method proposed in the paper aims at this purpose, as well as the where an artificial parameter t has been used and F is possibility of direct implementation on an existing CNN- the operator which characterizes the desired processing 2 UC, in a single step, using only linear templates of 3×3 algorithm (F: R →R). In general, function F depends on dimension. the initial image, and its first and second order spatial Let us consider the energy function E defined as derivatives. The final image is obtained from processing follows [7,16]: as a solution of this partial differential equation. The partial differential equation can be obtained from 2 (8) E()Φ,G = ∇Φ dxdy + λG variational problems. The image results from the ∫∫ Smoothness Edge minimization of a cost function: Constraint Penalty Φ , (4) arg{Min Φ E( )} Minimizing function E requires estimating two where E is a given energy function. Minimizing E, Φ processes, the continuous segmented field, Φ and a binary can be obtained from the condition: F(Φ)=0, which edge process, G where λ is a scalar parameter; it contains results in a steady state solution of the equation: two terms, smoothness constraint and the edge penalty. ∂Φ Thus, the function formalizes a tradeoff between image = F ()Φ , (5) ∂t smoothness (denoising) and edge detection (deblurring). where t is also an artificially introduced parameter. Aintpol2.tem is resulted based on the constrain The PDE formulation of image processing gives us the conditions presented in paper [11] through the possibility of combining the algorithms. If, e.g. two minimization of the energy smoothness term. distinct processing are given by the equations: Aintpol2.tem has only template A: 0 0.25 0 ∂Φ ∂Φ A = 0.25 0 0.25 = F1 []Φ()t,y,x and = F2 []Φ()t,y,x , (6) ∂t ∂t 0 0.25 0 a complex image processing is resulted by the (9) combination of these equations as follows: In the first approximation, in order to implement the ∂Φ method on a single CNN layer, the cost function = F1 + λ F2 , (7) corresponding to the edge penalty term is chosen ∂t similarly to the smoothness term with the opposite sign. where λ ∈R+. The differential equation (7) can be Template B and z result in the same design constrain obtained from the minimization of energy E1+λE2, if F1 condition [11]: and F2 result from the minimization of energies E1 and 0 -1 0 E . 2 B = -1 4 -1 z =0 3. PDE image processing using CNN 0 -1 0 (10) The design of adequate templates is necessary in order The following template (enhan.tem) result from to use CNN for gray-scale image processing. The design relations (6,7,8): (11) is even more difficult if we take the fact that the CNN 0 0.25 0 0 0 chips have certain limits into account, namely, single -λ layer processing is supported and linear templates of 3×3 A = 0.25 0 0.25 B = -λ 4*λ -λ z = 0 dimension can be used. The templates for gray-scale 0 0.25 0 0 -λ 0 images can be designed by making a minimization of the energies or the cost functions [11], but we must where λ is a scalar parameter which defines the ratio frequently take necessary additional conditions for CNN between smoothness and contrast enhancement. processing into consideration. Smoothness is dominant for values of λ lower than one, The proposed adaptive image enhancement presumes while for values greater than one, the contrast that the attached transfer function depends on the local, or enhancement predominates. in some cases the regional, intensity level and contrast. The image processing is based on an iterative algorithm. The adaptive image enhancement presumes also that the number of imposed parameters at the beginning of the algorithm should be as small as possible, 822 4. Results of testing the adaptive image For edge detection, the same template edgegray.tem enhancement was used [17]. It can be observed that the edge detection is satisfying, robust, only for the globally scaled image In this section the experimental results obtained by and for the preprocessed image using enhan.tem using the “CadetWin” (CNN Application Development In the case of Computer Tomograph (CT) images Environment and Toolkit under Windows [17]) are enhan.tem can be used for low contrast image presented. Let us consider an image with low contrast and enhancement (see Figure 5). noise (see Figure 3a). a b c a b c Figure 5: (a) low contrast initial image; (b) enhanced image; (c) global scaled image. In the case of low contrast cardiac images we can use the same templates. The results are presented in the figure 6 d e f and 7. Figure 3: (a) initial image; image resulted by using enhan.tem ((b) with λ=0; (c) with λ=2; (d) with λ=0.05; (e) with λ=0.4; (f) with λ=1.5). This image will be processed by using templates that result from (6) for the different values of λ. If λ=0 only the averaging of image is produced (Figure 3b), which produces the lost of the edges. The local contrast is maximum if λ=2, which determines that the pixels can a b have almost only extreme values +1 or –1. In Figure 3c,d,e the results of the initial image processing for: Figure 6: (a) low contrast initial image; (b) enhanced λ=0.05, λ=0.4 and λ=1.5, respectively are presented. image using enhan.tem. The evaluation of the processing method’s performances can also be made if the image, which results from the edge detection, is analyzed (Figure 4). a b a b c Figure 7: (a) low contrast initial image; (b) enhanced image using enhan.tem. d e f Figure 4: (a) initial image; (b) global scaled image; (c) enhanced image using enhan.tem; (d) edge detection on the initial image; (e) edge detection on the global scaled image; (f) edge detection on the enhanced image.