To segment above image i want to use line height. I don't know even any algorithm for this. I want a useful link pls help..
just i want an efficient algorithm link for this.....
I shall be very thankful to you for this..
// 今まで試してみました
function [avmax avmin avgwidth]=firstsvg(Imag)
%Imag=imread('D:\THAPAR\poj\images\ndpj.jpg');
imtool(Imag);
G=Imag;
%xlswrite('G.xlsx',Imag(:,:,1));
[y,x]=size(G); % y dentoes rows and x denotes columns
T=160;%sum(sum(I))/(y*x)%T dentoes threshhold value - i.e avg
HYT=zeros(1,1);
GY=zeros(y,1); %single column of zeros
for j=1:y
for i=1:x
if (G(j,i)<T)
GY(j,1)=GY(j,1)+1; % count of no. of black pixel
end
end
end
for c=1:y
if (GY(c,1)> min)
min = GY(c,1);
gt(ce,1)=GY(c,1);
ce=ce+1;
end
end
dgt=zeros(ce,1);
for b=1:(ce-2)
dgt(b,1)= gt(b+1,1)- gt(b,1);
end
mdgt= mean(dgt);
avgwidth= thyt;
avmax =thyt;
avmin = gt(1,1);
just i want an algorithm link to calculate line height ???