Skip to content

Commit d9275cb

Browse files
committed
Merge branch 4.x
2 parents 4b7de5a + ba5c23c commit d9275cb

27 files changed

+739
-111
lines changed

modules/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ $ cmake -D OPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules -D BUILD_opencv_<r
7272

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

75+
- **signal**: Signal processing algorithms
76+
7577
- **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.
7678

7779
- **shape**: Shape Distance and Matching

modules/ccalib/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
set(the_description "Custom Calibration Pattern")
2-
ocv_define_module(ccalib opencv_core opencv_imgproc opencv_3d opencv_calib opencv_features2d opencv_highgui WRAP python)
2+
ocv_define_module(ccalib opencv_core opencv_imgproc opencv_3d opencv_calib opencv_features2d opencv_highgui opencv_imgcodecs WRAP python)

modules/ccalib/src/precomp.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include <opencv2/3d.hpp>
4848
#include <opencv2/calib.hpp>
4949
#include <opencv2/features2d.hpp>
50+
#include "opencv2/imgcodecs.hpp"
5051
#include "opencv2/imgproc.hpp"
5152
#include "opencv2/highgui.hpp"
5253
#include <vector>

modules/cudacodec/src/ffmpeg_video_source.cpp

-46
Original file line numberDiff line numberDiff line change
@@ -62,55 +62,9 @@ static std::string fourccToString(int fourcc)
6262
return std::string(str);
6363
}
6464

65-
// handle old FFmpeg backend - remove when windows shared library is updated
66-
#ifdef _WIN32
67-
static
68-
Codec FourccToCodecWin32Old(int codec)
69-
{
70-
switch (codec)
71-
{
72-
case CV_FOURCC_MACRO('m', 'p', 'e', 'g'): // fallthru
73-
case CV_FOURCC_MACRO('m', 'p', 'g', '1'): // fallthru
74-
case CV_FOURCC_MACRO('M', 'P', 'G', '1'): return MPEG1;
75-
case CV_FOURCC_MACRO('m', 'p', 'g', '2'): // fallthru
76-
case CV_FOURCC_MACRO('M', 'P', 'G', '2'): return MPEG2;
77-
case CV_FOURCC_MACRO('X', 'V', 'I', 'D'): // fallthru
78-
case CV_FOURCC_MACRO('m', 'p', '4', 'v'): // fallthru
79-
case CV_FOURCC_MACRO('D', 'I', 'V', 'X'): return MPEG4;
80-
case CV_FOURCC_MACRO('W', 'V', 'C', '1'): return VC1;
81-
case CV_FOURCC_MACRO('H', '2', '6', '4'): // fallthru
82-
case CV_FOURCC_MACRO('h', '2', '6', '4'): // fallthru
83-
case CV_FOURCC_MACRO('a', 'v', 'c', '1'): return H264;
84-
case CV_FOURCC_MACRO('H', '2', '6', '5'): // fallthru
85-
case CV_FOURCC_MACRO('h', '2', '6', '5'): // fallthru
86-
case CV_FOURCC_MACRO('h', 'e', 'v', 'c'): return HEVC;
87-
case CV_FOURCC_MACRO('M', 'J', 'P', 'G'): return JPEG;
88-
case CV_FOURCC_MACRO('v', 'p', '8', '0'): // fallthru
89-
case CV_FOURCC_MACRO('V', 'P', '8', '0'): // fallthru
90-
case CV_FOURCC_MACRO('v', 'p', '0', '8'): // fallthru
91-
case CV_FOURCC_MACRO('V', 'P', '0', '8'): return VP8;
92-
case CV_FOURCC_MACRO('v', 'p', '9', '0'): // fallthru
93-
case CV_FOURCC_MACRO('V', 'P', '9', '0'): // fallthru
94-
case CV_FOURCC_MACRO('V', 'P', '0', '9'): // fallthru
95-
case CV_FOURCC_MACRO('v', 'p', '0', '9'): return VP9;
96-
case CV_FOURCC_MACRO('a', 'v', '1', '0'): // fallthru
97-
case CV_FOURCC_MACRO('A', 'V', '1', '0'): // fallthru
98-
case CV_FOURCC_MACRO('a', 'v', '0', '1'): // fallthru
99-
case CV_FOURCC_MACRO('A', 'V', '0', '1'): return AV1;
100-
default:
101-
return NumCodecs;
102-
}
103-
}
104-
#endif
105-
10665
static
10766
Codec FourccToCodec(int codec)
10867
{
109-
#ifdef _WIN32 // handle old FFmpeg backend - remove when windows shared library is updated
110-
Codec win32OldCodec = FourccToCodecWin32Old(codec);
111-
if(win32OldCodec != NumCodecs)
112-
return win32OldCodec;
113-
#endif
11468
switch (codec)
11569
{
11670
case CV_FOURCC_MACRO('m', 'p', 'g', '1'): return MPEG1;

modules/cudacodec/src/video_writer.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,10 @@ Ptr<VideoWriter> createVideoWriter(const String& fileName, const Size frameSize,
402402
{
403403
CV_Assert(params.idrPeriod >= params.gopLength);
404404
if (!encoderCallback) {
405-
// required until PR for raw video encapsulation is merged and windows dll is updated
406-
#ifndef WIN32 // remove #define and keep code once merged
407405
try {
408406
encoderCallback = new FFmpegVideoWriter(fileName, codec, fps, frameSize, params.idrPeriod);
409407
}
410408
catch (...)
411-
#endif
412409
{
413410
encoderCallback = new RawVideoWriter(fileName);
414411
}

modules/cudacodec/test/test_video.cpp

-21
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,6 @@ CUDA_TEST_P(CheckInitParams, Reader)
611611

612612
CUDA_TEST_P(Seek, Reader)
613613
{
614-
#if defined(WIN32)
615-
throw SkipTestException("Test disabled on Windows until the FFMpeg wrapper is updated to include PR24012.");
616-
#endif
617614
std::string inputFile = std::string(cvtest::TS::ptr()->get_data_path()) + "../highgui/video/big_buck_bunny.mp4";
618615
// seek to a non key frame
619616
const int firstFrameIdx = 18;
@@ -660,13 +657,7 @@ CUDA_TEST_P(TransCode, H264ToH265)
660657
constexpr cv::cudacodec::ColorFormat colorFormat = cv::cudacodec::ColorFormat::NV_NV12;
661658
constexpr double fps = 25;
662659
const cudacodec::Codec codec = cudacodec::Codec::HEVC;
663-
// required until PR for raw video encapsulation is merged and windows dll is updated
664-
#ifdef WIN32
665-
const std::string ext = ".hevc";
666-
#else
667-
// use this after update
668660
const std::string ext = ".mp4";
669-
#endif
670661
const std::string outputFile = cv::tempfile(ext.c_str());
671662
constexpr int nFrames = 5;
672663
Size frameSz;
@@ -743,13 +734,7 @@ CUDA_TEST_P(Write, Writer)
743734
const cudacodec::Codec codec = GET_PARAM(2);
744735
const double fps = GET_PARAM(3);
745736
const cv::cudacodec::ColorFormat colorFormat = GET_PARAM(4);
746-
// required until PR for raw video encapsulation is merged and windows dll is updated
747-
#ifdef WIN32
748-
const std::string ext = codec == cudacodec::Codec::H264 ? ".h264" : ".hevc";
749-
#else
750-
// use this after update
751737
const std::string ext = ".mp4";
752-
#endif
753738
const std::string outputFile = cv::tempfile(ext.c_str());
754739
constexpr int nFrames = 5;
755740
Size frameSz;
@@ -827,13 +812,7 @@ CUDA_TEST_P(EncoderParams, Writer)
827812
const std::string inputFile = std::string(cvtest::TS::ptr()->get_data_path()) + "../highgui/video/big_buck_bunny.mp4";
828813
constexpr double fps = 25.0;
829814
constexpr cudacodec::Codec codec = cudacodec::Codec::H264;
830-
// required until PR for raw video encapsulation is merged and windows dll is updated
831-
#ifdef WIN32
832-
const std::string ext = ".h264";
833-
#else
834-
// use this after update
835815
const std::string ext = ".mp4";
836-
#endif
837816
const std::string outputFile = cv::tempfile(ext.c_str());
838817
Size frameSz;
839818
const int nFrames = max(params.gopLength, params.idrPeriod) + 1;

modules/cudaimgproc/include/opencv2/cudaimgproc.hpp

+23-11
Original file line numberDiff line numberDiff line change
@@ -800,10 +800,21 @@ enum MomentsOrder {
800800
@param order Order of largest moments to calculate with lower order moments requiring less computation.
801801
@returns number of image moments.
802802
803-
@sa cuda::moments, cuda::spatialMoments, cuda::MomentsOrder
803+
@sa cuda::spatialMoments, cuda::moments, cuda::MomentsOrder
804804
*/
805805
CV_EXPORTS_W int numMoments(const MomentsOrder order);
806806

807+
/** @brief Converts the spatial image moments returned from cuda::spatialMoments to cv::Moments.
808+
@param spatialMoments Spatial moments returned from cuda::spatialMoments.
809+
@param order Order used when calculating image moments with cuda::spatialMoments.
810+
@param momentsType Precision used when calculating image moments with cuda::spatialMoments.
811+
812+
@returns cv::Moments.
813+
814+
@sa cuda::spatialMoments, cuda::moments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder
815+
*/
816+
CV_EXPORTS_W Moments convertSpatialMoments(Mat spatialMoments, const MomentsOrder order, const int momentsType);
817+
807818
/** @brief Calculates all of the spatial moments up to the 3rd order of a rasterized shape.
808819
809820
Asynchronous version of cuda::moments() which only calculates the spatial (not centralized or normalized) moments, up to the 3rd order, of a rasterized shape.
@@ -813,24 +824,25 @@ Each moment is returned as a column entry in the 1D \a moments array.
813824
@param [out] moments 1D array with each column entry containing a spatial image moment.
814825
@param binaryImage If it is true, all non-zero image pixels are treated as 1's.
815826
@param order Order of largest moments to calculate with lower order moments requiring less computation.
816-
@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`.
827+
@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.
817828
@param stream Stream for the asynchronous version.
818829
819-
@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
830+
@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
820831
```
821832
GpuMat momentsDevice(1,numMoments(MomentsOrder::SECOND_ORDER_MOMENTS),CV_32F)
822833
```
823-
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.
834+
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.
824835
```
825-
HostMem momentsHostMem(1, numMoments(MomentsOrder::SECOND_ORDER_MOMENTS), CV_32F);
826-
momentsDevice.download(momentsHostMem, stream);
836+
HostMem spatialMomentsHostMem(1, numMoments(MomentsOrder::SECOND_ORDER_MOMENTS), CV_32F);
837+
spatialMomentsDevice.download(spatialMomentsHostMem, stream);
827838
stream.waitForCompletion();
828-
Mat momentsMat = momentsHostMem.createMatHeader();
829-
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));
839+
Mat spatialMoments = spatialMomentsHostMem.createMatHeader();
840+
cv::Moments cvMoments = convertSpatialMoments<float>(spatialMoments, order);
830841
```
842+
831843
see the \a CUDA_TEST_P(Moments, Async) test inside opencv_contrib_source_code/modules/cudaimgproc/test/test_moments.cpp for an example.
832844
@returns cv::Moments.
833-
@sa cuda::moments
845+
@sa cuda::moments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder
834846
*/
835847
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());
836848

@@ -842,7 +854,7 @@ results are returned in the structure cv::Moments.
842854
@param src Raster image (single-channel 2D array).
843855
@param binaryImage If it is true, all non-zero image pixels are treated as 1's.
844856
@param order Order of largest moments to calculate with lower order moments requiring less computation.
845-
@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`.
857+
@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.
846858
847859
@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.
848860
The costly HostMem allocation cannot be avoided however the GpuMat device allocation can be by using BufferPool, e.g.
@@ -852,7 +864,7 @@ The costly HostMem allocation cannot be avoided however the GpuMat device alloca
852864
```
853865
see the \a CUDA_TEST_P(Moments, Accuracy) test inside opencv_contrib_source_code/modules/cudaimgproc/test/test_moments.cpp for an example.
854866
@returns cv::Moments.
855-
@sa cuda::spatialMoments
867+
@sa cuda::spatialMoments, cuda::convertSpatialMoments, cuda::numMoments, cuda::MomentsOrder
856868
*/
857869
CV_EXPORTS_W Moments moments(InputArray src, const bool binaryImage = false, const MomentsOrder order = MomentsOrder::THIRD_ORDER_MOMENTS, const int momentsType = CV_64F);
858870

modules/cudaimgproc/src/cuda/moments.cu

+9-1
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,22 @@ constexpr int blockSizeY = 16;
1616
template <typename T>
1717
__device__ T butterflyWarpReduction(T value) {
1818
for (int i = 16; i >= 1; i /= 2)
19+
#if (CUDART_VERSION >= 9000)
1920
value += __shfl_xor_sync(0xffffffff, value, i, 32);
21+
#else
22+
value += __shfl_xor(value, i, 32);
23+
#endif
2024
return value;
2125
}
2226

2327
template <typename T>
2428
__device__ T butterflyHalfWarpReduction(T value) {
2529
for (int i = 8; i >= 1; i /= 2)
26-
value += __shfl_xor_sync(0xffff, value, i, 32);
30+
#if (CUDART_VERSION >= 9000)
31+
value += __shfl_xor_sync(0xffff, value, i, 16);
32+
#else
33+
value += __shfl_xor(value, i, 16);
34+
#endif
2735
return value;
2836
}
2937

modules/cudaimgproc/src/moments.cpp

+21-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@ int cv::cuda::numMoments(const MomentsOrder order) {
1212
return order == MomentsOrder::FIRST_ORDER_MOMENTS ? device::imgproc::n1 : order == MomentsOrder::SECOND_ORDER_MOMENTS ? device::imgproc::n12 : device::imgproc::n123;
1313
}
1414

15+
template<typename T>
16+
cv::Moments convertSpatialMomentsT(Mat spatialMoments, const MomentsOrder order) {
17+
switch (order) {
18+
case MomentsOrder::FIRST_ORDER_MOMENTS:
19+
return Moments(spatialMoments.at<T>(0), spatialMoments.at<T>(1), spatialMoments.at<T>(2), 0, 0, 0, 0, 0, 0, 0);
20+
case MomentsOrder::SECOND_ORDER_MOMENTS:
21+
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);
22+
default:
23+
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));
24+
}
25+
}
26+
27+
cv::Moments cv::cuda::convertSpatialMoments(Mat spatialMoments, const MomentsOrder order, const int momentsType) {
28+
if (momentsType == CV_32F)
29+
return convertSpatialMomentsT<float>(spatialMoments, order);
30+
else
31+
return convertSpatialMomentsT<double>(spatialMoments, order);
32+
}
33+
1534
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
1635
Moments cv::cuda::moments(InputArray src, const bool binary, const MomentsOrder order, const int momentsType) { throw_no_cuda(); }
1736
void spatialMoments(InputArray src, OutputArray moments, const bool binary, const MomentsOrder order, const int momentsType, Stream& stream) { throw_no_cuda(); }
@@ -53,15 +72,12 @@ void cv::cuda::spatialMoments(InputArray src, OutputArray moments, const bool bi
5372
}
5473

5574
Moments cv::cuda::moments(InputArray src, const bool binary, const MomentsOrder order, const int momentsType) {
56-
Stream& stream = Stream::Null();
75+
Stream stream;
5776
HostMem dst;
5877
spatialMoments(src, dst, binary, order, momentsType, stream);
5978
stream.waitForCompletion();
6079
Mat moments = dst.createMatHeader();
61-
if(momentsType == CV_32F)
62-
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));
63-
else
64-
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));
80+
return convertSpatialMoments(moments, order, momentsType);
6581
}
6682

6783
#endif /* !defined (HAVE_CUDA) */

modules/cudaimgproc/test/test_moments.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ CUDA_TEST_P(Moments, Async)
101101
HostMem momentsHost(1, nMoments, momentsType);
102102
momentsDevice.download(momentsHost, stream);
103103
stream.waitForCompletion();
104-
Mat momentsHost64F = momentsHost.createMatHeader();
105-
if (momentsType == CV_32F)
106-
momentsHost.createMatHeader().convertTo(momentsHost64F, CV_64F);
107-
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));
104+
const cv::Moments moments = convertSpatialMoments(momentsHost.createMatHeader(), order, momentsType);
108105
Mat imgHostAdjustedType = imgHost(roi);
109106
if (imgType != CV_8U && imgType != CV_32F)
110107
imgHost(roi).convertTo(imgHostAdjustedType, CV_32F);

modules/sfm/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,16 @@ set(LIBMV_LIGHT_INCLUDES
8888
)
8989

9090
set(LIBMV_LIGHT_LIBS
91-
correspondence
92-
multiview
93-
numeric
91+
opencv.sfm.correspondence
92+
opencv.sfm.multiview
93+
opencv.sfm.numeric
9494
${GLOG_LIBRARIES}
9595
${GFLAGS_LIBRARIES}
9696
)
9797

9898
if(Ceres_FOUND)
9999
add_definitions("-DCERES_FOUND=1")
100-
list(APPEND LIBMV_LIGHT_LIBS simple_pipeline)
100+
list(APPEND LIBMV_LIGHT_LIBS opencv.sfm.simple_pipeline)
101101
if(Ceres_VERSION VERSION_LESS 2.0.0)
102102
list(APPEND LIBMV_LIGHT_INCLUDES "${CERES_INCLUDE_DIRS}")
103103
endif()

modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ SET(CORRESPONDENCE_SRC feature_matching.cc
66
# define the header files (make the headers appear in IDEs.)
77
FILE(GLOB CORRESPONDENCE_HDRS *.h)
88

9-
ADD_LIBRARY(correspondence STATIC ${CORRESPONDENCE_SRC} ${CORRESPONDENCE_HDRS})
9+
ADD_LIBRARY(opencv.sfm.correspondence STATIC ${CORRESPONDENCE_SRC} ${CORRESPONDENCE_HDRS})
1010

11-
ocv_target_link_libraries(correspondence LINK_PRIVATE ${GLOG_LIBRARIES} multiview opencv_imgcodecs)
11+
ocv_target_link_libraries(opencv.sfm.correspondence LINK_PRIVATE ${GLOG_LIBRARIES} opencv.sfm.multiview opencv_imgcodecs)
1212
IF(TARGET Eigen3::Eigen)
13-
TARGET_LINK_LIBRARIES(correspondence LINK_PUBLIC Eigen3::Eigen)
13+
TARGET_LINK_LIBRARIES(opencv.sfm.correspondence LINK_PUBLIC Eigen3::Eigen)
1414
ENDIF()
1515

1616

17-
LIBMV_INSTALL_LIB(correspondence)
17+
LIBMV_INSTALL_LIB(opencv.sfm.correspondence)

modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ SET(MULTIVIEW_SRC conditioning.cc
1616
# define the header files (make the headers appear in IDEs.)
1717
FILE(GLOB MULTIVIEW_HDRS *.h)
1818

19-
ADD_LIBRARY(multiview STATIC ${MULTIVIEW_SRC} ${MULTIVIEW_HDRS})
20-
TARGET_LINK_LIBRARIES(multiview LINK_PRIVATE ${GLOG_LIBRARIES} numeric)
19+
ADD_LIBRARY(opencv.sfm.multiview STATIC ${MULTIVIEW_SRC} ${MULTIVIEW_HDRS})
20+
TARGET_LINK_LIBRARIES(opencv.sfm.multiview LINK_PRIVATE ${GLOG_LIBRARIES} opencv.sfm.numeric)
2121
IF(TARGET Eigen3::Eigen)
22-
TARGET_LINK_LIBRARIES(multiview LINK_PUBLIC Eigen3::Eigen)
22+
TARGET_LINK_LIBRARIES(opencv.sfm.multiview LINK_PUBLIC Eigen3::Eigen)
2323
ENDIF()
2424
IF(CERES_LIBRARIES)
25-
TARGET_LINK_LIBRARIES(multiview LINK_PRIVATE ${CERES_LIBRARIES})
25+
TARGET_LINK_LIBRARIES(opencv.sfm.multiview LINK_PRIVATE ${CERES_LIBRARIES})
2626
ENDIF()
2727

28-
LIBMV_INSTALL_LIB(multiview)
28+
LIBMV_INSTALL_LIB(opencv.sfm.multiview)

modules/sfm/src/libmv_light/libmv/numeric/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ SET(NUMERIC_SRC numeric.cc
55
# define the header files (make the headers appear in IDEs.)
66
FILE(GLOB NUMERIC_HDRS *.h)
77

8-
ADD_LIBRARY(numeric STATIC ${NUMERIC_SRC} ${NUMERIC_HDRS})
8+
ADD_LIBRARY(opencv.sfm.numeric STATIC ${NUMERIC_SRC} ${NUMERIC_HDRS})
99

1010
IF(TARGET Eigen3::Eigen)
11-
TARGET_LINK_LIBRARIES(numeric LINK_PUBLIC Eigen3::Eigen)
11+
TARGET_LINK_LIBRARIES(opencv.sfm.numeric LINK_PUBLIC Eigen3::Eigen)
1212
ENDIF()
1313

14-
LIBMV_INSTALL_LIB(numeric)
14+
LIBMV_INSTALL_LIB(opencv.sfm.numeric)

modules/sfm/src/libmv_light/libmv/simple_pipeline/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ SET(SIMPLE_PIPELINE_SRC
1515
# Define the header files so that they appear in IDEs.
1616
FILE(GLOB SIMPLE_PIPELINE_HDRS *.h)
1717

18-
ADD_LIBRARY(simple_pipeline STATIC ${SIMPLE_PIPELINE_SRC} ${SIMPLE_PIPELINE_HDRS})
18+
ADD_LIBRARY(opencv.sfm.simple_pipeline STATIC ${SIMPLE_PIPELINE_SRC} ${SIMPLE_PIPELINE_HDRS})
1919

20-
TARGET_LINK_LIBRARIES(simple_pipeline LINK_PRIVATE multiview ${CERES_LIBRARIES})
20+
TARGET_LINK_LIBRARIES(opencv.sfm.simple_pipeline LINK_PRIVATE opencv.sfm.multiview ${CERES_LIBRARIES})
2121

22-
LIBMV_INSTALL_LIB(simple_pipeline)
22+
LIBMV_INSTALL_LIB(opencv.sfm.simple_pipeline)

modules/signal/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set(the_description "Signal processing algorithms")
2+
ocv_define_module(signal opencv_core WRAP python)

0 commit comments

Comments
 (0)