Identification of Possible Infarction on the Cross Section of Cardiac Muscle Tissue Using Color Segmentation and Difference of Gaussian

Medical Imaging is essential for medical diagnosis and treatment so there is a need to be able to obtain quantitative data from them for analysis and these data can be obtained through Image Processing. The data from the microscopic images could possibly contain information about concerning changes and variations in the forms of organisms that describe the relationship between the human body and disease. In this study, Color Segmentation was used to detect possible infarction locations by analyzing digital microscopic images of the cross section of cardiac muscle tissues and the Derivative of Gaussian (DoG) was used to stitch the selected microscopic images together. With these algorithms we were able to detect the possible locations of infarction and obtain their quantitative data and create an application for automated analysis.


Introduction
Medical Image processing has greatly contributed on a lot of medical applications.It deals with the development of problem specific and image-specific techniques to enhance raw medical data for accurate selective visualization and analysis.Medical Imaging is essential for medical diagnosis and treatment so there is a need to be able to obtain quantitative data from these images for analysis.These data can be obtained through Image Processing.Image processing is the most important and challenging part in medical image segmentation because images can have various characteristics that makes segmentation complex.

+ Both authors contributed equally
To address these complexities, various techniques of image segmentation exist that can be used to extract quantitative data.
Generating quantitative data from microscopic images is needed and is a common research requirement.The data from these features could possibly contain information about concerning changes and variations in the forms of organisms that describe the relationship between the human body and disease.Therefore, areas of various tissue sections need to be measured and analyzed accurately.This research attempts to address this problem by using Computer Vision techniques on tissue elements.
The purpose of this study is to detect possible minimal or small scale myocardial infarction on a microscopic image of the cross section of cardiac muscle tissues.The study is significant because it can now stitch a pathologic slide taken from a microscope using a digital camera while taking a single shot of a pathologic slide, not all areas of the slide are covered.You need to take several shots and stitch them to form an entire slide.Also, finding a possible infarction in a slide is difficult even if the slide is subjected to a microscope.The advantage of using digital analysis is to identify possible area of infarction that cannot be seen by the naked eye.
Output of this study can be used in advanced studies in histopathology and other branches in medicine.Identification of possible infarction can be correlated with the history of the patient.Significant conclusion can be drawn by the medical experts if we correlate possible minute infarction with the treatment and reaction of the patient"s body.
With the emergence of biomedical technology, tissue histopathological slides can now be digitized and stored in digital image form.Computerized image analysis and machine learning techniques can now be applied to these digitized tissue histopathology.
Computer-assisted diagnosis (CAD) algorithms in medical imaging have begun to be developed for disease detection, diagnosis, and prognosis prediction to complement the opinion of the pathologist (1) .
Myocardial Infarction (Heart Attack) is the irreversible death (necrosis) of heart muscle due to cardiac ischemia or prolonged lack of oxygen supply 1 .It is the ischemic necrosis of an area of myocardium.
The histopathologic changes are similar to tissue necrosis at other sites but specific histologic changes depend on stage of infarction.The changes follow a predictable sequence in time with coagulative necrosis as the earliest light microscopic findings identified at 4-12 hours after infarction in surviving patients.Necrosis is then followed by the infiltration of the neutrophils seen at about 12-24 hours after onset of infarction.The necrotic myocytes are then replaced by a collection of neutrophils to initiate the process of inflammation and repair.With progressive inflammation the neutrophils begin to die and replaced by influx of macrophages.The process of inflammation is intertwined by the process of repair 2 .
In image stitching and panorama construction, there are several computer vision and image processing techniques used to "stitch" images together and create a simple panorama such as: key point detection and local invariant descriptors; key point matching; RANSAC; and perspective warping (4) .Image stitching is a widely used technique in restoring images from its original state.It is widely used in the forensics and investigation science in recovering evidences and also has wide applications in various medical researches.
A research by Arya and Shikha (2) reviewed image stitching and its different methods.According to this paper, the image stitching process can be divided into three: image registration, image calibration and blending.Image registration is the feature matching method that uses image alignment method that searches for image alignment between two images or a group of images.Image calibration minimizes the differences that occur between an ideal and camera lens model used.It is where optical defects and the changes during the feature detection methods that may occur are calibrated and reduced.It calibrates the pixels that are needed for stitching.Image /heart_and_myocardium/myocardial_infarction_(ami).aspx blending is used to improve the quality of the image after the changes applied during the calibration stage.Image stitching can be done by two techniques: direct and feature based.Direct image stitching techniques minimize pixel to pixel image dissimilarity.Its main advantage is minimizing the sum of absolute differences between overlapping pixels.With this technique, each pixel of an image is compared with each other, which makes it complex.Feature-based techniques on the other hand compare the main features with all the features of one image to another.It is more widely used since its main advantage is that it is robust and faster.A panoramic image stitching mode is also presented in this research.
Medical images in their raw form are represented by a matrix of numbers in the computer with the values that consists of relevant information on the physical quantities that shows the relevant variance between different types of body tissues or of its parts.Since this representation is quite complex, processing these images into quantifiable form is very useful in extracting significant quantitative data for different medical purposes such as medical diagnosis, since it is much easier to analyze these data in numbers.
In a study by Norouzi et al. (3) , medical segmentation methods, algorithms and applications were discussed.Advantages and disadvantages of each segmentation method were described along with their examination and its algorithm applied in Magnetic Resonance Imaging and Computed Tomography image analysis.The researchers classified the segmentation methods into four classifications: 1  (4) , thresholding was to be done based on color values in natural images.Multilevel thresholding has been conducted to the RGB color information of the object extract it from the background and other objects.For the proposed multilevel thresholding for natural images, a brief study on the color information of the natural images was carried out in order to get the most suitable values for selection range of the threshold.The study stated that it is very important to determine the selection range because if the threshold cannot acquire a suitable value, the threshold cannot acquire a suitable value and the algorithm will extract pixels other that the object of interest.As the researchers were dealing with natural images, they calculated the range foe RGB intensities for green (Forest) and blue (Sky) colors and then the thresholding algorithm was applied.Various combinations of values can be used to determine the best threshold value for the type of image used for this study.Various attempts have been done to obtain such values since the determination of the best result can only be done by human observation.From the experiments the threshold values for the green and blue areas were observed.The segmentation allowed the elimination of the unwanted pixels and were able to retain the pixels of the object of interest.The resulted images satisfactorily shows that by using the selected threshold values, the segmentation method has been able to segment out the green are and blue are of the natural image.The segmentation results hold favorable consistency in terms of human perception and satisfy the content-based image and retrieval and recognition process.One disadvantage of this proposed algorithm is that in using fixed thresholding values, it may not generate best results for all the images.However it is stated in this study that this algorithm can be combined with other properties such as texture to improve segmentation performance.

Pipeline of Work
This study focused on the analysis of the sample digital images of the cross section of cardiac muscle tissue slides and the possible detection of infarction by using Computer Vision techniques.The study is coded in Python 2.7 (32-bit) (5) and uses OpenCV-Python (6) functions and modules.
Figure 1 shows the pipeline of the study.In Data Sampling, images of the prepared cross section of cardiac Fig. 1.Pipeline of the study.muscle tissue slides were taken through a microscope to convert them into digital samples.Multiple images of each sample are taken in order to capture all of its parts.In the Data Pre-processing, stitching method is then applied to selected images.In Image Analysis, Color Segmentation is performed by applying color thresholding to the selected/stitched samples.The segmented image produced after thresholding is then used to calculate the percentage of the colors of interest in the image.
On data sampling, cross section of the cardiac muscle tissue slide samples are transformed into digital images saved into JPG format by camera default.Converting these mounted slide samples into digital images makes analyzing and obtaining of quantitative data faster and easier.In histological and histopathological image studies, using Computer Vision and computer aided image analysis on these digitized images could give accurate diagnosis and data.
The data that were used in this study were prepared cross section of cardiac muscle tissue slides.These slides were pre-ordered from MICRO-BIOLOGICAL LABORATORY, INC., an importer/distributor of medical & analytical slides and equipment.For this study, nine cross sections of cardiac muscle tissue slide samples were prepared.In image acquisition, each of the slide samples was placed on a microscope to convert them into digital image samples in where we performed the analysis (7) .The magnification of the microscope that was set to capture the images were 100x and 400x.

Color Segmentation and Detection of Possible Infarction
Image segmentation is the process of dividing an image into multiple parts.It is stated that image segmentation is one of the steps in getting the quantitative measurement of the image.
In this study, color segmentation was performed on the digital data samples.Input image I(x,y) can be segmented using the algorithm below: (1 where Ω is a region; m, n, o, p are values of the pixels in a region.
By choosing an upper and lower threshold for each band, we were able to segment the image into four different colors.Looking back at our calculated threshold values, these colors represent different objects in our area of interest.
Using the histogram of the original image, Figure 2, thresholds were identified and an equivalent pixel value is assigned for each category.These values then grouped the image into four color levels.To identify these values, the RGB values of the image were extracted.
This study used these values taken from the histogram of the original image (Figure 6): We will be using these values in detecting the possible small scale infarction.We set the Ω 2 as our color of interest to represent the infarction.
30%-40% range of pixel for Ω 2 is chosen to eliminate false positive.Below the range, advanced infarction may   have occurred.Above Ω 2, a false positive may be included.
Pixel values are changed according to the set fixed threshold range that we computed.These values will cause the whole image to be converted into four colored images, segmenting the area of interest we need for analysis.
Applying the algorithm above, we have now identified the area of interest that we need to count analyze and also the object of interest.After choosing Ω 2 as our color of interest to represent the infarction, the next step is to convert the pixels that belongs in this band to a new value, in this case, Ω 2 :{x | x = 255} which is the color white, for a clearer view of the point of interest as shown in Figure 4.
We applied color segmentation on the four images as seen in Figure 3.This process was done since the image properties could change when these images are already stitched.With these conditions, we would like to check the percentage of the colors that represents our area of interest by doing a pixel count and calculate its percentage after segmentation on each of the images.
The percentage was calculated by 100 * float(num)/float(total) (2) where num is the total pixel count of the specific threshold and the total is the total pixel count of the color specified in our threshold value.
The total pixel count is only from the colors that make up our area of interest since it is only in these colors that we need to get their percentage.In this study, we need to get the percentage of Ω 2 since it is in this color that we correlate the inflammation of the neutrophils when myocardial infarction is present.
From the resulting images of the four images, we were able to obtain the areas of interest.We were able to segment the pixels of the object of interest which is in the threshold value of Ω 2 .Table 1 shows us the percentage values of each band in each image.
We see that the values representing the lighter red area Ω 3 and Ω 4 are more dominant.In this table we don"t mind the black areas since it is a part of the background of the image that belonged to the excess from the image stitching.
Figure 5 and Table 2 shows the resulting image and the percentage of the pixel of each band in the image.Figure 6 shows the conversion of Ω 2 to Ω 2 :{ x | x = 255} which is the color white.Comparing this result to the results of the four images, the final stitched image"s result showed consistency in terms of all the percentage of each band on each images.A consistent orientation to each key point is assigned to achieve invariance to image rotation.For each image sample, L(x,y), at this scale, the gradient magnitude, m(x,y), the orientation, θ(x,y), of the gradient is pre-computed as: (5) Hartley and Zisserman (11) claims that if there is 5% outliers then only three iterations are needed to get at least one pure sample with p = 0.99.
Since there are four images, this will require three rounds of image stitching: one for A and B and another for C and D. After stitching images, AB and CD results are shown in Figure 3.As you can see, black seams can still be seen due to the morphing function applied to the image and possibly because of a minor fault in the pre-processing of the digital image.
For the third round of stitching, the resulting images as shown in Figure 8 needs to be rotated manually according to the left-to-right order, Figure 9, since this algorithm is for panoramic images.If not rotated, the algorithm will still run but it will not stitch the images together and will only return one image instead.If this is the case, we need to stitch the image again, this time in the correct order.
Stitching these images is important to get a better analysis and quantification of the specimen since the digital data samples were not obtained through a whole-slide scanner which can already show the whole microscopic image of the specimen.With the tools that the researchers have: a microscope mounted with a digital camera, sampling and pre-processing all the data was a challenge since it required a lot of time and patience to take a proper microscopic images of the specimen.As much as possible it is important to get a significant part of the specimen to be stitched.
The image shown in Figure 10 is the resulting image seen to have remnants of the black excess that were created when stitching the images from the last round of stitching and also because of the fault in the pre-processing of the image.The images were not perfectly stitched.However, an infarction can still be identified in the stitched image.

Copyright
This paper is an original product of the researchers and is currently unpublished.All proprietary products of researches mentioned in this study are properly cited in this paper.

Conclusions, Recommendations and
Future Work

Conclusions
Based on the algorithms applied, possible infarction locations of a pathological slide of the cross section of cardiac muscle can be identified.The application of color histogram analysis can help identify objects of interest.
The application of DoG can identify the similarities of two input images that can be used to stitch the individual microscopic images.

Recommendations
Having additional samples for testing maybe used to fine tune the algorithm especially in color clustering.

Future Work
Morphometry will be used to classify cross-section cardiac muscle tissue to better understand the histopathological images.

Fig. 5 .
Fig. 5.The resulting image of the final stitched image after applying color segmentation.

Fig. 10 .
Fig. 10.The resulting image of the 3rd round of stitching.

Table 1 .
Showing the percentage values (rounded to the nearest hundredth) of each colors in the segmented images

Table 2 .
Showing the percentage values (rounded to the nearest hundredth) of each colors in the segmented stitched image.