Can we extract keypoints from background subtracted video?
Can we extract keypoints from the background subtracted images ? i am
extracting keypoint from the video by first subtracting its background ,
but it show me runtime error
capture >> current_frame;
if (current_frame.empty())
break;
if (! previous_frame.empty()) {
subtract(current_frame, previous_frame, predict_img);
detector.detect(predict_img, keypoint2);
BestKeypoints(keypoint2, 20);
dextract.compute( predict_img, keypoint2, descriptors_2);
Mat my_img_3 = descriptors_2.reshape(1,1);
float response = svm.predict(my_img_3);
}
waitKey(10);
current_frame.copyTo(previous_frame);
}
This is error :
OpenCv Error : Image step is wrong ( The matrix is not contineous, thus
its number of rows can not be changes ) in unknown function
..\..\..\src\opencv\modules\core\src\matrix.cpp , line802
I did it without subtracting background subtraction , it works
No comments:
Post a Comment