Initialization and Deinitialization

Function Description

Initialization API for Vision SDK application development. Before calling related APIs, invoke the global initialization function mx_init() to apply for device and log resources.

After all Vision SDK APIs are executed, call mx_deinit() to deinitialize the initialized global resources.

For details about related APIs, see Initialization and Deinitialization.

Sample Code

The following are the code samples of initialization and deinitialization methods, which are for reference only and cannot be directly copied for execution.

Perform global initialization to load device and log resources. After the program is executed, deinitialize the program.
1
2
3
4
5
from mindx.sdk import base
# After global initialization, the Vision SDK APIs can be called normally.
base.mx_init()
# Perform global deinitialization to destroy resources.
base.mx_deinit()