i'm trying to use only the size and the color to detect the infected cells
infected white cell detection in image
2 views (last 30 days)
Show older comments
hello i'm a beginner of using mat-lab and as part of my Homework. i need to detect infected white cells in image and count them where the Nucleus of an infected white cell large and color Blue.
Original Image:
Explain Image:
so i try to isolate the whit cells then detect the infected white cells but i'm stuck and do not what to do i will write my code and mention where i stuck and please if three is anther way to do this pleas help.
1.convert the image from RGB to YcBcR space color to detect the whit sells
OrgenalImg = imread('D:\Users\FADI\Desktop\cells\cells1.jpg');
CopyOfOrgenalImg = OrgenalImg;
YcbcrImage = rgb2ycbcr(CopyOfOrgenalImg);
cb = YcbcrImage(:,:,2);
cr = YcbcrImage(:,:,3);
[r,c,v] = find(cb>=77 & cb<=127 & cr>=133 & cr<=173);
index1 = size(r,1);
%Mark the white cell pixel
for i=1:index1
CopyOfOrgenalImg(r(i),c(i),:) = 255;
end
figure, imshow(CopyOfOrgenalImg);title('White Cells');
the White Cells image:
2.here i'm stuck i try to convert the White Cells image to gray grayscale to delete and remove the unwanted shape but i can't find way to do that so pleas help and how can i continue in my homework to detect and count the with cells and if there is anther ways to do this pleas let me know thanks in advance on any help.
Answers (1)
Image Analyst
on 23 Aug 2014
I think you need to do a two pass color segmentation because the dark purple blobs are inside the light purple blobs. First find the light purple ones. You'll probably have to do watershed to separate them. http://www.mathworks.com/help/images/examples/marker-controlled-watershed-segmentation.html Then find the dark purple and use the watershed binary image to make them. Then determine size and color and number of dark purple in the light purple and make your decision.
See my File Exchange for image segmentation and color segmentation demos: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!