Hi guys,
I have a simple program that does stitching and the code I've used mainly comes from here. When complied on it's own, the program runs fine but when I embed it into a Windows Form and run the same code in a background worker, I get the following error:
I have slowly worked through the code and it seems that the error is triggered when it reaches the following line:
cv::Mat homography = cv::findHomography(framePoints, stitchedPoints, CV_RANSAC);
where:
std::vector <cv::Point2f> stitchedPoints, framePoints; where data is from goodMatches
for (size_t i = 0; i < goodMatches.size(); i++)
{
//-- Get the keypoints from the good matches
stitchedPoints.push_back(keypointsStitched[goodMatches.at(i).trainIdx].pt);
framePoints.push_back(keypointsFrame[goodMatches.at(i).queryIdx].pt);
}
I thank you guys in advance for taking the time to read my post and in assisting me with this.