How can I extract the inner cell body(s) from the cell capsule in images (grayscale) such as these ??

조회 수: 2 (최근 30일)
This is what I have written so far but I cannot seem to get the exact shape of the cell body in the mask
image_file = 'IMAGE_LOCATION';
image = imread(image_file);
figure
imshow(image);
image = adapthisteq(image);
figure
imshow(image);
image_wth = image - imopen(image, strel('disk', 5));
figure
imshow(image_wth);
image_bw = imbinarize(image_wth);
image_bw = bwareaopen(image_bw, 20);
image_bw = imclose(image_bw, strel('disk', 5));
image_bw = imfill(image_bw, 'holes');
B = bwboundaries(image_bw);
figure
imshow(image_bw);
hold on
visboundaries(B);
figure
imshowpair(image_wth, image_bw);
key = waitforbuttonpress;
close all
  댓글 수: 1
Gaurav Kudva
Gaurav Kudva 2018년 2월 6일
편집: Gaurav Kudva 2018년 2월 6일
This is what the result looks like for the first image using the code given above.
But a part of the first cell body is missing in the mask.
So I need help in extracting the exact shape of the cell body in the mask. How do I go about it ??

댓글을 달려면 로그인하십시오.

답변 (1개)

Arun Mathamkode
Arun Mathamkode 2018년 2월 22일
To get good results you have to finetune the parameters in the algorithm. For example, giving a lower threshold for imbinarize function (may be 0.1) will give you complete mask. Although I am not much clear about the algorithm you are using, I believe it is heavily depended on multiple parameters. Tuning these parameters for different images will be difficult.
If we can assume the cell body will be approximately circular, we can use imfindcircles to detect the circles in the image and use imfill to create the mask from the circle boundaries. I believe this approach will be more robust.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by