Hi, I am new in C++ programming.
I use c++ and opencv. The type of image is Mat structure.
In matlab, I did this :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
for i=1:m
for j=1:n
if(image(i,j)==1)
if(one_flag==1)
if(zeros_count<=hor_thresh)
hor_image(i,j-zeros_count:j-1)=1;
else
one_flag=0;
end
zeros_count=0;
end
one_flag=1;
elseif(one_flag==1)
zeros_count=zeros_count+1;
end
end
end
end