After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725163 - opencv extension is using the deprecated cv.h header
opencv extension is using the deprecated cv.h header
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 747705 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-02-25 16:28 UTC by Vicente Olivert Riera
Modified: 2015-04-17 15:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change opencv configure test to check for OpenCV2 headers (2.04 KB, patch)
2015-04-12 01:01 UTC, LRN
committed Details | Review

Description Vicente Olivert Riera 2014-02-25 16:28:34 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?
Comment 1 Vicente Olivert Riera 2014-02-25 16:33:58 UTC
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.
Comment 2 Sebastian Dröge (slomo) 2014-02-25 20:38:19 UTC
Yes, we should switch to configure checks for all the modules and then only include whatever headers are required.
Comment 3 LRN 2015-04-11 19:22:01 UTC
*** Bug 747705 has been marked as a duplicate of this bug. ***
Comment 4 LRN 2015-04-12 01:01:26 UTC
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 5 Sebastian Dröge (slomo) 2015-04-17 15:22:45 UTC
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