* moved DIS optical flow from opencv_contrib to opencv, moved TVL1 from opencv to opencv_contrib
* fixed compile warning
* TVL1 optical flow example moved to opencv_contrib
- allow installing samples sources on all platforms
even if BUILD_EXAMPLES is disabled, fixed minor
issues in sources installation process
- use 'example_<group>_<name>' scheme for target and binary file naming
- use single function for sample executable creation
The class `App` appears to have two unused methods: `message` and `checkRectSimilarity`. The is no definition or use of either of these methods. This appears to be dead code.
All of these: (performance) Prefer prefix ++/-- operators for non-primitive types.
[modules/calib3d/src/fundam.cpp:1049] -> [modules/calib3d/src/fundam.cpp:1049]: (style) Same expression on both sides of '&&'.
For current OpenCV-CL architecture, if the data buffer
allocated in UMat are cpu buffer(not ocl buffer) under
cpu mode, and then pass this UMat to an OpenCL kernel
as an argument, the OpenCL path will fail and fallback
to cpu mode. Take HOGDescriptor::oclSvmDetector as an example:
ocl::setUseOpenCL(false);
//data allocated in hog.oclSvmDetector will be cpu buffer
hog.setSVMDetector(HOGDescriptor::getDaimlerPeopleDetector());
ocl::setUseOpenCL(true);
//We enabled OpenCL, but hog.oclSvmDetector are cpu buffer,
//so it will fail in the function ocl_classify_hists
//when reach to this line
//idx = k.set(idx, ocl::KernelArg::PtrReadOnly(detector));
hog.detectMultiScale(img, found, hit_threshold, win_stride,
Size(0, 0), scale, gr_threshold);
Similar problems heppen on img_aux and img. So we should re-define
or re-set these UMat when do mode switch (CPU -> OpenCL) in order
to make their data be allocated by ocl and then OpenCL path will
succeed.
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>