function l = cv_add_neighbors(list,Es,mask,r0,c0)
%
[rows,cols] = size(Es);
l = list;
for r = r0-1:r0+1
   if (r>0) & (r<=rows)
      for c = c0-1:c0+1
         if (c>0) & (c<=cols)
            if (mask(r,c)==0) & (Es(r,c)>0)
               if ~cv_in_list(r,c,l)
                  l = [l; r c];
               end
            end
         end
      end
   end
end
