Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Supported Python versions](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue)](https://www.python.org/downloads/)
[![PyPI downloads](https://img.shields.io/pypi/dm/dbr)](https://pypistats.org/packages/dbr)

![Dynamsoft](https://dynamsoft.github.io/styleguide/assets/img-icon/logo-dynamsoft-whiteBg-190x47.png "Dynamsoft") | ![dbr](https://dynamsoft.github.io/styleguide/assets/img-icon/logo-dbr-88x88.png "dbr")
![Dynamsoft](https://dynamsoft.github.io/styleguide/assets/images/icons/dynamsoft_logos/dynamsoft_logo_original.png "Dynamsoft") | ![dbr](https://dynamsoft.github.io/styleguide/assets/images/icons/product-logo-SVG/dbr.svg "dbr")


## What You Should Know
Expand Down Expand Up @@ -33,7 +33,7 @@

### Version

- **8.4**
- **8.6**

### Supported Platforms
- **Windows x64**
Expand Down
4 changes: 2 additions & 2 deletions samples/test_AppendTemplateFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_AppendTemplateString.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_DecodeFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_DecodeFileInMemory.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_DecodeImageBufferByOpencv.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_DecodeImagesInFolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_DecodeIntermediateResults.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
8 changes: 4 additions & 4 deletions samples/test_DecodeLocalVideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def text_results_callback_func(frame_id, t_results, user_data):
print("Exception : ")
print(text_result.exception)
print("-------------")
## Or you can inherit the abstract class TextResultResultCallBack to implement the abstract method text_results_callback_func.
# class SubTextResultResultCallBack(TextResultResultCallBack):
## Or you can inherit the abstract class TextResultCallBack to implement the abstract method text_results_callback_func.
# class SubTextResultCallBack(TextResultCallBack):
# @staticmethod
# def text_results_callback_func(frame_id, t_results, user_data):
# print(frame_id)
Expand Down Expand Up @@ -142,14 +142,14 @@ def read_barcode():
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
8 changes: 4 additions & 4 deletions samples/test_DecodeLocalVideos.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def text_results_callback_func(frame_id, t_results, user_data):
print("Exception : ")
print(text_result.exception)
print("-------------")
## Or you can inherit the abstract class TextResultResultCallBack to implement the abstract method text_results_callback_func.
# class SubTextResultResultCallBack(TextResultResultCallBack):
## Or you can inherit the abstract class TextResultCallBack to implement the abstract method text_results_callback_func.
# class SubTextResultCallBack(TextResultCallBack):
# @staticmethod
# def text_results_callback_func(frame_id, t_results, user_data):
# print(frame_id)
Expand Down Expand Up @@ -151,14 +151,14 @@ def read_barcode(video_path):
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
8 changes: 4 additions & 4 deletions samples/test_DecodeVideoByCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def text_results_callback_func(frame_id, t_results, user_data):
print("Exception : ")
print(text_result.exception)
print("-------------")
## Or you can inherit the abstract class TextResultResultCallBack to implement the abstract method text_results_callback_func.
# class SubTextResultResultCallBack(TextResultResultCallBack):
## Or you can inherit the abstract class TextResultCallBack to implement the abstract method text_results_callback_func.
# class SubTextResultCallBack(TextResultCallBack):
# @staticmethod
# def text_results_callback_func(frame_id, t_results, user_data):
# print(frame_id)
Expand Down Expand Up @@ -146,14 +146,14 @@ def read_barcode():
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
9 changes: 4 additions & 5 deletions samples/test_DecodeVideoByPiCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def text_results_callback_func(frame_id, t_results, user_data):
print("Exception : ")
print(text_result.exception)
print("-------------")
## Or you can inherit the abstract class TextResultResultCallBack to implement the abstract method text_results_callback_func.
# class SubTextResultResultCallBack(TextResultResultCallBack):
## Or you can inherit the abstract class TextResultCallBack to implement the abstract method text_results_callback_func.
# class SubTextResultCallBack(TextResultCallBack):
# @staticmethod
# def text_results_callback_func(frame_id, t_results, user_data):
# print(frame_id)
Expand Down Expand Up @@ -159,7 +159,6 @@ def read_barcode():

reader.stop_video_mode()
cv2.destroyWindow(windowName)
camera.close()


print("-------------------start------------------------")
Expand All @@ -168,14 +167,14 @@ def read_barcode():
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

reader = BarcodeReader()

connection_paras = BarcodeReader.init_lts_connection_parameters()
connection_paras = BarcodeReader.init_dls_connection_parameters()
# If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
connection_paras.main_server_url = "Input your own server url"
connection_paras.handshake_code = "Input your own handshake"
connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM

try:
error = BarcodeReader.init_license_from_lts(connection_paras)
error = BarcodeReader.init_license_from_dls(connection_paras)
if error[0] != EnumErrorCode.DBR_OK:
print(error[1])
except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_InitRuntimeSettingsByFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_InitRuntimeSettingsByString.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down
4 changes: 2 additions & 2 deletions samples/test_UpdateRuntimeSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
reader.init_license(license_key)

## The code snippet below shows how to use the full license in DBR 8.x:
# connection_paras = BarcodeReader.init_lts_connection_parameters()
# connection_paras = BarcodeReader.init_dls_connection_parameters()
## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value.
# connection_paras.main_server_url = "Input your own server url"
# connection_paras.handshake_code = "Input your own handshake"
# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP
# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM
# try:
# error = BarcodeReader.init_license_from_lts(connection_paras)
# error = BarcodeReader.init_license_from_dls(connection_paras)
# if error[0] != EnumErrorCode.DBR_OK:
# print(error[1])
# except BarcodeReaderError as bre:
Expand Down