質問編集履歴

2

コードの変更

2022/05/14 05:15

投稿

Luiahu
Luiahu

スコア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) #float64
14
+ print(norm.dtype)#float64
15
- norm = np.clip(norm * 255, a_min = 0, a_max = 255).astype(np.uint8) #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) #uint8
17
+ print(norm.dtype)#uint8
18
- plt.imshow(norm) #真っ黒な画像が表示
18
+ plt.imshow(norm)#真っ黒な画像が表示
19
19
  ```

1

タグの変更

2022/05/13 02:32

投稿

Luiahu
Luiahu

スコア2

test CHANGED
File without changes
test CHANGED
File without changes