Method of denoising for the image generated by Monte Carlo ray tracing preserving small details