Skip to content

Commit 0a6f216

Browse files
committed
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2 parents 1d0334f + 98c2ccf commit 0a6f216

File tree

28 files changed

+104
-36
lines changed

28 files changed

+104
-36
lines changed

3rdparty/carotene/src/resize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
758758
}
759759
else if (channels == 3)
760760
{
761-
if ((wr == 2.0f) && (wr == 2.0f))
761+
if ((wr == 2.0f) && (hr == 2.0f))
762762
{
763763
#ifndef __ANDROID__
764764
size_t roiw16 = dsize.width >= 15 ? (dsize.width - 15) * 3 : 0;

cmake/OpenCVFindLibsGrfmt.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@ if(BUILD_ZLIB)
77
ocv_clear_vars(ZLIB_FOUND)
88
else()
99
ocv_clear_internal_cache_vars(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
10+
if(ANDROID)
11+
set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
12+
set(CMAKE_FIND_LIBRARY_SUFFIXES .so)
13+
endif()
1014
find_package(ZLIB "${MIN_VER_ZLIB}")
15+
if(ANDROID)
16+
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
17+
unset(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
18+
endif()
1119
if(ZLIB_FOUND AND ANDROID)
12-
if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$")
20+
if(ZLIB_LIBRARIES MATCHES "/usr/lib.*/libz.so$")
1321
set(ZLIB_LIBRARIES z)
1422
endif()
1523
endif()

cmake/OpenCVUtils.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,11 @@ macro(ocv_check_flag_support lang flag varname base_options)
564564
elseif("_${lang}_" MATCHES "_C_")
565565
set(_lang C)
566566
elseif("_${lang}_" MATCHES "_OBJCXX_")
567-
set(_lang OBJCXX)
567+
if(DEFINED CMAKE_OBJCXX_COMPILER) # CMake 3.16+ and enable_language(OBJCXX) call are required
568+
set(_lang OBJCXX)
569+
else()
570+
set(_lang CXX)
571+
endif()
568572
else()
569573
set(_lang ${lang})
570574
endif()

doc/py_tutorials/py_setup/py_setup_in_ubuntu/py_setup_in_ubuntu.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Installing OpenCV-Python from Pre-built Binaries
2222

2323
This method serves best when using just for programming and developing OpenCV applications.
2424

25-
Install package [python-opencv](https://packages.ubuntu.com/trusty/python-opencv) with following command in terminal (as root user).
25+
Install package [python3-opencv](https://packages.ubuntu.com/focal/python3-opencv) with following command in terminal (as root user).
2626

2727
```
28-
$ sudo apt-get install python-opencv
28+
$ sudo apt-get install python3-opencv
2929
```
3030

3131
Open Python IDLE (or IPython) and type following codes in Python terminal.

doc/tutorials/imgproc/pyramids/pyramids.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Our program exits if the user presses **ESC**. Besides, it has two options:
170170
We use the function **pyrDown()** with three arguments (similarly to **pyrUp()**):
171171
- *src*: The current and destination image (to be shown on screen, supposedly half the input
172172
image)
173-
- *Size( tmp.cols/2, tmp.rows/2 )* : The destination size. Since we are upsampling,
173+
- *Size( tmp.cols/2, tmp.rows/2 )* : The destination size. Since we are downsampling,
174174
**pyrDown()** expects half the size the input image (in this case *src*).
175175

176176
@add_toggle_cpp

modules/calib3d/src/calibinit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,7 @@ bool findCirclesGrid( InputArray _image, Size patternSize,
22662266
}
22672267
}
22682268

2269-
if (!H.empty()) // undone rectification
2269+
if (!centers.empty() && !H.empty()) // undone rectification
22702270
{
22712271
Mat orgPointsMat;
22722272
transform(centers, orgPointsMat, H.inv());

modules/calib3d/test/test_chesscorners.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,5 +710,45 @@ TEST(Calib3d_AsymmetricCirclesPatternDetector, regression_18713)
710710
}
711711
}
712712

713+
TEST(Calib3d_AsymmetricCirclesPatternDetector, regression_19498)
714+
{
715+
float pts_[121][2] = {
716+
{ 84.7462f, 404.504f }, { 49.1586f, 404.092f }, { 12.3362f, 403.434f }, { 102.542f, 386.214f }, { 67.6042f, 385.475f },
717+
{ 31.4982f, 384.569f }, { 141.231f, 377.856f }, { 332.834f, 370.745f }, { 85.7663f, 367.261f }, { 50.346f, 366.051f },
718+
{ 13.7726f, 364.663f }, { 371.746f, 362.011f }, { 68.8543f, 347.883f }, { 32.9334f, 346.263f }, { 331.926f, 343.291f },
719+
{ 351.535f, 338.112f }, { 51.7951f, 328.247f }, { 15.4613f, 326.095f }, { 311.719f, 319.578f }, { 330.947f, 313.708f },
720+
{ 256.706f, 307.584f }, { 34.6834f, 308.167f }, { 291.085f, 295.429f }, { 17.4316f, 287.824f }, { 252.928f, 277.92f },
721+
{ 270.19f, 270.93f }, { 288.473f, 263.484f }, { 216.401f, 260.94f }, { 232.195f, 253.656f }, { 266.757f, 237.708f },
722+
{ 211.323f, 229.005f }, { 227.592f, 220.498f }, { 154.749f, 188.52f }, { 222.52f, 184.906f }, { 133.85f, 163.968f },
723+
{ 200.024f, 158.05f }, { 147.485f, 153.643f }, { 161.967f, 142.633f }, { 177.396f, 131.059f }, { 125.909f, 128.116f },
724+
{ 139.817f, 116.333f }, { 91.8639f, 114.454f }, { 104.343f, 102.542f }, { 117.635f, 89.9116f }, { 70.9465f, 89.4619f },
725+
{ 82.8524f, 76.7862f }, { 131.738f, 76.4741f }, { 95.5012f, 63.3351f }, { 109.034f, 49.0424f }, { 314.886f, 374.711f },
726+
{ 351.735f, 366.489f }, { 279.113f, 357.05f }, { 313.371f, 348.131f }, { 260.123f, 335.271f }, { 276.346f, 330.325f },
727+
{ 293.588f, 325.133f }, { 240.86f, 313.143f }, { 273.436f, 301.667f }, { 206.762f, 296.574f }, { 309.877f, 288.796f },
728+
{ 187.46f, 274.319f }, { 201.521f, 267.804f }, { 248.973f, 245.918f }, { 181.644f, 244.655f }, { 196.025f, 237.045f },
729+
{ 148.41f, 229.131f }, { 161.604f, 221.215f }, { 175.455f, 212.873f }, { 244.748f, 211.459f }, { 128.661f, 206.109f },
730+
{ 190.217f, 204.108f }, { 141.346f, 197.568f }, { 205.876f, 194.781f }, { 168.937f, 178.948f }, { 121.006f, 173.714f },
731+
{ 183.998f, 168.806f }, { 88.9095f, 159.731f }, { 100.559f, 149.867f }, { 58.553f, 146.47f }, { 112.849f, 139.302f },
732+
{ 80.0968f, 125.74f }, { 39.24f, 123.671f }, { 154.582f, 103.85f }, { 59.7699f, 101.49f }, { 266.334f, 385.387f },
733+
{ 234.053f, 368.718f }, { 263.347f, 361.184f }, { 244.763f, 339.958f }, { 198.16f, 328.214f }, { 211.675f, 323.407f },
734+
{ 225.905f, 318.426f }, { 192.98f, 302.119f }, { 221.267f, 290.693f }, { 161.437f, 286.46f }, { 236.656f, 284.476f },
735+
{ 168.023f, 251.799f }, { 105.385f, 221.988f }, { 116.724f, 214.25f }, { 97.2959f, 191.81f }, { 108.89f, 183.05f },
736+
{ 77.9896f, 169.242f }, { 48.6763f, 156.088f }, { 68.9635f, 136.415f }, { 29.8484f, 133.886f }, { 49.1966f, 112.826f },
737+
{ 113.059f, 29.003f }, { 251.698f, 388.562f }, { 281.689f, 381.929f }, { 297.875f, 378.518f }, { 248.376f, 365.025f },
738+
{ 295.791f, 352.763f }, { 216.176f, 348.586f }, { 230.143f, 344.443f }, { 179.89f, 307.457f }, { 174.083f, 280.51f },
739+
{ 142.867f, 265.085f }, { 155.127f, 258.692f }, { 124.187f, 243.661f }, { 136.01f, 236.553f }, { 86.4651f, 200.13f },
740+
{ 67.5711f, 178.221f }
741+
};
742+
743+
Mat candidates(121, 1, CV_32FC2, (void*)pts_);
744+
Size patternSize(13, 8);
745+
746+
std::vector< Point2f > result;
747+
bool res = false;
748+
749+
EXPECT_NO_THROW(res = findCirclesGrid(candidates, patternSize, result, CALIB_CB_SYMMETRIC_GRID, Ptr<FeatureDetector>()/*blobDetector=NULL*/));
750+
EXPECT_FALSE(res);
751+
}
752+
713753
}} // namespace
714754
/* End of file. */

modules/core/include/opencv2/core.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#endif
5151

5252
#include "opencv2/core/cvdef.h"
53-
#include "opencv2/core/version.hpp"
5453
#include "opencv2/core/base.hpp"
5554
#include "opencv2/core/cvstd.hpp"
5655
#include "opencv2/core/traits.hpp"

modules/core/include/opencv2/core/cvdef.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
#ifndef OPENCV_CORE_CVDEF_H
4646
#define OPENCV_CORE_CVDEF_H
4747

48+
#include "opencv2/core/version.hpp"
49+
4850
//! @addtogroup core_utils
4951
//! @{
5052

modules/core/include/opencv2/core/simd_intrinsics.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ or generated by CMake on the fly (use CMAKE_BINARY_DIR for that).
4040
#endif
4141

4242
#include "opencv2/core/cvdef.h"
43-
#include "opencv2/core/version.hpp"
4443

4544
#ifdef OPENCV_SIMD_CONFIG_HEADER
4645
#include CVAUX_STR(OPENCV_SIMD_CONFIG_HEADER)

0 commit comments

Comments
 (0)