The algorithm for Speckle Filtering -> Single Product Speckle Filtering -> Refined Lee is the one given in Lee’s book (J. S. Lee, E. Pottier (2009) “Polarimetric Radar Imaging from basics to applications”). The 7x7 window is used for edge detection. Details can be found on page 150-152 in Chapter 5 in Lee’s book.