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

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -