Open smallrain777 opened 1 year ago
hey, I solve this problem by locate the bug in this line! https://github.com/gaoxiang12/slambook2/blob/f522131fadae7e7ec1a09f18873bc65369cdd073/ch7/orb_self.cpp#L384 the coordinates of point pp and qq can be negative value, so the img.at() crash.
I solve this by simply assign all the negative coordinate values to zeros like this before calling img.at():
if (pp.y < 0){pp.y = 0;}
if (pp.x < 0){pp.x = 0;}
if (qq.y < 0){qq.y = 0;}
if (qq.x < 0){qq.x = 0;}
if (img.at<uchar>(pp.y, pp.x) < img.at<uchar>(qq.y, qq.x)) {
Thanks so much!
$ ./orb_self Segmentation fault
尝试通过ulimit修改stack size为100M但是仍然没有解决