Hi, while I build from source, I got the following error.
It seems related to openCV. I installed openCV 4.0 and CV_BGR2RGB seems changed to COLOR_BGR2RGB in opencv4.
/home/dali/dali/aux/optical_flow/turing_of/optical_flow_turing_test.cc: In member function 'virtual void dali::optical_flow::testing::OpticalFlowTuringTest_DISABLED_CalcOpticalFlowTest_Test::TestBody()':
/home/dali/dali/aux/optical_flow/turing_of/optical_flow_turing_test.cc:243:32: error: 'CV_BGR2RGB' was not declared in this scope
cv::cvtColor(matref, matref, CV_BGR2RGB);
^
/home/dali/dali/aux/optical_flow/turing_of/optical_flow_turing_test.cc: In member function 'virtual void dali::optical_flow::testing::OpticalFlowTuringTest_DISABLED_CalcOpticalFlowExternalHintsTest_Test::TestBody()':
/home/dali/dali/aux/optical_flow/turing_of/optical_flow_turing_test.cc:306:32: error: 'CV_BGR2RGB' was not declared in this scope
cv::cvtColor(matref, matref, CV_BGR2RGB);
^
dali/CMakeFiles/dali_test.bin.dir/build.make:1142: recipe for target 'dali/CMakeFiles/dali_test.bin.dir/aux/optical_flow/turing_of/optical_flow_turing_test.cc.o' failed
make[2]: *** [dali/CMakeFiles/dali_test.bin.dir/aux/optical_flow/turing_of/optical_flow_turing_test.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:565: recipe for target 'dali/CMakeFiles/dali_test.bin.dir/all' failed
make[1]: *** [dali/CMakeFiles/dali_test.bin.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Hi,
thanks for the info. As openCV 4.0 is quite recent, we did not yet had a chance to check DALIs compatibility. Internally, we use 3.4.3 and this in known to work best.
Sorry for the unfortunate wording of the note on openCV compatibility in the Redme. We are in the process of updating it.
Thanks @awolant. So DALI is going to support v3.4.x only or do you have plan to support v4.0 also?
No problem @kkjh0723. For now, there is no plan to support v4.0. We do not see any strong reason to move away from v3.4.3.
Nevertheless, we are open to community contributions in this regard, so if you really need 4.0 support and plan to do it on your own, maybe consider creating a PR with it.
I successfully build with openCV4 by changing CV_BGR2RGB to cv::COLOR_BGR2RGB in optical_flow_turing_test.cc (The file moved from the point I forked)
I'm not sure what is the best way to modify for handling both version. Most naive way I can imagine is,
#if (CV_VERSION_MAJOR >= 4)
cv::cvtColor(matref, matref, cv::COLOR_BGR2RGB);
#else
cv::cvtColor(matref, matref, CV_BGR2RGB);
#endif
But copying above lines 4 times in the code doesn't look nice...
@kkjh0723 Thanks for pointing this out.
This should fix the problem, please reopen this issue otherwise
Most helpful comment
I successfully build with openCV4 by changing
CV_BGR2RGBtocv::COLOR_BGR2RGBin optical_flow_turing_test.cc (The file moved from the point I forked)I'm not sure what is the best way to modify for handling both version. Most naive way I can imagine is,
But copying above lines 4 times in the code doesn't look nice...