Skip to content

'CV_BGR2RGB' was not declared in this scope #735

@kkjh0723

Description

@kkjh0723

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions