| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -191,13 +191,13 @@ void Classifier::Preprocess(const cv::Mat& img, | |||
| 191 | 191 | /* Convert the input image to the input image format of the network. */ | |
| 192 | 192 | cv::Mat sample; | |
| 193 | 193 | if (img.channels() == 3 && num_channels_ == 1) | |
| 194 | - cv::cvtColor(img, sample, CV_BGR2GRAY); | ||
| 194 | + cv::cvtColor(img, sample, cv::COLOR_BGR2GRAY); | ||
| 195 | 195 | else if (img.channels() == 4 && num_channels_ == 1) | |
| 196 | - cv::cvtColor(img, sample, CV_BGRA2GRAY); | ||
| 196 | + cv::cvtColor(img, sample, cv::COLOR_BGRA2GRAY); | ||
| 197 | 197 | else if (img.channels() == 4 && num_channels_ == 3) | |
| 198 | - cv::cvtColor(img, sample, CV_BGRA2BGR); | ||
| 198 | + cv::cvtColor(img, sample, cv::COLOR_BGRA2BGR); | ||
| 199 | 199 | else if (img.channels() == 1 && num_channels_ == 3) | |
| 200 | - cv::cvtColor(img, sample, CV_GRAY2BGR); | ||
| 200 | + cv::cvtColor(img, sample, cv::COLOR_GRAY2BGR); | ||
| 201 | 201 | else | |
| 202 | 202 | sample = img; | |
| 203 | 203 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments