Windows
You need to install it yourself on Windows OpenCV and hidapi
And configure environment variables
For OpenCV

For HIDAPI, you can build a folder by yourself, and then put hidapi.dll into this folder and then configure environment variables. You can also directly put Hidapi.dll in C: \ Windows \ System32
Download Example, open the project with Visual Studio to replace the project attributes in the project attributes, which contains the directory and library directory as your address.
When using a dynamic library, you need to define a DeviceManager
class object (device manager class), and then call the enumerate ()
function to traverse the device to obtain the list of equipment objects.
DeviceManager *manager = new DeviceManager();
auto streamDocks = manager->enumerate();
After obtaining the list of equipment objects, make the open()
method open the device when the device needs to be called, and then other methods to operate the device
auto it = StreamDocks->begin();
StreamDock *s = *it;
s->open();
// Set the brightness
s->setBrightness(100);