ATV Modulator: implement opencv

This commit is contained in:
f4exb 2017-03-08 08:36:28 +01:00
parent 806b955110
commit 0429b36fd9
3 changed files with 15 additions and 1 deletions

View File

@ -1,7 +1,12 @@
project(mod)
find_package(OpenCV)
add_subdirectory(modam)
add_subdirectory(modatv)
add_subdirectory(modnfm)
add_subdirectory(modssb)
add_subdirectory(modwfm)
if (OpenCV_FOUND)
add_subdirectory(modatv)
endif()

View File

@ -16,8 +16,11 @@ set(modatv_FORMS
atvmodgui.ui
)
# OpenCV variables defined in /usr/share/OpenCV/OpenCVConfig.cmake (Ubuntu)
include_directories(
.
${OpenCV_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
@ -34,6 +37,7 @@ add_library(modatv SHARED
)
target_link_libraries(modatv
${OpenCV_LIBS}
${QT_LIBRARIES}
sdrbase
)

View File

@ -20,6 +20,9 @@
#include <QObject>
#include <QMutex>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdint.h>
#include "dsp/basebandsamplesource.h"
@ -209,6 +212,8 @@ private:
Real m_peakLevel;
Real m_levelSum;
cv::Mat m_image;
static const float m_blackLevel;
static const float m_spanLevel;
static const int m_levelNbSamples;