2

I am working on breast region segmentation using Huang Thresholding. The original and result image is provided here:

Sample1

As you can see the mask edges are not smooth enough but it's accepted in this sample. Next is another sample with the mask edges pretty jagged:

Sample2

In the attached picture I already implemented some preprocessing to smoothing the edge by using close operation with the following codes (I tried it with the median filter but not much effect).

kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (15, 15))                    
closed = cv2.morphologyEx(canvas.copy(), cv2.MORPH_CLOSE, kernel, iterations=3)

I also tried the solution provided here:

Smoothing Edges of a Binary Image

but not satisfying enough for me in this case.

Can anybody help me or suggest me a method to smooth the edges of the mask? Here I have provided the mask images for sample1:

mask1

and for sample2:

mask2.

FYI, I planned to bitwise_and the image with the mask so I can remove the background images. Background images in mammograms sometimes not really black background and contain too much noise which you don't want when enhancing the image after.

`

Ahmet
  • 7,527
  • 3
  • 23
  • 47
Mario
  • 93
  • 1
  • 7
  • Hi @YvesDaoust I used averaging filter as its help before segmentation / binarization. Yes i know the outline / contours is not exactly at the peripheral / edges of the breast and this due to low contrast of the breast peripheral that caused during acquisition (mammography) (i used old mammogram database so the imaging is not good as the current mammogram). – Mario Aug 13 '20 at 10:27
  • Some techniques is already developed in the past to combat this problem ; for example Multi Threshold Peripheral Equalization but fyi one of the steps involved is using binary mask (by using otsu thresholding) to remove the background of the image. Using otsu thresholding the result is not good as huang thresholding that i used. Another idea that i have in my mind right now is to lower the threshold value by only using n percentage of the threshold value computed so it can segment low contrast region more better but this method is kinda dumb i think haha. Thx for commenting btw – Mario Aug 13 '20 at 10:27
  • Or maybe i need to enhance the image first before segmenting, but in the past when i do this the noise at the background is also enhanced (i used Adatipve Median Filter then followed by CLAHE with clip limit 0.01). – Mario Aug 13 '20 at 10:32

0 Answers0