开发者

EXC_BAD_ACCESS when calling cvThreshold

开发者 https://www.devze.com 2023-04-09 04:01 出处:网络
Im getting EXC_BAD_ACCESS error when calling cvThreshold. Without that line (if I comment it), the image is displayed perfectly.

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

精彩评论

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

关注公众号