Skip to content

Commit 3fa0de9

Browse files
Deprecated OpenCV consts
1 parent 77d66df commit 3fa0de9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

examples/cpp_classification/classification.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ void Classifier::Preprocess(const cv::Mat& img,
186186
/* Convert the input image to the input image format of the network. */
187187
cv::Mat sample;
188188
if (img.channels() == 3 && num_channels_ == 1)
189-
cv::cvtColor(img, sample, CV_BGR2GRAY);
189+
cv::cvtColor(img, sample, cv::COLOR_BGR2GRAY);
190190
else if (img.channels() == 4 && num_channels_ == 1)
191-
cv::cvtColor(img, sample, CV_BGRA2GRAY);
191+
cv::cvtColor(img, sample, cv::COLOR_BGRA2GRAY);
192192
else if (img.channels() == 4 && num_channels_ == 3)
193-
cv::cvtColor(img, sample, CV_BGRA2BGR);
193+
cv::cvtColor(img, sample, cv::COLOR_BGRA2BGR);
194194
else if (img.channels() == 1 && num_channels_ == 3)
195-
cv::cvtColor(img, sample, CV_GRAY2BGR);
195+
cv::cvtColor(img, sample, cv::COLOR_GRAY2BGR);
196196
else
197197
sample = img;
198198

0 commit comments

Comments
 (0)