필터 지우기
필터 지우기

regionprops

조회 수: 16 (최근 30일)
Mary Kodogianni
Mary Kodogianni 2011년 3월 30일
댓글: Amit Kumar 2020년 8월 14일
I would like someone to give me a good example to understand the use of regionprops with 'PixelList' as a parameter
  댓글 수: 3
Walter Roberson
Walter Roberson 2013년 3월 25일
Rod, you have not indicated what your question is.
Note: the Image Processing Toolbox is included with the Student Version license, but is not necessarily installed by default.
Amit Kumar
Amit Kumar 2020년 8월 14일
You can use Online MATLAB for assessing Image Processing Toolbox. Even I was not having it, but on Online MATLAB platform its available.

댓글을 달려면 로그인하십시오.

채택된 답변

David Young
David Young 2011년 3월 31일
Try this for a start:
img = zeros(5,5);
img(2:4, 2:4) = 1;
props = regionprops(img, 'PixelList');
disp(img);
disp(props.PixelList);
You can change the pattern of ones in img until you're clear about how the result is structured. Another simple but informative example:
img = zeros(5,5);
img(2,2) = 1;
img(4,4) = 2;
props = regionprops(img, 'PixelList');
disp(props(1).PixelList);
disp(props(2).PixelList);
  댓글 수: 1
Gopika Babu
Gopika Babu 2020년 3월 3일
i have some doubt

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Saneem Ahmed
Saneem Ahmed 2011년 3월 31일
regionprops is a function which is used on a labeled image. If we are having an image im. let it be a black and white image( values are either 1's or 0's). Now apply bwlabel to label image for this image.
[label n]=bwlabel(im); %n gives number of clusters, no.of groups of 1's. 0's are considered to be background.
now the label image can be put as input to regionprops to find certain characteristics about each clusters in the image. regionprops can give us area, bounding box, centroid, eccentricity etc of each cluster. 'PixelList' in regionprops will return pixel co-ordinates of each element in cluster. code can be like...
pix = regionprops(label.'PixeList');
list1=pix(1).PixelList; % we have to access like this coz regionprops gives output as a structure. similarly we can access every cluster.
listn=pix(n).PixelList;
  댓글 수: 1
Sean de Wolski
Sean de Wolski 2011년 3월 31일
It's also to be used with BWCONNCOMP, a much more powerful function.

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by