Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1.     def pre_process_image(self, image):
  2.         kernel = np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]])
  3.         image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
  4.         image = cv2.filter2D(image, -1, kernel)
  5.         image = invert(image)
  6.         image = binary_dilation(image, disk(2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement