setPreferableBackend和setPreferableTarget

setPreferableBackend和setPreferableTarget

  1. 环境
    opencv4.4.0
  2. setPreferableBackend()函数原型
/**
 * @brief Ask network to use specific computation backend where it supported.
 * @param[in] backendId backend identifier.
 * @see Backend
 *
 * If OpenCV is compiled with Intel's Inference Engine library, DNN_BACKEND_DEFAULT
 * means DNN_BACKEND_INFERENCE_ENGINE. Otherwise it equals to DNN_BACKEND_OPENCV.
 */
CV_WRAP void setPreferableBackend(int backendId);
  1. setPreferableTarget()函数原型
/**
 * @brief Ask network to make computations on specific target device.
 * @param[in] targetId target identifier.
 * @see Target
 *
 * List of supported combinations backend / target:
 * |                        | DNN_BACKEND_OPENCV | DNN_BACKEND_INFERENCE_ENGINE | DNN_BACKEND_HALIDE |  DNN_BACKEND_CUDA |
 * |------------------------|--------------------|------------------------------|--------------------|-------------------|
 * | DNN_TARGET_CPU         |                  + |                            + |                  + |                   |
 * | DNN_TARGET_OPENCL      |          

你可能感兴趣的:(目标检测,C++,linux,深度学习,opencv,计算机视觉)