kylemcdonald / ofxCv

Alternative approach to interfacing with OpenCv from openFrameworks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ofTextureData’ has no member named ‘glInternalFormat’

elbaro opened this issue · comments

Hello, this is an error from OF 0.9.3 + ofxCv.

Ubuntu 14.04, OpenCV 3.1, the project is generated by projectGenerator.
Simply removing ofxCv entry from addons.make compiles fine.

Tried both master and develop branches, got the same errors.

||=== Build: Debug in libopenFrameworks (compiler: GNU GCC Compiler) ===|
||=== Build: Debug in tld (compiler: GNU GCC Compiler) ===|
../../addons/ofxCv/libs/CLD/src/ETF.cpp||In member function ‘void ETF::Smooth(int, int)’:|
../../addons/ofxCv/libs/CLD/src/ETF.cpp|205|warning: unused variable ‘MAX_GRADIENT’ [-Wunused-variable]|
../../addons/ofxCv/libs/CLD/src/fdog.cpp||In function ‘void GetFlowDoG(ETF&, mymatrix&, mymatrix&, myvec&)’:|
../../addons/ofxCv/libs/CLD/src/fdog.cpp|129|warning: unused variable ‘flow_DOG_sign’ [-Wunused-variable]|
../../addons/ofxCv/libs/CLD/src/fdog.cpp||In function ‘void GetFDoG(imatrix&, ETF&, double, double, double)’:|
../../addons/ofxCv/libs/CLD/src/fdog.cpp|226|warning: variable ‘half_w1’ set but not used [-Wunused-but-set-variable]|
../../addons/ofxCv/libs/CLD/src/fdog.cpp|226|warning: variable ‘half_w2’ set but not used [-Wunused-but-set-variable]|
../../addons/ofxCv/libs/CLD/src/fdog.cpp|226|warning: variable ‘half_l’ set but not used [-Wunused-but-set-variable]|
../../addons/ofxCv/libs/CLD/src/fdog.cpp||In function ‘void GaussSmoothSep(imatrix&, double)’:|
../../addons/ofxCv/libs/CLD/src/fdog.cpp|249|warning: unused variable ‘MAX_GRADIENT’ [-Wunused-variable]|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h||In function ‘int ofxCv::getDepth(ofTexture&)’:|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|43|error: ‘class ofTextureData’ has no member named ‘glInternalFormat’|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h||In function ‘int ofxCv::getChannels(ofTexture&)’:|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|102|error: ‘class ofTextureData’ has no member named ‘glInternalFormat’|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Tracker.h||In member function ‘virtual const std::vector<unsigned int>& ofxCv::RectTracker::track(const std::vector<cv::Rect_<int> >&)’:|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Tracker.h|327|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Calibration.h||In constructor ‘ofxCv::Calibration::Calibration()’:|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Calibration.h|117|warning: ‘ofxCv::Calibration::reprojectionError’ will be initialized after [-Wreorder]|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Calibration.h|112|warning:   ‘cv::Mat ofxCv::Calibration::distCoeffs’ [-Wreorder]|
../../addons/ofxCv/libs/ofxCv/src/Calibration.cpp|96|warning:   when initialized here [-Wreorder]|
../../addons/ofxCv/libs/ofxCv/src/Calibration.cpp||In member function ‘bool ofxCv::Calibration::calibrateFromDirectory(std::string)’:|
../../addons/ofxCv/libs/ofxCv/src/Calibration.cpp|296|error: ‘ofImage’ has no member named ‘load’|
../../addons/ofxCv/libs/ofxCv/src/Calibration.cpp||In member function ‘void ofxCv::Calibration::draw(int) const’:|
../../addons/ofxCv/libs/ofxCv/src/Calibration.cpp|383|error: ‘ofDrawCircle’ was not declared in this scope|
../../addons/ofxCv/libs/ofxCv/src/Calibration.cpp||In member function ‘void ofxCv::Calibration::draw3d(int) const’:|
../../addons/ofxCv/libs/ofxCv/src/Calibration.cpp|428|error: ‘ofDrawCircle’ was not declared in this scope|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h||In instantiation of ‘cv::Mat ofxCv::toCv(ofBaseHasPixels_<T>&) [with T = unsigned char]’:|
../../addons/ofxCv/libs/ofxCv/src/Calibration.cpp|297|required from here|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|234|error: no matching function for call to ‘toCv(unsigned char*)’|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|234|note: candidates are:|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|229|note: cv::Mat ofxCv::toCv(cv::Mat&)|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|229|note:   no known conversion for argument 1 from ‘unsigned char*’ to ‘cv::Mat&’|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|230|note: template<class T> cv::Mat ofxCv::toCv(ofPixels_<PixelType>&)|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|230|note:   template argument deduction/substitution failed:|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|234|note:   mismatched types ‘ofPixels_<PixelType>’ and ‘unsigned char*’|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|233|note: template<class T> cv::Mat ofxCv::toCv(ofBaseHasPixels_<T>&)|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|233|note:   template argument deduction/substitution failed:|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|234|note:   mismatched types ‘ofBaseHasPixels_<T>’ and ‘unsigned char*’|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h||In function ‘cv::Mat ofxCv::toCv(ofBaseHasPixels_<T>&) [with T = unsigned char]’:|
../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h|235|warning: control reaches end of non-void function [-Wreturn-type]|
||=== Build failed: 6 error(s), 13 warning(s) (0 minute(s), 4 second(s)) ===|

ofTextureData member variable glTypeInternal has been renamed to glInternalFormat here openframeworks/openFrameworks@1fb58c2#diff-47f88ee03e9e72bf5ed52945a557c6bc

and this commit should be part of 0.9.3 (it happend on July '15) so it's strange you got this error with of 0.9.3.
At least you can downgrade ofxCv to a version before this changes.

As described above, this isn't a problem with ofxCv, but a version mismatch between ofxCv and OF.