user1492588
user1492588

Reputation:

Feature extraction from an image

hi i am new in matlab.... i want to detect sick cells in a image.

first i segmented the image by this code: now i want to extract its features.... what should i do? please guide me? thanks

he = imread('hestain.png');
imshow(he), title('H&E image');
text(size(he,2),size(he,1)+15,...
     'Image courtesy of Alan Partin, Johns Hopkins University', ...
     'FontSize',7,'HorizontalAlignment','right');

cform = makecform('srgb2lab');
lab_he = applycform(he,cform);
ab = double(lab_he(:,:,2:3));
nrows = size(ab,1);
ncols = size(ab,2);
ab = reshape(ab,nrows*ncols,2);
nColors = 3;
% repeat the clustering 3 times to avoid local minima
[cluster_idx cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', ...
                                      'Replicates',3);
pixel_labels = reshape(cluster_idx,nrows,ncols);
imshow(pixel_labels,[]), title('image labeled by cluster index');

segmented_images = cell(1,3);
rgb_label = repmat(pixel_labels,[1 1 3]);
for k = 1:nColors
    color = he;
    color(rgb_label ~= k) = 0;
    segmented_images{k} = color;
end
imshow(segmented_images{1}), title('objects in cluster 1');

imshow(segmented_images{2}), title('objects in cluster 2');

imshow(segmented_images{3}), title('objects in cluster 3');

Here is the image: enter image description here

Now i want to extract its features.... what should i do? please guide me? thanks

Upvotes: 0

Views: 13555

Answers (2)

Ankur
Ankur

Reputation: 46

Find the properties of each of your clusters aka cells by finding its eigenvalues and eigenvectors. These will indicate the "tubeness" of your cells. You can compute moments of each cell as well.

I have no idea what your "sick" cells look like, so coming up with a method to differentiate between healthy and sick cells is not possible if no one knows what a "sick" cell looks like. Post another image of what a sick cell looks like.

You can learn properties of tubeness and moments for each cell, and store them. Then use a Support Vector Machine to classify healthy vs sick cell. Use SVM-Light. http://svmlight.joachims.org/

Ankur

Upvotes: 0

G453
G453

Reputation: 1456

regionprops function in matlab will extract different properties of detected blobs, here is a link regionsprops

Upvotes: 3

Related Questions