質問編集履歴

3

更新

2018/06/05 00:06

投稿

north_redwings
north_redwings

スコア32

test CHANGED
File without changes
test CHANGED
@@ -24,10 +24,6 @@
24
24
 
25
25
  ```C++
26
26
 
27
- // 画像処理工学 レポート
28
-
29
-
30
-
31
27
  #include <opencv2/core/core.hpp>
32
28
 
33
29
  #include <opencv2/highgui/highgui.hpp>

2

内容の更新

2018/06/05 00:06

投稿

north_redwings
north_redwings

スコア32

test CHANGED
File without changes
test CHANGED
@@ -24,6 +24,10 @@
24
24
 
25
25
  ```C++
26
26
 
27
+ // 画像処理工学 レポート
28
+
29
+
30
+
27
31
  #include <opencv2/core/core.hpp>
28
32
 
29
33
  #include <opencv2/highgui/highgui.hpp>
@@ -42,7 +46,7 @@
42
46
 
43
47
  {
44
48
 
45
- Mat Img = imread("lena.jpg");
49
+ Mat Img = imread("lena.jpeg");
46
50
 
47
51
 
48
52
 
@@ -120,7 +124,7 @@
120
124
 
121
125
  // Img.at<Vec3b>(row, col) = Vec3b(0,0,0);
122
126
 
123
- cout << "Img_h.at<Vec3b>(row, col) = " << Img_h.at<Vec3b>(row, col) << endl;
127
+ cout << "Img_h.at<Vec3b>(" << row <<"," << col << ")="<< Img_h.at<Vec3b>(row, col) << endl;
124
128
 
125
129
  // Img_h.at<Vec3b>(row, col) = BGR_h[row][col];
126
130
 
@@ -128,7 +132,7 @@
128
132
 
129
133
  // cout << "BGR_h[row][col] = " << BGR_h[row][col] << endl;
130
134
 
131
- cout << "代入後Img_h.at<Vec3b>(row, col) = " << Img_h.at<Vec3b>(row, col) << endl;;
135
+ cout << "代入後Img_h.at<Vec3b>(" << row <<"," << col << ")=" << Img_h.at<Vec3b>(row, col) << endl;;
132
136
 
133
137
 
134
138
 
@@ -170,6 +174,8 @@
170
174
 
171
175
  }
172
176
 
177
+
178
+
173
179
  ```
174
180
 
175
181
  とりあえず全てBGR_hはVec3b(0,0,0)で変更する様にしてでバックしてます。
@@ -180,77 +186,73 @@
180
186
 
181
187
  ```
182
188
 
189
+ Img_h.at<Vec3b>(0,0)=[12, 16, 35]
190
+
191
+ 代入後Img_h.at<Vec3b>(0,0)=[0, 0, 0]
192
+
193
+
194
+
195
+ Img_h.at<Vec3b>(0,1)=[15, 19, 38]
196
+
197
+ 代入後Img_h.at<Vec3b>(0,1)=[0, 0, 0]
198
+
199
+
200
+
183
- Img_h.at<Vec3b>(row, col) = [213, 204, 201]
201
+ Img_h.at<Vec3b>(0,2)=[10, 14, 32]
202
+
184
-
203
+ 代入後Img_h.at<Vec3b>(0,2)=[0, 0, 0]
204
+
205
+
206
+
207
+ Img_h.at<Vec3b>(0,3)=[12, 15, 36]
208
+
209
+ 代入後Img_h.at<Vec3b>(0,3)=[0, 0, 0]
210
+
211
+
212
+
185
- BGR_h[row][col]
213
+ Img_h.at<Vec3b>(0,4)=[9, 15, 34]
214
+
186
-
215
+ 代入後Img_h.at<Vec3b>(0,4)=[0, 0, 0]
216
+
217
+
218
+
219
+ Img_h.at<Vec3b>(0,5)=[13, 16, 37]
220
+
221
+ 代入後Img_h.at<Vec3b>(0,5)=[0, 0, 0]
222
+
223
+
224
+
225
+ Img_h.at<Vec3b>(0,6)=[9, 16, 33]
226
+
227
+ 代入後Img_h.at<Vec3b>(0,6)=[0, 0, 0]
228
+
229
+
230
+
231
+ Img_h.at<Vec3b>(0,7)=[9, 16, 33]
232
+
233
+ 代入後Img_h.at<Vec3b>(0,7)=[0, 0, 0]
234
+
235
+
236
+
237
+ Img_h.at<Vec3b>(0,8)=[11, 15, 33]
238
+
239
+ 代入後Img_h.at<Vec3b>(0,8)=[0, 0, 0]
240
+
241
+
242
+
243
+ Img_h.at<Vec3b>(0,9)=[11, 15, 34]
244
+
245
+ 代入後Img_h.at<Vec3b>(0,9)=[0, 0, 0]
246
+
247
+
248
+
249
+ Img_h.at<Vec3b>(0,10)=[9, 13, 31]
250
+
187
- 代入後Img_h.at<Vec3b>(row, col) = [53, 51, 50]
251
+ 代入後Img_h.at<Vec3b>(0,10)=[0, 0, 0]
188
-
189
- Img_h.at<Vec3b>(row, col) = [213, 204, 201]
190
-
191
- BGR_h[row][col]
192
-
193
- 代入後Img_h.at<Vec3b>(row, col) = [53, 51, 50]
194
-
195
- Img_h.at<Vec3b>(row, col) = [213, 204, 201]
196
-
197
- BGR_h[row][col]
198
-
199
- 代入後Img_h.at<Vec3b>(row, col) = [53, 51, 50]
200
-
201
- Img_h.at<Vec3b>(row, col) = [213, 204, 201]
202
-
203
- BGR_h[row][col]
204
-
205
- 代入後Img_h.at<Vec3b>(row, col) = [53, 51, 50]
206
-
207
- Img_h.at<Vec3b>(row, col) = [213, 204, 201]
208
-
209
- BGR_h[row][col]
210
-
211
- 代入後Img_h.at<Vec3b>(row, col) = [53, 51, 50]
212
252
 
213
253
  ~~~
214
254
 
215
- Img_h.at<Vec3b>(row, col) = [169, 177, 217]
216
-
217
- BGR_h[row][col] = [63, 66, 81]
218
-
219
- 代入後Img_h.at<Vec3b>(row, col) = [63, 66, 81]
220
-
221
-
222
-
223
- Img_h.at<Vec3b>(row, col) = [166, 174, 214]
224
-
225
- BGR_h[row][col] = [60, 63, 79]
226
-
227
- 代入後Img_h.at<Vec3b>(row, col) = [60, 63, 79]
228
-
229
-
230
-
231
- Img_h.at<Vec3b>(row, col) = [161, 168, 211]
232
-
233
- BGR_h[row][col] = [57, 61, 78]
234
-
235
- 代入後Img_h.at<Vec3b>(row, col) = [57, 61, 78]
236
-
237
- ~~~
255
+ 以下同様
238
-
239
- Img_h.at<Vec3b>(row, col) = [179, 168, 170]
240
-
241
- 代入後Img_h.at<Vec3b>(row, col) = [0, 0, 0]
242
-
243
-
244
-
245
- Img_h.at<Vec3b>(row, col) = [189, 181, 182]
246
-
247
- 代入後Img_h.at<Vec3b>(row, col) = [0, 0, 0]
248
-
249
-
250
-
251
- Img_h.at<Vec3b>(row, col) = [138, 131, 136]
252
-
253
- 代入後Img_h.at<Vec3b>(row, col) = [0, 0, 0]
254
256
 
255
257
  ```
256
258
 

1

内容の更新

2018/06/05 00:05

投稿

north_redwings
north_redwings

スコア32

test CHANGED
File without changes
test CHANGED
@@ -172,7 +172,7 @@
172
172
 
173
173
  ```
174
174
 
175
-
175
+ とりあえず全てBGR_hはVec3b(0,0,0)で変更する様にしてでバックしてます。
176
176
 
177
177
  ターミナルでの表示は,
178
178
 
@@ -210,7 +210,47 @@
210
210
 
211
211
  代入後Img_h.at<Vec3b>(row, col) = [53, 51, 50]
212
212
 
213
- (以下同様)
213
+ ~~~
214
+
215
+ Img_h.at<Vec3b>(row, col) = [169, 177, 217]
216
+
217
+ BGR_h[row][col] = [63, 66, 81]
218
+
219
+ 代入後Img_h.at<Vec3b>(row, col) = [63, 66, 81]
220
+
221
+
222
+
223
+ Img_h.at<Vec3b>(row, col) = [166, 174, 214]
224
+
225
+ BGR_h[row][col] = [60, 63, 79]
226
+
227
+ 代入後Img_h.at<Vec3b>(row, col) = [60, 63, 79]
228
+
229
+
230
+
231
+ Img_h.at<Vec3b>(row, col) = [161, 168, 211]
232
+
233
+ BGR_h[row][col] = [57, 61, 78]
234
+
235
+ 代入後Img_h.at<Vec3b>(row, col) = [57, 61, 78]
236
+
237
+ ~~~
238
+
239
+ Img_h.at<Vec3b>(row, col) = [179, 168, 170]
240
+
241
+ 代入後Img_h.at<Vec3b>(row, col) = [0, 0, 0]
242
+
243
+
244
+
245
+ Img_h.at<Vec3b>(row, col) = [189, 181, 182]
246
+
247
+ 代入後Img_h.at<Vec3b>(row, col) = [0, 0, 0]
248
+
249
+
250
+
251
+ Img_h.at<Vec3b>(row, col) = [138, 131, 136]
252
+
253
+ 代入後Img_h.at<Vec3b>(row, col) = [0, 0, 0]
214
254
 
215
255
  ```
216
256