Hi Samuele,
Was using your code for experiments and found a failing case. Thought I should let you know.
In the shot.h file you have used these floating point defines
#define DEG_45_TO_RAD 0.78539816339744830961566084581988f
#define DEG_90_TO_RAD 1.5707963267948966192313216916398f
#define DEG_135_TO_RAD 2.3561944901923449288469825374596f
#define DEG_168_TO_RAD 2.7488935718910690836548129603696f
but in the function SHOTDescriptor::interpolateSingleChannel in shot.cpp you use 1e-30 as the width of imprecise region at e.g. line 705. This causes an error for inclination values close to pi/2 degree and cause the assertion on 724 to be falsified.
See https://en.wikipedia.org/wiki/IEEE_754#/media/File:IEEE754.svg for relation between floating point values and their precision. In the given case the imprecise should be about 1e-6 or use double precision constants and imprecise region of 1e-15.
Best regards,
Abhishek
Hi Samuele,
Was using your code for experiments and found a failing case. Thought I should let you know.
In the shot.h file you have used these floating point defines
#define DEG_45_TO_RAD 0.78539816339744830961566084581988f
#define DEG_90_TO_RAD 1.5707963267948966192313216916398f
#define DEG_135_TO_RAD 2.3561944901923449288469825374596f
#define DEG_168_TO_RAD 2.7488935718910690836548129603696f
but in the function SHOTDescriptor::interpolateSingleChannel in shot.cpp you use 1e-30 as the width of imprecise region at e.g. line 705. This causes an error for inclination values close to pi/2 degree and cause the assertion on 724 to be falsified.
See https://en.wikipedia.org/wiki/IEEE_754#/media/File:IEEE754.svg for relation between floating point values and their precision. In the given case the imprecise should be about 1e-6 or use double precision constants and imprecise region of 1e-15.
Best regards,
Abhishek