We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cb5199 commit 5eb2642Copy full SHA for 5eb2642
1 file changed
samples/test_DecodeVideoByPiCamera.py
@@ -109,9 +109,9 @@ def read_barcode():
109
stride = 0
110
stream = io.BytesIO()
111
camera.capture(stream, format='jpeg')
112
- # 从流构建numpy
+ # create numpy by stream
113
data = np.frombuffer(stream.getvalue(), dtype=np.uint8)
114
- # 通过opencv解码numpy
+ # decode numpy by opencv
115
image = cv2.imdecode(data, 1)
116
stride = image.strides[0]
117
print(stride)
@@ -152,6 +152,7 @@ def read_barcode():
152
153
# 'ESC' for quit
154
key = cv2.waitKey(1)
155
+ # reset
156
rawCapture.truncate(0)
157
if key == 27:
158
break
0 commit comments