An efficient algorithm based on the simulated annealing for the learni
ng optimization of morphological filters is proposed. The learning sta
ge is divided into two consecutive parts; the initial-learning stage f
inds and fixes the most important parts of the structuring elements, a
nd the precise-learning stage determines details of the rest. This met
hod significantly reduces the number of trials for the modification of
structuring elements. The proposed algorithm is applied to the learni
ng optimization of the bipolar morphological operation, whose optimiza
tion problem has not yet been investigated. It is shown experimentally
that the algorithm optimizes the operator as efficiently as the conve
ntional one and reduces the amount of calculation.