hii Omkar
this is via python but if you able to make its api it also can be used with mendix.
i really don’t know python.
Hand Distance Measurement with Normal Webcam + Game | OpenCV Python - YouTube
according to below article Open CV also spport in Java desktop development.
OpenCV: Introduction to Java Development
with native.
How to Use React Native & OpenCV for Image Processing (brainhub.eu)
may this help you.