region properties problem

3 visualizaciones (últimos 30 días)
Mohammad Golam Kibria
Mohammad Golam Kibria el 21 de Jun. de 2011
Hi I have the following code:
I =
0 0 0 0 0 0 0
0 1 1 0 1 1 0
1 0 1 1 1 0 1
0 1 1 0 1 0 1
0 0 0 0 1 1 0
0 0 0 0 0 0 0
K>> r=regionprops(I,'PixelValues'); ??? Error using ==> regionprops>getPropsFromInput at 1172 REGIONPROPS needs I as an input to calculate 'PixelValues'.
Error in ==> regionprops>ParseInputs at 1133 reqStats = getPropsFromInput(startIdxForProp, ...
Error in ==> regionprops at 154 [I,requestedStats,officialStats] = ParseInputs(imageSize, varargin{:});
Is there any one to solve this problem?
Thanks.

Respuestas (1)

Andrei Bobrov
Andrei Bobrov el 21 de Jun. de 2011
regionprops(I,I,'PixelValues')

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by