1. In the first step, we enter the MRI image data of the brain tumor into MATLAB software to display the pixel size and the image itself. Of course, we can rotate the tumor at this stage, but significant off-screen rotations may require additional preprocessing.
2. Since tumor ranges are usually a solid color, we begin by finding areas with similar intensities in the image using the MSER area detector. Some of these areas contain additional background pixels. Use the Canny Edge Detector to further segment the tumor. Because the tumor is usually located on the background of a clear MRI image of the brain, it tends to respond highly to edge diagnosis. In addition, the intersection of the MSER areas with the edges creates areas that are most likely to belong to the tumor.
3. Note that the main MSER regions in mserMask still contain pixels that are not part of the tumor. We can use the edge mask along with the edge gradient to remove those areas. Using the image gradients around the edge locations, we grow the edges outwards. This mask can now be used to remove pixels that are in MSER areas but may not be part of the tumor. At this stage, the tumor image is mostly isolated from the background and many non-tumor areas from the MRI image.
4. Filter tumor candidates using parser analysis. Some remaining components can now be removed using area features. The thresholds used below may vary for different tumors, image sizes or imaging.
5. Filter tumors candidates using the hit width image. The stroke width image is calculated using the helper Stroke Width function. Note that most non-tumor areas show great variation in stroke width. They can now be filtered using the impact width change factor.
6. Specify boxes to restrict tumor areas to calculate a finite box in a tumor area, we first merge the separate areas into a single connected component. This can be done using morphological closing and then opening to clean each outlet and find the border boxes of large areas.
7. Finally, we apply the algorithms to two MRI images with and without tumors. We will see that the tumor MRI image of the isolated tumor with high accuracy and sensitivity and our algorithm detects the tumor-free image.
First, we follow the algorithm implementation steps and display two MEA images of a tumor-free brain and a tumor brain.
Figure 1. A is an MRI image of a tumor brain and B is an MRI image of a tumor-free brain
In this section, we apply the MSER algorithm to find areas with a similar intensity to MSER.Of course, we can also use several other segmentation algorithms to do this, some of which we will provide next to MSER in the image.
Figure 2. The algorithm is to obtain the same resolution of corners and areas. Applying algorithms of different types of zoning on MRI images, the four images above belong to tumor brain images and the bottom images of zoning with different methods on MRI images of tumor-free brain
Figure 3. A) Apply MSER algorithm on tumor brain MRI image. B) Apply MSER algorithm on division of intensity in tumor brain MRI image
Figure 4. Use the Canny Edge Detector to further segment the MRI images of the brain
Figure 5. We use the MSER areas in mserMask that contain pixels that are not part of the tumor with an edge mask with an edge gradient to remove those areas.
Figure 6. In this image, tumor have been further separated from the background and many of the non-tumor regions have been separated from MRI image.
Figure 7. Filter tumor Candidates Using Connected Component Analysis.
In these two images, we see that our algorithm detects the tumor well at this stage and extracts it from the MRI image of the tumor brain and shows it, while the MRI image without the tumor shows a blank, which indicates the absence of a tumor. So far, our algorithm has met our goal of elucidating and detection of brain tumors in MRI image with the help of intelligent algorithms in the form of high quality artificial intelligence.
Figure 8. Stroke width images are calculated using the helper helperStrokeWidth function, where A represents the image of the brain tumor and the blank screen indicates the absence of the tumor in the MRI image.
Figure 9. We visualized the effect of stroke width filtering for the MRI image and for the tumor. A is the tumor MRI image and B is the tumor-free MRI image.