OpenCV 2.4.4 wth CUDA: registerPageLocked fails -


i trying page-lock mat has been created. consider following example code:

... mat cpugray; gpumat gpugray; cv::cvtcolor (cpucolor, cpugray, cv_bgr2gray); registerpagelocked(cpugray); gpustream.enqueueupload(cpugray, gpugray); ... 

at runtime fails with:

opencv error: gpu api call (invalid argument) in registerpagelocked, file ../gpu/src/matrix_operations.cpp, line 194 terminate called after throwing instance of 'cv::exception'   what():  ../gpu/src/matrix_operations.cpp:194: error: (-217) invalid argument in function registerpagelocked aborted 

does know doing cause error? in advance

i think cpugray might empty matrix. function registerpagelocked(cpugray) needs know how memory needs page-locked cpugray. make sure cpugray not empty matrix. cpugray initialized in

cv::cvtcolor (cpucolor, cpugray, cv_bgr2gray); 

so make sure cpucolor not empty.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -