there may be free/open libraries that rival the commercial optical inspection libraries but I don't know any.
OpenCV has cv::matchShapes()
. it's not as advanced and optimized (or as patented!) as commercial solutions.
you could look into Cognex's patents. check if they're expired before you actually read them. if it is expired, there is no danger in reading the patent. if it is still active, be aware that reading it means your brain is now tainted with that information and you can't implement or use it without a license. they claim that the Patmax parent is from 1997 so it may have expired.
people who do optical inspection usually just use commercial libraries (visionpro, halcon, ...). the other crowd throws deep learning object detection at the problem. OpenCV is definitely not geared towards optical inspection, mostly because the industry would rather buy a library (and support for it) than pay developers to implement things in a free library.
Absolutely. Your Cognex VisionPr will work with Deep Learning, Machine learning, etc. Here is link: