Ask Your Question

JohannesZ's profile - activity

2018-10-11 23:57:45 -0600 received badge  Popular Question (source)
2016-05-25 10:00:08 -0600 commented answer Pedestrian detection - strategies for eliminating false positives

Lorena, you should read the article in depth - of course the non-maxima supression is expressed in detail, also with code provided. Nevertheless I think the article can give some hints how to improve the results.

2016-05-25 07:59:42 -0600 answered a question Pedestrian detection - strategies for eliminating false positives

Hi, I think this post may help you. It discusses the parameters in detail:

http://www.pyimagesearch.com/2015/11/...

Sure, it's openCV with Python, but the used parameters should be the same... Johannes

2016-04-22 03:07:11 -0600 received badge  Famous Question (source)
2016-03-20 22:23:02 -0600 received badge  Notable Question (source)
2016-02-11 05:55:08 -0600 received badge  Popular Question (source)
2015-11-15 22:57:31 -0600 received badge  Nice Answer (source)
2015-09-09 15:27:14 -0600 asked a question Stitcher in openCV 3.0

Hi there,

dealing with the stitcher module in openCV 3.0 (newest checkout from GitHub), Win7 32bit and VS 2013, and searching this forum I did not find a reasonable answer yet. A straighforward implementation for my problem:

cv::Mat imgLeft = cv::imread("panoLeftS.jpg");
cv::Mat imgRight = cv::imread("panoRightS.jpg");

std::vector<cv::Mat> images;
images.push_back(imgLeft);
images.push_back(imgRight);

cv::Mat pano;
cv::Stitcher stitcher = cv::Stitcher::createDefault(false);

stitcher.setRegistrationResol(-1); // 0.6
stitcher.setSeamEstimationResol(-1);   // 0.1
stitcher.setCompositingResol(-1);   //1
stitcher.setPanoConfidenceThresh(-1);   //1
stitcher.setWaveCorrection(true);
stitcher.setWaveCorrectKind(cv::detail::WAVE_CORRECT_HORIZ);

cv::Stitcher::Status status = stitcher.stitch(images, pano);

if (status != cv::Stitcher::OK)
{
    std::cout << "Can't stitch images, error code = " << status << std::endl;
    return -1;
}

In debug mode, everything is working fine. Running in release mode I am always getting a segfault in this line (ocl.cpp) without any detailed information:

bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
    {
        if(!u)
            return false;

        UMatDataAutoLock lock(u);

        //here is the crash (!)
        if(u->handle == 0)
        {
            CV_Assert(u->origdata != 0);
            Context& ctx = Context::getDefault();
            int createFlags = 0, flags0 = 0;
            getBestFlags(ctx, accessFlags, usageFlags, createFlags, flags0);

What I am doing wrong? On my two machines, I set the OPENCV_OPENCL_DEVICE = Intel(R) OpenCL:CPU:0 and installed the Intel openCL driver set.

Do you have any hints what could be the problem??

Thanks for your help! Johannes

2015-07-20 09:57:43 -0600 answered a question Which new algorithms would you like to see implemented in OpenCV?

Would be nice: PTAM, DTAM, a better FLANN documentation :-)

2015-07-16 06:24:10 -0600 commented answer OpenCV OpenCL- Where is creation of context?
2015-07-08 08:48:56 -0600 commented answer OpenCV 3.0: How to determine which GPU is used for OpenCL?

after digging deeper into the headers, I found the following:

type deviceType

  • 1 default
  • 2 CPU
  • 4 GPU
  • 8 Accelerator - whatever
  • 65540 dGPU - deticated GPU
  • 131076 iGPU - integrated GPU
  • 1 All

Will post my results, thanks in advance!

2015-07-03 08:20:20 -0600 commented answer OpenCV 3.0: How to determine which GPU is used for OpenCL?

Yes this could be a problem with the Core 2 Duo. Anyway, what do you think about my two points mentioned?

2015-07-03 07:20:01 -0600 commented answer OpenCV 3.0: How to determine which GPU is used for OpenCL?

I am using a Core 2 Duo Processor with compute capability 1.2.

On another system with a new Xeon processor and and integrated Intel GPU I get the following:

  • when I am iterating trough all devices with context.create(cv::ocl::Device::TYPE_ALL)), only the CPU is detected. Splitting the search in CPU and GPU from the code above I can see both devices.

  • to what refers the attribute "type" of a found device? i though that the original mapping would be:

    0 -> default; 1 -> CPU; 2 -> GPU; 3 -> Accelerator; 4 -> dGPU; 5 -> iGPU; 6->ALL.

    But from this point of view, my XEON CPU is specified as type = 2, means a GPU. What is wrong here?

2015-07-03 07:20:01 -0600 received badge  Commentator
2015-07-03 05:00:22 -0600 commented answer OpenCV 3.0: How to determine which GPU is used for OpenCL?

Hi, it is a GeForce GTX 550Ti, not the newest model, I know. OpenCL compute capability is 1.1. This could be too low for openCV, right? Iterating trough the platform info (please see my post before) I was able to see the accelerator, with the context mentioned above not. This is somewhat strange...

2015-06-28 10:01:58 -0600 commented answer OpenCV 3.0: How to determine which GPU is used for OpenCL?

Hm, the context GPU works well both in debug and release. However, the context CPU throws an exception in debug mode:

"C:\builds\master_PackSlave-win32-vc12-shared\opencv\modules\core\src\ocl.cpp:2530: error: (-215) clGetDeviceIDs_pfn( pl, dtype, 0, 0, &nd0 ) == 0 in function cv::ocl::Context::Impl::Impl

in release mode, the CPU context works, but no devices are found... this is strange.

2015-06-16 08:24:26 -0600 commented answer OpenCV 3.0: How to determine which GPU is used for OpenCL?

Hi unbehagelig,

thanks for your answer and your code, I will test it soon! Did you also set the environment variable for openCL OPENCV_OPENCL_DEVICE. if yes, what kind of value did you set?

Thanks for your help, JoZ

2015-06-03 05:54:48 -0600 commented question Best way to get good features

Your question has been discussed here for several times - please use the search function of this forum.

2015-05-27 06:38:24 -0600 received badge  Self-Learner (source)
2015-05-07 07:44:10 -0600 commented question SURF feature vector keypoints compute similarity percentage

Please use the search functionality of this forum. This optic ist asked quiet often.

2015-05-06 07:35:44 -0600 answered a question flann feature matching - image distance

First, the number of points depends always on your texture. SIFT/SURF extract their features in corner-like image structures. So no corners, no/less feature points of poor quality.

In general, there is no hard border for match / non match. You may set a specific threshold but this wilk not give you robust results. A solution is to work with probabilities. Imagine a histogramm which tells you "model A gets 20 matches", "model B gets 2 matches" and "model C gets 3 matches". In this case, your distribution will tell you what will be a good match. Also try to look for terms like "bag of words classifier", "k-means" etc. OpenCV will help you with this.

2015-04-23 05:45:34 -0600 commented question OpenCV stitch issues

what about timing? Did the images "change" their content between the shots? Moving clouds could be a good reason - the other parts were static.

2015-04-12 15:10:42 -0600 commented answer Multiple objects classification

At least a model for bag of words is available.

2015-04-07 15:48:25 -0600 commented question openCV 3.0 beta and OpenCL setDevice

What do you recommend as a OpenCL Runtime for Intel Processors (Core Processors)?

For example, is the "Intel Integrated Native Developer Experience Starter Edition" suitable? Or ist there anoher software package from Intel recommended?

2015-04-06 12:00:55 -0600 commented question openCV 3.0 beta and OpenCL setDevice

yes sure. But in case of the environment variable, the methd useOpenCl always returns false, no matter of setuseOpenCL(true/false)

2015-04-06 11:46:25 -0600 commented question openCV 3.0 beta and OpenCL setDevice

Hm, this is strange: without the environment variable you mentioned, cv::ocl::useOpenCL() always return true.

When i set the environment variable to:

Intel(R) OpenCL:CPU:0

There are no error messages (I recently got an error message writing 1:CPU:0) So these parameters should be fine. But in this case, useOpenCL() always returns false.

This is somewhat strange!

2015-04-06 08:54:20 -0600 commented question openCV 3.0 beta and OpenCL setDevice

Thanks for your tip! I think it's too bad that you can't set the device in the code directly. I made some tests (see below) but the cast to the void* pointer is not working - no idea why.

2015-04-06 08:49:47 -0600 commented answer openCV 3.0 beta and OpenCL setDevice

The conversion is not working - both ways not:

//OpenCL:: Platform
const cv::ocl::PlatformInfo* platform = &platforms[0];

//Access known device
cv::ocl::Device current_device;
platform->getDevice(current_device, 0);

//set Device - NOT WORKING
cv::ocl::Device::set(&current_device);

or

//set Device - NOT WORKING

void *p;
p = (void*)& current_device;
cv::ocl::Device::set(p);
2015-04-06 04:44:23 -0600 answered a question openCV 3.0 beta and OpenCL setDevice

Hi theodore!

Thanks for your answer. As I understand correctly the current API von openCV 3.0 beta has some changes in the API. Actually, I am retieviing the platform info and device info using

//OpenCL: Platform Info
std::vector<cv::ocl::PlatformInfo> platforms;
cv::ocl::getPlatfomsInfo(platforms);

//OpenCL Platforms
for (size_t i = 0; i < platforms.size(); i++)
{
    //Access to Platform
    const cv::ocl::PlatformInfo* platform = &platforms[i];

//Platform Name
std::cout << "Platform Name: " << platform->name().c_str() << "\n";

//Access Device within Platform
cv::ocl::Device current_device;
for (int j = 0; j < platform->deviceNumber(); j++)
{
    //Access Device
    platform->getDevice(current_device, j);

    //Device Type
    int deviceType = current_device.type();

In the api, there is only a method like

void cv::ocl::Device::set   (void * d)

from: http://docs.opencv.org/master/d7/d9f/...

My question is, how can I use it? I really don't understand the parameter or the cast to void*. Any help would be appreciated!

2015-04-04 08:36:39 -0600 asked a question openCV 3.0 beta and OpenCL setDevice

Hi,

in OpenCL, I have studied the ocl_test.cpp. Retrieving information about my system (Windows 7 SP1, 32bit) concerning available CPUs, GPUs and so on works fine. Studying the documentation, I have not found a way to set the device to do the actual computations.

In an older version of openCV, I saw a method like "setDevice", which is not available in the 3.0 beta. So, how can I enable a specific device for further computations? I only found a method called "set" which accepts a void-pointer. Since my GPU (device 0) is not the newest model I would like to enable my multicore-CPU (following device 1 and so on).

Thanks for your tips! Johannes

2015-04-04 08:28:17 -0600 commented question openCV 3.0 beta (source) + tbb

Hi, there was a failure in my path variable, I linked my executable against an older version of openCV. It is working now, thanks a lot!

2015-04-02 16:46:34 -0600 commented question openCV 3.0 beta (source) + tbb

Hmm, maybe a stupid question but what kind of version is this exactly?? 2.4.X oder a 3.0 beta?

openCV at GitHub

2015-04-02 16:43:27 -0600 commented question openCV 3.0 beta (source) + tbb

Hi, thanks for your answer. The problem is that I definitely don't want to use CUDA, so I set all CUDA-related flags to OFF/NO. I really don't understad why I get some kind of "cuda error message" mentioned above.

2015-04-02 14:43:21 -0600 received badge  Organizer (source)
2015-04-02 14:42:37 -0600 asked a question openCV 3.0 beta (source) + tbb

Hi there,

again a new post about compilation from openCV 3.0 master branch and tbb. Here is what I have done so far:

  • machine: win7, 32bits, visual studio 2013 (vc12)
  • set all path variables to openCV (code from master branch) and TBB (precompiled-win-zip)
  • ran cMake and activated with_tbb.
  • After configure, set the path to the relevant files (include-dirs, lib-dir, stddef-path)
  • my openCV folder is located at C:\Code\openCV3, my TBB folder C:\Code\tbb - is this a problem or must the tbb folder be included directly in the openCV folder?

  • added the tbb include and lib files to a property sheet and build openCV as debug (later as release). No errors, everything worked fine.

  • hit "install" including and linking to all files
  • in my test application compilation works, but at execution time, I am getting this failure:

"Failure in a procedure entry point" "?getHostMemRef@_OutputArray@cv@@UBEAAVHostMem@cuda@2@xz was not found in the dll opencv_world300d.dll"

I definitely deactivated WITH_CUDA and WITH_CUFFT in Cmake. So, why do I get this failure and what does "cuda" in this endless string mean? I have no CUDA graphics card and therefore deactivated these options, so I don't understand this problem.

Do you have a tip for me? Thank you so much, Johannes

2015-04-02 08:14:53 -0600 answered a question What are the applications of feature detectors?

Short answer: http://szeliski.org/Book/

Long answer: you should read this book. Besides, look for Zisserman & Hartley, David Forsyth.

2015-04-02 04:44:59 -0600 commented answer What type of image is this?

9.7 Kilobytes?! This is too less for a raw image file, thats for sure. Even for JPEG to less... try to load the jpeg file with the code above and see what's happening. Maybe its some kind of a thumbnail image ;-)