How to remove the black background from region of interest (gray scale& RGB)

Sir, i'm doing my project in image processing, i need to segment the nucleus from the histopathological image.. i've tried with colour cell segmentation code which is there in matlab help .. it works good... the thing i need is... i need to process only the gray scale value of the segmented region..
http://www.mathworks.in/help/images/examples/color-based-segmentation-using-k-means-clustering.html the image is as same as image in this help topic ans i've used the same code..
from the segmented region (ie segmented blue nuclei--last image)..i converted it into grayscale image and then i need to extract features such as texture (GLCM features),statistical features., and wavelet based features...
... i dont need the black background.. can u help me how to overcome this problem

4 Comments

C = num2cell(YourImage); C(~YourImage) = {{}};
it worked out well.. the image i uploaded http://www4.picturepush.com/photo/a/12190392/640/12190392.jpg
the original and segmented image are http://www1.picturepush.com/photo/a/12190389/640/12190389.jpg now the thing is how can i use the values of C (ROI only)for obtaining statistical features like mean, variance and entropy... and for obtainng wavelet decomposition [c,s]=wavedec2(C,3,'db1'); by which i've to obtain its mean,variance and entropy in its each decomposition level... .. how to overcome this problem sir.. thanks in advance..
I thought Walter's response was as clever as it was hilarious. Evidently you didn't notice - hence the situation you're in now. It will be interesting/fun to see how this turns out.
Sorry Sir.. i didnt get you... i need to change something or... i dono wat i have to do... help me out sir..
No, I'm not getting into that again. We never could get you to understand what "removing the background" means. Go back to that thread and take it up with Walter, if you want. So, did you do anything with my suggestion below?

Sign in to comment.

Answers (1)

You do know about entropyfilt(), var(), mean(), conv2(), and graycomatrix() don't you?

7 Comments

yes sir.. i heard about it... in my work i use graycomatrix().., mean2().. but dont know how to use conv2()and entropyfilt();
Did you look in the help, and see if you can run the examples?
of course sir.. with Matlab help only i used graycomatrix()and mean2(). entropyfilt i tried it.. the segmented region was much more dialated then the actual one... .. . really dono hw to use.. conv2(a,b) wat the value of a and b should be..
What do you mean by "dialated"? And from the help:
I = imread('circuit.tif');
J = entropyfilt(I);
imshow(I), figure, imshow(J,[]);
Actually sir , i applied entropyfilt to the segmented image instead of original image... so the segmented edges seems to be widended then the normal one(tat i meant as dialated)... now i applied it to original image.. thanks for the help
Yes, that might happen since as the window gets near the textured regions, the entropy starts to rise. It doesn't just rise when the central pixel is over the region.
Now i understood clearly.. Thank you Sir..

Sign in to comment.

Asked:

on 14 Feb 2013

Community Treasure Hunt

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

Start Hunting!