0
我有一個video.I想讀取和顯示使用opencv命令。(或)我有325 frames.how我可以閱讀和顯示使用opencv以及如何將這些幀轉換爲視頻?我不知道如何使用opencv編寫代碼。有沒有這方面的任何命令,請幫助我如何使用opencv讀取和顯示視頻以及如何轉換爲幀?
我有一個video.I想讀取和顯示使用opencv命令。(或)我有325 frames.how我可以閱讀和顯示使用opencv以及如何將這些幀轉換爲視頻?我不知道如何使用opencv編寫代碼。有沒有這方面的任何命令,請幫助我如何使用opencv讀取和顯示視頻以及如何轉換爲幀?
cv::Mat img;
cv::VideoCapture capture("yourfile.avi");
while (img.rows > 0)
{
capture >> img;
cv::imwrite("c:/tmp/file.png", img);
}
夠簡單嗎?