开发者

EXC_BAD_ACCESS on a struct assignment -- no idea why this happens

My program crashes on the line

params.hessianThreshold = threshold;

CvSURFParams cvSURFParams(double threshold, int extended)
{
    CvSURFParams params;
    params.hessianThreshold = threshold;
    params.extended = extended;
    params.upright = 0;
    params.nOctaves = 4;
    par开发者_如何转开发ams.nOctaveLayers = 2;
    return params;
}

I have no idea why it would crash on a static assignment ... any ideas?


If that code is in the header, it should be static inline CvSURFParams cvSURFParams(double threshold, int extended) (Add a static inline to it). If it's not in the header, put it in the header.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜