I am developing a text segmentation program in C #, I want to use the histogram segment text I have the histogram froze library How can i use And I want to cut the threshold. Yet I only developed
Vertical Intensive Statistics versatility = New Vertical Intensive Statistics (bitmap); Histogram Histogram = Verticality Gray; How to print now where the histogram moves down the sound and changes the original image.
Also I want to display this histogram on the chart.
I created a similar job, you can take histogram values:
Returning int [] has the same width of the image (vertical projection) or heigath (horizontal projection).
Once you have int arrays, for example, you can calculate the mean average value:
int average = 0;
Foreach (Array in ARM): Average + = Ams;
average = average / array.label;
So now you can iterate your array, while the value is subject to your average.
int startWidth while (array [initial] & lt; average) startpoint ++;
While (Array [Andwith] and Lt; average) Endwid -;
// Here is your new width in which some text is included.
// If you want text to the Segment, you can iterate the code a second time.
// Unless you receive a single word / letter
No comments:
Post a Comment