Ask Your Question

gleberof's profile - activity

2015-08-05 04:37:54 -0500 received badge  Student (source)
2015-01-10 02:02:02 -0500 commented question Redeclaration issue

In the beginning I have downloaded 2 versions 2.4.10 - by link and git (which is actually 3 beta) I do not understand the difference for that moment. I have compiled both but 2.4.10 was in a second turn. But once I have try examples I took them from 3 beta - which clause the multiple errors.

for instance for 2.4.10: > include "opencv2/imgproc/imgproc.hpp" include "opencv2/highgui/highgui.hpp"

but for 3 beta: > include "opencv2/imgcodecs.hpp" include "opencv2/highgui/highgui.hpp"

Conclusion: I've done stupid thing in the very begginig

2015-01-09 16:26:53 -0500 commented question Redeclaration issue

berak, thank you for pushing me in right direction. Once I installing opencv i've download and compile version form page http://opencv.org/downloads.html and it seems mistakes is there. Once I take git version all troubles disappeared. Thanks you a lot again.

2015-01-09 15:53:47 -0500 commented question Redeclaration issue

i'm using cmake make combo.Ubuntu 14.04.

I found out that standard sample squares.cpp use the same combination on includes. Can't compile it either (with same error).

2015-01-09 15:09:53 -0500 asked a question Redeclaration issue

I'm trying to build OpenCV project (cpp) with following inclusions:

#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui/highgui.hpp"

and getting an error during the make "redeclaration issues.

It happens because of imgcodecs.hpp contains declaration:

 enum {
   IMREAD_UNCHANGED  = -1, // 8bit, color or not
   IMREAD_GRAYSCALE  = 0,  // 8bit, gray
   IMREAD_COLOR      = 1,  // ?, color
   IMREAD_ANYDEPTH   = 2,  // any depth, ?
   IMREAD_ANYCOLOR   = 4,  // ?, any color
   IMREAD_LOAD_GDAL  = 8   // Use gdal driver
   };

And highgui.hpp contains basically the same:

 enum {
// 8bit, color or not
IMREAD_UNCHANGED  =-1,
// 8bit, gray
IMREAD_GRAYSCALE  =0,
// ?, color
IMREAD_COLOR      =1,
// any depth, ?
IMREAD_ANYDEPTH   =2,
// ?, any color
IMREAD_ANYCOLOR   =4
};

Is any way to fix it without changing hpp files of OpenCV?

I'm really newbie at c++ thus my question could be dummy (sorry for that)