function h = cv_Canny_hysteresis_thresh(Es,Eo,t_low,t_high)
%
[rows,cols] = size(Es);
h = zeros(rows,cols);
mask = zeros(rows,cols);
list = [];
for r = 1:rows
   for c = 1:cols
      if (Es(r,c)>t_high) & (mask(r,c)==0)
         list = cv_add_neighbors(list,Es,mask,r,c);
         mask(r,c) = 1;
         h(r,c) = Es(r,c);
         [len_list,dummy] = size(list);
         while len_list>0
            rprime = list(1,1);
            cprime = list(1,2);
            mask(rprime,cprime) = 1;
            list = list(2:len_list,:);
            [len_list,dummy] = size(list);
            if Es(rprime,cprime) > t_low
               h(rprime,cprime) = Es(rprime,cprime);
               list = cv_add_neighbors(list,Es,mask,rprime,cprime);
            end
         end
      end
   end
end
