1
$\begingroup$

enter image description here

enter image description here

I want to segment this Red Blood Cell Image on HSI color space.I want to try the Otsu Method but from what I read that method work only on Grayscale image.Do you have any suggestion for suitable image segmentation on those red blood cell image ? [EDIT] This is what i want to achieve(Segmented Blood Cell) Segmented Blood Cell Image

$\endgroup$
1
$\begingroup$

Using Matlab:

You might try converting your image to greyscale first with

greycells = rgb2gray(rgbcells);

where rgbcells contains the color image of your cells (see here).

Then use Otsu's threshold on the greyscale image like so

threshcells = graythresh(greycells);

like so (see here).

EDIT After OP explained what image should be the resulting image.

Using: FIJI (formerly ImageJ)

I am still not 100% sure as to which images you finally want to obtain. It seems like you only want to see the cells with the many purple dots (sorry, I am not a biologist myself) inside them and completely remove the others. For this attempt at a solution I use FIJI, but the principle can be easily applied in Python / Matlab, you name it...

Your images are somewhat different, because in the first image the other cells pretty much have the same color as the one in the middle (that you want to segment probably). In the second image the other cells are much lighter.

Let us look at the second image first:

Converting to HSI

Use the Color Transformer 2 Plugin to convert the images to HSI using the options "From Colorspace: sRGB" and "To Colorspace: HSI". Looking at the channels we can see that S and I carry pretty much the same information. So let's stick with the I channel. It looks like this: I channel of second image.

Selecting a Threshold

Now we use the useful "Auto Threshold" (Image->Adjust->Auto Threshold) feature of Fiji on this channel. Clip the image from the HSI stack and convert it to 16 bit first. Use the option "Try All", also check "Ignore White" and uncheck "white objects on black background". Now we can see a whole panel of different thresholding algorithms applied to this image. It looks like this:

Different thresholding methods for Image 2 (I channel)

You can see that many thresholding methods do what you want. Among them Otsus method (as you suggested) and MaxEnt. Now that we know MaxEnt or Otsus thresholding works for this image lets do the same thing again (meaning AutoThreshold), but instead of "Try All" we select "MaxEnt" as our threshold of choice (you'll see below why MaxEnt). Then we invert the threshold and overlay it on the image and we end up with:

Thresholded image 2

Now for the first image

Here we can do exactly the same. Repeating the steps, we end up with an I channel like this:

I channel of image 1

The other cells are very well visible here. This is also true for the other channels. I have also plotted the histogram. The left hump corresponds to the wihte background, the right hump to pretty much all cells. This will be important in the next step.

Now try all thresholds again like above and we will see this:

enter image description here

You see that Otsus threshold separates the cells from the background, but does not give you the cell in the middle that you want. Look at the Histogram: due to the way Otsus method is designed (see here) it will seperate these two clusters. Which is not what you want (as I understand) in this case. But MaxEnt(Maximum Entropy) does. So use the MaxEnt threshold as above.

You will end up with this:

enter image description here

SUMMARY This is my processing chain:

  • Do HSI transform
  • Apply MaxEnt threshold to the I channel
  • Use the binary mask on the RGB image again to clip out the relevant parts

OUTLOOK If you are not satisfied with the results, then play around with different thresholds. Ultimately changing the colorspance and thresholding are powerful but very low tech ways of image segmentation. You might be interested in more sophisticated ways. For a software suite catered especially to cell biologists check out Cell Profiler. Former colleagoues have used it and were very happy with it.

LITERATURE Maximum Entropy Threshold: Wong et al: "A gray-level threshold selection method based on maximum entropy principle", https://ieeexplore.ieee.org/document/35351

$\endgroup$
  • $\begingroup$ my professor said to do the segmentation on color image(HSI color space)(Without Converting to Grayscale) but he didnt give me guidance on what method to use.Do you have any idea any method that working for color image segmentation ? $\endgroup$ – Julius Permana Oct 27 '18 at 9:00
  • $\begingroup$ @JuliusPermana Have you tried looking at the individual HIS channels to see if you can apply your thresholding there (the individual channels are grayscale images again)? $\endgroup$ – geo Oct 27 '18 at 9:23
  • $\begingroup$ Hi,I already edit my question.That third picture is my goal of image segmentation.Do you have any suggestion for method that is suitable for that ? $\endgroup$ – Julius Permana Oct 28 '18 at 17:07
  • $\begingroup$ @JuliusPermana check out my edits and see if they are useful to you. $\endgroup$ – geo Oct 28 '18 at 19:25
  • $\begingroup$ @JuliusPermana did the edits help you? $\endgroup$ – geo Oct 30 '18 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.