This code is working on C++. This code refers to paper : Karabchevsky, Serge, et al. "FPGA-based adaptive speckle suppression filter for underwater imaging sonar." IEEE Journal of Oceanic Engineering 36.4 (2011): 646-657 and also refers to https://www.imageeprocessing.com/2018/06/frost-filter.html