LPX
commited on
Commit
·
32d1ae3
1
Parent(s):
c6683ee
cv2
Browse files- utils/bitplane.py +1 -1
utils/bitplane.py
CHANGED
@@ -19,7 +19,7 @@ def bit_plane_extractor(
|
|
19 |
idx = {"Red": 0, "Green": 1, "Blue": 2}[channel]
|
20 |
img = img[:, :, idx]
|
21 |
plane = cv.bitwise_and(np.full_like(img, 2 ** bit), img)
|
22 |
-
plane = cv.normalize(plane, None, 0, 255,
|
23 |
if filter_type == "Median":
|
24 |
plane = cv.medianBlur(plane, 3)
|
25 |
elif filter_type == "Gaussian":
|
|
|
19 |
idx = {"Red": 0, "Green": 1, "Blue": 2}[channel]
|
20 |
img = img[:, :, idx]
|
21 |
plane = cv.bitwise_and(np.full_like(img, 2 ** bit), img)
|
22 |
+
plane = cv.normalize(plane, None, 0, 255, cv.NORM_MINMAX).astype(np.uint8)
|
23 |
if filter_type == "Median":
|
24 |
plane = cv.medianBlur(plane, 3)
|
25 |
elif filter_type == "Gaussian":
|