How do I use Image projections in specific computations
I want to decide the language of the text image based on the Hor. projection. I computed the Hor projection as shown in the following figures. So how can I find that if the image has an extreme horizontal peak (such as in figure 1 and 2), so the text belongs to Language X and if the image has more than one peaks (such as in figure 3 and 4), so it belongs to language Y.
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Counting the number of peaks, and using that to infer written language seems a very broad brush to apply to the problem. As well, it is a difficult thing to measure, since on some samples there may easily be a second peak. Looking at the second figure, I see it might easily lead you astray.
Anyway, there are simpler methods that might not be so easily led astray, that are trivial to compute. For example, compute a normalized area under that curve, when viewed as x(y). Thus, viewing x as the independent variable, compute the area of the curve as trapz(x), then divide that result by max(x).
measure = trapz(x)/max(x);
The point is, figures 1 and 2 have relatively little area under that curve, relative to the maximum value that x attains. Whereas figures 3 and 4 will show a seriously different result from the above trivial computation.
I’m not sure how the above curves are defined, so you might gain the same information from a tool like polyarea, rather than trapz. And since I don’t know if the points on the curve are equally spaced, it is hard to be sure how exactly to compute that result. But you should get the general idea.
SEE COMPLETE ANSWER CLICK THE LINK