FLIR / BosonUSB

Tool to capture Boson USB video in Linux
MIT License
64 stars 26 forks source link

Not compiling due to deprecated enum in opencv4 #6

Closed RustyRaptor closed 5 years ago

RustyRaptor commented 5 years ago

Ran cmake then make and I get this

make -j12
[ 50%] Building CXX object CMakeFiles/BosonUSB.dir/BosonUSB.cpp.o
/home/ziad/Documents/src/ETV/WIND/FLIR/BosonUSB/BosonUSB.cpp: In function ‘int main(int, char**)’:
/home/ziad/Documents/src/ETV/WIND/FLIR/BosonUSB/BosonUSB.cpp:151:31: error: ‘CV_IMWRITE_PXM_BINARY’ was not declared in this scope
  compression_params.push_back(CV_IMWRITE_PXM_BINARY);
                               ^~~~~~~~~~~~~~~~~~~~~
CMakeFiles/BosonUSB.dir/build.make:62: recipe for target 'CMakeFiles/BosonUSB.dir/BosonUSB.cpp.o' failed
make[2]: *** [CMakeFiles/BosonUSB.dir/BosonUSB.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/BosonUSB.dir/all' failed
make[1]: *** [CMakeFiles/BosonUSB.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I have opencv installed so this should work right? Is it maybe a deprecated feature of opencv being used here?

Ubuntu 18.04 OpenCV version 4.0.0-pre

RustyRaptor commented 5 years ago

Ah it does seem this enum has been phased out. At least as of 4.0.0. I don't know how this works exactly but would it still work if we replaced CV_IMWRITE_PXM_BINARY with IMWRITE_PXM_BINARY ?

See here. https://docs.opencv.org/master/d4/da8/group__imgcodecs.html#gga292d81be8d76901bff7988d18d2b42aca6ad01adc2675d735ec8424e6e7562087

RustyRaptor commented 5 years ago

Please see #7

ghost commented 5 years ago

Updating the deprecated to the new enum. Thank you !