# Debug Assertion Error when detecting object and scene points in OpenCV

I am trying to extract the query and train keypoints and generate a homography in OpenCV. I am doing that using the following block of code:

//Object and Scene are both vector<vector<Point2f>, and H is a cv::Mat.
//keypoints 1 and 2 are both vector<cv::keypoints>
//good_matches are vector<cv::DMatches>
for (size_t i = 0; i < good_matches.size(); i++)
{
try {
object.push_back(keypoints1[good_matches[i].queryIdx].pt);
scene.push_back(keypoints2[good_matches[i].trainIdx].pt);
}
catch (cv::Exception & e) {
std::cout << e.msg << std::endl;
}
}


The goal is to generate a homography:

H = findHomography(object, scene, cv::RANSAC);


But whenever I feed the camera a blurry frame, it throws an error window:

Debug Assertion Error
File: debug_heap.cpp (line 996)

I did some research online and people said that this error is caused by libs, and the solution is to use the release libs in debug mode but that doesnt even compile in my case, and the file that is referenced - opencv_world411.lib doesnt exist in my Cmake build.