what's the intuition of opencv Top Hat and Black Hat

Viewed 3028

I recently started study opencv. I only have a bachelor's degree on engineering. I am having a hard time of understanding these 2 morphological transformation: Black Hat, Top Hat. the official documents is here

Can some one give some advice of what is the intuition of these operation and what is it for?

2 Answers

Hopefully you understand ”morphological opening”. If so, the (white) Top Hat tells you the pixels that would be removed by ”opening”.

Likewise, the Black Hat tells you the pixels that would be added by ”morphological closing”.

Related