MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / setProcessingDevice

Method setProcessingDevice

src/CVObjectDetection.cpp:35–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void CVObjectDetection::setProcessingDevice(){
36 if(processingDevice == "GPU"){
37 net.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA);
38 net.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);
39 }
40 else if(processingDevice == "CPU"){
41 net.setPreferableBackend(cv::dnn::DNN_BACKEND_OPENCV);
42 net.setPreferableTarget(cv::dnn::DNN_TARGET_CPU);
43 }
44}
45
46void CVObjectDetection::detectObjectsClip(openshot::Clip &video, size_t _start, size_t _end, bool process_interval)
47{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected