Merge pull request #2399 from SpecLad:merge-2.4

pull/2393/merge
Roman Donchenko 11 years ago committed by OpenCV Buildbot
commit 693129902d
  1. 8
      CMakeLists.txt
  2. 5
      cmake/OpenCVCompilerOptions.cmake
  3. 5
      cmake/OpenCVDetectCUDA.cmake
  4. 37
      cmake/OpenCVFindIPP.cmake
  5. 2
      doc/conf.py
  6. 2
      doc/tutorials/imgproc/histograms/template_matching/template_matching.rst
  7. 9
      doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.rst
  8. 2
      doc/tutorials/introduction/load_save_image/load_save_image.rst
  9. 2
      modules/core/CMakeLists.txt
  10. 2
      modules/core/doc/basic_structures.rst
  11. 8
      modules/core/perf/opencl/perf_bufferpool.cpp
  12. 2
      modules/core/perf/opencl/perf_usage_flags.cpp
  13. 4
      modules/cudaimgproc/src/cuda/canny.cu
  14. 17
      modules/highgui/src/cap_ios_abstract_camera.mm
  15. 26
      modules/highgui/src/grfmt_tiff.cpp
  16. 41
      modules/highgui/test/test_grfmt.cpp
  17. 7
      modules/imgproc/src/clahe.cpp
  18. 4
      modules/imgproc/src/color.cpp
  19. 2
      modules/imgproc/src/floodfill.cpp
  20. 12
      modules/imgproc/src/imgwarp.cpp
  21. 4
      modules/imgproc/src/moments.cpp
  22. 8
      modules/imgproc/test/test_convhull.cpp
  23. 4
      modules/legacy/src/bgfg_gaussmix.cpp
  24. 1
      modules/legacy/src/face.cpp
  25. 4
      modules/legacy/src/lmeds.cpp
  26. 2
      modules/nonfree/CMakeLists.txt
  27. 14
      modules/photo/src/cuda/nlm.cu
  28. 2
      modules/superres/CMakeLists.txt
  29. 2
      modules/ts/include/opencv2/ts/ts_perf.hpp
  30. 5
      modules/ts/misc/xls-report.py
  31. 2
      modules/ts/src/ts_arrtest.cpp
  32. 2
      platforms/android/service/engine/jni/Tests/HardwareDetectionTest.cpp

@ -198,6 +198,7 @@ OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binar
OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF (NOT IOS) )
OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) )
OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CMAKE_COMPILER_IS_GNUCXX )
OCV_OPTION(ENABLE_COVERAGE "Enable coverage collection with GCov" OFF IF CMAKE_COMPILER_IS_GNUCXX )
OCV_OPTION(ENABLE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC" ON IF CMAKE_COMPILER_IS_GNUCXX AND NOT (APPLE AND CMAKE_COMPILER_IS_CLANGCXX) )
OCV_OPTION(ENABLE_POWERPC "Enable PowerPC for GCC" ON IF (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES powerpc.*) )
OCV_OPTION(ENABLE_FAST_MATH "Enable -ffast-math (not recommended for GCC 4.6.x)" OFF IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
@ -418,8 +419,15 @@ include(cmake/OpenCVModule.cmake)
# ----------------------------------------------------------------------------
# Detect endianness of build platform
# ----------------------------------------------------------------------------
if(CMAKE_SYSTEM_NAME STREQUAL iOS)
# test_big_endian needs try_compile, which doesn't work for iOS
# http://public.kitware.com/Bug/view.php?id=12288
set(WORDS_BIGENDIAN 0)
else()
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
endif()
# ----------------------------------------------------------------------------
# Detect 3rd-party libraries

@ -185,6 +185,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-ffunction-sections)
endif()
if(ENABLE_COVERAGE)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} --coverage")
set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} --coverage")
endif()
set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0 -DDEBUG -D_DEBUG")
endif()

@ -178,9 +178,8 @@ if(CUDA_FOUND)
# we remove -Wsign-promo as it generates warnings under linux
string(REPLACE "-Wsign-promo" "" ${var} "${${var}}")
# we remove -fvisibility-inlines-hidden because it's used for C++ compiler
# but NVCC uses C compiler by default
string(REPLACE "-fvisibility-inlines-hidden" "" ${var} "${${var}}")
# we remove -Wno-sign-promo as it generates warnings under linux
string(REPLACE "-Wno-sign-promo" "" ${var} "${${var}}")
# we remove -Wno-delete-non-virtual-dtor because it's used for C++ compiler
# but NVCC uses C compiler by default

@ -163,9 +163,16 @@ function(set_ipp_new_libraries _LATEST_VERSION)
${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPI}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPS}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
PARENT_SCOPE)
${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
if (UNIX)
set(IPP_LIBRARIES
${IPP_LIBRARIES}
${IPP_LIB_PREFIX}irc${CMAKE_SHARED_LIBRARY_SUFFIX}
${IPP_LIB_PREFIX}imf${CMAKE_SHARED_LIBRARY_SUFFIX}
${IPP_LIB_PREFIX}svml${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
return()
endfunction()
@ -208,18 +215,38 @@ function(set_ipp_variables _LATEST_VERSION)
set(IPP_INCLUDE_DIRS ${IPP_ROOT_DIR}/include PARENT_SCOPE)
if (APPLE)
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib PARENT_SCOPE)
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib)
elseif (IPP_X64)
if(NOT EXISTS ${IPP_ROOT_DIR}/lib/intel64)
message(SEND_ERROR "IPP EM64T libraries not found")
endif()
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/intel64 PARENT_SCOPE)
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/intel64)
else()
if(NOT EXISTS ${IPP_ROOT_DIR}/lib/ia32)
message(SEND_ERROR "IPP IA32 libraries not found")
endif()
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32 PARENT_SCOPE)
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32)
endif()
if (UNIX)
get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH)
if (IPP_X64)
if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/intel64)
message(SEND_ERROR "Intel compiler EM64T libraries not found")
endif()
set(IPP_LIBRARY_DIRS
${IPP_LIBRARY_DIRS}
${INTEL_COMPILER_LIBRARY_DIR}/intel64)
else()
if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/ia32)
message(SEND_ERROR "Intel compiler IA32 libraries not found")
endif()
set(IPP_LIBRARY_DIRS
${IPP_LIBRARY_DIRS}
${INTEL_COMPILER_LIBRARY_DIR}/ia32)
endif()
endif()
set(IPP_LIBRARY_DIRS ${IPP_LIBRARY_DIRS} PARENT_SCOPE)
# set IPP_LIBRARIES variable (7.x or 8.x lib names)
set_ipp_new_libraries(${_LATEST_VERSION})

@ -54,7 +54,7 @@ master_doc = 'index'
# General information about the project.
project = u'OpenCV'
copyright = u'2011-2013, opencv dev team'
copyright = u'2011-2014, opencv dev team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the

@ -85,7 +85,7 @@ d. **method=CV\_TM\_CCORR\_NORMED**
.. math::
R(x,y)= \frac{\sum_{x',y'} (T(x',y') \cdot I'(x+x',y+y'))}{\sqrt{\sum_{x',y'}T(x',y')^2 \cdot \sum_{x',y'} I(x+x',y+y')^2}}
R(x,y)= \frac{\sum_{x',y'} (T(x',y') \cdot I(x+x',y+y'))}{\sqrt{\sum_{x',y'}T(x',y')^2 \cdot \sum_{x',y'} I(x+x',y+y')^2}}
e. **method=CV\_TM\_CCOEFF**

@ -32,15 +32,20 @@ Let's use a simple program such as DisplayImage.cpp shown below.
int main(int argc, char** argv )
{
if ( argc != 2 )
{
printf("usage: DisplayImage.out <Image_Path>\n");
return -1;
}
Mat image;
image = imread( argv[1], 1 );
if( argc != 2 || !image.data )
if ( !image.data )
{
printf("No image data \n");
return -1;
}
namedWindow("Display Image", WINDOW_AUTOSIZE );
imshow("Display Image", image);

@ -99,7 +99,7 @@ Explanation
imshow( imageName, image );
imshow( "Gray image", gray_image );
#. Add add the *waitKey(0)* function call for the program to wait forever for an user key press.
#. Add the *waitKey(0)* function call for the program to wait forever for an user key press.
Result

@ -10,7 +10,7 @@ if(HAVE_WINRT)
endif()
if(HAVE_CUDA)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wenum-compare -Wunused-function)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wenum-compare -Wunused-function -Wshadow)
endif()
file(GLOB lib_cuda_hdrs "include/opencv2/${name}/cuda/*.hpp" "include/opencv2/${name}/cuda/*.h")

@ -1620,7 +1620,7 @@ The method copies the matrix data to another matrix. Before copying the data, th
so that the destination matrix is reallocated if needed. While ``m.copyTo(m);`` works flawlessly, the function does not handle the case of a partial overlap between the source and the destination matrices.
When the operation mask is specified, and the ``Mat::create`` call shown above reallocated the matrix, the newly allocated matrix is initialized with all zeros before copying the data.
When the operation mask is specified, if the ``Mat::create`` call shown above reallocates the matrix, the newly allocated matrix is initialized with all zeros before copying the data.
.. _Mat::convertTo:

@ -61,7 +61,7 @@ OCL_PERF_TEST_P(BufferPoolFixture, BufferPool_UMatCreation100, Bool())
}
}
SANITY_CHECK_NOTHING()
SANITY_CHECK_NOTHING();
}
OCL_PERF_TEST_P(BufferPoolFixture, BufferPool_UMatCountNonZero100, Bool())
@ -79,7 +79,7 @@ OCL_PERF_TEST_P(BufferPoolFixture, BufferPool_UMatCountNonZero100, Bool())
}
}
SANITY_CHECK_NOTHING()
SANITY_CHECK_NOTHING();
}
OCL_PERF_TEST_P(BufferPoolFixture, BufferPool_UMatCanny10, Bool())
@ -104,7 +104,7 @@ OCL_PERF_TEST_P(BufferPoolFixture, BufferPool_UMatCanny10, Bool())
}
}
SANITY_CHECK_NOTHING()
SANITY_CHECK_NOTHING();
}
OCL_PERF_TEST_P(BufferPoolFixture, BufferPool_UMatIntegral10, Bool())
@ -124,7 +124,7 @@ OCL_PERF_TEST_P(BufferPoolFixture, BufferPool_UMatIntegral10, Bool())
}
}
SANITY_CHECK_NOTHING()
SANITY_CHECK_NOTHING();
}
} } // namespace cvtest::ocl

@ -34,7 +34,7 @@ OCL_PERF_TEST_P(UsageFlagsBoolFixture, UsageFlags_AllocHostMem, ::testing::Combi
cv::subtract(dst, Scalar::all(1), final);
}
SANITY_CHECK_NOTHING()
SANITY_CHECK_NOTHING();
}
} } // namespace cvtest::ocl

@ -293,8 +293,12 @@ namespace canny
n += smem[threadIdx.y + 2][threadIdx.x + 2] == 2;
}
__syncthreads();
if (n > 0)
smem[threadIdx.y + 1][threadIdx.x + 1] = 2;
__syncthreads();
}
const int e = smem[threadIdx.y + 1][threadIdx.x + 1];

@ -278,9 +278,21 @@
{
self.captureVideoPreviewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:self.captureSession];
if ([self.captureVideoPreviewLayer isOrientationSupported]) {
if ([self.captureVideoPreviewLayer respondsToSelector:@selector(connection)])
{
if ([self.captureVideoPreviewLayer.connection isVideoOrientationSupported])
{
[self.captureVideoPreviewLayer.connection setVideoOrientation:self.defaultAVCaptureVideoOrientation];
}
}
else
{
// Deprecated in 6.0; here for backward compatibility
if ([self.captureVideoPreviewLayer isOrientationSupported])
{
[self.captureVideoPreviewLayer setOrientation:self.defaultAVCaptureVideoOrientation];
}
}
if (parentView != nil) {
self.captureVideoPreviewLayer.frame = self.parentView.bounds;
@ -290,9 +302,6 @@
NSLog(@"[Camera] created AVCaptureVideoPreviewLayer");
}
- (void)setDesiredCameraPosition:(AVCaptureDevicePosition)desiredPosition;
{
for (AVCaptureDevice *device in [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]) {

@ -259,11 +259,15 @@ bool TiffDecoder::readData( Mat& img )
{
case 8:
{
uchar * bstart = buffer;
if( !is_tiled )
ok = TIFFReadRGBAStrip( tif, y, (uint32*)buffer );
else
{
ok = TIFFReadRGBATile( tif, x, y, (uint32*)buffer );
//Tiles fill the buffer from the bottom up
bstart += (tile_height0 - tile_height) * tile_width0 * 4;
}
if( !ok )
{
close();
@ -275,19 +279,19 @@ bool TiffDecoder::readData( Mat& img )
{
if (wanted_channels == 4)
{
icvCvt_BGRA2RGBA_8u_C4R( buffer + i*tile_width*4, 0,
icvCvt_BGRA2RGBA_8u_C4R( bstart + i*tile_width0*4, 0,
data + x*4 + img.step*(tile_height - i - 1), 0,
cvSize(tile_width,1) );
}
else
{
icvCvt_BGRA2BGR_8u_C4C3R( buffer + i*tile_width*4, 0,
icvCvt_BGRA2BGR_8u_C4C3R( bstart + i*tile_width0*4, 0,
data + x*3 + img.step*(tile_height - i - 1), 0,
cvSize(tile_width,1), 2 );
}
}
else
icvCvt_BGRA2Gray_8u_C4C1R( buffer + i*tile_width*4, 0,
icvCvt_BGRA2Gray_8u_C4C1R( bstart + i*tile_width0*4, 0,
data + x + img.step*(tile_height - i - 1), 0,
cvSize(tile_width,1), 2 );
break;
@ -312,19 +316,19 @@ bool TiffDecoder::readData( Mat& img )
{
if( ncn == 1 )
{
icvCvt_Gray2BGR_16u_C1C3R(buffer16 + i*tile_width*ncn, 0,
icvCvt_Gray2BGR_16u_C1C3R(buffer16 + i*tile_width0*ncn, 0,
(ushort*)(data + img.step*i) + x*3, 0,
cvSize(tile_width,1) );
}
else if( ncn == 3 )
{
icvCvt_RGB2BGR_16u_C3R(buffer16 + i*tile_width*ncn, 0,
icvCvt_RGB2BGR_16u_C3R(buffer16 + i*tile_width0*ncn, 0,
(ushort*)(data + img.step*i) + x*3, 0,
cvSize(tile_width,1) );
}
else
{
icvCvt_BGRA2BGR_16u_C4C3R(buffer16 + i*tile_width*ncn, 0,
icvCvt_BGRA2BGR_16u_C4C3R(buffer16 + i*tile_width0*ncn, 0,
(ushort*)(data + img.step*i) + x*3, 0,
cvSize(tile_width,1), 2 );
}
@ -334,12 +338,12 @@ bool TiffDecoder::readData( Mat& img )
if( ncn == 1 )
{
memcpy((ushort*)(data + img.step*i)+x,
buffer16 + i*tile_width*ncn,
buffer16 + i*tile_width0*ncn,
tile_width*sizeof(buffer16[0]));
}
else
{
icvCvt_BGRA2Gray_16u_CnC1R(buffer16 + i*tile_width*ncn, 0,
icvCvt_BGRA2Gray_16u_CnC1R(buffer16 + i*tile_width0*ncn, 0,
(ushort*)(data + img.step*i) + x, 0,
cvSize(tile_width,1), ncn, 2 );
}
@ -367,13 +371,13 @@ bool TiffDecoder::readData( Mat& img )
if(dst_bpp == 32)
{
memcpy((float*)(data + img.step*i)+x,
buffer32 + i*tile_width*ncn,
buffer32 + i*tile_width0*ncn,
tile_width*sizeof(buffer32[0]));
}
else
{
memcpy((double*)(data + img.step*i)+x,
buffer64 + i*tile_width*ncn,
buffer64 + i*tile_width0*ncn,
tile_width*sizeof(buffer64[0]));
}
}

@ -471,6 +471,47 @@ TEST(Highgui_Tiff, write_read_16bit_big_little_endian)
}
}
class CV_GrfmtReadTifTiledWithNotFullTiles: public cvtest::BaseTest
{
public:
void run(int)
{
try
{
/* see issue #3472 - dealing with tiled images where the tile size is
* not a multiple of image size.
* The tiled images were created with 'convert' from ImageMagick,
* using the command 'convert <input> -define tiff:tile-geometry=128x128 -depth [8|16] <output>
* Note that the conversion to 16 bits expands the range from 0-255 to 0-255*255,
* so the test converts back but rounding errors cause small differences.
*/
cv::Mat img = imread(string(ts->get_data_path()) + "readwrite/non_tiled.tif",-1);
if (img.empty()) ts->set_failed_test_info(cvtest::TS::FAIL_INVALID_TEST_DATA);
ASSERT_TRUE(img.channels() == 3);
cv::Mat tiled8 = imread(string(ts->get_data_path()) + "readwrite/tiled_8.tif", -1);
if (tiled8.empty()) ts->set_failed_test_info(cvtest::TS::FAIL_INVALID_TEST_DATA);
ASSERT_PRED_FORMAT2(cvtest::MatComparator(0, 0), img, tiled8);
cv::Mat tiled16 = imread(string(ts->get_data_path()) + "readwrite/tiled_16.tif", -1);
if (tiled16.empty()) ts->set_failed_test_info(cvtest::TS::FAIL_INVALID_TEST_DATA);
ASSERT_TRUE(tiled16.elemSize() == 6);
tiled16.convertTo(tiled8, CV_8UC3, 1./256.);
ASSERT_PRED_FORMAT2(cvtest::MatComparator(2, 0), img, tiled8);
// What about 32, 64 bit?
}
catch(...)
{
ts->set_failed_test_info(cvtest::TS::FAIL_EXCEPTION);
}
ts->set_failed_test_info(cvtest::TS::OK);
}
};
TEST(Highgui_Tiff, decode_tile_remainder)
{
CV_GrfmtReadTifTiledWithNotFullTiles test; test.safe_run();
}
#endif
#ifdef HAVE_WEBP

@ -133,8 +133,8 @@ namespace
class CLAHE_CalcLut_Body : public cv::ParallelLoopBody
{
public:
CLAHE_CalcLut_Body(const cv::Mat& src, cv::Mat& lut, cv::Size tileSize, int tilesX, int tilesY, int clipLimit, float lutScale) :
src_(src), lut_(lut), tileSize_(tileSize), tilesX_(tilesX), tilesY_(tilesY), clipLimit_(clipLimit), lutScale_(lutScale)
CLAHE_CalcLut_Body(const cv::Mat& src, cv::Mat& lut, cv::Size tileSize, int tilesX, int clipLimit, float lutScale) :
src_(src), lut_(lut), tileSize_(tileSize), tilesX_(tilesX), clipLimit_(clipLimit), lutScale_(lutScale)
{
}
@ -146,7 +146,6 @@ namespace
cv::Size tileSize_;
int tilesX_;
int tilesY_;
int clipLimit_;
float lutScale_;
};
@ -401,7 +400,7 @@ namespace
cv::Mat srcForLut = _srcForLut.getMat();
lut_.create(tilesX_ * tilesY_, histSize, CV_8UC1);
CLAHE_CalcLut_Body calcLutBody(srcForLut, lut_, tileSize, tilesX_, tilesY_, clipLimit, lutScale);
CLAHE_CalcLut_Body calcLutBody(srcForLut, lut_, tileSize, tilesX_, clipLimit, lutScale);
cv::parallel_for_(cv::Range(0, tilesX_ * tilesY_), calcLutBody);
CLAHE_Interpolation_Body interpolationBody(src, dst, lut_, tileSize, tilesX_, tilesY_);

@ -2272,7 +2272,7 @@ struct YUV420p2RGB888Invoker : ParallelLoopBody
const int rangeBegin = range.start * 2;
const int rangeEnd = range.end * 2;
size_t uvsteps[2] = {width/2, stride - width/2};
int uvsteps[2] = {width/2, stride - width/2};
int usIdx = ustepIdx, vsIdx = vstepIdx;
const uchar* y1 = my1 + rangeBegin * stride;
@ -2340,7 +2340,7 @@ struct YUV420p2RGBA8888Invoker : ParallelLoopBody
int rangeBegin = range.start * 2;
int rangeEnd = range.end * 2;
size_t uvsteps[2] = {width/2, stride - width/2};
int uvsteps[2] = {width/2, stride - width/2};
int usIdx = ustepIdx, vsIdx = vstepIdx;
const uchar* y1 = my1 + rangeBegin * stride;

@ -42,7 +42,7 @@
#include "precomp.hpp"
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif

@ -1216,8 +1216,13 @@ public:
alpha(_alpha), _beta(__beta), ssize(_ssize), dsize(_dsize),
ksize(_ksize), xmin(_xmin), xmax(_xmax)
{
CV_Assert(ksize <= MAX_ESIZE);
}
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif
virtual void operator() (const Range& range) const
{
int dy, cn = src.channels();
@ -1266,6 +1271,9 @@ public:
vresize( (const WT**)rows, (T*)(dst.data + dst.step*dy), beta, dsize.width );
}
}
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic pop
#endif
private:
Mat src;
@ -1273,7 +1281,9 @@ private:
const int* xofs, *yofs;
const AT* alpha, *_beta;
Size ssize, dsize;
int ksize, xmin, xmax;
const int ksize, xmin, xmax;
resizeGeneric_Invoker& operator = (const resizeGeneric_Invoker&);
};
template<class HResize, class VResize>

@ -203,6 +203,10 @@ static Moments contourMoments( const Mat& contour )
\****************************************************************************************/
template<typename T, typename WT, typename MT>
#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 9
// Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60196
__attribute__((optimize("no-tree-vectorize")))
#endif
static void momentsInTile( const Mat& img, double* moments )
{
Size size = img.size();

@ -1380,7 +1380,7 @@ CV_FitLineTest::CV_FitLineTest()
max_noise = 0.05;
}
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif
@ -1456,7 +1456,7 @@ void CV_FitLineTest::generate_point_set( void* pointsSet )
}
}
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic pop
#endif
@ -1484,7 +1484,7 @@ void CV_FitLineTest::run_func()
cv::fitLine(cv::cvarrToMat(points), (cv::Vec6f&)line[0], dist_type, 0, reps, aeps);
}
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif
@ -1567,7 +1567,7 @@ _exit_:
return code;
}
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic pop
#endif

@ -413,7 +413,7 @@ CV_INLINE int _icvRemoveShadowGMM(float* data, int nD,
//IEEE Trans. on Pattern Analysis and Machine Intelligence, vol.26, no.5, pages 651-656, 2004
//http://www.zoranz.net/Publications/zivkovic2004PAMI.pdf
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
@ -606,7 +606,7 @@ CV_INLINE int _icvUpdateGMM(float* data, int nD,
return bBackground;
}
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic pop
#endif

@ -200,6 +200,7 @@ void RFace::CalculateError(FaceData * lpFaceData)
void RFace::CreateFace(void * lpData)
{
FaceData Data;
memset(&Data, 0, sizeof(FaceData));
double Error = MAX_ERROR;
double CurError = MAX_ERROR;

@ -163,7 +163,7 @@ icvLMedS( int *points1, int *points2, int numPoints, CvMatrix3 * fundamentalMatr
/*===========================================================================*/
/*===========================================================================*/
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif
@ -328,7 +328,7 @@ icvCubic( double a2, double a1, double a0, double *squares )
return CV_NO_ERR;
} /* icvCubic */
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic pop
#endif

@ -3,5 +3,5 @@ if(BUILD_ANDROID_PACKAGE)
endif()
set(the_description "Functionality with possible limitations on the use")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wshadow)
ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_cudaarithm)

@ -264,7 +264,7 @@ namespace cv { namespace cuda { namespace device
__device__ __forceinline__ int calcDist(const uchar2& a, const uchar2& b) { return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y); }
__device__ __forceinline__ int calcDist(const uchar3& a, const uchar3& b) { return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) + (a.z-b.z)*(a.z-b.z); }
template <class T> struct FastNonLocalMenas
template <class T> struct FastNonLocalMeans
{
enum
{
@ -288,7 +288,7 @@ namespace cv { namespace cuda { namespace device
int block_window;
float minus_h2_inv;
FastNonLocalMenas(int search_window_, int block_window_, float h) : search_radius(search_window_/2), block_radius(block_window_/2),
FastNonLocalMeans(int search_window_, int block_window_, float h) : search_radius(search_window_/2), block_radius(block_window_/2),
search_window(search_window_), block_window(block_window_), minus_h2_inv(-1.f/(h * h * VecTraits<T>::cn)) {}
PtrStep<T> src;
@ -392,7 +392,7 @@ namespace cv { namespace cuda { namespace device
}
}
__device__ __forceinline__ void convolve_window(int i, int j, const int* dist_sums, PtrStepi& col_sums, PtrStepi& up_col_sums, T& dst) const
__device__ __forceinline__ void convolve_window(int i, int j, const int* dist_sums, T& dst) const
{
typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type sum_type;
@ -469,18 +469,18 @@ namespace cv { namespace cuda { namespace device
__syncthreads();
convolve_window(i, j, dist_sums, col_sums, up_col_sums, dst(i, j));
convolve_window(i, j, dist_sums, dst(i, j));
}
}
};
template<typename T>
__global__ void fast_nlm_kernel(const FastNonLocalMenas<T> fnlm, PtrStepSz<T> dst) { fnlm(dst); }
__global__ void fast_nlm_kernel(const FastNonLocalMeans<T> fnlm, PtrStepSz<T> dst) { fnlm(dst); }
void nln_fast_get_buffer_size(const PtrStepSzb& src, int search_window, int block_window, int& buffer_cols, int& buffer_rows)
{
typedef FastNonLocalMenas<uchar> FNLM;
typedef FastNonLocalMeans<uchar> FNLM;
dim3 grid(divUp(src.cols, FNLM::TILE_COLS), divUp(src.rows, FNLM::TILE_ROWS));
buffer_cols = search_window * search_window * grid.y;
@ -491,7 +491,7 @@ namespace cv { namespace cuda { namespace device
void nlm_fast_gpu(const PtrStepSzb& src, PtrStepSzb dst, PtrStepi buffer,
int search_window, int block_window, float h, cudaStream_t stream)
{
typedef FastNonLocalMenas<T> FNLM;
typedef FastNonLocalMeans<T> FNLM;
FNLM fnlm(search_window, block_window, h);
fnlm.src = (PtrStepSz<T>)src;

@ -3,6 +3,6 @@ if(ANDROID OR IOS)
endif()
set(the_description "Super Resolution")
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef -Wshadow)
ocv_define_module(superres opencv_imgproc opencv_video
OPTIONAL opencv_highgui opencv_cudaarithm opencv_cudafilters opencv_cudawarping opencv_cudaimgproc opencv_cudaoptflow opencv_cudacodec)

@ -205,7 +205,7 @@ private:
#define SANITY_CHECK_MOMENTS(array, ...) ::perf::Regression::addMoments(this, #array, array , ## __VA_ARGS__)
#define SANITY_CHECK_KEYPOINTS(array, ...) ::perf::Regression::addKeypoints(this, #array, array , ## __VA_ARGS__)
#define SANITY_CHECK_MATCHES(array, ...) ::perf::Regression::addMatches(this, #array, array , ## __VA_ARGS__)
#define SANITY_CHECK_NOTHING() this->setVerified();
#define SANITY_CHECK_NOTHING() this->setVerified()
class CV_EXPORTS GpuPerf
{

@ -97,6 +97,9 @@ re_data_type = re.compile(r'^ (?: 8 | 16 | 32 | 64 ) [USF] C [1234] $', re.VERBO
time_style = xlwt.easyxf(num_format_str='#0.00')
no_time_style = xlwt.easyxf('pattern: pattern solid, fore_color gray25')
failed_style = xlwt.easyxf('pattern: pattern solid, fore_color red')
noimpl_style = xlwt.easyxf('pattern: pattern solid, fore_color orange')
style_dict = {"failed": failed_style, "noimpl":noimpl_style}
speedup_style = time_style
good_speedup_style = xlwt.easyxf('font: color green', num_format_str='#0.00')
@ -328,7 +331,7 @@ def main():
for c in config_names:
if c in configs:
sheet.write(row, col, configs[c], time_style)
sheet.write(row, col, configs[c], style_dict.get(configs[c], time_style))
else:
sheet.write(row, col, None, no_time_style)
col += 1

@ -123,7 +123,7 @@ void ArrayTest::get_test_array_types_and_sizes( int /*test_case_idx*/, vector<ve
}
static const int icvTsTypeToDepth[] =
static const unsigned int icvTsTypeToDepth[] =
{
IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16U, IPL_DEPTH_16S,
IPL_DEPTH_32S, IPL_DEPTH_32F, IPL_DEPTH_64F

@ -55,7 +55,7 @@ TEST(Parse, ParseEmptyString)
EXPECT_FALSE(ParseString(a, key, value));
}
TEST(Parse, ParseStringWithoutSeporator)
TEST(Parse, ParseStringWithoutSeparator)
{
string a = "qqqwww";
string key;

Loading…
Cancel
Save