Based on mathematical morphology, a new algorithm for edge detection w
as proposed, which has a bright future in practical application. This
new algorithm has the advantages of simplicity, convenience, flexibili
ty and programmability, better than the old one. The experimental demo
nstrations were given.