BM3D strange artifacts

asked Sep 19 '19

cm7695 gravatar image

updated Sep 20 '19

LBerger gravatar image

Hello,

i tried the example bm3d_image_denoising.cpp with a grayscale picture in pgm format. The result is strange and has artifacts: there are lines visibile. I don't know what is wrong.

I started the program with the parameters ./bm3d_image_denoising -i=sample.pgm -sigma=55 -o=sample_out.pgm

I know the sigma is high but the problem is still visible for sigma 10 or 15 (but not so good). I sharpened the image and marked the lines with red arrow. Can someone help?

C:\fakepath\sample_out_sharpen.jpg

Preview: (hide)

Comments

1

You should add also the original image.

If you have Matlab, you can also test with the original implementation.

Eduardo gravatar imageEduardo (Sep 19 '19)edit
1

Here is the original image:

sample.jpg

I don't own matlab. But I know the implementation of Marc Lebrun in https://github.com/gfacciol/bm3d

This implementation produces

sample_lebrun.jpg

cm7695 gravatar imagecm7695 (Sep 20 '19)edit

I don't undestand using opencv-4.1.2 results is : image description

LBerger gravatar imageLBerger (Sep 20 '19)edit

You have this problem too. If you sharpen your image, you can see it clearly:

C:\fakepath\sharpened.jpg

cm7695 gravatar imagecm7695 (Sep 20 '19)edit

If you sharpen image, how do you sharpen this image?

LBerger gravatar imageLBerger (Sep 20 '19)edit

If I sharpen an image, it depends on what i want to see. But in this case, i only sharpened the image, such that everybody can see the artifacts. I applied with gimp an inverse diffusion filter with gmic. But it works with an unsharp mask too. Or with a filter of your choice. For example with a deblur filter

C:\fakepath\deblur.jpg

One can see this also without sharpening on good monitors.

cm7695 gravatar imagecm7695 (Sep 20 '19)edit

Maybe an issue in the OpenCV implementation.

If you are lucky, the IPOL and the OpenCV implementations follow strictly the original Matlab code. To debug, input a dummy matrix and compare the outputs at different steps of the two implementations to find the discrepancy.

Eduardo gravatar imageEduardo (Sep 20 '19)edit