region properties problem

조회 수: 1 (최근 30일)
Mohammad Golam Kibria
Mohammad Golam Kibria 2011년 6월 21일
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.

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2011년 6월 21일
regionprops(I,I,'PixelValues')

카테고리

Help CenterFile Exchange에서 Particle Swarm에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by