A black hat operation is defined as the difference between the input image and the closing of the input image. You can see the details of this operation in the following code:
black_hat = cv2.morphologyEx(image, cv2.MORPH_BLACKHAT, kernel)
A black hat operation is defined as the difference between the input image and the closing of the input image. You can see the details of this operation in the following code:
black_hat = cv2.morphologyEx(image, cv2.MORPH_BLACKHAT, kernel)