マトリックスを使用していないにもかかわらず、画像データをキャプチャおよびスケーリングしているときに、OpenCV からマトリックス関連のエラー メッセージ/例外が表示されます。それが現時点での私のコードです:
if (data->capture->grab()) // capture something from already opened device
{
if (data->capture->retrieve(grabFrame,0)) // get the frame
{
CvSize size;
size.width=data->config.width;
size.height=data->config.height;
nextFrame=cvCreateImage(size,32,0);
resFrame=cvCreateImage(size,32,0); // predefined default sizes to scale the image to...
if ((nextFrame) && (resFrame))
{
cvResize(&grabFrame,nextFrame,cv::INTER_AREA); // scale the image to the predefined size
--> here the Exception is thrown!
cvCvtColor(nextFrame,resFrame,CV_BGR2RGB);
...
}
if (nextFrame) cvReleaseImage(&nextFrame);
}
}
OpenCV からの正確な出力は次のとおりです。
OpenCV エラー: cvarrToMat の不正な引数 (不明な配列型)、ファイル /builddir/build/BUILD/> OpenCV-2.3.1/modules/core/src/matrix.cpp、'cv のインスタンスをスローした後に呼び出される 646 行目: :Exception' what(): /builddir/build/BUILD/OpenCV-2.3.1/modules/core/src/matrix.cpp:646: エラー: (-5) 関数 cvarrToMat の不明な配列型
中止しました
それでは、愚かで単純なスケーリング操作で、ここで何が間違っているのでしょうか?
ありがとう!