Page 1 of 1

Remove squared artefacts after increasing resolution

Posted: 2019-01-06T04:15:51-07:00
by BigNoub
I'm using Imagemagick 7.0.8-14 on ubuntu 16.04

I have an image that has been upscaled 8 times. As a result, when I zoom in a lot on it, I can see squares of 8x8 pixels, circled here:

Image

Can Imagemagick help me get rid of these? I tried with -kuwahara but I need a high kuwahara value to get rid of the squares, and the high value changes my image too much. So I think I would need something to blur only the edges of these 8x8 squares, or any solution that would not change my image too much.

Here is the original image if you wan to test:

Image

Re: Remove squared artefacts after increasing resolution

Posted: 2019-01-06T04:37:18-07:00
by snibgo
How did you upscale the original image? It's usually better to prevent problems than fixing them after they have occurred.
BigNoub wrote:As a result, when I zoom in a lot on it, I can see squares of 8x8 pixels, ...
You have shown the zoomed-in version, which has blocks of 11x11 repeating pixels. Processing that to remove 8x8 artefacts (which are now 88x88 artefacts) won't work well.
BigNoub wrote:... something to blur only the edges of these 8x8 squares,...
If you know where the edges are, you could do a small blur, then composite that over the original with a mask.

Re: Remove squared artefacts after increasing resolution

Posted: 2019-01-06T06:57:09-07:00
by BigNoub
snibgo wrote: 2019-01-06T04:37:18-07:00 How did you upscale the original image? It's usually better to prevent problems than fixing them after they have occurred.
It was with some neural network technique. I don't have much control over this, the not upscaled picture has been lost.
snibgo wrote: 2019-01-06T04:37:18-07:00 You have shown the zoomed-in version, which has blocks of 11x11 repeating pixels. Processing that to remove 8x8 artefacts (which are now 88x88 artefacts) won't work well.
It's not easy to count but I think the blocks are 8x8 (on the upscaled version I'm talking, see the squares I have circled, they have a side of 8 mini-squares, which I guess are pixels on my upscaled image?).

Re: Remove squared artefacts after increasing resolution

Posted: 2019-01-06T07:08:03-07:00
by snibgo
You show versions that are zoomed in. Do you have a version that isn't zoomed in? Can you show that?

Re: Remove squared artefacts after increasing resolution

Posted: 2019-01-07T03:58:53-07:00
by BigNoub
This is the version that is not zoomed in

Image

Re: Remove squared artefacts after increasing resolution

Posted: 2019-01-07T04:51:28-07:00
by snibgo
Okay. In that red/white checker image, I can't see any 8x8 artefacts, even when zoomed in. The squares are about 43x43 pixels, with detail in each square. Perhaps you want to smooth the detail within each square, while leaving the edges of each square unchanged. This would be adaptive smoothing.

Re: Remove squared artefacts after increasing resolution

Posted: 2019-01-07T05:59:04-07:00
by BigNoub
Wait the host compressed the previous image. This one should be uncompressed: https://drive.google.com/file/d/19NPu0N ... sp=sharing and you should be able to see the 8x8 artifacts such as the ones in my first post.