Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On RHEL 9, opencv-4.6.0-7.el9.x86_64 there is this representative build error.
src/caffe/util/io.cpp:76:34: error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope
76 | int cv_read_flag = (is_color ? CV_LOAD_IMAGE_COLOR :
The header containing this enum has moved to
opencv4/opencv2/imgcodecs/legacy/constants_c.h
And is no longer in the include path.
The replacement mappings are
CV_LOAD_IMAGE_COLOR -> IMREAD_COLOR
CV_LOAD_IMAGE_GRAYSCALE -> IMREAD_GRAYSCALE
from
./opencv4/opencv2/imgcodecs/legacy/constants_c.h
CV_LOAD_IMAGE_GRAYSCALE =0,
CV_LOAD_IMAGE_COLOR =1,
to
./opencv2/imgcodecs.hpp
IMREAD_GRAYSCALE = 0, //!< If set, always convert image to the single channel grayscale image (codec internal conversion).
IMREAD_COLOR = 1, //!< If set, always convert image to the 3 channel BGR color image.
Signed-off-by: Tom Rix [email protected]