Clear Filters
Clear Filters

distance between center of bounding box in text image

2 views (last 30 days)
<<
>>
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?

Answers (0)

Community Treasure Hunt

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

Start Hunting!