PJLab-ADG / SensorsCalibration

OpenCalib: A Multi-sensor Calibration Toolbox for Autonomous Driving
Apache License 2.0
2.32k stars 558 forks source link

LSD algorithm #50

Closed WeichuanPan closed 1 year ago

WeichuanPan commented 1 year ago

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) ?

llzc1919 commented 1 year ago

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.