Ask Your Question
1

Separating conjoined blobs

asked 2020-05-16 22:19:46 -0600

tpsynx gravatar image

updated 2020-10-18 11:10:35 -0600

I'm developing an android application using OpenCV 4.0.1 to detect platelets. What I've done so far is I've removed the background by applying threshold and detected the platelets using approxpolydp and contour, but I have problem detecting platelets if they are conjoined or if the platelet is on top on an cell (red blood),

morphological operations is not usable as the size of the platelet can vary and can erode too well that it reduces platelet count.

I've tried watershed but after normalization and applying threshold it doesn't seem to separate them.

I don't know why the upload image button does not work but i've created an imgur link of it

I've used threshold to remove background and also to remove RBC (in some instances, the RBC has almost the same color of the platelet, which is the case in this picture)

Manually encircled the platelets that are detect as a whole with the RBC (this is after background subtraction using the threshold image)

The two encircled in blue here are the platelets using my current implementation, some of the platelets are not detected due the conjoined blobs as stated. This is also the input image w/o the encircled platelets

edit retag flag offensive close merge delete

Comments

btw, please do not use imgur for image hosting, as it is blocked in several countries

berak gravatar imageberak ( 2020-05-17 04:35:00 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2020-05-17 15:58:17 -0600

kpachinger gravatar image

updated 2020-05-19 10:48:53 -0600

  • loop moments area for 2d coverage. Divide total by mode(?) for count.
    • or use threshold to mask original, then target gradient values inrange between platelets in 2nd pass mask.
    • or convexhull defects could subdivide blobs in an inexact way. depending on need of your application it may have some purpose in secondary factors. I am not in mutant science.
    • or assuming a red blood cell is the spotted one, isolate those (RETR_CCOMP)... then from it's center draw a circle of average size. filled to mask or stroke to separate.

What is practical for your purpose? Can you present user UI controls for different model estimates? You may accept multiple samples of same image and process x times for more accuracy, especially if it's a partial view.

... You might accept hsv is the defining factor, in addition to scale. Careful kmeans tests may isolate 3 centers - white background, purple, and red. Derive area from this and compare to expectations. Inrange can moderate the sample spectrum. Be aware that radial hsv red channel spans linear color model. You might consider output frames as slices of a histogram.

edit flag offensive delete link more

Comments

1
  1. I'll try the moment area thing, I suppose this refers to the usage of Hu moments?
  2. Sorry, I'm not good with image processing terminology (or related to them) as I'd just picked up this project for one of my subjects in college. What I understand by this is that after the background subtraction, I have use threshold again to pinpoint features of platelets?
  3. This is the thing I'm doing right now. will take note of your suggestion
  4. I've updated the original question with "progress" photos of what the platelets look like

My project consist of counting platelets from the given input image, I don't think it is feasible for the time I still have left to learn the acceptance of multiple samples and I don't really need it to be that accurate, I'd just have to prove that it is possible.

tpsynx gravatar imagetpsynx ( 2020-05-18 01:42:21 -0600 )edit

Do you want to count all cells including overlapping cells? Is that original image is last one on bottom?

supra56 gravatar imagesupra56 ( 2020-05-18 08:09:28 -0600 )edit
1

@supra56 yes I need to be able to differentiate them to increase the accuracy of the application. Yes it is the original image

tpsynx gravatar imagetpsynx ( 2020-05-18 08:45:16 -0600 )edit

I will post another one.

supra56 gravatar imagesupra56 ( 2020-05-18 21:06:57 -0600 )edit

https://blog.roboflow.ai/a-thorough-b... recent news shows YOLO detect RBC

kpachinger gravatar imagekpachinger ( 2020-06-05 04:52:52 -0600 )edit
0

answered 2020-05-19 06:13:18 -0600

kbarni gravatar image

My idea is the following:

  • Fill the "hollow circles" in the binary image: using the negative of the first image in post, make a connected component analysis. The first connected component is the background, the others are the isolated areas inside the blood cells.

    Set these areas to 255 on the original binarized image. So you'll have a well segmented image.

  • Compute the distance transform on this binary image. Use the maxima to detect the blood cellls.
edit flag offensive delete link more

Comments

The hollow circles are those parts of the red blood cell that were not included due to my usage of InRange that I modified to detected colors of the platelets. But I'll take note of your suggestion and try to isolate them

tpsynx gravatar imagetpsynx ( 2020-05-20 00:27:45 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-16 22:19:46 -0600

Seen: 725 times

Last updated: May 19 '20