Opencv stitching with free dll

I have a function in my project that will do the stitching, the function works fine, it's very simple:

Mat output(m_Img, true), pano; // a panaoramic image bool try_use_gpu = true; Stitcher iSticher = Stitcher::createDefault(try_use_gpu); // Set Feature finder to be ORB iSticher.setFeaturesFinder(new detail::OrbFeaturesFinder()); try{ Stitcher::Status status = iSticher.stitch(Imgs, pano); if (status != Stitcher::OK) { LOG("Error stitching - Code: %d", int(status)); return -1; } } catch(exception e) { LOG("Cannot Stitch Image,%s",e.what()); } 

The code works well, and I was able to stitch the images pretty well. The only problem is that when I want to deploy my code, I realized that I need to use a proprietary dll. Otherwise .exe will not start. My questions is: to use the Stitcher class from opencv does this mean that you have to pay , even if you are not using SURF or SIFT ? Is there a way to do this without using "non-free dlls"? Note. I am using opencv 2.4.2 . Edit: I also tested it using OpenCV 2.4.11

+5
source share
1 answer

So, after a lot of digging. I think I found a solution to this problem: There is a flag in HAVE_OPENCV_NONFREE : HAVE_OPENCV_NONFREE If you undefine or comment on the definition of this flag and build opencv from the source, then this should fix this problem, i.e. opencv_stitching.dll will not be opencv_non-free.dll with opencv_non-free.dll

+1
source

Source: https://habr.com/ru/post/1240732/


All Articles