Home How to label separate lines in the image (image of a text) separately using "bwlabel" in matlab?
Reply: 0

How to label separate lines in the image (image of a text) separately using "bwlabel" in matlab?

user915
1#
user915 Published in April 25, 2018, 10:52 am

I have recognized and labeled objects in my image that is fully consists of texts. you can see the objects are labeled as red color in the attached image. so, I want to separate the objects in the second line (or more lines) from the first line and give them different colors (each line would has a different colors) but I can't do that. do you have any idea? thanks for all answers. this is part of my matlab code that does the labeling:

%% Label connected components
[L, Ne]=bwlabel(imagen);
%% Measure properties of image regions
propied=regionprops(L,'BoundingBox');
hold on
%% Plot Bounding Box
for n=1:size(propied,1)
    rectangle('Position',propied(n).BoundingBox,'EdgeColor','r','LineWidth',2)
end

and this is labeled image that all the objects in different lines have the same label (same color=red).

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.326684 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO