[問題] OpenCV在影片畫質高於1080P

看板C_and_CPP (C/C++)作者 (萬事皆可達)時間12年前 (2014/02/14 12:27), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) VC2008 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) NULL 問題(Question): 在影片大小於1080P時 CvSize AviSize = cvSize(width,height); int AviColor = 1; writer=cvCreateVideoWriter(AviFileName,AviForamt,FPS,AviSize,AviColor); cvSize太大會讓cvCreateVideoWriter無法創立然後break 影像資訊讀取得近來有測試過 餵入的資料(Input): CvSize AviSize = cvSize(width,height) //cvSize(1920,1080) 預期的正確結果(Expected Output): 和低解析度一樣可以做動作 錯誤結果(Wrong Output): http://ppt.cc/PQX5 程式碼(Code):(請善用置底文網頁, 記得排版) CvCapture* CvCapture1; CvCapture1 = cvCaptureFromAVI("000281.avi"); cvQueryFrame(CvCapture1); int height = (int)cvGetCaptureProperty(CvCapture1, CV_CAP_PROP_FRAME_HEIGHT); int width = (int)cvGetCaptureProperty(CvCapture1, CV_CAP_PROP_FRAME_WIDTH); int fps = (int)cvGetCaptureProperty(CvCapture1, CV_CAP_PROP_FPS); int numFrames = (int)cvGetCaptureProperty(CvCapture1, CV_CAP_PROP_FRAME_COUNT); CvVideoWriter *writer; char AviFileName[]="Output.avi"; int AviForamt = CV_FOURCC('D', 'I', 'V', 'X'); int FPS = fps; CvSize AviSize = cvSize(width,height); int AviColor = 1; writer=cvCreateVideoWriter(AviFileName,AviForamt,FPS,AviSize,AviColor); 補充說明(Supplement): -- :老闆來份法式蒜香雞丁佐羅勒 老闆:嗯? :一份鹹酥雞不要辣加蒜頭跟九層塔謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.70.240.50
文章代碼(AID): #1I_PjD5k (C_and_CPP)
文章代碼(AID): #1I_PjD5k (C_and_CPP)