質問編集履歴
1
OSを表記した
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
しかし、以下の2つのことが解決できません。
|
3
3
|
1つ目は、任意でトリミング後の画像は生成できたのですが表示できません。
|
4
4
|
2つ目は、中心部からのトリミング画像が生成できません。
|
5
|
+
OSはWindowsです。
|
5
6
|
以下、コードです。
|
6
7
|
|
7
8
|
```
|
@@ -53,13 +54,13 @@
|
|
53
54
|
Traceback (most recent call last):
|
54
55
|
File "C:\Python 3.9\semi\trim.py", line 28, in <module>
|
55
56
|
plt.imshow(im_list1) #貼り付け
|
56
|
-
File "C:\Users\
|
57
|
+
File "C:\Users????\AppData\Local\Programs\Python\Python39\lib\site-packages\matplotlib\pyplot.py", line 2724, in imshow
|
57
58
|
__ret = gca().imshow(
|
58
|
-
File "C:\Users\
|
59
|
+
File "C:\Users????\AppData\Local\Programs\Python\Python39\lib\site-packages\matplotlib\__init__.py", line 1447, in inner
|
59
60
|
return func(ax, *map(sanitize_sequence, args), **kwargs)
|
60
|
-
File "C:\Users\
|
61
|
+
File "C:\Users????\AppData\Local\Programs\Python\Python39\lib\site-packages\matplotlib\axes\_axes.py", line 5523, in imshow
|
61
62
|
im.set_data(X)
|
62
|
-
File "C:\Users\
|
63
|
+
File "C:\Users????\AppData\Local\Programs\Python\Python39\lib\site-packages\matplotlib\image.py", line 702, in set_data
|
63
64
|
raise TypeError("Image data of dtype {} cannot be converted to "
|
64
65
|
TypeError: Image data of dtype object cannot be converted to float
|
65
66
|
|