Ask Your Question

TADRIAN's profile - activity

2020-02-18 02:49:31 -0600 received badge  Famous Question (source)
2018-12-02 22:41:07 -0600 received badge  Notable Question (source)
2018-06-11 03:23:37 -0600 received badge  Popular Question (source)
2017-09-25 06:08:17 -0600 answered a question how to detect multiple cars in an image using opencv??

You should post the XML file and the picture 1.jpg

2017-09-18 01:32:54 -0600 commented answer Canny doesn´t run faster when using OpenMP

Set the Cores in the VM to 4, cv::getNumberOfCPUs() returns 4 I tried the implementation of your gaussianblur class for

2017-09-18 01:32:23 -0600 commented answer Canny doesn´t run faster when using OpenMP

Set the Cores in the VM to 4, cv::getNumberOfCPUs() returns 4 | I tried the implementation of your gaussianblur class f

2017-09-18 01:31:55 -0600 commented answer Canny doesn´t run faster when using OpenMP

Set the Cores in the VM to 4, cv::getNumberOfCPUs() returns 4 | I tried the implementation of your gaussianblur class f

2017-09-15 04:05:55 -0600 commented question Canny doesn´t run faster when using OpenMP

cv::getNumberOfThreads() returns 4 (i´m running a Linux VM with 4 Cores) | when debuging the programm steps into (with

2017-09-14 01:01:13 -0600 commented question Canny doesn´t run faster when using OpenMP

Thanks for the answer matman | I´m using OpenCV 3.2. | I don´t use OpenCLs UMat | i set L2gradient=true but there is no

2017-09-14 01:00:43 -0600 commented question Canny doesn´t run faster when using OpenMP

Thanks for the answer matman - I´m using OpenCV 3.2. - I don´t use OpenCLs UMat - i set L2gradient=true but there is no

2017-09-13 06:33:42 -0600 edited question Canny doesn´t run faster when using OpenMP

Canny doesn´t run faster when using OpenMP I want to test the benefits when building OpenCV with -D WITH_OPENMP=ON I hav

2017-09-13 06:33:26 -0600 commented question Canny doesn´t run faster when using OpenMP

cv::getBuildInformation() gives me: Parallel framework: OpenMP

2017-09-13 05:45:51 -0600 asked a question Canny doesn´t run faster when using OpenMP

Canny doesn´t run faster when using OpenMP I want to test the benefits when building OpenCV with -D WITH_OPENMP=ON I hav

2017-07-03 00:33:16 -0600 received badge  Supporter (source)
2017-06-29 06:34:26 -0600 commented question Place data of Mat at a specific memoryarea pointed to by a pointer

It´s the opposite direction. On the thread he initialized a CV:Mat with values located in the shared memory (where the pointer pointed to) but i want to read in a picture in a CV:Mat and save the values on a memory area a pointer is pointing to.

2017-06-29 03:16:13 -0600 commented question Place data of Mat at a specific memoryarea pointed to by a pointer

I have a shared memory between the Host(ARM) and the Device (FPGA). on this shared memory i created the buffer. After that i want to read an image and safe the data of the image on the allocated memory which was allocated by clCreateBuffer

2017-06-29 01:56:20 -0600 asked a question Place data of Mat at a specific memoryarea pointed to by a pointer

I have created a memory object on the shared memory with following OpenCL-Function call:

cl_mem buffer_img_GAUSS_TEST = clCreateBuffer(context, CL_MEM_ALLOC_HOST_PTR, sizeof(uchar) * size_cols * size_rows,NULL,&status);

A call of this function gives me the pointer:

uchar *src_ptr;
src_ptr  = (uchar *)clEnqueueMapBuffer(cmdQueue, buffer_img_GAUSS_TEST, CL_TRUE, CL_MAP_READ, 0, sizeof(uchar) * size_cols* size_rows, 0, NULL, NULL, &status);

Now I want to read an image with following OpenCV function call:

Mat img= imread( "scene.jpg", IMREAD_GRAYSCALE );

Is it possible to "say" that the data of the picture should be placed at the data-area pointed to by src_ptr? The area located by the buffer_img_GAUSS_TEST has exactly the size needed for the data of Template

In other words: I want to replace this part of the code, which copys the data from the Image to the address pointed to by src_pointer.

memcpy ( src_ptr, img.data, sizeof(uchar) * img.cols * img.rows);
2017-05-02 05:45:29 -0600 commented question OpenCV Featuredetection with OpenCL

Hello, thanks for the answer. I tried to use OpenCL with the Surf detector, but the time needed for the Mat and the UMat version is nearly the same. Did you test the Surf OpenCL by yourself and noticed the same behaviour? To verify that OpenCL "works" I tried to use "Canny" and "Convert from Color to Grayscale" which runs faster using the UMat version.

2017-04-28 05:06:52 -0600 commented question OpenCVs OpenCL doesn´t find any device but the code executed with UMAT runs faster

No, I disbaled "with_cuda" in CMAKE

2017-04-28 04:17:10 -0600 commented question OpenCVs OpenCL doesn´t find any device but the code executed with UMAT runs faster

I think the Canny-function I used with Umat runs on the GPU (excecution time went down and the CPU workload went down in comparison to the Mat Canny call) But i´m quite confused why, because running the codeexample 1 from my post outputs no devices. When trying your Codeexample i got following error at the code part: error: http://img5.fotos-hochladen.net/uploa... codepart:
case (1 << 2): cout << " GPU device\n"; if (context.create(deviceType)) // <--- errors

Thanks for your help

2017-04-28 02:57:54 -0600 received badge  Student (source)
2017-04-28 00:35:45 -0600 received badge  Editor (source)
2017-04-28 00:33:50 -0600 asked a question OpenCVs OpenCL doesn´t find any device but the code executed with UMAT runs faster

Hello together,

I recently started trying to use OpenCVs OpenCL. By executing following code but i´m not able to find any device (cv::ocl::haveOpenCL() returns true).

cv::ocl::Context context;
if (!context.create(cv::ocl::Device::TYPE_ALL))
{
    cout << "Failed creating the context..." << endl;
    //return;
}

cout << context.ndevices() << " CPU devices are detected." << endl; //This bit provides an overview of the OpenCL devices you have in your computer
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;
}

So I thought OpenCL isn´t set-up correctly so I tried it with the "normal OpenCL" with following lines of code, which outputs the devices and platforms as expected: Output: http://img5.fotos-hochladen.net/uploa...

std::vector<cl::Platform> all_platforms;
cl::Platform::get(&all_platforms);
if (all_platforms.size() == 0) {
    std::cout << " No platforms found. Check OpenCL installation!\n";
}
else
{
    std::cout << "################################################################" << endl;
    std::cout << "################## Verfuegbare Hardware ########################" << endl;
    std::cout << "################################################################" << endl;
    for (int i = 0; i < all_platforms.size(); i++)
    {
        std::cout << "Platform " << i+1 << ": " << all_platforms[i].getInfo<CL_PLATFORM_NAME>() << "\n";
        std::cout << "Platform version: " << all_platforms[i].getInfo<CL_PLATFORM_VERSION>() << "\n";

        //get default device of the default platform
        std::vector<cl::Device> all_devices;
        all_platforms[i].getDevices(CL_DEVICE_TYPE_ALL, &all_devices);
        if (all_devices.size() == 0) {
            std::cout << " No devices found. Check OpenCL installation!\n";
        }
        else
        {
            for (int j = 0; j < all_devices.size(); j++)
            {
                cl::Device default_device = all_devices[j];
                std::cout << "Device " << j+1 << ": " << default_device.getInfo<CL_DEVICE_NAME>() << "\n";
            }
        }
        std::cout << "___________________________________________" << endl;
    }
}

After that I tried to use the OpenCVs OpenCL nevertheless by executing a comparison between UMat Canny and Mat Canny, the UMat Canny runs much faster. Now i´m quite confused why it works and on which device and platform it runs? I hope someone can clarify whats going on :D

i appreciate your help. Thanks

2017-04-27 01:08:13 -0600 received badge  Scholar (source)
2017-04-27 00:19:08 -0600 commented answer Not able to install xfeatures2d (with opencv_contrib)

Thanks a lot :), It was indeed a networking problem due a proxy. I disabled the proxy (cause i couldn´t figure out how to set the proxy settings for cmake) and everything works fine.

2017-04-26 04:27:25 -0600 asked a question Not able to install xfeatures2d (with opencv_contrib)

Hello,

I have a problem building OpenCV 3.2 with the xfeatures2d module. I followed this tutorial: putuyuwono.wordpress.com/2015/04/23/building-and-installing-opencv-3-0-on-windows-7-64-bit/ to build OpenCV with OpenCV_contrib.

After completing the guide I´m able to use most of the OpenCV + OpenCV contrib modules with expection of the xfeatures2d module.

After building with Visual Stuido 2015 i´m not able to find the corresponing libary in the Directory: E:\opencv-3.2\build\install\x64\vc14\lib (all the other libarys are there): In the solution explorer of VS 15 i´m able to find the module opencv_xfeatures2d. When trying to build only this module i get following errors:

Severity Code Description Project File Line Suppression State Error C1083 Cannot open include file: 'vgg_generated_120.i': No such file or directory opencv_xfeatures2d E:\opencv-3.2\source\opencv_contrib\modules\xfeatures2d\src\vgg.cpp 474

Severity Code Description Project File Line Suppression State Error C1083 Cannot open include file: 'boostdesc_bgm.i': No such file or directory opencv_xfeatures2d E:\opencv-3.2\source\opencv_contrib\modules\xfeatures2d\src\boostdesc.cpp 646

Do you have any idea whats the problem? (google said a soultion would be to disbale Build_opencv_contribworld and _cudaarithm in cmake, but it didn´t solve the problem)

Thanks

2017-04-21 01:05:37 -0600 received badge  Enthusiast
2017-04-12 04:04:24 -0600 asked a question OpenCV Featuredetection with OpenCL

Hello,

I recently start experimenting with OpenCV, especially with the featuredetectors (eg. SIFT, SURF ...) Now i´m starting to look into OpenCL and I wanted to ask if there is OpenCL "support" for these featuredetectors, because i would like to run these algorithm on a parallel device (Altera Cyclone V SoC)

While browsing through the OpenCV doc I found following a link saying:

"All specialized ocl implemetations has been hidden behind general C++ algorithm interface. Now the function execution path can be selected dynamically at runtime: CPU or OpenCL; this mechanism is also called Transparent API. New class cv::UMat is intended to hide data exchange with OpenCL device in a convinient way."

So if I use UMat instead of Mat with OpenCL enabled the code, which can be run via OpenCL is excecutet on the parallel device? For OpenCV 3.2 I´m not able to find a list which lists the OpenCV functions with are usable with OpenCL (or are the functions the same as in 2.4). So when i declare things with UMat it could be run on the GPU or maybe the CPU but i don´t know exactly what is run on which component?

What would happen if I use this codeexample? 1. Not working 2. Run on CPU because detect isn´t supportet in OpenCL 3. parts from the sift algorithm which are supported in OpenCL run on gpu and other parts run on cpu?

UMat img =imread("..");     
cv::Ptr<cv::xfeatures2d::SiftFeatureDetector> siftDetector = 
      cv::xfeatures2d::SiftFeatureDetector::create();
std::vector<cv::KeyPoint> siftKeypoints;
siftDetector->detect(img, siftKeypoints);

Already asked a quite similar question on stackoverflow a few days ago, but thought this might be a better place for asking this question.

Thanks for reading :)