From 9029a7f24fb93a167cd7ad765fa259bd3d7a55fa Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 27 Apr 2020 14:41:02 +0200 Subject: [PATCH] ATV modulator: make OpenCV code objects compatible with OpenCV version in Ubuntu 20.04. Fixes issue #511 --- plugins/channeltx/modatv/atvmodsource.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/channeltx/modatv/atvmodsource.cpp b/plugins/channeltx/modatv/atvmodsource.cpp index 95f5b1296..a8e004ac0 100644 --- a/plugins/channeltx/modatv/atvmodsource.cpp +++ b/plugins/channeltx/modatv/atvmodsource.cpp @@ -316,7 +316,7 @@ void ATVModSource::pullVideo(Real& sample) mixImageAndText(colorFrame); } - cv::cvtColor(colorFrame, m_videoframeOriginal, cv::COLOR_BGR2GRAY); + cv::cvtColor(colorFrame, m_videoframeOriginal, cv::COLOR_RGB2GRAY); resizeVideo(); } } @@ -443,7 +443,7 @@ void ATVModSource::pullVideo(Real& sample) mixImageAndText(colorFrame); } - cv::cvtColor(colorFrame, camera.m_videoframeOriginal, cv::COLOR_BGR2GRAY); + cv::cvtColor(colorFrame, camera.m_videoframeOriginal, cv::COLOR_RGB2GRAY); resizeCamera(); } @@ -648,7 +648,7 @@ void ATVModSource::applyStandard(const ATVModSettings& settings) void ATVModSource::openImage(const QString& fileName) { - m_imageFromFile = cv::imread(qPrintable(fileName), cv::IMREAD_GRAYSCALE); + m_imageFromFile = cv::imread(qPrintable(fileName), cv::ImreadModes::IMREAD_GRAYSCALE); m_imageOK = m_imageFromFile.data != 0; if (m_imageOK)