Manage Records in Human Body Picture Library

You can upload human body pictures with linked information to the human body picture library and manage the existing human body pictures.

  • Make sure you have called NET_DVR_Init to initialize the development environment.

  • Make sure you have called NET_DVR_Login_V40 to log in to the device.

  • Make sure you have created a human body picture library. Refer to Create Human Body Picture Library for details.

Figure 1 API Calling Flow of Managing Records in Human Body Picture Library

  1. Call NET_DVR_UploadFile_V40, set dwUploadType to "IMPORT_DATA_TO_HBDLIB" (value: 60), and set lpInBuffer to the structure NET_DVR_HBDLIB_COND for setting up a persistent connection.
    Note:
    • If the concurrency mode is enabled, when importing pictures to the library, the pictures will only be stored without modeling, which can fasten the importing speed. So that the pictures must be modeled manually. Enabling concurrency mode is only supported by front-end devices.

    • If you want to model the imported human body pictures manually, you can set the value of byConcurrent in structure NET_DVR_HBDLIB_COND to 1 (enable).

    • Only the pictures with JPEG format can be imported and the maximum picture size is 300 KB.

  2. Add a human body record to human body picture library.
    1. Call NET_DVR_UploadSend for starting uploading a human body record to human body picture library.
    2. Call NET_DVR_GetUploadState for getting the uploading status and progress to check if the human body record is uploaded.
      Note:

      Only when the returned pProgress equals to "1", it indicates uploading completed, and you can continue the following steps.

    3. Call NET_DVR_GetUploadResult for getting the uploading result information.

      The result information, i.e., uploaded picture ID (PID) is returned by lpOutBuffer.

    Note:
  3. Call NET_DVR_UploadClose to disconnect the persistent connection after uploading completed.
  4. Optional: Perform the following operation(s) for managing human body records in human body picture library.
    Option Description

    Delete Human Body Picture(s) of Library

    Configure Linked Information of Human Body Picture

    Search for Human Body Pictures in Library

    Call NET_DVR_STDXMLConfig to transmit the request URI: POST /ISAPI/Intelligent/HBDLib/HBDSearch?format=json

  5. Check whether the concurrent mode is enabled in step 1.
    • If the value of byConcurrent in structure NET_DVR_HBDLIB_COND is set to 1, perform the following steps to continue.

    • If the value of byConcurrent in structure NET_DVR_HBDLIB_COND is set to 0, the modeling will complete automatically and you can end the task.

  6. Check whether the device supports manual modeling.
    • If the node isSuportHBDManualModeling exists in the configuration capability of human body picture library JSON_HBDLibCap, and its value is true, perform the following step.

    • Otherwise, end the task as manual modeling is not supported.

  7. Optional: Perform the following operation(s) to build models manually if the concurrency mode is enabled.
    Option Description

    Build Models in a Batch for Specified Human Body Picture Library

    Call NET_DVR_STDXMLConfig to transmit the request URI: POST /ISAPI/Intelligent/HBDLib/manualModeling/<HBDID>?format=json

    Build Models for Specified Human Body Picture

    Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Intelligent/HBDLib/manualModeling/<HBDID>/HBP/<HBPID>?format=json

    Build Models for Human Body Pictures of Different Libraries

    Call NET_DVR_STDXMLConfig to transmit the request URI: POST /ISAPI/Intelligent/HBDLib/manualModelingRangeTask?format=json

    Searching for Modeling Task Progress

    Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Intelligent/HBDLib/manualModeling/progressState/<taskID>?format=json

    Search for All Modeling Statuses

    Call NET_DVR_STDXMLConfig to transmit the request URI: POST /ISAPI/Intelligent/HBDLib/modelingStatus?format=json

    Get Modeling Status of a Human Body Picture

    Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Intelligent/HBDLib/modelingStatus/<HBDID>/HBP/<HBPID>?format=json

Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release the resources.