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
%% Measure properties of image regions
%% Plot Bounding Box
and this is labeled image that all the objects in different lines have the same label (same color=red).