我正在使用OpenCV进行CUDA处理来自USB网络摄像头的直播。目前我正在做这样的事情:
cv::videoCapture cap(0);
cv::Mat h_frame;
while(cap.read(h_frame)){
cv::cuda::gpuMat d_frame(h_frame);
//process d_frame;
}
Run Code Online (Sandbox Code Playgroud)
是否有可能摆脱h_frame
并直接阅读d_frame
:
//Imaginary code
cv::cuda::gpuVideoCapture cap(0);
cv::cuda::gpuMat d_frame;
while(cap.read(d_frame)){
//process d_frame;
}
Run Code Online (Sandbox Code Playgroud)
甚至直接使用CUDA。我的意思是像将摄像头输出读取为字节流(直接发送到GPU),然后gpuMat
以某种方式获取它一样?
归档时间: |
|
查看次数: |
746 次 |
最近记录: |