Error: Expression: _BLOCK_TYPE_IS_VALID(pHead -> nBlockUse)

asked 2015-03-07 04:32:29 -0600

Icetray gravatar image

updated 2015-03-07 04:44:29 -0600

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:

Error

Edit: This is another error that accompanies it. Also caused by the line highlighted below Error 2

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.

edit retag flag offensive close merge delete

Comments

Same error with Chamfer matching sample. Has anyone made any progress?

WebSight gravatar imageWebSight ( 2015-05-24 00:56:48 -0600 )edit