Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
opencv中是否有任何函数可用于获取帧序列中的最后一帧?
我试着用这个
dst = cvCreateImage( cvGetSize(src), IPL_DEPTH_8U, 1 );
但似乎只适用于 IplImage 格式。我正在使用 Mat 并且 dst 应该是浮点指针。
根据帧的存储方式,您可能需要以下内容:
float* frames; // pointer to array of floats containing N frames; float* last_frame = frames + (N - 1) * rows * cols; cv:Mat dst(rows, cols, CV_32FC1, last_frame);