reason for this error??

Plzz tell me what's wrong with this code?? I want to perform text filtering on my image and want to remove all the non-letter elements.. What else can i do to achieve this??
cc= bwconncomp(Bgmclose);
>> L=labelmatrix(cc);
>> props=regionprops(cc,'BoundingBox');
>> idx=([props.BoundingBox(3)]<0.5);
??? Field reference for multiple structure elements that is followed
by more reference blocks is an error.

 채택된 답변

Walter Roberson
Walter Roberson 2012년 4월 20일

0 개 추천

bb = vertcat(probs.BoundingBox);
idx = bb(:,3) <0.5;

댓글 수: 5

supriya
supriya 2012년 4월 20일
hey!thanxx.Can u tell me how can i find center width and center height of a bounding box??
Walter Roberson
Walter Roberson 2012년 4월 20일
bb(:,[3 4]) ./ 2
If you are looking for the centroid, then get the 'Centroid' property. If you are looking for the center of the bounding box, then
bb(:,[1 2]) + bb(:,[3 4]) ./ 2
supriya
supriya 2012년 4월 20일
actually i want to find those connected components for which
.1<center width of the bounding box<.9
.3<center height of the bounding box<.7
Walter Roberson
Walter Roberson 2012년 4월 20일
What is the "center width" or "center height" of a bounding box?
find( 0.1 < bb(:,3) & bb(:,3) < 0.9 & 0.3 < bb(:,4) & bb(:,4) < 0.7)
supriya
supriya 2012년 4월 20일
I got it..thanxxx it was really very helpful!

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by