私はOpenCVを初めて使用し、画像をキャプチャしてファイルに保存しようとしています。参考までにコードを以下に掲載します。
jpgファイルは保存中ですが、黒です。
// Capture the Image from the webcam
CvCapture *pCapturedImage = cvCreateCameraCapture(0);
// Get the frame
IplImage *pSaveImg = cvQueryFrame(pCapturedImage);
// Save the frame into a file
cvSaveImage("test.jpg". ,pSaveImg); // A JPG FILE IS BEING SAVED
// OF 6KB , BUT IT IS BLACK
すべての機能が成功しています。XPとVistaの両方で上記のコードを試しましたが、結果は両方で黒い画像になります。私が見逃しているものを教えてください。