Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x=imread('textt.png');
- %hold on%x=imread ('rc.jpg');%img=rgb2gray(x);
- umb=graythresh(x);
- bw=im2bw(x,umb);
- [l ne]=bwlabel(bw);
- pr=regionprops(l,'Area','BoundingBox');
- av=[pr.Area];
- id=find((500<=av)&(av<=10000));
- h=ismember(l,id);
- np=regionprops(h);
- whos h
- hold on
- for n=1:size(np,1)
- rectangle('Position',np(n).BoundingBox,'EdgeColor','g','LineWidth',5)
- end
- hold on
- subplot(2,1,1)
- imshow(x); xlabel('originial image ');
- hold on
- subplot(2,1,2)
- imshow(h); xlabel('number detected image ');
Add Comment
Please, Sign In to add comment