How to crop image?
Show older comments
I want to crop the image in matlab, so the image just display the characters "*H 43 L*" and "*B 411 PJK*".
And the "*2 points*" and characters "*04.16 _*" in below are cropped.
I want that the displayed objects is only object from the right side to the left side.
And here is my code..
[labelled jml] = bwlabel(citra_fill);
Iprops=regionprops(labelled,'BoundingBox','Image');
a=~citra_fill;
[f c]=find(a);
lmaxc=max(c);lminc=min(c);
lmaxf=max(f);lminf=min(f);
imgn=a(lminf:lmaxf,lminc:lmaxc);%Crops image
Any suggestion?
Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!