Some help with segmentation?
3 views (last 30 days)
Show older comments
Hi!
I would like to segment the cells (the brightest parts) of an image (lots of them).
Unfortunately, some of these cells have very low intensity values in their inner parts (see as an example the region of the orange arrow). This brings difficulties when trying to define a threshold for background subtraction. After numerous tests, I think I'm very close to achieving this goal. However, once again I am not able to.
I've been trying edge, entropyfilt, rangefilt...functions on "restan" image, but without succesful results.
Does anyone have an idea on how to solve this last step(s)?
Here is the code that i'm using to get the subsequent images until the "restan" image.
inthe=histeq(int);
%figure; imshow(inthe)
intheg=imgaussfilt(inthe,4);
%figure; imshow(inthe)
intstd=stdfilt(intheg, true(3));
map=gray; ncol = size(map,1);
minv = min(intstd(:));
maxv = max(intstd(:));
s = round(1+(ncol-1)*(intstd-minv)/(maxv-minv));
rgb_image = ind2rgb(s,map);
intstd16=im2uint16(rgb2gray(rgb_image)); %figure; imshow(intstd16)
resta=imadjust(intheg-intstd16); %figure; imshow(resta)
restan=imnoise(resta, 'speckle',1); %figure; imshow(restan)
I've also attached the original image (int.png)
Thank you very much in advance!!!
Maria.
0 Comments
Answers (2)
Image Analyst
on 25 Sep 2019
All that code you did does not do anything for getting a threshold - it's all unnecessary. You don't need to blur, rescale intensities, detect edges, or add noise.
Have you tried imbinarize()?
Or else try my interactive thresholding app: in my File Exchange
1 Comment
KALYAN ACHARJYA
on 25 Sep 2019
@Maria, refer the suggestion from Image Analyst sir.
How you determine the accuracy of segmentation result in this case? Is there any expeted output?
Looking for input single image, you can do the segmentation in multiple ways.
Good Luck!
MARIA RODRIGUEZ SANZ
on 25 Sep 2019
2 Comments
Image Analyst
on 25 Sep 2019
Maybe try the triangle threshold like in the attached function.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!