SDK Initialization

Initialize the SDK running environment when calling SDK in the program, to improve the subsequent API calling fluency.

You can refer to the following sample code when initializing the running environment, and deinitializing SDK when exiting the program.
int main()
{
int nRet = MV_OK;
MV_CC_Initialize(); // 1. Initialize SDK after launching the program
// 2. To identify and control device, acquire images, etc.
MV_CC_Finalize(); // 3. Deinitialize SDK after closing the program
return nRet;
}
  1. Call MV_CC_Initialize() to initialize the SDK running environment This can apply for and distribute needed resources in advance, and improve the subsequent API calling fluency.
  2. After initializing SDK, call other APIs here to initialize the camera or frame grabber, configure parameters, collect, and process the image.
  3. After all these operations, you can call MV_CC_Finalize() to finalize the SDK and release the system resources occupied by the SDK.
Attention
In a single program, you can execute MV_CC_Initialize() and MV_CC_Finalize() each for once.