nonMaximumSuppression include three realization of NMS,(matlab,c++,c),also with a demo in them details can be found here