ビデオのフレームからトレーニング データ セットを作成しようとしています。
新しいフレームごとに、特徴ベクトル (サイズは3300X1
) を見つけ、古い特徴ベクトルと連結してトレーニング データ セットを作成しています。しかし、2000 フレームを読み取った後、指定されたエラーを下回っています。
そして、2行目の以下の言及コードでエラーが発生しています。つまり
cv::Mat frameFV = getFeatureVectorFromGivenImage(curFrame, width, height);
cv::hconcat(trainingDataPerEmotion, frameFV, trainingDataPerEmotion);
エラー時のサイズcv::Mat trainingDataPerEmotion
は3300X2000(nearly)
を使って昔の動画を公開しています
cvReleaseCapture(&capture);
新しいビデオを処理する前に。そして、エラーは
OpenCV Error: Insufficient memory (Failed to allocate 3686404 bytes) in OutOfMemoryError, file /home/naresh/OpenCV-2.4.0/modules/core/src/alloc.cpp, line 52
terminate called after throwing an instance of 'cv::Exception'
what(): /home/mario/OpenCV-2.4.0/modules/core/src/alloc.cpp:52: error: (-4) Failed to allocate 3686404 bytes in function OutOfMemoryError
どうすればこの問題を克服できるか、システムをトレーニングするために大きなトレーニングデータを保存する必要があることを誰かが教えてくれますか?
ありがとうございました。