Ask Your Question

darkmoor's profile - activity

2013-10-18 10:36:32 -0600 asked a question Too Slow GpuMat uploading of an small image

I want to upload an image into the following variable gpu::GpuMat test;. First of all the input image(src) is converted into a grayscale image cvtColor( src, src_gray, COLOR_BGR2GRAY ); and then it is uploaded test.upload(src_gray);. Unfortunately, it took so much time for the uploading. More than two minutes. The image size is 169x90. I know that that generally there is some delay because of the bandwidth but I think two minutes are too much for such a small image. Finally, I want to mention that after the uploading of the first image the up loading of the next images is almost instant. Is there any initialization procedures? Can we improve such delay?

int main( int, char** argv )
{
/// Load source image and convert it to gray
string filename =  argv[1] ;//"yourfile.avi";
VideoCapture capture(filename);
if( !capture.isOpened() )
    throw "Error when reading steam_avi";

int framenumber=1;
Mat src, src_gray;
gpu::GpuMat test;

namedWindow( "w", 1);
time_t start,end;
time (&start);
for( ; ; )
{
    //printf("Frame %d: \n", framenumber++ );
    capture >> src;

    cvtColor( src, src_gray, COLOR_BGR2GRAY );

    test.upload(src_gray);//it takes too long even for an image of 169x90
    if( src_gray.empty() )
        break;
    imshow("w", src_gray);



    waitKey(20); // waits to display frame

}
time (&end);
double dif = difftime (end,start);
printf ("Elasped time is %.2lf seconds.", dif );
getchar();

return(0);

}

PS: Win 7 64x, CUDA SDK 5.5, Opencv 2.4.6, GeForce 9600.

2013-09-23 13:48:13 -0600 commented question call farneback optical flow

farneback_optical_flow.cpp and calls the gpu implementation of that algorithm.

2013-09-23 13:36:58 -0600 asked a question call farneback optical flow

Can anybody tell me why the following call of farneback algorithm in gpu mode is not working? In the command arguments in visual studio 2010 I have l basketball1.png r basketball1.png. I also tried -l basketball1.png -r basketball1.png but it returns

Unhandled exception at 0x760dc41f in cudaFarneback.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x002ae440

It crashes when it reaches the following part of the code:

if (cmd.get<bool>("help")){...}

I know it is something wrong with the syntax of the arguments because I have run similar examples but I can not image what I am doing wrong. Finally, the desired syntax is

CommandLineParser cmd(argc, argv, "{ l | left | | specify left image }" "{ r | right | | specify right image }" "{ h | help | false | print help message }");

Thank you in advance.

2013-08-31 17:00:06 -0600 commented question OpenCV Error: GPU API call <out of memory> in gpumat.cpp

I run the algorithm with a smaller image (384x288 ) and it worked

2013-08-31 16:43:38 -0600 commented question OpenCV Error: GPU API call <out of memory> in gpumat.cpp

Thanks for answering. I have GeForce 9600 GT. I am using an algorithm for disparity estimation and I am testing it in two images of size 640x480. Also I am using the main that the opencv offers in samples folder.

2013-08-30 16:55:58 -0600 asked a question OpenCV Error: GPU API call <out of memory> in gpumat.cpp

Hello I have build an VS 2010 project in which I am trying to run a gpu algorith. I have no build or link erros but when I am trying to run the exe returns the following error:

OpenCV Error: GPU API call (out of memory) in unknown function, file ../../../modules\core\src\gpumat.cpp line 1415 error: ......\modules\core\src\gpumat.cpp:1415: error: <-217> out of memory

Also I have added the new dlls after the build with cuda support to the debug file.

I am using Win 7, CUDA toolkit 5.5 and OpenCV 2.4.6.

Thanks in advance.

2013-08-30 12:50:52 -0600 asked a question No GPU support in GPU builded OpenCV

Hello I have created a VS 2010 project In order to run one of the GPU module algorithms.

I link the libs and I copy the corresponding dlls from opencv dir to the debug folder. The libs I use are:

opencv_gpu246d.lib opencv_core246d.lib opencv_imgproc246d.lib opencv_calib3d246d.lib opencv_video246d.lib opencv_highgui246d.lib cudart.lib

Also the project asked me the follwing hpp files: precomp.hpp internal_shared.hpp safe_call.hpp

I copied them to a folder into the project directory and I add I include the folder in the proj's properties.

I build the project without any link error but when I run the exe file an error is returned:

OpenCV Error: No GPU support <the library="" is="" compiled="" without="" gpu="" support=""> in unknown function, file c:....\precomp.hpp line 137 error c:....\precomp.hpp:137 error:<-216> the library is compiled without GPU support.

I am using Win 7 64x, CUDA toolkit 5.5, OpenCV 2.4.6 and GeForce 9600. Please do not tell me that I did not build the opencv with cuda support, because I did it and I am using the lib and dll files from the new folder that the solution created.

Thank you in advance.

P.S: The same error is returned with OpenCV 2.4.5

2013-08-15 03:01:17 -0600 commented question Disparity Estimation Algorithms

I think this site, http://vision.middlebury.edu/stereo/eval/, contains all the information needed to compare algorithms.

2013-08-10 17:58:47 -0600 received badge  Student (source)
2013-08-10 14:29:00 -0600 received badge  Editor (source)
2013-08-10 14:27:28 -0600 asked a question Disparity Estimation Algorithms

Hello everyone,

I would like to ask a question about the disparity estimation algorithms that the openCV offers. My question concerns the efficiency of the disparity algorithms both in visual quality and the time efficiency. I am interested in extracting disparity information in some hundred not even say thousands of HD videos. Because such a procedure is very time consuming and it must be done once I need someones advise which algorithm can I use. My first priority is the quality of the disparity which means low error estimation. As a second priority is the time efficiency of the algorithm. All in all, I would like to mention that I am familiarized with the CUDA technology and it would be a pleasure to work with an algorithms that fits the requirements.

Thank you in advance.