Ask Your Question

Plouf's profile - activity

2017-02-22 03:11:13 -0500 received badge  Famous Question (source)
2016-09-28 08:22:55 -0500 received badge  Notable Question (source)
2016-08-16 04:29:29 -0500 received badge  Popular Question (source)
2014-11-24 06:16:44 -0500 asked a question CLAHE : ClipLimit definition

Hello, I'm using CLAHE to enhance the contrast in a video. I'd like to how cliplimit parameter is computed. Is it a number of pixels or a gray level limit ? What's its range ? Thanks in advance !

2014-11-24 06:08:16 -0500 asked a question CLAHE : ClipLimit definition

Hello,

I use CLAHE to enhance the contrast in a video. I want to know exacty how ClipLimit parameter is computed. Is it a number of pixels limit or a gray level limit ? What's the range of this parameter ? Thank in advance !

2014-08-12 07:02:35 -0500 answered a question warpAffine execution time varying

I have solved my problem. I compiled Opencv with the option WITH_OPENMP. My computer was using 8 threads. I forced it to use 1 thread (with the code lign : omp_set_num_threads(1);) and my execution is faster now and stable. On the chart below, I call 1000 times the function warpaffine with one thread (blue dots) and with 8 threads (red dots). With 8 threads, the execution time explodes sometimes (the red dots at 5 ms are higher actually, I reduced their values (~50ms) to 5 ms for scaling reason). As I call warpaffine function several times per frame and some other optimized opencv functions, there were some big execution time leaps. Now, the execution time per frame is stable (+- 1ms) and faster (time/2). It's less efficient to use more threads due probably to data transmission.

image description

2014-08-07 09:21:50 -0500 commented answer warpAffine execution time varying

Hey boaz001, thanks for your answer. I want to estimate global motion in real time and I want to have time left to do other stuff. My video is 720x576 at 30fps. I'd like to estimate global motion in less than 15ms. I call 10 times per frame the function warpaffine. So it's important for my application to have a stable execution delay. I tried the function calcOpticalFlowPyrLK on a predefined set of points and I noticed the same irregularities..

2014-08-06 06:50:48 -0500 asked a question warpAffine execution time varying

Hello,

I'm working on global motion estimation in videos. And I noticed that the execution time of the warpAffine function varies a lot (same input image, same transformation). Here's a small test :

Mat im = imread("image_test.png");
Mat wavimg = Mat(im.rows,im.cols,CV_8UC1);
Mat mapMatrix = Mat(2,3,CV_32F);
mapMatrix.at<float>(0,0) = 1.05;
mapMatrix.at<float>(0,1) = 0.0001;
mapMatrix.at<float>(0,2) = 5.3;
mapMatrix.at<float>(1,0) = -0.0001;
mapMatrix.at<float>(1,1) = 1.05;
mapMatrix.at<float>(1,2) = -0.8;

double tic, toc, tictoc;
for (int i=0; i<1000; i++){
    tic = (double)cvGetTickCount();
    warpAffine(im,wavimg,mapMatrix,wavimg.size(),CV_INTER_LINEAR+WARP_INVERSE_MAP);
    toc = (double)cvGetTickCount();
    tictoc = (toc-tic)/(1000*(double)cvGetTickFrequency());
    printf("time: %fms\n",(float)tictoc);
}
return 0;

Here are the execution times for 300 samples. These times are mainly around 0.8 ms but some of them are higher (up to 1.4 ms). I don't understand why and I'd like to know the reason. My configuration : windows 7 pro, visual studio express 2013, opencv 2.4.8, Intel Core i7-4700MQ CPU @ 2.4Ghz, 64 bits

Could anybody help me please ?

Regards, image description