質問編集履歴
5
文法修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
fig, ax = plt.subplots()
|
42
42
|
|
43
|
-
ax.bar(bin,hist)
|
43
|
+
ax.bar(bin,hist_norm)
|
44
44
|
|
45
45
|
plt.show()
|
46
46
|
|
4
文法修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,6 +56,10 @@
|
|
56
56
|
|
57
57
|
TypeError: only size-1 arrays can be converted to Python scalars
|
58
58
|
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
59
63
|
以下の図のようにヒストグラム表示をしたいです。縦軸は正規化した値を用いたいです
|
60
64
|
|
61
65
|
![イメージ説明](8790ca09296ff1eeaf9a9a15202e6226.png)
|
3
文法修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,11 +8,7 @@
|
|
8
8
|
|
9
9
|
```ここに言語を入力
|
10
10
|
|
11
|
-
|
11
|
+
gray = io.imread('./sample/sample01.jpg', as_gray=True)
|
12
|
-
|
13
|
-
gray= cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
|
14
|
-
|
15
|
-
|
16
12
|
|
17
13
|
|
18
14
|
|
@@ -28,11 +24,15 @@
|
|
28
24
|
|
29
25
|
hist = descriptors.sum(axis=0)
|
30
26
|
|
31
|
-
#
|
27
|
+
#hist=hist.reshape(-1,1)
|
32
28
|
|
33
|
-
|
29
|
+
bin = np.arange(128)
|
34
30
|
|
31
|
+
mmcaler = MinMaxScaler()
|
32
|
+
|
35
|
-
hist_norm =
|
33
|
+
hist_norm = mmcaler.fit_transform(hist)
|
34
|
+
|
35
|
+
#hist_norm=hist_norm.reshape(-1,1)
|
36
36
|
|
37
37
|
|
38
38
|
|
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
fig, ax = plt.subplots()
|
42
42
|
|
43
|
-
ax.bar(hist
|
43
|
+
ax.bar(bin,hist)
|
44
44
|
|
45
45
|
plt.show()
|
46
46
|
|
@@ -54,37 +54,7 @@
|
|
54
54
|
|
55
55
|
```ここに言語を入力
|
56
56
|
|
57
|
-
|
57
|
+
TypeError: only size-1 arrays can be converted to Python scalars
|
58
|
-
|
59
|
-
array=[10338. 12060. 12021. 11242. 10509. 8952. 7613. 7719. 21517. 16683.
|
60
|
-
|
61
|
-
11528. 10562. 11536. 11373. 9738. 12924. 22158. 12504. 8467. 9926.
|
62
|
-
|
63
|
-
14865. 15278. 13967. 18848. 11078. 8193. 7539. 10153. 14693. 13478.
|
64
|
-
|
65
|
-
12072. 12843. 14555. 11868. 13106. 13885. 13788. 11728. 9017. 9916.
|
66
|
-
|
67
|
-
38820. 19358. 15427. 15696. 15142. 13132. 11412. 19217. 43430. 19680.
|
68
|
-
|
69
|
-
9354. 12008. 21784. 21254. 17366. 24351. 13128. 8564. 9538. 16468.
|
70
|
-
|
71
|
-
25147. 22791. 16174. 13489. 14920. 8850. 9176. 12072. 13720. 13280.
|
72
|
-
|
73
|
-
12812. 13099. 39104. 18972. 11491. 13785. 16714. 15527. 14141. 19733.
|
74
|
-
|
75
|
-
43032. 24309. 16905. 21364. 22213. 12496. 8647. 19599. 12889. 13364.
|
76
|
-
|
77
|
-
16373. 22457. 25837. 16933. 8418. 8100. 10036. 8271. 8288. 9285.
|
78
|
-
|
79
|
-
10091. 10083. 10566. 12104. 21194. 14284. 11122. 11101. 11709. 10191.
|
80
|
-
|
81
|
-
11584. 17397. 23751. 19068. 13079. 14000. 15595. 10321. 8889. 14115.
|
82
|
-
|
83
|
-
11363. 11893. 11437. 12883. 16598. 11546. 7619. 8679.].
|
84
|
-
|
85
|
-
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
|
86
|
-
|
87
|
-
```
|
88
58
|
|
89
59
|
以下の図のようにヒストグラム表示をしたいです。縦軸は正規化した値を用いたいです
|
90
60
|
|
2
文法修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -86,6 +86,6 @@
|
|
86
86
|
|
87
87
|
```
|
88
88
|
|
89
|
-
以下の図のようにヒストグラム表示をしたいです。
|
89
|
+
以下の図のようにヒストグラム表示をしたいです。縦軸は正規化した値を用いたいです
|
90
90
|
|
91
91
|
![イメージ説明](8790ca09296ff1eeaf9a9a15202e6226.png)
|
1
画像の添付
test
CHANGED
File without changes
|
test
CHANGED
@@ -85,3 +85,7 @@
|
|
85
85
|
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
|
86
86
|
|
87
87
|
```
|
88
|
+
|
89
|
+
以下の図のようにヒストグラム表示をしたいです。
|
90
|
+
|
91
|
+
![イメージ説明](8790ca09296ff1eeaf9a9a15202e6226.png)
|