GNOME Bugzilla – Bug 725163
opencv extension is using the deprecated cv.h header
Last modified: 2015-04-17 15:22:57 UTC
The opencv extension (ext/opencv) of gst-plugins-bad is using a deprecated opencv header. This is what we find in the cv.h file: //CV_WARNING("This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module") OpenCV recommends to include just the needed headers from "opencv2/module_name/". For instance, if you need the imgproc OpenCV module, you can do this: #include <opencv2/imgproc/imgproc.hpp> So..., could be possible to change the #includes of cv.h (which includes a lot of OpenCV modules) and use the above method to include just the needed modules?
In fact, it would be great to pre-check which OpenCV modules are available (maybe the user doesn't have all of them installed). Right now, including cv.h you are assuming that the user has "imgproc", "video", "features2d", "flann", "calib3d", "objdetect" and "legacy" modules installed. Checking the modules in the configure phase and stop the process if a required module is not installed, and enable/disable the support for an optional feature if certain optional module is not installed would be the best solution, in my honest opinion.
Yes, we should switch to configure checks for all the modules and then only include whatever headers are required.
*** Bug 747705 has been marked as a duplicate of this bug. ***
Created attachment 301390 [details] [review] Change opencv configure test to check for OpenCV2 headers * Checks for opencv2 headers only, not for legacy opencv1 headers * Checks for every opencv2 header that the implementation needs, not just highgui_c.h See also attachment 301370 [details] [review] from bug 747705 for a patch that makes opencv plugin only use opencv2 headers.
Comment on attachment 301390 [details] [review] Change opencv configure test to check for OpenCV2 headers commit 64080e632d7e86b218f2595bcc7b3a9199c1bc4a Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Sun Apr 12 00:56:48 2015 +0000 opencv: Change configure test to check for OpenCV2 headers * Checks for opencv2 headers only, not for legacy opencv1 headers * Checks for every opencv2 header that the implementation needs, not just highgui_c.h https://bugzilla.gnome.org/show_bug.cgi?id=725163