しょっちゅう忘れることを書いておく。
![]() |
66 |
1064 views
- # coding:UTF-8
- from pyzbar.pyzbar import decode
- from PIL import Image
- import cv2
- image = "sample2.JPG"
- result_img = cv2.imread(image)
- records = decode(Image.open(image))
- for record in records:
- print(record[0].decode('utf-8', 'ignore'))
- left = int(record[2][0])
- top = int(record[2][1])
- width = int(record[2][2])
- height = int(record[2][3])
- print(left, top, width, height)
- cv2.rectangle(result_img, (left, top), (left+width, top+height), (0, 0, 255))
- cv2.imshow('test', result_img)
- cv2.waitKey(0)
Page 15 of 69.
すぺぺぺ
本サイトの作成者。
プログラムは趣味と勉強を兼ねて、のんびり本サイトを作っています。
フレームワークはdjango。
ChatGPTで自動プログラム作成に取り組み中。
https://www.osumoi-stdio.com/novel/