the question can be tough I think as I use orbslam2 and modify it. orbslam2 use FAST in opencv to detect feature. In orbslam2 ORBextractor.cc it has the following line
FAST(mvImagePyramid[level].rowRange(iniY,maxY).colRange(iniX,maxX),vKeysCell,iniThFAST,true);
It runs totally all right. However, after I use the code here(it changes orbslam to visual inertial slam, but don't worry about this...) When I run the visual inertial orbslam, it doesn't modify the orbslam part. But it will stop at FAST and returns segmentation fault(core sumped). But the weird thing is the code in original orbslam code and the code above have the totally same input. I print out the input of FAST. It is
[ 18, 19, 20, 21, 21, 24, 26, 27, 26, 26, 28, 27, 27, 28, 28, 27, 26, 26, 27, 24, 26, 25, 28, 28, 28, 29, 31, 31, 32, 33, 32, 30, 28, 28, 26, 23;
19, 23, 23, 24, 24, 27, 26, 29, 29, 30, 32, 34, 29, 31, 31, 28, 31, 30, 32, 30, 29, 28, 30, 31, 31, 34, 35, 34, 35, 35, 33, 34, 32, 30, 26, 24;
27, 27, 30, 29, 26, 28, 27, 30, 30, 33, 31, 30, 28, 31, 31, 32, 31, 31, 33, 32, 32, 29, 31, 32, 31, 33, 34, 34, 36, 35, 35, 33, 33, 31, 27, 23;
29, 31, 32, 32, 34, 30, 31, 32, 33, 31, 29, 29, 30, 31, 30, 31, 31, 30, 31, 32, 31, 32, 34, 32, 31, 33, 34, 33, 35, 33, 34, 35, 34, 32, 27, 24;
32, 31, 33, 35, 35, 34, 32, 31, 30, 29, 28, 27, 29, 30, 30, 32, 30, 31, 30, 31, 31, 32, 35, 35, 35, 35, 35, 35, 36, 34, 33, 33, 33, 31, 29, 23;
32, 31, 34, 35, 35, 33, 33, 31, 29, 28, 29, 30, 30, 29, 29, 28, 31, 30, 31, 30, 30, 32, 35, 35, 35, 34, 34, 34, 35, 34, 33, 33, 33, 31, 27, 23;
31, 33, 33, 33, 34, 32, 31, 33, 31, 32, 29, 30, 31, 28, 30, 31, 31, 30, 30, 32, 32, 31, 33, 32, 33, 35, 33, 34, 35, 33, 32, 35, 31, 31, 28, 25;
34, 33, 32, 32, 33, 32, 34, 31, 33, 31, 31, 33, 31, 31, 33, 32, 33, 31, 33, 32, 34, 33, 34, 35, 38, 36, 34, 33, 33, 35, 35, 32, 31, 28, 27, 23;
30, 32, 30, 31, 32, 32, 31, 32, 31, 31, 32, 32, 34, 33, 34, 36, 36, 38, 35, 37, 37, 36, 37, 40, 36, 37, 35, 32, 32, 33, 31, 30, 28, 29, 27, 22;
33, 32, 29, 31, 32, 32, 30, 31, 33, 31, 33, 34, 34, 38, 38, 37, 39, 37, 37, 35, 37, 36, 37, 36, 37, 36, 35, 31, 33, 34, 30, 32, 30, 29, 28, 24;
33, 33, 32, 31, 31, 29, 33, 33, 34, 33, 35, 34, 35, 36, 38, 37, 39, 36, 37, 37, 36, 36, 38, 36, 36, 34, 36, 35, 32, 34, 34, 32, 34, 32, 28, 24;
33, 32, 31, 32, 30, 32, 34, 32, 30, 33, 36, 35, 35, 35, 39, 39, 40, 36, 38, 39, 40, 39, 40, 39, 38, 39, 37, 33, 35, 34, 33, 34, 33, 35, 29, 25;
33, 34, 34, 34, 34, 34, 33, 36, 37, 37, 37, 37, 39, 40, 39, 40, 40, 39, 38, 37, 41, 40, 40, 41, 40, 41, 38, 37, 37, 36, 35, 34, 35, 31, 28, 24;
32, 34, 34, 33, 35, 36, 34, 39, 39, 38, 38, 40, 41, 40, 41, 38, 38, 41, 41, 39, 41, 41, 40, 39, 42, 40, 41, 39, 38, 37, 38, 37, 35, 30, 30, 25;
35, 34, 34, 34, 36, 38, 38, 40, 39, 39, 43, 41, 41, 40, 38, 40, 40, 41, 39, 40, 40, 40, 39, 40, 40, 41, 40, 40, 38, 38, 37, 36, 34, 32, 28, 24;
38, 35, 36, 34, 35, 33, 34, 37, 38, 38, 38, 39, 39, 41, 40, 40, 40, 40, 39, 41, 40, 43, 41, 41, 42, 42, 42, 39, 39, 39, 40, 36, 36, 30, 28, 23;
39, 40, 37, 38, 40, 37, 37, 37, 36, 37, 39, 38, 40, 39, 39, 40, 40, 41, 40, 42, 41, 40, 40, 41, 40, 39, 42, 39, 40, 41, 36, 36, 34, 32, 29, 25;
37, 38, 38, 41, 38, 39, 37, 38, 38, 39, 41, 40, 40, 39, 39, 39, 42, 41, 39, 41, 40, 43, 41, 41, 40, 41, 42, 39, 42, 38, 37, 35, 34, 30, 26, 23;
38, 39, 39, 39, 38, 37, 39, 40, 40, 41, 40, 41, 40, 42, 38, 39, 40, 39, 40, 43, 42, 39, 40, 41, 38, 40, 39, 40, 40, 38, 35, 35, 35, 31, 28, 25;
39, 39, 39, 38, 41, 41, 39, 39, 40, 39, 41, 41, 41, 41, 40, 40, 39, 40, 40, 40, 40, 41, 41, 40, 39, 39, 40, 38, 40, 36, 36, 36, 34, 33, 28, 24;
38, 39, 39, 39, 39, 39, 40, 38, 39, 39, 42, 41, 41, 40, 40, 38, 40, 39, 38, 41, 42, 42, 39, 39, 40, 37, 40, 39, 37, 38, 36, 35, 34, 32, 31, 25;
40, 38, 37, 39, 38, 41, 40, 40, 38, 40, 42, 43, 44, 40, 40, 40, 37, 41, 40, 41, 41, 41, 40, 39, 42, 43, 40, 39, 37, 38, 36, 37, 35, 33, 30, 25;
38, 38, 39, 38, 40, 39, 40, 39, 41, 42, 40, 39, 42, 40, 40, 38, 38, 43, 41, 39, 40, 40, 40, 40, 41, 39, 41, 42, 37, 37, 37, 36, 35, 32, 31, 24;
40, 38, 39, 40, 39, 40, 40, 40, 41, 40, 40, 41, 42, 39, 38, 38, 39, 40, 41, 42, 40, 40, 42, 42, 39, 42, 41, 43, 40, 37, 37, 39, 36, 35, 31, 27;
38, 39, 40, 40, 40, 39, 41, 42, 39, 39, 41, 42, 41, 42, 42, 39, 42, 41, 42, 42, 43, 42, 41, 42, 41, 43, 42, 41, 38, 38, 37, 36, 36, 33, 31, 25;
40, 40, 41, 40, 40, 39, 41, 41, 41, 41, 43, 43, 41, 42, 41, 42, 41, 44, 44, 44, 43, 43, 43, 44, 43, 42, 42, 43, 40, 39, 40, 35, 38, 37, 32, 28;
42, 41, 41, 42, 40, 41, 41, 43, 44, 42, 42, 44, 42, 41, 43, 44, 44, 41, 43, 45, 44, 46, 43, 44, 44, 43, 43, 41, 42, 39, 39, 38, 39, 34, 33, 28;
42, 40, 43, 41, 42, 41, 42, 44, 44, 42, 44, 44, 43, 42, 44, 43, 43, 42, 44, 44, 46, 44, 43, 45, 44, 43, 44, 44, 43, 41, 38, 39, 37, 35, 31, 28;
43, 41, 40, 43, 43, 42, 44, 44, 43, 43, 43, 44, 44, 43, 43, 43, 44, 44, 44, 43, 43, 43, 43, 44, 45, 42, 43, 45, 48, 41, 40, 39, 37, 33, 31, 29;
42, 42, 43, 43, 42, 42, 42, 44, 44, 42, 46, 42, 44, 45, 44, 45, 44, 43, 42, 43, 44, 43, 44, 41, 42, 42, 43, 45, 40, 43, 38, 38, 37, 35, 33, 28;
41, 41, 43, 41, 42, 42, 42, 41, 42, 43, 43, 44, 45, 44, 45, 43, 45, 45, 44, 44, 44, 43, 44, 43, 41, 40, 43, 42, 40, 44, 39, 39, 37, 35, 33, 28;
39, 41, 41, 41, 43, 41, 43, 44, 44, 42, 44, 45, 46, 44, 46, 45, 45, 45, 44, 46, 45, 45, 45, 45, 43, 43, 40, 41, 40, 41, 40, 39, 36, 35, 33, 28;
42, 41, 42, 44, 43, 42, 45, 45, 42, 43, 44, 44, 46, 44, 42, 43, 42, 44, 43, 43, 43, 42, 44, 46, 42, 42, 39, 42, 40, 41, 39, 37, 36, 35, 33, 28;
41, 43, 42, 44, 44, 43, 44, 42, 41, 44, 42, 44, 46, 42, 42, 41, 40, 41, 43, 41, 42, 44, 45, 43, 42, 43, 43, 41, 41, 40, 40, 38, 39, 37, 32, 29;
41, 41, 41, 43, 42, 41, 43, 42, 42, 43, 45, 44, 45, 43, 40, 38, 32, 32, 41, 41, 42, 41, 42, 44, 43, 44, 44, 43, 42, 41, 41, 38, 37, 35, 32, 30;
40, 42, 42, 43, 41, 41, 42, 40, 42, 41, 44, 44, 44, 44, 42, 35, 31, 30, 36, 43, 44, 45, 43, 42, 42, 42, 44, 44, 42, 41, 38, 36, 36, 33, 32, 29;
36, 41, 40, 41, 42, 41, 43, 42, 40, 43, 42, 44, 42, 42, 44, 38, 33, 36, 40, 42, 42, 41, 42, 40, 40, 42, 42, 42, 40, 37, 38, 37, 37, 34, 34, 31;
39, 40, 40, 41, 42, 41, 43, 43, 41, 42, 42, 42, 42, 43, 43, 40, 38, 40, 38, 41, 40, 40, 42, 43, 42, 44, 44, 43, 41, 40, 39, 37, 38, 35, 34, 30]
nCols: 24 nRows: 14 maxY : 54 maxX: 52 iniY: 16 iniX: 16 iniThFAST is 20
I double make sure that every number is the same, so FAST has totally the same input. So what could be the problem? Thanks for answer!!