Merge remote-tracking branch 'upstream/3.4' into merge-3.4
authorAlexander Alekhin <alexander.alekhin@intel.com>
Wed, 2 Oct 2019 14:49:19 +0000 (17:49 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Wed, 2 Oct 2019 14:49:19 +0000 (17:49 +0300)
1  2 
modules/dnn/misc/python/test/test_dnn.py
modules/dnn/test/test_misc.cpp
modules/imgcodecs/src/loadsave.cpp
modules/imgproc/src/pyramids.cpp
modules/js/src/embindgen.py
modules/objdetect/src/qrcode.cpp
modules/videoio/src/cap_dshow.cpp

@@@ -206,16 -166,10 +206,16 @@@ class dnn_test(NewOpenCVTests)
              scoresDiff = 4e-3 if target in [cv.dnn.DNN_TARGET_OPENCL_FP16, cv.dnn.DNN_TARGET_MYRIAD] else 1e-5
              iouDiff = 2e-2 if target in [cv.dnn.DNN_TARGET_OPENCL_FP16, cv.dnn.DNN_TARGET_MYRIAD] else 1e-4
  
 -            normAssertDetections(self, ref, out, 0.5, scoresDiff, iouDiff)
 +            ref = np.array(ref, np.float32)
 +            refClassIds, testClassIds = ref[:, 1], out[:, 1]
 +            refScores, testScores = ref[:, 2], out[:, 2]
 +            refBoxes, testBoxes = ref[:, 3:], out[:, 3:]
 +
 +            normAssertDetections(self, refClassIds, refScores, refBoxes, testClassIds,
 +                                 testScores, testBoxes, 0.5, scoresDiff, iouDiff)
  
      def test_async(self):
-         timeout = 500*10**6  # in nanoseconds (500ms)
+         timeout = 10*1000*10**6  # in nanoseconds (10 sec)
          testdata_required = bool(os.environ.get('OPENCV_DNN_TEST_REQUIRE_TESTDATA', False))
          proto = self.find_dnn_file('dnn/layers/layer_convolution.prototxt', required=testdata_required)
          model = self.find_dnn_file('dnn/layers/layer_convolution.caffemodel', required=testdata_required)
Simple merge
@@@ -393,12 -391,17 +393,11 @@@ static void ApplyExifOrientation(const 
   *                      LOAD_MAT=2
   *                    }
   * @param[in] mat Reference to C++ Mat object (If LOAD_MAT)
-  * @param[in] scale_denom Scale value
   *
  */
 -static void*
 -imread_( const String& filename, int flags, int hdrtype, Mat* mat=0 )
 +static bool
 +imread_( const String& filename, int flags, Mat& mat )
  {
 -    CV_Assert(mat || hdrtype != LOAD_MAT); // mat is required in LOAD_MAT case
 -
 -    IplImage* image = 0;
 -    CvMat *matrix = 0;
 -    Mat temp, *data = &temp;
 -
      /// Search for the relevant decoder to handle the imagery
      ImageDecoder decoder;
  
Simple merge
@@@ -143,35 -143,7 +143,35 @@@ features2d = {'Feature2D': ['detect', '
                'BFMatcher': ['isMaskSupported', 'create'],
                '': ['drawKeypoints', 'drawMatches', 'drawMatchesKnn']}
  
 -calib3d = {'': ['findHomography', 'estimateAffine2D', 'Rodrigues']}
 +photo = {'': ['createAlignMTB', 'createCalibrateDebevec', 'createCalibrateRobertson', \
 +              'createMergeDebevec', 'createMergeMertens', 'createMergeRobertson', \
 +              'createTonemapDrago', 'createTonemapMantiuk', 'createTonemapReinhard', 'inpaint'],
 +        'CalibrateCRF': ['process'],
 +        'AlignMTB' : ['calculateShift', 'shiftMat', 'computeBitmaps', 'getMaxBits', 'setMaxBits', \
 +                      'getExcludeRange', 'setExcludeRange', 'getCut', 'setCut'],
 +        'CalibrateDebevec' : ['getLambda', 'setLambda', 'getSamples', 'setSamples', 'getRandom', 'setRandom'],
 +        'CalibrateRobertson' : ['getMaxIter', 'setMaxIter', 'getThreshold', 'setThreshold', 'getRadiance'],
 +        'MergeExposures' : ['process'],
 +        'MergeDebevec' : ['process'],
 +        'MergeMertens' : ['process', 'getContrastWeight', 'setContrastWeight', 'getSaturationWeight', \
 +                          'setSaturationWeight', 'getExposureWeight', 'setExposureWeight'],
 +        'MergeRobertson' : ['process'],
 +        'Tonemap' : ['process' , 'getGamma', 'setGamma'],
 +        'TonemapDrago' : ['getSaturation', 'setSaturation', 'getBias', 'setBias', \
 +                          'getSigmaColor', 'setSigmaColor', 'getSigmaSpace','setSigmaSpace'],
 +        'TonemapMantiuk' : ['getScale', 'setScale', 'getSaturation', 'setSaturation'],
 +        'TonemapReinhard' : ['getIntensity', 'setIntensity', 'getLightAdaptation', 'setLightAdaptation', \
 +                             'getColorAdaptation', 'setColorAdaptation']
 +        }
 +
 +aruco = {'': ['detectMarkers', 'drawDetectedMarkers', 'drawAxis', 'estimatePoseSingleMarkers', 'estimatePoseBoard', 'estimatePoseCharucoBoard', 'interpolateCornersCharuco', 'drawDetectedCornersCharuco'],
 +        'aruco_Dictionary': ['get', 'drawMarker'],
 +        'aruco_Board': ['create'],
 +        'aruco_GridBoard': ['create', 'draw'],
 +        'aruco_CharucoBoard': ['create', 'draw'],
 +        }
 +
- calib3d = {'': ['findHomography','calibrateCameraExtended', 'drawFrameAxes', 'getDefaultNewCameraMatrix', 'initUndistortRectifyMap']}
++calib3d = {'': ['findHomography', 'calibrateCameraExtended', 'drawFrameAxes', 'estimateAffine2D', 'getDefaultNewCameraMatrix', 'initUndistortRectifyMap', 'Rodrigues']}
  
  def makeWhiteList(module_list):
      wl = {}
Simple merge
Simple merge