質問編集履歴
1
エラー内容と試したことを更新しました.
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
```
|
18
18
|
|
19
|
-
|
19
|
+
TypeError: '<' not supported between instances of 'type' and 'float'
|
20
20
|
|
21
21
|
```
|
22
22
|
|
@@ -210,9 +210,53 @@
|
|
210
210
|
|
211
211
|
### 試したこと
|
212
212
|
|
213
|
-
|
214
|
-
|
215
|
-
|
213
|
+
以下のようなコードを組んで回してみましたがエラーが出てしまいました.
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
for ay in range(int(refY)):
|
218
|
+
|
219
|
+
for ax in range(int(refX)):
|
220
|
+
|
221
|
+
ix=int
|
222
|
+
|
223
|
+
int(ax-w/(2*b))<=int(ix<ax+w/(2*b))
|
224
|
+
|
225
|
+
iy=int
|
226
|
+
|
227
|
+
ay-h/(2*a)<=iy<ay+h/(2*a)
|
228
|
+
|
229
|
+
ch1x=Cx
|
230
|
+
|
231
|
+
ch2x=Cx
|
232
|
+
|
233
|
+
ch3x=Cx
|
234
|
+
|
235
|
+
xg_img[iy,ix,0]=ch1x
|
236
|
+
|
237
|
+
xg_img[iy,ix,1]=ch2x
|
238
|
+
|
239
|
+
xg_img[iy,ix,2]=ch3x
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
ch1y=Cy
|
244
|
+
|
245
|
+
ch2y=Cy
|
246
|
+
|
247
|
+
ch3y=Cy
|
248
|
+
|
249
|
+
yg_img[iy,ix,0]=ch1y
|
250
|
+
|
251
|
+
yg_img[iy,ix,1]=ch2y
|
252
|
+
|
253
|
+
yg_img[iy,ix,2]=ch3y
|
254
|
+
|
255
|
+
cv2.imwrite("img/x_so.JPG",xg_img)
|
256
|
+
|
257
|
+
cv2.imwrite("img/y_so.JPG",yg_img)
|
258
|
+
|
259
|
+
|
216
260
|
|
217
261
|
|
218
262
|
|