Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Questions/answer

  1. What if using 2 different UMat like Canny(u, v, 100, 50); (Optimize memory transfers and initialization) ?
  2. What if Canny is called once before t1 = clock(); (OpenCL kernels initialization) ?

Here my results (Win7x64/OCV3.1x64/AMD Radeon6370)

                            | Your code | +Point 1  | +Point 2 |
----------------------------+-----------+-----------+----------+
Running time with OpenCL:   |    9.936  |   1.011   |   0.141  |
Running time without OpenCL:|   13.819  |  25.906   |  11.143  |

finally, collect info about your OpenCV and OpenCL

//INFO ABOUT OpenCV BUILD
cout << getBuildInformation();
// INFO ABOUT OpenCL
cout << "OpenCL: " << endl;
std::vector<ocl::PlatformInfo> platform_info;
cv::ocl::getPlatfomsInfo(platform_info);
for (size_t i = 0; i < platform_info.size(); i++)
{
    cout
        << "\tName: " << platform_info[i].name() << endl
        << "\tVendor: " << platform_info[i].vendor() << endl
        << "\tVersion: " << platform_info[i].version() << endl
        << "\tDevice Number: " << platform_info[i].deviceNumber() << endl
        << endl;
}

and compare them with your EmguCV