Hi everybody i have applied k-mean clustering on this image
i got 3 cluster but this was of my interest as shown in below picture but problem is this that i only want to extract infected cell shown in the below picture in square box i don't want rest of the things kindly help me how to achieve this.Thanks in Advance.

 채택된 답변

Image Analyst
Image Analyst 2014년 11월 29일

0 개 추천

That might not be a good method if it's not automatically choosing the correct clusters. I'd recommend you try color segmentation by HSV color space. See http://www.mathworks.com/matlabcentral/fileexchange/28512-simple-color-detection-by-hue - it will let you fine tune the thresholds to get exactly the color purple you want and not all those other colors. Try that and attach your code if you can't get it working.

댓글 수: 6

Umer Siddique
Umer Siddique 2014년 11월 29일
편집: Umer Siddique 2014년 11월 29일
can you please help me in code how to get purple colo i tried making changes but can not get what i want.
Image Analyst
Image Analyst 2014년 11월 29일
See attached adapted code. It produces this image:
Be sure to change the folder name in the file to wherever you store your images, or else use uigetdir() or uigetfile().
Umer Siddique
Umer Siddique 2014년 11월 29일
Thank you so much for your help.. The code that you have given me does not recognizes the shades of the purple like in below pictures how can i solve this.
Kindly help please.
Image Analyst
Image Analyst 2014년 11월 29일
편집: Image Analyst 2014년 11월 29일
You don't have good control over the image lighting. Try to fix that first. Anyway, just tweak the thresholds. Like maybe lower the low saturation threshold. You might have to write a little routine to make the thresholds adapt to the histogram. That's what I'd do.
Umer Siddique
Umer Siddique 2014년 11월 29일
can you please write some code for this.this will be very helpful for me to understand.
Image Analyst
Image Analyst 2014년 11월 29일
Try the attached. I did the adaptations I suggested. I'm thresholding pretty much on only the saturation image now. I also knocked down the smallest allowable blob to 220 pixels so that in image #5 it would still find something.

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

추가 답변 (1개)

r r
r r 2018년 8월 8일

0 개 추천

I have an image I want to extract the small areas of black color within the blue How so؟؟؟

댓글 수: 1

Image Analyst
Image Analyst 2018년 8월 8일
Start your own new, separate question and I'll tell you how you can invert the image and use imclearborder() to do it.

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

질문:

2014년 11월 28일

댓글:

2018년 8월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by