필터 지우기
필터 지우기

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개)

Community Treasure Hunt

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

Start Hunting!

Translated by