Reading and processing an image in DICOM format is an important issue for further the diagnostic imaging and visualization. In this article, we focus on describing the edge detection techniques of INMOFEVV - our new software which combines Insight Toolkit (ITK), Visualization Toolkit (VTK) and Qt software development framework.
Kỹ thuật điều khiển & Điện tử EDGE DETECTION TECHNIQUES FOR MEDICAL IMAGE PROCESSING USING A NEW TOOL – INMOFEVV Ha Quang Thanh1*, Ho Thi Thao 2, Le Tuan Anh2, Phan Viet Cuong2, Nguyen Hong Ha2 Abstract: Reading and processing an image in DICOM format is an important issue for further the diagnostic imaging and visualization In this article, we focus on describing the edge detection techniques of INMOFEVV - our new software which combines Insight Toolkit (ITK), Visualization Toolkit (VTK) and Qt software development framework The edge tool's purpose is tracking the contours of the area of interest as well as enhancement the images quality and performing advanced image processing Keywords: DICOM, INMOFEVV, Image Processing, Edge detection, ITK, VTK, QT INTRODUCTION In medical imaging analysis, edge detection is a fundamental task that needs to point out the true edges to get the best results The image edge detection refers to extraction of the edges for the analysis of anatomical organs and anomalies like tumor, lesion, cyst [1,2] The purpose of this process is to find points where intermittent or varying intensity occurs significantly Edges are the boundary between the object of interest and the surrounding background And it represents the contour of that object There are many approaches used in many researches to evaluate the effectiveness of edge detection methods Nadeem Mahmood et al [3] proposed many detection methods for articular cartilage on the knee joint image segmentation using MATLAB This paper showed that Canny approach is very effective with the given images as compared to other methods Zhao Yu-qian et al [4] have concluded that the algorithm based on morphology edge detector is a powerful tool for the detection of lung CT images The method proposed by Krit Somkantha [5] required intensity gradient and texture gradient features for edge detection But this approach causes fake edges on the image Jamil A M Saif et al [6] use a detection procedure in which edges are detected using many gradient operations on MR and endoscopic images The canny downside is the over-detection leads to confusion of significant areas with low contrast boundaries Edge detection will significantly reduce the amount of data that needs to be processed eliminate unnecessary information while still ensuring the critical properties of the image structure The basis of the edge detection methods is used in this research for processing fused DICOM images in order to delimit the edges of the hyper-uptake regions of radiopharmaceuticals [7] Edge has detected according to some early brought forward algorithms such as gradient-based algorithm and template based algorithm, but they are not so good for thin edge features of the noisy medical image In order to overcome this problem, adaptive threshold using Canny, Sobel, and Laplace of Gauss has proposed These three algorithms are compared to each other and their performance is evaluated using the evaluation metrics The computational process is performed by INMOFEVV, that was developed by us based on ITK, VTK and Qt tools In addition to the edge enhancing and edge detection, extract edge points and filter out some meaningless noise points, respectively This paper is organized as follows: Section proposes and compares four edge enhancement approaches for sharpening thin edge details in low contrast regions Section describes the results Conclusions are given in Section 76 H Q Thanh, …, N H Ha, “Edge detection techniques … using a new tool - INMOFEVV.” Nghiên cứu khoa học công nghệ EDGE DETECTION METHODS Edge detection is a basic tool used in many image processing applications This is the preparation step for extracting features and segmenting of the objects in the image Its result is a set of edges that covered the entire image or a set of contours extracted from the image [2,4] In medical images, edge detection helps us to detect the boundary of the tumor and will lead to finding the exact location of tumor Edges are basically sharp intensity transitions between pixels, mark the pixel as boundary element and redraw the image with only the edges showing 0 33 0 45 78 45 23 33 0 42 76 0 38 (1) The boundaries of the image are defined as the place where the brightness changes rapidly or officially have a discontinuity [8] The edge map is known as the image of these boundaries information In this paper, three edge detection techniques are applied to obtain the optimal edges as follows: • Canny edge detector • Sobel edge detector • Laplacian of Gaussian 2.1 Canny edge detection The Canny edge detection algorithm is widely used for image segmentation based on a set of criteria, which include finding the most edges by minimizing the error rate, localization, and noise robustness Also, the result detected by Canny edge detection algorithm reduce the loss of edge component and the error between the detected edge and the real gradient on the original image To achieve all three criteria above, Canny is implemented as a multi-step method It includes Gaussian smoothing to remove noise by (2), calculation of gradient magnitudes of the boundaries that have been smoothed, removing the points is not the maximum, and finally, removing the values below the threshold The Gaussian filter is determined by the value of standard deviation Consider that: G ( x, y ) 2 e x2 y 2 (2) Calculate the average magnitude Consider: M ( x, y ) M m M x ( x, y ) M y ( x, y ) (3) where M x and M y are the average magnitudes of the horizontal and vertical gradient, respectively Tạp chí Nghiên cứu KH&CN quân sự, Số 55, 06 - 2018 77 Kỹ thuật điều khiển & Điện tử Calculate the density of the edge length The density of the edge length is: L ( x, y ) C ( x, y ) max C ( x, y ) (4) where C ( x, y ) is the number of connected pixels for each pixel position [9] The disadvantage of this method is that choosing too low thresholds will create the wrong edges Conversely, if the threshold is too high, many important information of edges will be eliminated Based on predefined thresholds, we will decide which points will be boundary and which points are not boundary 2.2 Sobel edge detection Sobel edge detection is used to sharpen the image because this will help us to detect the boundary of the tumor by sharpening the edges This is a gradient-based segmentation technique and suitable for the images that have higher intensity value The equation of gradient magnitude used in region growing segmentation is, to get the edge magnitude S (using S1 and S are horizontal and vertical orientation kernels of gradient): S S12 S12 (5) Where: 1 2 1 S1 H * 0 1 1 (6) 1 S H * 2 1 S1 : horizontal gradient component → corresponding result from row mask S : vertical gradient component → corresponding result from column mask H is original image [9] To get the edge direction : S1 S2 arctan (7) 2.3 Laplacian of Gaussian The Laplacian of Gaussian was combined Gaussian kernel with the Laplacian In this method, all the second derivatives of an image are computed independently in the same way The Laplacian kernels detect edges by highlighting fast-varying areas This allows the boundary to be determined based on the value of of the second derivatives Often, the Laplacian of an image is applied to an image with a smoothing step first in order to reduce its sensitivity to noise LoG allows for a wider area around the image being 78 H Q Thanh, …, N H Ha, “Edge detection techniques … using a new tool - INMOFEVV.” Nghiên cứu khoa học công nghệ studied to more accurately determine the boundary location The Laplacian L( x, y ) of an image with pixel intensity values I ( x, y ) [10] is given by (8): 2I 2I L ( x, y ) x y (8) The disadvantage of this approach is that the orientation of the boundary due to two Laplacian filters is too different The commonly used 3x3 small kernels are shown in equation 1 1 1 8 1 1 1 (9) 1 1 4 1 1 The kernels are approximately a measurement of second derivative, so they are very sensitive to noise Like Canny method, the image is usually applied Gaussian to smooth before using Laplacian kernel RESULTS 3.1 Technologies • Structure of the INMOFEVV software is developed on three tools: User Interface library: Qt Visualization library: Visualization Toolkit (VTK) 7.1.0 Image processing library: Insight Toolkit (ITK) 4.11.0 Figure Interface of INMOFEVV software Tạp chí Nghiên cứu KH&CN quân sự, Số 55, 06 - 2018 79 Kỹ thuật điều khiển & Điện tử 3.2 Implementation In this paper, Sobel, Canny, LoG edge detection operators have been implemented on a phantom, DICOM images and slices of brain tumor image and the results are presented in Figure 2, Figure and Figure 4, respectively Figure Original (a), Sobel (b), Canny (c) and LoG (d) algorithms implemented on Gamex 463 phantom take from Kien Giang Cancer Hospital Most edge detectors rely on the use of a set of convolution masks for image processing And a common disadvantage found in the above-mentioned approaches was that some thin edge details in the image were eliminated, for example, fine intensity differences in lowcontrast regions (where the brightness was too dark or too bright) If these thin edge details were pruned, subsequent processing algorithms may perform poorly or inaccurate results For Canny edge detection, we set threshold value equal to 0,25 At this value, the edge smoothly detected on the image and localizing them correctly The important structure of the image almost lost when the value of more than 0,25 In Figure 2c, 3c, 4c we can see a good view of the bone structure The drawback of the Canny’s algorithm is it generates lots of spurious edges corresponding to weak edge points in the image The borders are not smooth and thin Canny edge detectors also include complex computations and are timeconsuming As for LoG edge detector, which uses the second derivative, finds the exact location of edges and tests wider area around the pixel LoG can detect smooth edges However, It creates some defects in the detection of contour features in the corner Because LoG uses the Laplacian filter, it can not find edge orientation And it causes deviations in angles of varying intensity Result did not show the necessary information because most of them lost the important structure But LoG method still can show the shape of bone and part of the area of tissues, which are shown in Figure 2d, 3d, 4d The simplicity, detecting edges having high spatial frequencies and certain orientations are the advantages of the Sobel operator The Sobel method provides quantity closely to the gradient magnitude Another advantage of the Sobel operator is, it can preserve thin edge details successfully in low-contrast regions, as well as other apparent edges It also removes most of the incorrectly detected edge features, and the processed results are shown in Figure 2b, 3b, 4b But, Sobel operator is sensitive to high-frequency noise 1, 80 H Q Thanh, …, N H Ha, “Edge detection techniques … using a new tool - INMOFEVV.” Nghiên cứu khoa học công nghệ 2, 3, 4, 5, a, b, c, d, Figure Original (a), Sobel (b), Canny (c) and LoG (d) algorithms implemented on DICOM images (1,3) of patient Le Tuong M with head ;(2,4) of patient Le Quang T with abdomen , take from Da Nang Hospital; (5) take from ITK example data [12] 6, Tạp chí Nghiên cứu KH&CN quân sự, Số 55, 06 - 2018 81 Kỹ thuật điều khiển & Điện tử 7, 8, 9, 10 , a, b, c, d, Figure Original brain tumor (a), Sobel (b), Canny (c) and LoG (d) algorithms implemented on brain tumor images take from [13] To evaluate the quality of the segmentation, the mean square error (MSE) (10) and the peak signal to noise ratio (PSNR) (11) are computed [11] Mean Square Error evaluates the difference between edges obtained by computation and real edges PSNR calculations the peak signal to noise ratio between two pixels in decibels The higher the PSNR, the better the quality of the data This is used for two-dimensional images of the size M.N where f and f ' are the original image and the restored image respectively MSE NM N 1 M 1 f (i, j ) f i 0 j 0 PSNR 10 log 2552 MSE ' (i, j ) (10) (11) 82 H Q Thanh, …, N H Ha, “Edge detection techniques … using a new tool - INMOFEVV.” Nghiên cứu khoa học công nghệ Table shows the result of different edge detection techniques As can be seen in Table and Figure 5, Sobel method gives the smallest MSE result and the PSNR has the greatest value compared to other methods in most cases This again verifies that the Sobel algorithm outperforms other approaches overall Method LoG shows clearer lines of the boundary, the MSE and PSNR were relatively good Table Results of MSE and PSNR Image MSE PSNR Canny Sobel LoG Canny Sobel LoG Phantom 5233.31 4945.53 15938.56 10.94 11.19 6.11 13801.34 12986.36 8937.77 6.73 7.00 8.62 12609.54 7175.82 7295.70 7.12 9.57 9.50 5427.54 3364.71 3568.86 10.78 12.86 12.61 13132.92 7295.33 7437.39 6.95 9.50 9.42 11149.94 7625.18 10029.33 7.66 9.31 8.12 7398.92 3889.43 9800.15 9.44 12.23 8.22 9811.84 6920.64 7471.96 8.21 9.73 9.40 6972.22 3951.77 8161.47 9.70 12.16 9.01 8527.46 5650.90 11958.56 8.82 10.61 7.35 10 8987.58 5676.64 8607.84 8.59 10.59 8.78 Figure Comparision of PSNR CONCLUSIONS Edge detection is one of the fundamental tools in image processing, machine vision and computer vision, which aim at identifying points in a digital image Many methods have been proposed to extract the contour features in an image Tạp chí Nghiên cứu KH&CN quân sự, Số 55, 06 - 2018 83 Kỹ thuật điều khiển & Điện tử Each method has its advantages and disadvantages Depending on the characteristics and properties of the image, that the user applies them accordingly We can see that Sobel method can produce the equally good edge with the smooth continuous pixels and thin edge Canny detects the edges in the image completely, including weak edges All three methods are also sensitive to the noise From our analysis, we have shown that between Sobel, Canny and LoG edge detection algorithms, the response given by Sobel edge detection was better than result of other methods used in these CT, MRI images This article points out the strengths and weaknesses of the three border detection algorithms: Canny, Sobel, LoG It then offers Sobel method suitable for each type of medical image to produce the best segmentation result in all cases In the future, we will focus on studying new algorithms more optimally and finishing the INMOFEVV software with featuring enhancement, segmentation, 3D reconstruction obtained from different medical equipment REFERENCES [1] Rachel A Powsner, Matthew R Palmer, and Edward R Powsner, "Essentials of Nuclear Medicine Physics and Instrumentation," Radio Science, 3rd Ed, pp 60-158, (2013) [2] H J Johnson, M M McCormick, and L Ibanez, "The ITK Software Guide," The Insight Software Consortium, Chapter 4, pp 79-82, 395-426 (2017) Available at: https://itk.org/ItkSoftwareGuide.pdf [3] Nadeem M, Asadullah S, A Waqas, Adamu A, S Kamran, S B Zaidi," Image Segmentation Methods and Edge Detection: An Application to Knee Joint Articular Cartilage Edge Detection," Journal of Theoretical and App Info Tech., pp 87-96, Vol 71 (1), (2015) [4] Zhao Yu-qian, Gui Wei-hua, Chen Zhen-cheng, Tang Jing-tian, Li Ling-yun, " Medical Images Edge Detection Based on Mathematical Morphology," IEEE Engineering in Medicine and Biology 27th Annual Conference, pp 6492-6495, (2005) [5] K Somkantha, Nipon T-U, Sansanee A, " Boundary Detection in Medical Images Using Edge Following Algorithm Based on Intensity Gradient and Texture Gradient Features," IEEE Transactions On Biomedical Engineering, pp 567 - 573, Vol 58 (3), (2015) [6] Jamil A M Saif, Mahgoub H Hammad, and Ibrahim A A Alqubati, " Gradient Based Image Edge Detection," International Journal of Engineering and Technology, pp 153 – 156, Vol (3), (2016) [7] E Zagrouba, S Dhahbi and W; Barhoumi, "A Cost Efficient Approach for Automatic Non-Rigid Registration of Medical Images," International Workshop on Medical Image Analysis and Description for Diagnosis Systems, (2009) [8] Rachel Indra Kanta Maitra1, Sanjay Nag, Pradip Saha and Samir K Bandyopadhyay, "A Tree-based Approach Towards Edge Detection of Medical Image using MDT," International Journal of Computer Graphics, Vol 6, No.1, pp 37-56, (2015) [9] Seong-Wook Jang, Young-Jin Seo, Yon-Sik Yoo, and Yoon Sang Kim, "Computed Tomographic Image Analysis Based on FEM Performance Comparison of Segmentation on Knee Joint Reconstruction," The Scientific World Journal, (2014) [10] Raman Maini, Himanshu Aggarwal, " Study and Comparison of Various Image Edge Detection Techniques," J International Journal of Image Processing, Vol 3, (2015) 84 H Q Thanh, …, N H Ha, “Edge detection techniques … using a new tool - INMOFEVV.” Nghiên cứu khoa học công nghệ [11] S.N Kumar, A Lenin Fred, Ajay Kumar H, Sebastin Varghese, M.Manikandan, "Medical image Edge detection using Gauss Gradient operator," Journal of Pharmaceutical Sciences and Research, pp 695-704, Vol 9, (2017) [12] Available at: https://github.com/InsightSoftwareConsortium/ITK/tree/master/Examples/Data [13] Available at: http://www.radiologyassistant.nl/en/p47f86aa182b3a/brain-tumor-systematicapproach.html, https://www.braintumour.ca/4880/metastatic-brain-tumours TÓM TẮT ÁP DỤNG CÁC KỸ THUẬT PHÁT HIỆN BIÊN CHO XỬ LÝ HÌNH ẢNH Y TẾ SỬ DỤNG CƠNG CỤ MỚI - INMOFEVV Đọc xử lý hình ảnh định dạng DICOM vấn đề quan trọng trình xử lý hình ảnh hóa Trong báo này, tập trung vào việc mô tả kỹ thuật phát cạnh INMOFEVV - phần mềm phát triển kết hợp công cụ Insight Toolkit (ITK), Visualization Toolkit (VTK) khuôn khổ phát triển phần mềm Qt để xử lý hình ảnh định dạng DICOM Mục đích cơng cụ phát cạnh theo dõi đường biên khu vực quan tâm nâng cao chất lượng hình ảnh thực trình xử lý hình ảnh tiên tiến Từ khóa: DICOM, INMOFEVV, Xử lý hình ảnh, Phát biên, ITK, VTK, QT Received date, 21th March, 2018 Revised manuscript, 12th April, 2018 Published, 08th June, 2018 Author affiliations: National Institute of Medical Device and Construction; Centre of Nuclear Physics, Institute of Physics, Vietnam Academy of Science and Technology, Hanoi, Vietnam * Corresponding author: haquangthanh70@gmail.com Tạp chí Nghiên cứu KH&CN quân sự, Số 55, 06 - 2018 85 ... Rachel Indra Kanta Maitra1, Sanjay Nag, Pradip Saha and Samir K Bandyopadhyay, "A Tree-based Approach Towards Edge Detection of Medical Image using MDT," International Journal of Computer Graphics,... Zagrouba, S Dhahbi and W; Barhoumi, "A Cost Efficient Approach for Automatic Non-Rigid Registration of Medical Images," International Workshop on Medical Image Analysis and Description for Diagnosis... Ha, Edge detection techniques … using a new tool - INMOFEVV. ” Nghiên cứu khoa học công nghệ [11] S.N Kumar, A Lenin Fred, Ajay Kumar H, Sebastin Varghese, M.Manikandan, "Medical image Edge detection