character segmentation
Mostra commenti meno recenti
hi, i have obtained this code from a website,for character segmentation, i am unable to understand a particular line in this code , could any body explain me...
code:-
clear all;
close all;
I = imread('plate.jpg');
BW = im2bw(I, 0.9);
BW = ~BW;
stats = regionprops(BW);
for index=1:length(stats)
if stats(index).Area > 200 && stats(index).BoundingBox(3)*stats(index).BoundingBox(4) < 30000
x = ceil(stats(index).BoundingBox(1))
y= ceil(stats(index).BoundingBox(2))
widthX = floor(stats(index).BoundingBox(3)-1)
widthY = floor(stats(index).BoundingBox(4)-1)
subimage(index) = {BW(y:y+widthY,x:x+widthX,:)};
figure, imshow(subimage{index})
end
end
what does this line do:
if stats(index).Area > 200 && stats(index).BoundingBox(3)*stats(index).BoundingBox(4) < 30000
Risposta accettata
Più risposte (1)
SATYAVIR SINGH KUNTAL
il 26 Apr 2011
0 voti
@ashish.. could u give me the link of the site from which u got this piece of code... thanxx..
1 Commento
Ashish
il 26 Apr 2011
Categorie
Scopri di più su Convert Image Type in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!