Skip to content

5.x merge 4.x #3628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ $ cmake -D OPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules -D BUILD_opencv_<r

- **saliency**: Saliency API -- Where humans would look in a scene. Has routines for static, motion and "objectness" saliency.

- **signal**: Signal processing algorithms

- **sfm**: Structure from Motion -- This module contains algorithms to perform 3d reconstruction from 2d images. The core of the module is a light version of Libmv.

- **shape**: Shape Distance and Matching
Expand Down
2 changes: 1 addition & 1 deletion modules/ccalib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
set(the_description "Custom Calibration Pattern")
ocv_define_module(ccalib opencv_core opencv_imgproc opencv_3d opencv_calib opencv_features2d opencv_highgui WRAP python)
ocv_define_module(ccalib opencv_core opencv_imgproc opencv_3d opencv_calib opencv_features2d opencv_highgui opencv_imgcodecs WRAP python)
1 change: 1 addition & 0 deletions modules/ccalib/src/precomp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <opencv2/3d.hpp>
#include <opencv2/calib.hpp>
#include <opencv2/features2d.hpp>
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <vector>
Expand Down
46 changes: 0 additions & 46 deletions modules/cudacodec/src/ffmpeg_video_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,55 +62,9 @@ static std::string fourccToString(int fourcc)
return std::string(str);
}

// handle old FFmpeg backend - remove when windows shared library is updated
#ifdef _WIN32
static
Codec FourccToCodecWin32Old(int codec)
{
switch (codec)
{
case CV_FOURCC_MACRO('m', 'p', 'e', 'g'): // fallthru
case CV_FOURCC_MACRO('m', 'p', 'g', '1'): // fallthru
case CV_FOURCC_MACRO('M', 'P', 'G', '1'): return MPEG1;
case CV_FOURCC_MACRO('m', 'p', 'g', '2'): // fallthru
case CV_FOURCC_MACRO('M', 'P', 'G', '2'): return MPEG2;
case CV_FOURCC_MACRO('X', 'V', 'I', 'D'): // fallthru
case CV_FOURCC_MACRO('m', 'p', '4', 'v'): // fallthru
case CV_FOURCC_MACRO('D', 'I', 'V', 'X'): return MPEG4;
case CV_FOURCC_MACRO('W', 'V', 'C', '1'): return VC1;
case CV_FOURCC_MACRO('H', '2', '6', '4'): // fallthru
case CV_FOURCC_MACRO('h', '2', '6', '4'): // fallthru
case CV_FOURCC_MACRO('a', 'v', 'c', '1'): return H264;
case CV_FOURCC_MACRO('H', '2', '6', '5'): // fallthru
case CV_FOURCC_MACRO('h', '2', '6', '5'): // fallthru
case CV_FOURCC_MACRO('h', 'e', 'v', 'c'): return HEVC;
case CV_FOURCC_MACRO('M', 'J', 'P', 'G'): return JPEG;
case CV_FOURCC_MACRO('v', 'p', '8', '0'): // fallthru
case CV_FOURCC_MACRO('V', 'P', '8', '0'): // fallthru
case CV_FOURCC_MACRO('v', 'p', '0', '8'): // fallthru
case CV_FOURCC_MACRO('V', 'P', '0', '8'): return VP8;
case CV_FOURCC_MACRO('v', 'p', '9', '0'): // fallthru
case CV_FOURCC_MACRO('V', 'P', '9', '0'): // fallthru
case CV_FOURCC_MACRO('V', 'P', '0', '9'): // fallthru
case CV_FOURCC_MACRO('v', 'p', '0', '9'): return VP9;
case CV_FOURCC_MACRO('a', 'v', '1', '0'): // fallthru
case CV_FOURCC_MACRO('A', 'V', '1', '0'): // fallthru
case CV_FOURCC_MACRO('a', 'v', '0', '1'): // fallthru
case CV_FOURCC_MACRO('A', 'V', '0', '1'): return AV1;
default:
return NumCodecs;
}
}
#endif

static
Codec FourccToCodec(int codec)
{
#ifdef _WIN32 // handle old FFmpeg backend - remove when windows shared library is updated
Codec win32OldCodec = FourccToCodecWin32Old(codec);
if(win32OldCodec != NumCodecs)
return win32OldCodec;
#endif
switch (codec)
{
case CV_FOURCC_MACRO('m', 'p', 'g', '1'): return MPEG1;
Expand Down
3 changes: 0 additions & 3 deletions modules/cudacodec/src/video_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,10 @@ Ptr<VideoWriter> createVideoWriter(const String& fileName, const Size frameSize,
{
CV_Assert(params.idrPeriod >= params.gopLength);
if (!encoderCallback) {
// required until PR for raw video encapsulation is merged and windows dll is updated
#ifndef WIN32 // remove #define and keep code once merged
try {
encoderCallback = new FFmpegVideoWriter(fileName, codec, fps, frameSize, params.idrPeriod);
}
catch (...)
#endif
{
encoderCallback = new RawVideoWriter(fileName);
}
Expand Down
21 changes: 0 additions & 21 deletions modules/cudacodec/test/test_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,6 @@ CUDA_TEST_P(CheckInitParams, Reader)

CUDA_TEST_P(Seek, Reader)
{
#if defined(WIN32)
throw SkipTestException("Test disabled on Windows until the FFMpeg wrapper is updated to include PR24012.");
#endif
std::string inputFile = std::string(cvtest::TS::ptr()->get_data_path()) + "../highgui/video/big_buck_bunny.mp4";
// seek to a non key frame
const int firstFrameIdx = 18;
Expand Down Expand Up @@ -660,13 +657,7 @@ CUDA_TEST_P(TransCode, H264ToH265)
constexpr cv::cudacodec::ColorFormat colorFormat = cv::cudacodec::ColorFormat::NV_NV12;
constexpr double fps = 25;
const cudacodec::Codec codec = cudacodec::Codec::HEVC;
// required until PR for raw video encapsulation is merged and windows dll is updated
#ifdef WIN32
const std::string ext = ".hevc";
#else
// use this after update
const std::string ext = ".mp4";
#endif
const std::string outputFile = cv::tempfile(ext.c_str());
constexpr int nFrames = 5;
Size frameSz;
Expand Down Expand Up @@ -743,13 +734,7 @@ CUDA_TEST_P(Write, Writer)
const cudacodec::Codec codec = GET_PARAM(2);
const double fps = GET_PARAM(3);
const cv::cudacodec::ColorFormat colorFormat = GET_PARAM(4);
// required until PR for raw video encapsulation is merged and windows dll is updated
#ifdef WIN32
const std::string ext = codec == cudacodec::Codec::H264 ? ".h264" : ".hevc";
#else
// use this after update
const std::string ext = ".mp4";
#endif
const std::string outputFile = cv::tempfile(ext.c_str());
constexpr int nFrames = 5;
Size frameSz;
Expand Down Expand Up @@ -827,13 +812,7 @@ CUDA_TEST_P(EncoderParams, Writer)
const std::string inputFile = std::string(cvtest::TS::ptr()->get_data_path()) + "../highgui/video/big_buck_bunny.mp4";
constexpr double fps = 25.0;
constexpr cudacodec::Codec codec = cudacodec::Codec::H264;
// required until PR for raw video encapsulation is merged and windows dll is updated
#ifdef WIN32
const std::string ext = ".h264";
#else
// use this after update
const std::string ext = ".mp4";
#endif
const std::string outputFile = cv::tempfile(ext.c_str());
Size frameSz;
const int nFrames = max(params.gopLength, params.idrPeriod) + 1;
Expand Down
34 changes: 23 additions & 11 deletions modules/cudaimgproc/include/opencv2/cudaimgproc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,21 @@ enum MomentsOrder {
@param order Order of largest moments to calculate with lower order moments requiring less computation.
@returns number of image moments.

@sa cuda::moments, cuda::spatialMoments, cuda::MomentsOrder
@sa cuda::spatialMoments, cuda::moments, cuda::MomentsOrder
*/
CV_EXPORTS_W int numMoments(const MomentsOrder order);

/** @brief Converts the spatial image moments returned from cuda::spatialMoments to cv::Moments.
@param spatialMoments Spatial moments returned from cuda::spatialMoments.
@param order Order used when calculating image moments with cuda::spatialMoments.
@param momentsType Precision used when calculating image moments with cuda::spatialMoments.

@returns cv::Moments.

@sa cuda::spatialMoments, cuda::moments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder
*/
CV_EXPORTS_W Moments convertSpatialMoments(Mat spatialMoments, const MomentsOrder order, const int momentsType);

/** @brief Calculates all of the spatial moments up to the 3rd order of a rasterized shape.

Asynchronous version of cuda::moments() which only calculates the spatial (not centralized or normalized) moments, up to the 3rd order, of a rasterized shape.
Expand All @@ -813,24 +824,25 @@ Each moment is returned as a column entry in the 1D \a moments array.
@param [out] moments 1D array with each column entry containing a spatial image moment.
@param binaryImage If it is true, all non-zero image pixels are treated as 1's.
@param order Order of largest moments to calculate with lower order moments requiring less computation.
@param momentsType Precision to use when calculating moments. Available types are `CV_32F` and `CV_64F` with the performance of `CV_32F` an order of magnitude greater than `CV_64F`. If the image is small the accuracy from `CV_32F` can be equal or very close to `CV_64F`.
@param momentsType Precision to use when calculating moments. Available types are \ref CV_32F and \ref CV_64F with the performance of \ref CV_32F an order of magnitude greater than \ref CV_64F. If the image is small the accuracy from \ref CV_32F can be equal or very close to \ref CV_64F.
@param stream Stream for the asynchronous version.

@note For maximum performance pre-allocate a 1D GpuMat for \a moments of the correct type and size large enough to store the all the image moments of up to the desired \a order. e.g. With \a order === MomentsOrder::SECOND_ORDER_MOMENTS and \a momentsType == `CV_32F` \a moments can be allocated as
@note For maximum performance pre-allocate a 1D GpuMat for \a moments of the correct type and size large enough to store the all the image moments of up to the desired \a order. e.g. With \a order === MomentsOrder::SECOND_ORDER_MOMENTS and \a momentsType == \ref CV_32F \a moments can be allocated as
```
GpuMat momentsDevice(1,numMoments(MomentsOrder::SECOND_ORDER_MOMENTS),CV_32F)
```
The central and normalized moments can easily be calculated on the host by downloading the \a moments array and using the cv::Moments constructor. e.g.
The central and normalized moments can easily be calculated on the host by downloading the \a moments array and using the cuda::convertSpatialMoments helper function. e.g.
```
HostMem momentsHostMem(1, numMoments(MomentsOrder::SECOND_ORDER_MOMENTS), CV_32F);
momentsDevice.download(momentsHostMem, stream);
HostMem spatialMomentsHostMem(1, numMoments(MomentsOrder::SECOND_ORDER_MOMENTS), CV_32F);
spatialMomentsDevice.download(spatialMomentsHostMem, stream);
stream.waitForCompletion();
Mat momentsMat = momentsHostMem.createMatHeader();
cv::Moments cvMoments(momentsMat.at<float>(0), momentsMat.at<float>(1), momentsMat.at<float>(2), momentsMat.at<float>(3), momentsMat.at<float>(4), momentsMat.at<float>(5), momentsMat.at<float>(6), momentsMat.at<float>(7), momentsMat.at<float>(8), momentsMat.at<float>(9));
Mat spatialMoments = spatialMomentsHostMem.createMatHeader();
cv::Moments cvMoments = convertSpatialMoments<float>(spatialMoments, order);
```

see the \a CUDA_TEST_P(Moments, Async) test inside opencv_contrib_source_code/modules/cudaimgproc/test/test_moments.cpp for an example.
@returns cv::Moments.
@sa cuda::moments
@sa cuda::moments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder
*/
CV_EXPORTS_W void spatialMoments(InputArray src, OutputArray moments, const bool binaryImage = false, const MomentsOrder order = MomentsOrder::THIRD_ORDER_MOMENTS, const int momentsType = CV_64F, Stream& stream = Stream::Null());

Expand All @@ -842,7 +854,7 @@ results are returned in the structure cv::Moments.
@param src Raster image (single-channel 2D array).
@param binaryImage If it is true, all non-zero image pixels are treated as 1's.
@param order Order of largest moments to calculate with lower order moments requiring less computation.
@param momentsType Precision to use when calculating moments. Available types are `CV_32F` and `CV_64F` with the performance of `CV_32F` an order of magnitude greater than `CV_64F`. If the image is small the accuracy from `CV_32F` can be equal or very close to `CV_64F`.
@param momentsType Precision to use when calculating moments. Available types are \ref CV_32F and \ref CV_64F with the performance of \ref CV_32F an order of magnitude greater than \ref CV_64F. If the image is small the accuracy from \ref CV_32F can be equal or very close to \ref CV_64F.

@note For maximum performance use the asynchronous version cuda::spatialMoments() as this version interally allocates and deallocates both GpuMat and HostMem to respectively perform the calculation on the device and download the result to the host.
The costly HostMem allocation cannot be avoided however the GpuMat device allocation can be by using BufferPool, e.g.
Expand All @@ -852,7 +864,7 @@ The costly HostMem allocation cannot be avoided however the GpuMat device alloca
```
see the \a CUDA_TEST_P(Moments, Accuracy) test inside opencv_contrib_source_code/modules/cudaimgproc/test/test_moments.cpp for an example.
@returns cv::Moments.
@sa cuda::spatialMoments
@sa cuda::spatialMoments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder
*/
CV_EXPORTS_W Moments moments(InputArray src, const bool binaryImage = false, const MomentsOrder order = MomentsOrder::THIRD_ORDER_MOMENTS, const int momentsType = CV_64F);

Expand Down
10 changes: 9 additions & 1 deletion modules/cudaimgproc/src/cuda/moments.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,22 @@ constexpr int blockSizeY = 16;
template <typename T>
__device__ T butterflyWarpReduction(T value) {
for (int i = 16; i >= 1; i /= 2)
#if (CUDART_VERSION >= 9000)
value += __shfl_xor_sync(0xffffffff, value, i, 32);
#else
value += __shfl_xor(value, i, 32);
#endif
return value;
}

template <typename T>
__device__ T butterflyHalfWarpReduction(T value) {
for (int i = 8; i >= 1; i /= 2)
value += __shfl_xor_sync(0xffff, value, i, 32);
#if (CUDART_VERSION >= 9000)
value += __shfl_xor_sync(0xffff, value, i, 16);
#else
value += __shfl_xor(value, i, 16);
#endif
return value;
}

Expand Down
26 changes: 21 additions & 5 deletions modules/cudaimgproc/src/moments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ int cv::cuda::numMoments(const MomentsOrder order) {
return order == MomentsOrder::FIRST_ORDER_MOMENTS ? device::imgproc::n1 : order == MomentsOrder::SECOND_ORDER_MOMENTS ? device::imgproc::n12 : device::imgproc::n123;
}

template<typename T>
cv::Moments convertSpatialMomentsT(Mat spatialMoments, const MomentsOrder order) {
switch (order) {
case MomentsOrder::FIRST_ORDER_MOMENTS:
return Moments(spatialMoments.at<T>(0), spatialMoments.at<T>(1), spatialMoments.at<T>(2), 0, 0, 0, 0, 0, 0, 0);
case MomentsOrder::SECOND_ORDER_MOMENTS:
return Moments(spatialMoments.at<T>(0), spatialMoments.at<T>(1), spatialMoments.at<T>(2), spatialMoments.at<T>(3), spatialMoments.at<T>(4), spatialMoments.at<T>(5), 0, 0, 0, 0);
default:
return Moments(spatialMoments.at<T>(0), spatialMoments.at<T>(1), spatialMoments.at<T>(2), spatialMoments.at<T>(3), spatialMoments.at<T>(4), spatialMoments.at<T>(5), spatialMoments.at<T>(6), spatialMoments.at<T>(7), spatialMoments.at<T>(8), spatialMoments.at<T>(9));
}
}

cv::Moments cv::cuda::convertSpatialMoments(Mat spatialMoments, const MomentsOrder order, const int momentsType) {
if (momentsType == CV_32F)
return convertSpatialMomentsT<float>(spatialMoments, order);
else
return convertSpatialMomentsT<double>(spatialMoments, order);
}

#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
Moments cv::cuda::moments(InputArray src, const bool binary, const MomentsOrder order, const int momentsType) { throw_no_cuda(); }
void spatialMoments(InputArray src, OutputArray moments, const bool binary, const MomentsOrder order, const int momentsType, Stream& stream) { throw_no_cuda(); }
Expand Down Expand Up @@ -53,15 +72,12 @@ void cv::cuda::spatialMoments(InputArray src, OutputArray moments, const bool bi
}

Moments cv::cuda::moments(InputArray src, const bool binary, const MomentsOrder order, const int momentsType) {
Stream& stream = Stream::Null();
Stream stream;
HostMem dst;
spatialMoments(src, dst, binary, order, momentsType, stream);
stream.waitForCompletion();
Mat moments = dst.createMatHeader();
if(momentsType == CV_32F)
return Moments(moments.at<float>(0), moments.at<float>(1), moments.at<float>(2), moments.at<float>(3), moments.at<float>(4), moments.at<float>(5), moments.at<float>(6), moments.at<float>(7), moments.at<float>(8), moments.at<float>(9));
else
return Moments(moments.at<double>(0), moments.at<double>(1), moments.at<double>(2), moments.at<double>(3), moments.at<double>(4), moments.at<double>(5), moments.at<double>(6), moments.at<double>(7), moments.at<double>(8), moments.at<double>(9));
return convertSpatialMoments(moments, order, momentsType);
}

#endif /* !defined (HAVE_CUDA) */
5 changes: 1 addition & 4 deletions modules/cudaimgproc/test/test_moments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ CUDA_TEST_P(Moments, Async)
HostMem momentsHost(1, nMoments, momentsType);
momentsDevice.download(momentsHost, stream);
stream.waitForCompletion();
Mat momentsHost64F = momentsHost.createMatHeader();
if (momentsType == CV_32F)
momentsHost.createMatHeader().convertTo(momentsHost64F, CV_64F);
const cv::Moments moments = cv::Moments(momentsHost64F.at<double>(0), momentsHost64F.at<double>(1), momentsHost64F.at<double>(2), momentsHost64F.at<double>(3), momentsHost64F.at<double>(4), momentsHost64F.at<double>(5), momentsHost64F.at<double>(6), momentsHost64F.at<double>(7), momentsHost64F.at<double>(8), momentsHost64F.at<double>(9));
const cv::Moments moments = convertSpatialMoments(momentsHost.createMatHeader(), order, momentsType);
Mat imgHostAdjustedType = imgHost(roi);
if (imgType != CV_8U && imgType != CV_32F)
imgHost(roi).convertTo(imgHostAdjustedType, CV_32F);
Expand Down
8 changes: 4 additions & 4 deletions modules/sfm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ set(LIBMV_LIGHT_INCLUDES
)

set(LIBMV_LIGHT_LIBS
correspondence
multiview
numeric
opencv.sfm.correspondence
opencv.sfm.multiview
opencv.sfm.numeric
${GLOG_LIBRARIES}
${GFLAGS_LIBRARIES}
)

if(Ceres_FOUND)
add_definitions("-DCERES_FOUND=1")
list(APPEND LIBMV_LIGHT_LIBS simple_pipeline)
list(APPEND LIBMV_LIGHT_LIBS opencv.sfm.simple_pipeline)
if(Ceres_VERSION VERSION_LESS 2.0.0)
list(APPEND LIBMV_LIGHT_INCLUDES "${CERES_INCLUDE_DIRS}")
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ SET(CORRESPONDENCE_SRC feature_matching.cc
# define the header files (make the headers appear in IDEs.)
FILE(GLOB CORRESPONDENCE_HDRS *.h)

ADD_LIBRARY(correspondence STATIC ${CORRESPONDENCE_SRC} ${CORRESPONDENCE_HDRS})
ADD_LIBRARY(opencv.sfm.correspondence STATIC ${CORRESPONDENCE_SRC} ${CORRESPONDENCE_HDRS})

ocv_target_link_libraries(correspondence LINK_PRIVATE ${GLOG_LIBRARIES} multiview opencv_imgcodecs)
ocv_target_link_libraries(opencv.sfm.correspondence LINK_PRIVATE ${GLOG_LIBRARIES} opencv.sfm.multiview opencv_imgcodecs)
IF(TARGET Eigen3::Eigen)
TARGET_LINK_LIBRARIES(correspondence LINK_PUBLIC Eigen3::Eigen)
TARGET_LINK_LIBRARIES(opencv.sfm.correspondence LINK_PUBLIC Eigen3::Eigen)
ENDIF()


LIBMV_INSTALL_LIB(correspondence)
LIBMV_INSTALL_LIB(opencv.sfm.correspondence)
10 changes: 5 additions & 5 deletions modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ SET(MULTIVIEW_SRC conditioning.cc
# define the header files (make the headers appear in IDEs.)
FILE(GLOB MULTIVIEW_HDRS *.h)

ADD_LIBRARY(multiview STATIC ${MULTIVIEW_SRC} ${MULTIVIEW_HDRS})
TARGET_LINK_LIBRARIES(multiview LINK_PRIVATE ${GLOG_LIBRARIES} numeric)
ADD_LIBRARY(opencv.sfm.multiview STATIC ${MULTIVIEW_SRC} ${MULTIVIEW_HDRS})
TARGET_LINK_LIBRARIES(opencv.sfm.multiview LINK_PRIVATE ${GLOG_LIBRARIES} opencv.sfm.numeric)
IF(TARGET Eigen3::Eigen)
TARGET_LINK_LIBRARIES(multiview LINK_PUBLIC Eigen3::Eigen)
TARGET_LINK_LIBRARIES(opencv.sfm.multiview LINK_PUBLIC Eigen3::Eigen)
ENDIF()
IF(CERES_LIBRARIES)
TARGET_LINK_LIBRARIES(multiview LINK_PRIVATE ${CERES_LIBRARIES})
TARGET_LINK_LIBRARIES(opencv.sfm.multiview LINK_PRIVATE ${CERES_LIBRARIES})
ENDIF()

LIBMV_INSTALL_LIB(multiview)
LIBMV_INSTALL_LIB(opencv.sfm.multiview)
6 changes: 3 additions & 3 deletions modules/sfm/src/libmv_light/libmv/numeric/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ SET(NUMERIC_SRC numeric.cc
# define the header files (make the headers appear in IDEs.)
FILE(GLOB NUMERIC_HDRS *.h)

ADD_LIBRARY(numeric STATIC ${NUMERIC_SRC} ${NUMERIC_HDRS})
ADD_LIBRARY(opencv.sfm.numeric STATIC ${NUMERIC_SRC} ${NUMERIC_HDRS})

IF(TARGET Eigen3::Eigen)
TARGET_LINK_LIBRARIES(numeric LINK_PUBLIC Eigen3::Eigen)
TARGET_LINK_LIBRARIES(opencv.sfm.numeric LINK_PUBLIC Eigen3::Eigen)
ENDIF()

LIBMV_INSTALL_LIB(numeric)
LIBMV_INSTALL_LIB(opencv.sfm.numeric)
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ SET(SIMPLE_PIPELINE_SRC
# Define the header files so that they appear in IDEs.
FILE(GLOB SIMPLE_PIPELINE_HDRS *.h)

ADD_LIBRARY(simple_pipeline STATIC ${SIMPLE_PIPELINE_SRC} ${SIMPLE_PIPELINE_HDRS})
ADD_LIBRARY(opencv.sfm.simple_pipeline STATIC ${SIMPLE_PIPELINE_SRC} ${SIMPLE_PIPELINE_HDRS})

TARGET_LINK_LIBRARIES(simple_pipeline LINK_PRIVATE multiview ${CERES_LIBRARIES})
TARGET_LINK_LIBRARIES(opencv.sfm.simple_pipeline LINK_PRIVATE opencv.sfm.multiview ${CERES_LIBRARIES})

LIBMV_INSTALL_LIB(simple_pipeline)
LIBMV_INSTALL_LIB(opencv.sfm.simple_pipeline)
2 changes: 2 additions & 0 deletions modules/signal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(the_description "Signal processing algorithms")
ocv_define_module(signal opencv_core WRAP python)
Loading