Learning morphological operators for skin detection