An intelligent speckle reduction algorithm for optical coherence tomography images