File tree Expand file tree Collapse file tree
examples/cpp_classification Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments