回答編集履歴

1

参考URLの差し替え

2019/08/03 06:34

投稿

mistn
mistn

スコア1191

test CHANGED
@@ -1,10 +1,10 @@
1
- 公式ドキュメントではなくブログからの引用で申し訳ないですが、
1
+ [OpenCV: High-level GUI](https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563)
2
2
 
3
- [Pillow, OpenCVなどでの画像の扱いの違い](https://nixeneko.hatenablog.com/entry/2017/09/01/000000)
3
+ > If the image is 8-bit unsigned, it is displayed as is.
4
4
 
5
- > cv2.imshowなどに渡す画素値の範囲
5
+ If the image is 16-bit unsigned or 32-bit integer, the pixels are divided by 256. That is, the value range [0,255*256] is mapped to [0,255].
6
6
 
7
- 画像表示・出力用のcv2.imshow, cv2.imwriteなどの関数に与える画像の画素値の範囲は、uint8であれば[0, 255]、uint16は[0, 65535]、int16は[-32768, 32767]、floatであれば[0.0, 1.0]であるらしい(値の小さい方が黒、大きい方が白となる)。float[0.0, 1.0]の範囲からはみ出た値は、黒(0.0)または白(1.0)になる。
7
+ If the image is 32-bit or 64-bit floating-point, the pixel values are multiplied by 255. That is, the value range [0,1] is mapped to [0,255].
8
8
 
9
9
 
10
10