digiKam Developer Documentation: Digikam::OpenCVOpenCLDNNSetter Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Digikam::OpenCVOpenCLDNNSetter Class Reference

This class is used to lock OpenCL in OpenCV when using DNN. More...

## Public Member Functions
void | relockOpenCL ()
void | unlockOpenCL ()

## Detailed Description

It is used to prevent OpenCL from being used when DNN is not compatible with it.

It's used much like a QMutexLocker. Simply create an instance of this class and it will set OpenCV to use the correct OpenCL settings for DNN usage. When the instance is destroyed, it will revert the OpenCL settings back to the global value.

Note
  OpenCV will use OpenCL only if using a cv::UMat. If using a cv::Mat, OpenCL will not be used so there is no need to use this class with cv::Mat.