clustering based on area
이전 댓글 표시
i already measured the area on my sputum cell. now i want to cluster it based on area. area >2000 in figure 1 and area 2000< is in other figure 2. can i know the simple tutorial.? i dont want to use k mean clustering because it very complicated. i only want to cluster them as simple as i can

댓글 수: 4
martin SALGADO
2015년 11월 12일
Might uploading your code. I'm doing my memory on this topic and I would be very useful your code. Thank you
Image Analyst
2015년 11월 12일
You can look at my Image Segmentation Tutorial here: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
No need to do it inefficiently like wil did below - you can simply use ismember() like I did.
martin SALGADO
2015년 11월 12일
Your code Image Segmentation Tutorial is for segment images, but I want only one way clustering a set of points, and the area that contains the items is less than some value.
izyan hanum
2015년 12월 3일
채택된 답변
추가 답변 (2개)
wil
2015년 3월 23일
Hi,
k-means is probably the simplest method of clustering, but if you simply want to sort the regions based on their area, you can use logical indexing or the find() method.
It depends on they type of data your groups are, but if they are simply binary images you can use (assuming the cells are contained in a cell, change as appropriate)
vol = cells{i};
area(i) = numel(vol(vol ~= 0));
to get the area for each cell and sort them using
idxs_1 = find(area < 2000);
idxs_2 = find(area >= 2000);
cells_1 = cells(idxs_1);
cells_2 = cells(idxs_2);
The groups cells_1 and cells_2 now contain your grouped cells.
Hope this helps, let me know if anything needs clarifying.
Wil
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
