add gray image smooth function