0

I have images of bonemarrow biopsy and I've been trying to segment the bones as a pre-processing step for a detection network. Bones are textured and mostly homogenous. I applied entropy with disk(6) and after examining the histogram, I've concluded that bones are usually > 1.7, but still have low variance. I found that Otsu works the best (entropy < thresh because bone is low variance) but it's still not sufficient. My problems:

  1. I get a lot of small polygons that are full on the edges, (I wrote remove_empty_tissues) for them but sometimes they are connected to bones so it's problematic.Example After otsu Final
  2. For some, otsu doesn't work well. Example (otsu returned 3.721635):Image,After otsu
  3. At first, I relied a lot on size, but because these are crops some bones are partial and after testing I found small bones that were removed. Example for small bone
  4. I will note I have a much better method, but as it removed small objects, I opted for this more inclusive method. I'd be happy for any suggestions. Thanks. Adding my code below (remove_small_objects_inside_frame means that if an object is at the bounding of the image it will be removed if < min_size_frame, for others removed if <min_size)
    image_data = color.rgb2gray(image_data)
    image_data = img_as_ubyte(image_data)
    entropy_img = entropy(image_data, disk(6)) 
    thresh = threshold_otsu(entropy_img)
    possible_bones = ((entropy_img < thresh) * (entropy_img > 1.7))  
    binary = remove_empty_tissues(possible_bones) 
    binary = binary_opening(binary,footprint=disk(3)) 
    binary = remove_small_objects_inside_frame(binary, min_size=500,min_size_frame=300) 
    binary = binary_closing(binary, footprint=disk(3)) 
    binary = binary_dilation(binary, footprint=disk(6)) 
    binary = remove_small_objects_inside_frame(binary, min_size=2000,min_size_frame=500)

0 Answers0