I was confused about the definition of variable log1term in function LineSegmentDetector::nfa of LSD.cpp, shouldn it be log_gamma(double(n) + 1) - log_gamma(double(k) + 1) - log_gamma(double(n - k) + 1) + double(k) log(p) + double(n - k) log(1.0 - p) ?
Oh, You're right. Here should be log_gamma(double(n) + 1). Cause nfa kind of works as threshold in rectangle improver so the error is not that significant. Thank you for pointing this out! We will update later.
I was confused about the definition of variable log1term in function LineSegmentDetector::nfa of LSD.cpp, shouldn it be log_gamma(double(n) + 1) - log_gamma(double(k) + 1) - log_gamma(double(n - k) + 1) + double(k) log(p) + double(n - k) log(1.0 - p) ?