The Microsoft's Embedded Learning Library (ELL) claims to help in the design and deployment of intelligent machine-learned models onto resource constrained platforms and small single-board computers, like Raspberry Pi, Arduino, and micro:bit.
OpenCV can be computationally very intensive, pushing the Raspberry Pi very hard, and Raspberry Pi 3 tends to overheat when pushed to its limits. The RPi's processor must protect itself from high temperatures, so when the processor’s internal temperature approaches 85 degrees Celsius, it protects itself by disables overclocking, reverting to minimal speeds/freq and voltages, or in some cases shutting down completely.
So the performance of the OpenCV algorithm may be impacted by the heat of the RPi processor. To combat this, it could be beneficial to provide active cooling. Microsoft blog, "Active cooling your Raspberry Pi 3", provides some data on how effective adding a fan can be. (NOTE: You can fine the Raspberry Pi 3 Fan Mount STL file here, and have it 3D printed at shapeways or other sites. To view the STL file, you can use this site.)
config.txt - Overclocking options - https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md
[10]: