Little problem with region props

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.

Respuestas (1)

Image Analyst
Image Analyst el 17 de Jul. de 2013

1 voto

You need to pass regionprops a binary or labeled image, not a string. Try taking the single quotes off the first argument.

1 comentario

abhinav
abhinav el 17 de Jul. de 2013
I didnot pass a string i passed the name of the bit wise image's identifier ( variable ) without inscribing it in single quotes sometimes my program works fine and some times it shows that error and program terminates.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 17 de Jul. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by