Ask Your Question

minhntu's profile - activity

2022-04-28 16:29:59 -0600 received badge  Popular Question (source)
2017-04-05 22:07:57 -0600 commented answer What is a different between Mali OpenCL SDK and OpenCL in OpenCV library

So. How we modify OpenCL code on OpenCL to do our application?

2017-04-05 02:21:52 -0600 asked a question What is a different between Mali OpenCL SDK and OpenCL in OpenCV library

Hi everyone,

Do you know what is different between Mali OpenCL SDK and OpenCL in OpenCV library. I see that in Mali OpenCL SDK has some detail sample code about how to create Memory buffer, get input data, setup argument... But in OpenCL inside OpenCV library, I only need change from Mat to UMAT to have OpenCL code run on GPU? and it seems OpenCL code hidden under API? How can I change OpenCL code by my application?

Thank you very much for your sharing.

2017-04-03 22:45:39 -0600 asked a question How to use OpenCL code in OpenCV library?

Anyone know how to use OpenCL code in OpenCV library?

2017-03-31 03:37:40 -0600 received badge  Editor (source)
2017-03-31 03:35:42 -0600 asked a question How to load new images parallel with computation current image on GPU use OpenCL in OpenCL library

I want to load new images parallel with computation current image on GPU to reduce an overhead time ( time spend on copying a new image to GPU for computation). Anyone know how to do that? Thank you very much for your help.

2017-03-26 22:35:16 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

I don't understand what you said. Whether we can load new frame to GPU memory while GPU is implementing computation to reduce time overhead.

2017-03-26 21:25:06 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

Can I check if subsequently (from the second frame onwards), this memory load can be done in parallel with the computation? to improve performance

2017-03-26 20:41:33 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

When I run fast code using a camera, running time on CPU is less than GPU. I understand that we take one-time overhead in loading the memory for the GPU implementation for each frame. Can I check if subsequently (from the second frame onwards), this memory load can be done in parallel with the computation? to improve performance. Otherwise, there will be an additional overhead for each new image frame that we are processing.

2017-03-24 06:56:37 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

I understood what is a reason. Running code on GPU is faster than CPU when a parallel volume computation on GPU is enough big and total time transfer data from CPU to GPU, implement it on GPU and transfer data from CPU to GPU again is less than running time on CPU. However, I am wondering that whether processing transfer data from CPU to GPU is implemented at command "im.copyTo(im2)" or at command "Fast()"? And after the first iteration of Fast () function, output data is still on GPU or is transferred to CPU before beginning next iteration of Fast() function.

2017-03-24 00:03:25 -0600 received badge  Enthusiast
2017-03-23 21:11:54 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

I use while(1) to iterate infinitely. My specification PC:

- Processor: Intel Xeon CPU E5-1650 v2 @ 3.5GHz.
- Ram: 16 GB.
- GPU: NVIDIA Quadro K2000.

This is a video when I run my fast corner detector code on PC. I showed source code, time running, and performance of CPU and GPU. When I run this code on Odroid XU4 (Processor Samsung Quad 4 core A15 - 2GHZ and 4 core A7 - 1.3GHZ. Ram 2GB. GPU MALI T628). Use MAT is still slower than UMAT. Link: https://www.youtube.com/watch?v=PXKJMepjuHg&feature=youtu.be (https://www.youtube.com/watch?v=PXKJM...)

2017-03-23 01:56:34 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

When I run code below

        cout << context.ndevices() << " GPU devices are detected." << endl;
    for (int i = 0; i < context.ndevices(); i++)
    {
        cv::ocl::Device device = context.device(i);
        cout << "name                 : " << device.name() << endl;
        cout << "available            : " << device.available() << endl;
        cout << "imageSupport         : " << device.imageSupport() << endl;
        cout << "OpenCL_C_Version     : " << device.OpenCL_C_Version() << endl;
        cout << endl;
    }

It showed results: 1 GPU devices are detected name: Quadro K2000 available: 1 image surport: 1

OpenCL version: OpenCL C 1.2

And while Code is implementing. It took 11026 ms for MAT and 29340ms for UMAT in the same time. Do you know why it is?

2017-03-22 04:39:54 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

When I change Mat by UMat. My result is code ran on GPU. But it is slower than CPU. And when I change a name of "fast.cl" file in path: opencv310\sources\modules\features2d\src\opencl\fast.cl), Code still run normally. Whether fast.cl file was not called while the code is implementing. How do we know that when changing Mat by UMat, Code will run parallel on GPU?

2017-03-21 20:50:56 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

It means I only need to change from

Mat img = imread("chessboard.jpg", IMREAD_UNCHANGED);
FAST(gray, keypointsCorners, thresholdCorner, true);

to

cv::ocl::Device(context.device(0)); 
UMat img, gray; 
imread("chessboard.jpg", 1).copyTo(img); 
FAST(gray, keypointsCorners, thresholdCorner, true);

to have OpenCL code and this code will run on GPU? And while FAST () function is implementing it will call fast.cl file inside?

2017-03-21 01:31:35 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

it's mean when I change Mat by UMat. FAST function will be run on GPU. Do you know what fast.cl in OpenCV library use for?

2017-03-20 05:22:52 -0600 commented answer How to run OpenCL file (example fast.cl) in OpenCV library?

I want to run OpenCL file (example fast.cl at opencv310\sources\modules\features2d\src\opencl\fast.cl) in OpenCV library. But I see in this file have many kernels. And each kernel has a different number of arguments. How can I set up arguments to run this file?

2017-03-19 22:39:17 -0600 asked a question How to run OpenCL file (example fast.cl) in OpenCV library?

Hi guys, Anyone knows how to run OpenCL source code in OpenCV library? I see that there are many kernels in a file. I am confused how to set up arguments to run it. Thank you very much for your help.