質問編集履歴
2
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,8 +22,6 @@
|
|
22
22
|
|
23
23
|
ret, frame = cap.read()
|
24
24
|
|
25
|
-
img = np.zeros((200,500,3),np.uint8)
|
26
|
-
|
27
25
|
# 表示する色
|
28
26
|
|
29
27
|
b,g,r,a = 0,255,0,0 #B(青)・G(緑)・R(赤)・A(透明度)
|
@@ -32,11 +30,11 @@
|
|
32
30
|
|
33
31
|
message = 'OpenCV(オープンシーブイ)'
|
34
32
|
|
35
|
-
fontpath ='C:\Windows\Fonts\
|
33
|
+
fontpath ='C:\Windows\Fonts\HGRPP1.TTC'
|
36
34
|
|
37
35
|
font = ImageFont.truetype(fontpath, 32) # フォントサイズが32
|
38
36
|
|
39
|
-
img_pil = Image.fromarray(
|
37
|
+
img_pil = Image.fromarray(frame)# 配列の各値を8bit(1byte)整数型(0~255)をPIL Imageに変換。
|
40
38
|
|
41
39
|
draw = ImageDraw.Draw(img_pil)# drawインスタンスを生成
|
42
40
|
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,6 +22,8 @@
|
|
22
22
|
|
23
23
|
ret, frame = cap.read()
|
24
24
|
|
25
|
+
img = np.zeros((200,500,3),np.uint8)
|
26
|
+
|
25
27
|
# 表示する色
|
26
28
|
|
27
29
|
b,g,r,a = 0,255,0,0 #B(青)・G(緑)・R(赤)・A(透明度)
|
@@ -34,7 +36,7 @@
|
|
34
36
|
|
35
37
|
font = ImageFont.truetype(fontpath, 32) # フォントサイズが32
|
36
38
|
|
37
|
-
img_pil = Image.fromarray(
|
39
|
+
img_pil = Image.fromarray(img)# 配列の各値を8bit(1byte)整数型(0~255)をPIL Imageに変換。
|
38
40
|
|
39
41
|
draw = ImageDraw.Draw(img_pil)# drawインスタンスを生成
|
40
42
|
|