opencv/samples
Chuanbo Weng 7452eef6e9 Correctly enable OpenCL mode in tapi's hog example.
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>
2014-10-20 11:50:46 +08:00
..
android fixed some more compile errors and test failures 2014-10-17 15:02:56 +04:00
cpp quickly corrected the previous refactoring of features2d: moved from set(SOME_PROP, val) to setSomeProp(val) 2014-10-18 20:44:26 +04:00
directx Several type of formal refactoring: 2014-08-13 15:21:35 +04:00
gpu samples: gpu: performance: SURF is now part of opencv_xfeatures2d 2014-08-30 01:01:08 +02:00
java opencv_version 2014-10-04 21:39:57 +04:00
python2 Merge pull request #3245 from avdmitry:hello_opencv_sample 2014-10-09 14:56:13 +00:00
tapi Correctly enable OpenCL mode in tapi's hog example. 2014-10-20 11:50:46 +08:00
winrt fixed some more compile errors and test failures 2014-10-17 15:02:56 +04:00
CMakeLists.txt removed contrib, legacy and softcsscade modules; removed latentsvm and datamatrix detector from objdetect. removed haartraining and sft apps. 2014-06-24 19:18:51 +04:00