Skip to content

Commit

Permalink
replaced np float
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubii committed Aug 16, 2021
1 parent edb48d1 commit ea10b6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion endoscopy/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,5 @@ def bilateralSegmentation(img: np.ndarray, th: float, d: int=15, sigmaColor: flo
hsv = cv2.cvtColor(hsv, cv2.COLOR_BGR2HSV)
if hsv.max() == 0:
return np.zeros(img.shape[:-1])
hsv = hsv.astype(np.float)/hsv.max()
hsv = hsv.astype(float)/hsv.max()
return cv2.bitwise_not(cv2.inRange(hsv, (0., 0., 0.), (1., 1., th)))

0 comments on commit ea10b6d

Please sign in to comment.