Ask Your Question

statcomp's profile - activity

2019-08-28 12:20:18 -0600 received badge  Notable Question (source)
2016-10-24 05:37:59 -0600 received badge  Popular Question (source)
2014-10-09 10:08:27 -0600 commented question OpenCV_Perf_GPU.exe makes GPU crashed (Resolved)

@StevenPuttemans I think I've already done that in my question. As I don't have enough reputation, I can't create my own answer.

2014-10-08 20:20:10 -0600 commented question OpenCV_Perf_GPU.exe makes GPU crashed (Resolved)

@StevenPuttemans I found my answer. The crash was because of Timeout Detection and Recovery in WIndows. After adjusting the time, it worked without any problem. Thanks anyway.

2014-10-07 20:45:04 -0600 asked a question OpenCV_Perf_GPU.exe makes GPU crashed (Resolved)

As documentation of OpenCV 2.4.9 suggested, I recompiled OpenCV to enable CUDA.

I found compiling was successful and all related unit test were passed by running opencv_test_gpu.exe. But when running opencv_perf_gpu.exe, it made my GPU crashed. I found following test was the one that made it happen. Of course, all tests after the test would fail. I wonder if this is something I can fix in my part or a bug in OpenCV. FYI, my system information follows.

UPDATE

I found my answer here. For some reason, For 32 bit Windows worked for me although my OS is 64 bit version. Here is what worked.

1. Exit all Windows based programs.
2. Click Start, type regedit in the Search box, and then double-click regedit.exe from the results above. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
3. Browse to and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
4. On the Edit menu, click New, and then select the following registry value from the drop-down menu specific to your version of Windows (32 bit, or 64 bit):

For 32 bit Windows

a. Select DWORD (32-bit) value.
b. Type TdrDelay as the Name and click Enter.
c. Double-click TdrDelay and add 8 for the Value data and click OK.

For 64 bit Windows 

a. Select QWORD (64-bit) value.
b. Type TdrDelay as the Name and click Enter.
c. Double-click TdrDelay and add 8 for the Value data and clickOK.
5. Close the registry editor and then restart your computer for the changes to take affect.

The first failed test:

[ RUN      ] Sz_Depth_Cn_WinSz_BlockSz_Denoising_NonLocalMeans.Denoising_NonLocalMeans/3
..\..\..\sources\modules\ts\src\ts_perf.cpp(1367): error: Failed
Expected: PerfTestBody() doesn't throw an exception.
  Actual: it throws cv::Exception:
  D:/mywork/dev/opencv-2.4.9/sources/modules/gpu/src/cuda/nlm.cu:154: error: (-217) unknown error

params    = (1280x720, CV_8U, BGR, 21, 5)
termination reason:  unhandled exception
bytesIn   =    2764800
bytesOut  =          0
samples   =          1 of 100
outliers  =          0
frequency =    3312880
min       =    6789452 = 2049.41ms
median    =    6789452 = 2049.41ms
gmean     =    6789452 = 2049.41ms
gstddev   = 0.00000000 = 0.00ms for 97% dispersion interval
mean      =    6789452 = 2049.41ms
stddev    =          0 = 0.00ms
[  FAILED  ] Sz_Depth_Cn_WinSz_BlockSz_Denoising_NonLocalMeans.Denoising_NonLocalMeans/3, where GetParam() = (1280x720, CV_8U, BGR, 21, 5) (3043 ms)
[----------] 4 tests from Sz_Depth_Cn_WinSz_BlockSz_Denoising_NonLocalMeans (156200 ms total)

System Info

[----------]
[   INFO   ]    Implementation variant: cuda.
[----------]
[----------]
[ GPU INFO ]    Run test suite on GeForce GTX 660 GPU.
[----------]
Time compensation is 0
OpenCV version: 2.4.9
OpenCV VCS version: unknown
Build type: release
Parallel framework: tbb
CPU features: sse sse2 sse3 ssse3 sse4.1 sse4.2 avx
[----------]
[ GPU INFO ]    Run on OS Windows x32.
[----------]
*** CUDA Device Query (Runtime API) version (CUDART static linking) *** 

Device count: 1

Device 0: "GeForce GTX 660"
  CUDA Driver Version / Runtime Version          5.50 / 5.50
  CUDA Capability Major/Minor version number:    3.0
  Total amount of global memory:                 2048 MBytes (2147483648 bytes)
  ( 5) Multiprocessors x (192) CUDA Cores/MP:     960 CUDA Cores
  GPU Clock Speed:                               1.11 GHz ...
(more)
2013-06-20 15:32:55 -0600 commented answer Difference of CLAHE between opencv and matlab

FYI: result values from CLAHE between opencv and matlab do not match even with clipLimit values you suggested. I suspect there is fundamental difference in calculation, maybe in histogram calculation.

2013-06-20 08:37:35 -0600 received badge  Scholar (source)
2013-06-20 02:57:49 -0600 received badge  Nice Question (source)
2013-06-19 15:52:18 -0600 received badge  Student (source)
2013-06-19 15:38:44 -0600 received badge  Editor (source)
2013-06-19 15:37:03 -0600 asked a question Difference of CLAHE between opencv and matlab

I am trying to translate our Matlab code into C++ with OpenCV. Among others, finding counter part of adapthist of Matlab in OpenCV is critical. The function does so-called Contrast-limited adaptive histogram equalization (CLAHE) Luckily, OpenCV 2.45 came with CLAHE and I can neatly run following code for it.

Ptr<CLAHE> clahe = createCLAHE();
clahe->setClipLimit(3); //****
clahe->setTilesGridSize(Size(8,8));
clahe->apply(input,output);

One problem for matching Matlab result, however, is that ClipLimit in Matlab has range of (0,1) while I don't have any idea about ClipLimit in OpenCV although I think it's usually more than 1.

So could anyone tell me what's the range of ClipLimit in OpenCV and how can it match with the one in Matlab?

2013-06-19 15:24:56 -0600 received badge  Supporter (source)