开发者

EXC_BAD_ACCESS when calling cvThreshold

Im getting EXC_BAD_ACCESS error when calling cvThreshold. Without that line (if I comment it), the image is displayed perfectly.

void CVWindow::processImage()
{
    sourceImg = cvCreateImage(cvSize(640,480),8,1);
    cvSetData(sourceImg, &m_img, sourceImg->widthStep);

    cvThreshold(sourceImg, sourceImg, 100, 255, CV_THRESH_BINARY);

    m_img = *sourceImg-开发者_如何学运维>imageData;
}

Any possible reasons? I have been searching for two days for a solution but cant find it. Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜