Skip to content

Commit

Permalink
Replace obsolete opencv constants (4.2.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-koi committed Apr 25, 2020
1 parent 1b2d837 commit 6ca1964
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ImageConverter.cpp
Expand Up @@ -70,7 +70,7 @@ void ImageConverter::convert(const cv::Mat * in, QImage * out)

cv::Mat tmp(in->cols, in->rows, in->type());

cvtColor(*in, tmp, (in->channels() == 1) ? CV_GRAY2RGB : CV_BGR2RGB);
cvtColor(*in, tmp, (in->channels() == 1) ? cv::COLOR_GRAY2RGB : cv::COLOR_BGR2RGB);

const unsigned int w3 = 3 * tmp.cols;
unsigned char * src = reinterpret_cast<unsigned char *>(tmp.ptr());
Expand Down Expand Up @@ -113,7 +113,7 @@ void ImageConverter::convert(const QImage & in, cv::Mat ** out)
dst += step;
}
}
cvtColor(**out, **out, CV_BGR2RGB);
cvtColor(**out, **out, cv::COLOR_BGR2RGB);
}

void ImageConverter::convert(const cimg_library::CImg<float> & in, QImage * out)
Expand Down

0 comments on commit 6ca1964

Please sign in to comment.