Top-hat and bottom-hat operation

Have you ever been interested in getting some small details from an image? The Julia Morphology package also implements tophat and bothat operators focused on retrieving these kinds of details.

The top-hat filter is applied to enhance bright objects of interest on a dark background. It transforms an image by subtracting a result from running the opening function from the original image. It holds those elements of a source image that are smaller than the structuring element and are brighter than their neighbors.

The bottom-hat operation, on the other hand, is used to do the opposite; that is, it is used to enhance dark objects of interest on a bright background. The bottom-hat operator returns an image that ...

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.