FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #2693 from AdamStelmaszczyk/patch-1 · rootkit/CaffeOnACL@c9086ca · GitHub

Repository navigation

Commit c9086ca

Browse files
committed
Merge pull request #2693 from AdamStelmaszczyk/patch-1
Deprecated OpenCV consts leading to compilation error
2 parents c7ee261 + 3fa0de9 commit c9086ca

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
@@ -191,13 +191,13 @@ void Classifier::Preprocess(const cv::Mat& img,
191191
/* Convert the input image to the input image format of the network. */
192192
cv::Mat sample;
193193
if (img.channels() == 3 && num_channels_ == 1)
194-
cv::cvtColor(img, sample, CV_BGR2GRAY);
194+
cv::cvtColor(img, sample, cv::COLOR_BGR2GRAY);
195195
else if (img.channels() == 4 && num_channels_ == 1)
196-
cv::cvtColor(img, sample, CV_BGRA2GRAY);
196+
cv::cvtColor(img, sample, cv::COLOR_BGRA2GRAY);
197197
else if (img.channels() == 4 && num_channels_ == 3)
198-
cv::cvtColor(img, sample, CV_BGRA2BGR);
198+
cv::cvtColor(img, sample, cv::COLOR_BGRA2BGR);
199199
else if (img.channels() == 1 && num_channels_ == 3)
200-
cv::cvtColor(img, sample, CV_GRAY2BGR);
200+
cv::cvtColor(img, sample, cv::COLOR_GRAY2BGR);
201201
else
202202
sample = img;
203203

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL