回答編集履歴
2
余計なお世話を追記
answer
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
|
3
3
|
16bitなのに unsigned char でアクセスするのは間違ってますよね.
|
4
4
|
|
5
|
+
画素値総和を求む箇所が何だか冗長に見えます.
|
6
|
+
(途中で配列に各画像の画素値を入れるようなことに特段の必要性が無いのであれば)このくらいで良いのでは:
|
7
|
+
|
8
|
+
```C++
|
9
|
+
totaloutput = 0; //全0
|
10
|
+
|
11
|
+
for(int z = 0; z < EXPECTED_IMAGES; z++)
|
12
|
+
{ cv::add( images[z], totaloutput, totaloutput, cv::noArray(), totaloutput.depth() ); }
|
13
|
+
```
|
14
|
+
|
5
15
|
---
|
6
16
|
|
7
17
|
`imshow` がbit深度毎にどういう表示を行うのかはリファレンスを見れば書いてあります.
|
1
文字Tが削れちゃったのを修正
answer
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
```
|
10
10
|
If the image is 8-bit unsigned, it is displayed as is.
|
11
|
-
If the image is 16-bit unsigned or 32-bit integer, the pixels are divided by 256.
|
11
|
+
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].
|
12
12
|
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].
|
13
13
|
```
|
14
14
|
|