Skip to main content
Journal of Medical Signals and Sensors logoLink to Journal of Medical Signals and Sensors
. 2021 Dec 28;12(1):84–89. doi: 10.4103/jmss.JMSS_49_20

Using Marker-Controlled Watershed Transform to Detect Baker's Cyst in Magnetic Resonance Imaging Images: A Pilot Study

Sadegh Ghaderi 1, Kayvan Ghaderi 2, Hamid Ghaznavi 3,
PMCID: PMC8804590  PMID: 35265470

Abstract

Nowadays, magnetic resonance imaging (MRI) has a high ability to distinguish between soft tissues because of high spatial resolution. Image processing is extensively used to extract clinical data from imaging modalities. In the medical image processing field, the knee's cyst (especially Baker) segmentation is one of the novel research areas. There are different methods for image segmentation. In this paper, the mathematical operation of the watershed algorithm is utilized by MATLAB software based on marker-controlled watershed segmentation for the detection of Baker's cyst in the knee's joint MRI sagittal and axial T2-weighted images. The performance of this algorithm was investigated, and the results showed that in a short time Baker's cyst can be clearly extracted from original images in axial and sagittal planes. The marker-controlled watershed segmentation was able to detect Baker's cyst reliable and can save time and current cost, especially in the absence of specialists it can help us for the easier diagnosis of MRI pathologies.

Keywords: Baker's cyst, image processing, magnetic resonance imaging, marker-controlled watershed transform

Introduction

Knees are the largest synovial and most complex joints in the body. They suffer a lot of injuries due to their complex anatomical structure and weight-bearing.[1] Baker or popliteal cyst is one of the common injuries in knees, and this cyst is produced by herniation of synovial membrane or leakage of synovial fluid usually resulting from distention of semimembranosus medial gastrocnemius bursa, meniscal, and ligament injuries.[2] Baker's cyst is diagnosed in 10%–41% of knee magnetic resonance imaging (MRI).[3] MRI has a high spatial resolution, a high ability to distinguish between soft tissues and is less invasive, compared to other diagnostic modalities; therefore, it is the best modality to detect knee's injuries.[4,5]

The golden standard for the diagnosis of Baker's cyst is MRI, especially in T2-weighted axial images, but ultrasound can be helpful especially for better diagnosis of this cyst in patients over 50-year-old because of osteoarthrosis occurrence in this age.[6] The high advantage of ultrasound is the revealing of hypoechoic and anechoic fluid between semimembranosus and medial gastrocnemius tendons, especially sonography can be very helpful when the Baker's cyst appears heterogeneous or has soft tissue neoplasm.[7] Some factors such as poor quality imaging, tiredness, and inattention of physicians, can limit the diagnosis of MRI reports.[8]

Using a computer program that can analyze the digital imaging and recognize injuries can be very helpful to physicians. One of these programs is the image segmentation algorithm. Characteristics of the nominated algorithm, one of the most prominent image segmentation algorithms, are discontinuity and similarity that do edge detection and threshold processing. It can be introduced as the watershed algorithm that is a morphological method based on region processing.[9] There are three methods to implement watershed: gradient method, distance transform approach, and marker controlled approach, the last of which being more effective than the other two.[10] Among the limitations of the watershed algorithm, we can mention oversegmentation, therewith many regions are recognized.[11] To control this problem, we can use some markers in or out of images. These markers are connected to images’ elements and can dominate oversegmentation problems. This processing is called marker-controlled watershed segmentation. This algorithm can improve the accuracy of the radiologist's diagnosis.[12]

Using marker-controlled watershed segmentation, which has been used mostly for the detection of brain tumors and knee injuries, has been discussed in many studies.[13,14] These studies have investigated meniscus tearing and articular surface, but other pathologies such as Baker's cyst have not been investigated yet, so we have decided to evaluate this cyst by using marker-controlled watershed segmentation. The study aims to evaluate the feasibility of the marker-controlled watershed segmentation to detect the Baker's cyst in knee joint's MRI sagittal and axial T2 images.

Materials and Methods

Magnetic resonance imaging databases (data acquisition)

In our study, Signa HDxt 1.5 T scanner of General Electric Company was used, this unit is equipped with an 8-channel coil for knee examination. Axial T2 (fat saturation), coronal proton density (fat saturation), coronal T1, sagittal T2 (fat saturation), and sagittal merg were performed on a patient's knees using the standard procedure in five sequences. Axial T2 and sagittal T2 images were used in our research. In this paper, we have suggested using the Marker-Controlled Watershed Transform Technique to remove Baker's cyst in MRI images using MATLAB (r2018b) software (Natick, Massachusetts, US states).

Image preprocessing was one of the primary steps in the advanced algorithm. The aim of preprocessing operation for input images was edge detection and image noise reduction. At the beginning of this process, images are converted to gray scale; in the next step, Sobel code is used for edge detection and noise reducing, and low-pass filtering is utilized by using Gaussian kernel. Sobel is a mask that detects points on the edge of an image. Based on the mask's coefficients, it gives more value to the neighboring edges whereupon better edges are gained.[9] Gaussian kernel is a two-dimensional low pass filter, the formula of which is presented below:

graphic file with name JMSS-12-84-g001.jpg

Where D0 and D (u, v) are the cutoff frequency and distance from the center of rectangular frequency, respectively.[9]

Segmentation

Gradient magnitude calculation

Before using the watershed transform for segmentation, it is common to use gradient magnitude to preprocess a grayscale image. High pixel values along object edges and low pixel values everywhere else characterize the gradient magnitude image.[9] Therefore, using the linear filtering technique in this method, the gradient magnitude of the grayscale image is computed. The gradient vector magnitude and the angle at which the maximum rate of change of intensity level occurs at the specified coordinates (x, y) can be computed for any grayscale image (x, y) at coordinates (x, y) using Eq. (2) and (3).

graphic file with name JMSS-12-84-g002.jpg

graphic file with name JMSS-12-84-g003.jpg

graphic file with name JMSS-12-84-g004.jpg

The gradients in the x and y directions are g1 (x, y) and g2 (x, y). The Sobel masks H1 and H2-used to calculate the magnitude of these gradients are described by Eq. (4).[9]

Watershed transformation

The watershed transformation is a popular image segmentation technique based on analytical morphology. It is a gradient-based segmentation system with catchment basins as the segmented areas. By treating a picture as a surface with high light pixels and low dark pixels, the watershed transform detects catchment basins and watershed ridgelines.[9,10]

As previously mentioned, the key issue with the watershed transform is oversegmentation, which results in a large number of segmented regions in each image's local minimum. This technique has made a change in image intensity that constructs extraregional minima due to the oversegmentation difficulty. To control oversegmentation, markers of the gradient image beginning from these markers instead of regional minima are recommended.[11] Marker-controlled watershed segmentation is a systematic procedure that reduces the oversegmentation difficulty.[12]

Marker-controlled watershed transform algorithm

Dividing touching objects in an image is one of the most difficult image processing steps. For this issue, watershed transforms are commonly used. Marker-controlled watershed segmentation has proven to be a reliable and versatile method for segmenting artifacts with closed outlines, with ridges indicating the boundaries. Foreground and backdrop markers are aligned with internal and external markers, respectively. Following segmentation, the watershed sections’ boundaries are drawn on desired ridges; hence, using the watershed transform to separate any object from its neighbors’ segmentation works best if you can distinguish or “mark” foreground and background objects and locations. In these procedures, marker-controlled watershed segmentation is used; compute a segmentation function for the items we were trying to segment in this section. The second phase involved calculating foreground markers to link blobs of pixels within each of the objects. Due to the presence of pixels that were not part of an entity, the next step was to compute background markers. The segmentation feature was then modified to provide minima only at the foreground and background marker positions. Finally, the watershed transform of the modified segmentation function was computed.[9,10]

Results

Image acquisitions are the first step. Original images in this study consisting of axial T2 FS and sagittal T2 FS images of the left knee of a patient are illustrated in Figure 1.

Figure 1.

Figure 1

Diagram of all steps during image processing

The second step to gain our purpose in this study was preprocessing that consisted of conversion to gray scale [Figure 2a and d], Gaussian low pass filter [Figure 2b and e], and Sobel high-pass filter [Figure 2c and f], as shown for sagittal and axial images in Figure 3, respectively.

Figure 2.

Figure 2

Preprocessing step on sagittal (a-c) and axial (d-f) plane images. Gaussian (b and e) and Sobel (c and f) filters are utilized for sagittal and axial images

Figure 3.

Figure 3

Image (a) is an axial plane and image (b) is a sagittal plane of the knee, with a Baker's cyst

Using Gaussian and Sobel filters, pixels intensity was changed, and the following histograms have shown this fact. At this stage, the histogram of the image was obtained following the application of the Gaussian filter and then the Sobel filter. Figure 4a-c show the original image histogram, image histogram after preprocessing with Gaussian and Sobel filters, respectively, in the axial plane; and similarly Figure 4d-f show histograms of the sagittal plane. The image histogram after using the Gaussian filter graphically shows the effect of noise deletion on image, and after applying the Sobel filter on this image, the histogram of this image is split into two sections, brightness as edges and darkness as background [Figure 4].

Figure 4.

Figure 4

Using the Gaussian (c and f) and Sobel (b and e) filters and its effects on the image histogram (values in b and e histogram are expressed in the form of ×105)

The third step in this process was segmentation. In the beginning, gradient magnitude [Figure 5a and e] is performed, then watershed segmentation [Figure 5b and f] on gradient magnitude image is applied. After that, on this image, with the aim of cleaning up the image, opening by reconstruction [Figure 5c and g] is performed; and eventually, opening–closing by reconstruction [Figure 5d and h] is performed. The aim of the nominated measures, which were foreground section subcategories, was to link blobs of pixels within each of the objects.

Figure 5.

Figure 5

Foreground section of segmentation process, upper and lower row images show axial (a-d) and sagittal (e-h)images, respectively

The next step in this process was the background section; dark pixels refer to the background. Here, pixels that were not part of images are cleaned up. This section began with thresholding on the final image in the foreground section, and then to help better understanding, this image was superimposed on the original image. Finally, by operating the threshold opening and closing (morphological operation) by reconstruction, background pixels were removed. The following figure illustrates this section for the axial and sagittal image. Figure 6a-d show thresholding image, regional maxima are superimposed on the original image, modified regional maxima are superimposed on the original image, and thresholded opening–closing by reconstruction image for the axial plane, sequentially. Similarly, Figure 6e-h show sagittal plane.

Figure 6.

Figure 6

Background section of the segmentation process, upper and lower row images show axial (a-d) and sagittal (e-h) images, respectively

Finally, by superimposing foreground and background markers and divided object boundaries images, this step is finished. Related images are shown below. [Figure 7a and b] show markers and object boundaries superimposed on the original image.

Figure 7.

Figure 7

Superimposing foreground and background markers on axial (a) and sagittal (b) images

The last section has displayed the result that includes colored watershed label matrix [Figure 8a and c] and colored labels transparently superimposed on the original image [Figure 8b and d].

Figure 8.

Figure 8

Output images, colored watershed label matrix (a and c) and colored labels transparently superimposed on the original image (b and d)

Discussion

We find no article applying Marker-Controlled Watershed Transform to detect Baker's cyst in MRI images. The results of this study reveal that using Marker-Controlled Watershed Transform can detect the Baker's cyst. Using this algorithm, the Baker's cyst can be extracted with high precision. The role of filters was highlighted in this study, low-pass filter (e.g., Gaussian) affects the high frequencies and causes the image to be smoothened, while high-pass filter (e.g., Sobel) creates changes on low-frequency pixels that cause edges to be detected.

Nowadays, 3-Tesla (3T) MRI scanners, compared to 1.5T scanners, provide high resolution as a result of an increased signal to noise (SNR). Utilizing 3T can improve the diagnosis of knee’ small pathologies, especially Anterior Cruciate Ligament (ACL) tearing, but in addition to the high cost of these facilities, it does not have a significant impact on the Baker's cyst diagnosis.[15]

Knee joint has a complex structure like soft tissues, articular, and bone; therefore, in MRI images, much pathology can be reported. This means that image processing may confront errors, especially around the bone.[16] To decrease these errors, some studies used the region of interest (ROI) that is an external marker used to evaluate a point or background signal, for example, while utilizing this algorithm for examination meniscus tearing and malignant lesions in the breast. In this process, we should determine the pathology of interest in MRI images that needs some parameters to detect ROI.[17,18] The outstanding advantage of our study was no need for applying ROI. The time used in our study was 1.5 s. This value can change based on the power of the computer central processing unit.

In addition to the watershed, other methods like thresholding and region growing were used in some papers. In a study, with the aim of detecting meniscus tearing by image processing, the three mentioned methods were used. The results show the superiority of the watershed segmentation from the point of view of effectiveness and better distinguishing of some irregularities.[19]

In some studies, using marker-controlled watershed segmentation was discussed for the detection of brain tumors, malignant lesions of the breast, meniscus tearing, and the articular surface of the knee. These studies illustrated the capability of this algorithm for extracting these pathologies from MRI images. The results demonstrated that watershed segmentation has the potential to be used as a screening method for meniscal injuries and diseases, with the aim of improving care.[17,18,19,20] We could not find an article that has used this algorithm for the detection of Baker's cyst in MRI. Moreover, due to more accuracy detection of lesions and delineation lymphomas, a nominated algorithm was performed in mammography and computed tomography.[21,22]

Conclusion

The marker-controlled watershed segmentation was able to detect the Baker's cyst reliability. Watershed segmentation can save time and current costs, especially in the absence of specialists who can help us with easier diagnosis of MRI images. We will consider checking the accuracy and validity of this algorithm for the detection of Baker's cyst by checking the data set of patients. Our future purpose includes evaluation accuracy of marker-controlled watershed segmentation for detecting Baker's cyst by selecting more patients that have Baker's cyst in their knees’ MRI images.

Financial support and sponsorship

None.

Conflicts of interest

There are no conflicts of interest.

References

  • 1.Drake R, Vogl AW, Mitchell AW. 41st ed. United State: Elsevier Health Sciences; 2017. Gray's Anatomy for Students; pp. 1386–92. [Google Scholar]
  • 2.Grey M, Alinani J. 2nd ed. United State McGraw-Hill; 2003. CT and MRI Pathology: A Pocket Atlas. Part VII; p. 388. [Google Scholar]
  • 3.Janzen DL, Peterfy C, Forbes JR, Tirman P, Genant H. Cystic lesions around the knee joint: MR imaging findings. AJR Am J Roentgenol. 1994;163:155–61. doi: 10.2214/ajr.163.1.8010203. [DOI] [PubMed] [Google Scholar]
  • 4.Thomas S, Pullagura M, Robinson E, Cohen A, Banaszkiewicz P. sports traumatology, arthroscopy. Value Magnetic Resonance Imaging Curr Manage ACL Meniscal Injur. 2007;15:533–6. doi: 10.1007/s00167-006-0259-7. [DOI] [PubMed] [Google Scholar]
  • 5.Lefevre N, Naouri JF, Herman S, Gerometta A, Klouche S, Bohu Y. A current review of the meniscus imaging: Proposition of a useful tool for its radiologic analysis. doi: 10.1155/2016/8329296. 2016;47:???.https://doi.org/100.1155/2016/8329296. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Jacobson JA. Musculoskeletal ultrasound and MRI: Which do I choose? Semin Musculoskeletal Radiol. 2005;9:135–49. doi: 10.1055/s-2005-872339. [DOI] [PubMed] [Google Scholar]
  • 7.Ward EE, Jacobson JA, Fessell DP, Hayes CW, van Holsbeeck M. Sonographic detection of Baker's cysts: Comparison with MR imaging. Am J Roentgenol. 2001;176:373–80. doi: 10.2214/ajr.176.2.1760373. [DOI] [PubMed] [Google Scholar]
  • 8.Ha AS, Porrino JA, Chew FS. Radiographic pitfalls in lower extremity trauma. Am J Roentgenol. 2014;203:492–500. doi: 10.2214/AJR.14.12626. [DOI] [PubMed] [Google Scholar]
  • 9.Gonzalez R, Woods R. Digital Image Processing. 4th ed. Ch. 3. Boston, US states: Pearson; 2018. pp. 133–248. [Google Scholar]
  • 10.Kaur A. Image Segmentation Using Watershed Transform. Int J Soft Comput Eng. 2014;4:5–8. [Google Scholar]
  • 11.Beucher S. Unbiased Implementation of the Watershed Transformation Based on Hierarchical Queues. CMM internal note. 2004 [Google Scholar]
  • 12.Goshal D, Acharjya PP. MRI image segmentation using watershed transform. Int J Emerg Technol Adv Eng. 2012;2:373–6. [Google Scholar]
  • 13.Rahman MM, Dürselen L, Seitz A. Automatic segmentation of knee menisci – A systematic review. Artificial Intelligence Med. 2020;105:1018492. doi: 10.1016/j.artmed.2020.101849. [DOI] [PubMed] [Google Scholar]
  • 14.More S, Singla J, Abugabah A, AlZubi A. Machine Learning Techniques for Quantification of Knee Segmentation from MRI. 2020 [Google Scholar]
  • 15.Schub DL, Altahawi F, Meisel AF, Winalski C, Parker RD, Saluan PM. Accuracy of 3-Tesla magnetic resonance imaging for the diagnosis of intra-articular knee injuries in children and teenagers. J Pediatric Orthopaedics. 2012;32:765–9. doi: 10.1097/BPO.0b013e3182619181. [DOI] [PubMed] [Google Scholar]
  • 16.Lee JS, Chung YN. Integrating edge detection and thresholding approaches to segmenting femora and patellae from magnetic resonance images. Biomed Eng Appl Basis Commun. 2005;17:1–11. [Google Scholar]
  • 17.Cui Y, Tan Y, Zhao B, Liberman L, Parbhu R, Kaplan J, et al. Malignant lesion segmentation in contrast-enhanced breast MR images based on the marker-controlled watershed. Med Physics. 2009;36:4359–69. doi: 10.1118/1.3213514. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Mittal N, Tayal S. Advance computer analysis of magnetic resonance imaging (MRI) for early brain tumor detection. Int J Neurosci. 2021;131:555–70. doi: 10.1080/00207454.2020.1750390. [DOI] [PubMed] [Google Scholar]
  • 19.Kohut P, Holak K, Obuchowicz R. Image processing in detection of knee joints injuries based on MRI images. J Vibroeng. 2017;19:3822–310. [Google Scholar]
  • 20.Sudharson M, Rajapandiyan ST, Ilavarasi P. Brain Tumor Detection by Image Processing Using MATLAB. Middle-East J Sci Res. 2016;24:143–8. [Google Scholar]
  • 21.Yan J, Zhao B, Wang L, Zelenetz A, Schwartz LH. Marker-controlled watershed for lymphoma segmentation in sequential CT images. Med Physics. 2006;33:2452–60. doi: 10.1118/1.2207133. [DOI] [PubMed] [Google Scholar]
  • 22.Xu S, Liu H, Song E. Marker-controlled watershed for lesion segmentation in mammograms. J Digital Imaging. 2011;24:754–63. doi: 10.1007/s10278-011-9365-2. [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from Journal of Medical Signals and Sensors are provided here courtesy of Wolters Kluwer -- Medknow Publications

RESOURCES