I have a function in my project that would do stitching, the function is working fine, it is 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 images fairly well. The only problem is that when I want to deploy my code, I realized that I have to use non-free dll. Otherwise, the .exe
won't run. My questions are: in order to use Stitcher
class from opencv does that mean you have to pay, even if you are not using SURF
or SIFT
algorithms? Is there a way to do it without using "nonfree dlls"?
Note: I am using opencv 2.4.2
. Edit: I also tested it with OpenCV 2.4.11
So, after a lot of digging. I think I have found a solution to this issue:
There is a flag in opencv_modules.hpp
called: HAVE_OPENCV_NONFREE
If you undefine
or comment the definition of this flag and build opencv
from source then this should fix this issue, i.e. opencv_stitching.dll
will not depeneds on opencv_non-free.dll
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With