If you are open to open source, the CodeTyphon (Freepascal) has cross-platform OpenCV samples ready to compile on your favourite platforms.
Linux and ARM are supported as well as windows, Intel macOS is also supprted, (ARM macOS not yet):
c:\codetyphon\CodeOcean\pl_OpenCV\samplescv4\