Skip to content

Commit 1967945

Browse files
committed
Update
1 parent fc5e9ff commit 1967945

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • examples/official/camera_file

examples/official/camera_file/file.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@
3333
if not os.path.exists(image_path):
3434
print("The image path does not exist.")
3535
continue
36+
37+
cv_image = cv2.imread(image_path)
3638
result = cvr_instance.capture(
37-
image_path, EnumPresetTemplate.PT_READ_BARCODES.value)
39+
cv_image, EnumPresetTemplate.PT_READ_BARCODES.value)
3840
if result.get_error_code() != EnumErrorCode.EC_OK:
3941
print("Error:", result.get_error_code(),
4042
result.get_error_string())
4143
else:
42-
cv_image = cv2.imread(image_path)
44+
4345

4446
items = result.get_items()
4547
print('Found {} barcodes.'.format(len(items)))

0 commit comments

Comments
 (0)