質問編集履歴
2
コードの変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,10 +10,10 @@
|
|
10
10
|
Lchannel = imgHLS[:,:,1]
|
11
11
|
norm = Lchannel / Lchannel.sum()
|
12
12
|
|
13
|
-
plt.imshow(norm)
|
13
|
+
plt.imshow(norm)#正規化後の画像が表示される
|
14
|
-
print(norm.dtype)
|
14
|
+
print(norm.dtype)#float64
|
15
|
-
norm = np.clip(norm * 255, a_min = 0, a_max = 255).astype(np.uint8)
|
15
|
+
norm = np.clip(norm * 255, a_min = 0, a_max = 255).astype(np.uint8)#uint8に変更
|
16
|
-
cv2.imwrite('norm.png', norm)
|
16
|
+
cv2.imwrite('norm.png', norm)#真っ黒な画像が保存
|
17
|
-
print(norm.dtype)
|
17
|
+
print(norm.dtype)#uint8
|
18
|
-
plt.imshow(norm)
|
18
|
+
plt.imshow(norm)#真っ黒な画像が表示
|
19
19
|
```
|
1
タグの変更
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|