質問編集履歴
1
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,11 +8,19 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
下のforEach はRGBの順でRGB画像を入れています。
|
11
|
+
下のforEach は BGRからRGBに変換したあと、RGBの順でRGB画像を入れています。
|
12
12
|
|
13
13
|
|
14
14
|
```c++
|
15
15
|
|
16
|
+
void preprocessing(Mat &img)
|
17
|
+
{
|
18
|
+
cvtColor(img, img, COLOR_BGR2RGB);
|
19
|
+
resize(img, img, Size(VALID_WIDTH, VALID_HEIGHT));
|
20
|
+
}
|
21
|
+
|
22
|
+
|
23
|
+
|
16
24
|
int8_t normalize_and_quantize(int pixel, int i, int j, int k, float scale)
|
17
25
|
{
|
18
26
|
int8_t q_pixel;
|