Hi,
I'm using another program that is generating images, however, they have a lot of pixelated noise.
Here is an example: https://cloud.githubusercontent.com/ass ... 9e7c1e.png
Any advice on removing this pattern, or smoothing the image. The only smoothing tool I've seen makes the image too blurry.
smoothing..
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: smoothing..
Well, the image is made of "giant pixels", that are each 8x8 pixels. And even then, the giant pixels are in a patchwork of 2x2.
So "-scale 12.5%" doesn't lose any data. "-resize 12.5%" somewhat merges the 2x2 pattern of giant pixels, so looks better.
Then, if you want, you can "-resize 800%", and then perhaps sharpen the result. Or you might apply more complex processing to identify areas of flat or gradient colour, and edge detail. See my pages "Cartoon and texture", "Flat-colour cartoons", etc.
So "-scale 12.5%" doesn't lose any data. "-resize 12.5%" somewhat merges the 2x2 pattern of giant pixels, so looks better.
Then, if you want, you can "-resize 800%", and then perhaps sharpen the result. Or you might apply more complex processing to identify areas of flat or gradient colour, and edge detail. See my pages "Cartoon and texture", "Flat-colour cartoons", etc.
snibgo's IM pages: im.snibgo.com
Re: smoothing..
I see what you mean.. The 8x8 was just the enlargement of the detail, post processing.... but it's the 2x2 patchwork that is the real problem
I'm guessing that it's rendered at half the size then enlarged without the regard for contour.
50% then 200% resize does help somewhat.
I'm guessing that it's rendered at half the size then enlarged without the regard for contour.
50% then 200% resize does help somewhat.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: smoothing..
So the 8x8 giant pixels are not relevant, but you want to remove the 2x2 patchwork? Okay. The following is Windows BAT script.
First, reduce to 1/8 size:
From my "Cartoon and texture" page, we use cartTextEep.bat to smooth the areas into gradients.
The script has created a mask of the edges, so we use that to paint back the original edges.
The result has the original edge detail, but with the noise smoothed away.
(The differences between the images are clearly seen when they are enlarged.)
First, reduce to 1/8 size:
Code: Select all
%IM%convert screenDots.png -resize 12.5%% sd_small.png
From my "Cartoon and texture" page, we use cartTextEep.bat to smooth the areas into gradients.
Code: Select all
call %PICTBAT%cartTextEep sd_small.png sd_small_XX.png 0.5
The script has created a mask of the edges, so we use that to paint back the original edges.
Code: Select all
%IM%convert ^
sd_small_cart.png ^
sd_small.png ^
sd_small_edges.png ^
-composite ^
sd_small_out.png
The result has the original edge detail, but with the noise smoothed away.
(The differences between the images are clearly seen when they are enlarged.)
snibgo's IM pages: im.snibgo.com