C port of C++ laser_finder