distance between center of bounding box in text image

1 回表示 (過去 30 日間)
lotus whit
lotus whit 2016 年 8 月 2 日
編集済み: lotus whit 2016 年 8 月 2 日
<<
>>
i tried to segment line to individual words, according to distance between letters, so i create image 2 (bounding box), then i calculate centroied for each box, but i have used following code
s = regionprops(imgn,'centroid');
stats = regionprops(lab,'Centroid','MajorAxisLength','MinorAxisLength')
cent = cat(1, stats.Centroid);
centers = stats.Centroid;
size_cent= size(cent);
figure(5),imshow(f1);
hold on
plot(cent(:,1), cent(:,2), 'b*')
hold off
x=cent(:,1);
y=cent(:,2);
then calculate the distance between x, y coordinates, but the values of distances is not varying to separate words, i don't know how to take the decision? Any one have an idea?

回答 (0 件)

カテゴリ

Help Center および File ExchangeText Analytics Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by