Classification of Cells
Show older comments
Could you please help me to solve this Matlab problem? I have an exam and I can't do this.
4 Comments
Ahmet Koyu
on 3 Nov 2011
Turgut Kizilcik
on 2 Jan 2017
dostum sorunun cevabını bulabildin mi
Walter Roberson
on 2 Jan 2017
Approximate translation:
Did you find the answer to the problem, my friend?
Image Analyst
on 2 Jan 2017
The answer is given in my tutorial: http://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial All he had to do was to make slight modifications, like the image filename, etc.
Answers (2)
Walter Roberson
on 3 Nov 2011
0 votes
The assignment does give step by step instructions. Perhaps you should post what you have so far based on those instructions, and explain the point you are stuck on.
10 Comments
Ahmet Koyu
on 3 Nov 2011
Ahmet Koyu
on 3 Nov 2011
Walter Roberson
on 3 Nov 2011
The page of instructions is cut off on the right hand side. There _is_ a download button, but it requires creating an account on scribd.com which I do not wish to do.
One of the regionprops is the bounding box. If the bounding box touches a border then some pixel in the component must touch the border -- otherwise a smaller bounding box would have been used.
Image Analyst
on 3 Nov 2011
To get rid of blobs touching the border, which is basically the entire background of your image, if you can't use imclearborder, just label it and set the 1 values to 0.
labeledImage = bwlabel(binaryImage);
labeledImage(labeledImage == 1) = 0; % Poof - they're gone!
Ahmet Koyu
on 3 Nov 2011
Ahmet Koyu
on 3 Nov 2011
Walter Roberson
on 3 Nov 2011
Image Analyst's answer only works if you consider the white areas to be the objects and the black areas to be the cells. I believe that the image uses the other way around, though: it appears to me that the black areas are the cells and the white area is your background. Note that the image processing routines assume that black (0) is background, so you will need to do a binary negation of your image along the way.
With regards to creating an account on scribd: I cannot do that, as I do not agree to the legal Terms and Conditions of the site.
Please see http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
As far as I know, all of the sites listed there allow downloading without creating an account. Some of them are a nuisance for volunteers, though: in particular, easy-share, rapidshare, and jumbofiles are not friendly to time-starved volunteers.
Ahmet Koyu
on 3 Nov 2011
Edited: Image Analyst
on 2 Jan 2017
Image Analyst
on 3 Nov 2011
Edited: Image Analyst
on 2 Jan 2017
Walter, my answer (bwareaopen, BlobsDemo) works if you consider the foreground objects to be white, like you said. But, like you said, his objects are black. That's why I said to invert the image. After you do that, his white background that touches the border is gone, his black blobs are now white, and you can do any standard image processing operations where the foreground is assumed to be the white blobs.
Ahmet: What kind of help do you want? it pretty much spells out what to do step by step. Do you want us to totally complete your assignment and hand over the code to you for you to turn in as your own? Or you're looking for something else?
Walter Roberson
on 4 Nov 2011
I'm told it is my turn to make the meal, alas.
Image Analyst
on 3 Nov 2011
0 votes
Why can't you use imclearborder? Anyway, you might not have to if you invert the image. Also check out bwareaopen to do size filtering. You might check out my image analysis tutorial, BlobsDemo. It's kind of similar. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!