Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def pre_process_image(self, image):
- kernel = np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]])
- image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
- image = cv2.filter2D(image, -1, kernel)
- image = invert(image)
- image = binary_dilation(image, disk(2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement