Little problem with region props
Show older comments
here I want to separate red blue and green content from the image and I should find centroid for the red blue and green content. For this I
1) First read the image;
2)seperated its Red,Blue and Green components into other variables;
3) converted that into a bit image after finding its treshold values;
4) next I planned of using regionprops function on my bit image;
now when I used that regionprops('mybitimage','Centroid') I got this error " Field reference for multiple structure elements that is followed by more reference blocks is an error."
I couldn't figure out why I am getting that error and when will I get that error because for some images my code is working good and for some images I am getting that error.
Thanks in advance.
Answers (1)
Image Analyst
on 17 Jul 2013
1 vote
You need to pass regionprops a binary or labeled image, not a string. Try taking the single quotes off the first argument.
1 Comment
abhinav
on 17 Jul 2013
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!