Text this: An Offset Parameter Optimization Algorithm for Denoising in Photon Counting Lidar