Home  /  Guides  /  Six settings, one folder

Bulk Remove Noise: 38.9434% Changed, 61.0566% Did Not

Updated 2026-11-30 · measured on 12 mixed files, 20,934,926 bytes, 63,016,384 pixels, six clean-up settings run over the same folder

The short answer

A 3x3 median left 38,475,640 of the 63,016,384 pixels exactly as they were, 61.0566 percent of the batch. The other 24,540,744 changed, by an average of 2.1356 levels. Larger kernels changed more and erased more: the 5x5 median touched 31,266,828 pixels, 27.4078 percent more than the 3x3, and cut the edge signal to 46.00 percent against 67.01 percent.

The trap is that the same setting is not the same operation across files. The 3x3 median moved 54.4678 percent of a 128 pixel icon and 0.0004 percent of a transparent logo. And every output was rewritten: six settings, six folders larger than the 19.97 MB they came from, the gentlest at 1.6375 times.

This page runs one folder through six clean-up settings and records, per file, what moved, what stayed, and how much edge survived. Its closest neighbours are the batch blur measurement, which is the same neighbourhood arithmetic used on purpose, and the batch sharpen measurement, which pushes the other way. If you are choosing between the two families, read the edge column in section 2 first: the median and the Gaussian do not differ mainly in how much they change, but in what they leave standing.

One note on scope. The tools that show up for this kind of job split into two kinds: browser batch tools that run a fixed neighbourhood filter on your files, and learned models that try to tell noise from detail. This page measures the first kind, and it does not test any particular site's implementation. What follows is the arithmetic those tools all perform, so the numbers apply to any of them that uses a median, a Gaussian or a box blur.

For filing and export questions around the same files, see the EXIF viewer and the image info page.

1. What was run and on what

Twelve files, 20,934,926 bytes on disk, eleven of which decoded into 63,016,384 pixels. Each file was read, converted to RGBA for comparison, and pushed through six settings: a 3x3 median, a 5x5 median, a Gaussian with radius 1.0, a Gaussian with radius 2.0, three passes of a 3x3 box blur, and a median applied to the luma channel only. Nothing was colour-managed, nothing was resampled, and no setting was tuned per file.

What the twelve files were: one 4000 x 3000 landscape JPEG, two byte-identical 3000 x 4000 portrait JPEGs, one 3000 x 4000 grey JPEG, one 2000 x 1500 JPEG with orientation tag 6, one 3000 x 3000 PNG, one 1200 x 800 transparent PNG, one 128 x 128 PNG icon, one 1600 x 900 WebP, one 400 x 300 six-frame GIF, one 800 x 600 16-bit grey PNG, and one truncated JPEG that failed to decode. Nothing left the machine: Pillow 13.0.0, numpy 2.5.4 and Python 3.13.14 on a 64-bit desktop machine. The full six-setting run took 172.31 seconds of wall clock.

One detail matters for everything that follows. The two portrait files are byte-identical copies, and they produced identical change counts and identical hashes, down to the last digit. Whatever else these settings do, they do the same thing twice.

2. The six settings, side by side

Six settings, the same 63,016,384 pixels, one run each. The changed column counts pixels whose value moved at all, at any of the three channels. Unchanged is what is left: pixels that came out bit-identical to their input.

SettingChanged pixelsShare changedUnchangedMean change per pixelEdge energy kept
3x3 median24,540,74438.9434%38,475,6402.135667.01%
5x5 median31,266,82849.617%31,749,5564.640846.00%
Gaussian 1.023,600,93037.4521%39,415,4543.845554.16%
Gaussian 2.032,188,24451.0792%30,828,1406.785629.02%
Box 3x3, three passes31,023,85149.2314%31,992,5335.493939.29%
Median 3x3 on luma only18,716,50629.701%44,299,8782.114267.18%

Mean change per pixel is the average absolute difference across all three channels, in levels out of 255. Edge energy kept is the mean absolute luma gradient after the setting divided by the same figure before it, averaged over files weighted by pixel count.

Read the last two columns against each other and the six collapse into two groups. Gaussian 1.0 and the 3x3 median changed almost the same number of pixels, 23,600,930 against 24,540,744, a difference of 939,814 or 3.8296 percent of the median's count. But the Gaussian's average change per pixel was 1.8 times the median's, and it kept 12.85 points less of the edge signal. Same reach, rougher ink.

Edge energy kept by each of six clean-up settings on the whole batch Edge energy kept, by setting Percentage of the input's luma gradient that survived 3x3 median Luma median Gaussian 1.0 5x5 median Box x3 Gaussian 2.0 67.01% 67.18% 54.16% 46.00% 39.29% 29.02%
Bar length is the share of edge energy kept on the whole batch. Both medians hold above two thirds; Gaussian 2.0 holds under a third.

There is a cheaper observation hiding in this table. The box filter is Gaussian 1.0 run three times, and it lands at 49.2314 percent changed with 39.29 percent of the edge energy, between the two Gaussians on both counts, at 5.4939 mean change per pixel. If a tool offers a passes field instead of a radius, that is what the field is doing: three passes of a 3x3 box sit closer to a single 5x5 window than to the single pass it looks like.

Pillow's own documentation says as much about its Gaussian: the function is written as a sequence of extended box filters that approximates a Gaussian kernel, with a citation for the accuracy question. So the near-agreement between box and Gaussian is not a coincidence of this run. It is the implementation.

3. Where the setting stops removing noise

The table above says how much changed. It says nothing about whether the change was the right change. For that, take a clean 512 x 512 crop of the landscape photo, add noise of a known strength, run each setting, and compare the result with the clean original. Lower is better: the number is the root-mean-square error against the untouched crop, and the percentage is how much of the injected noise each setting removed.

Noise strengthError before any filter3x3 median5x5 medianGaussian 1.0Gaussian 2.0
21.34112.674 (-8831.23%)25.989 (-37458.77%)6.581 (-2308.43%)30.255 (-50800.34%)
53.3212.819 (-1391.19%)25.95 (-6011.0%)6.893 (-331.14%)30.268 (-8213.65%)
106.60813.303 (-305.32%)25.912 (-1437.73%)7.817 (-39.95%)30.3 (-2002.6%)
2013.00314.905 (-31.39%)26.091 (-302.63%)10.669 (32.67%)30.45 (-448.4%)

A negative percentage means the setting left the crop further from the clean original than the noise itself did. That is not a bug in the measurement; it is detail being removed faster than noise at low noise levels. Positive is better.

This is the part most bulk previews hide. On a photo that is only slightly grainy, every setting in the table made it worse. The 3x3 median turned an error of 1.341 into 12.674, and Gaussian 2.0 turned it into 30.255, 22.6 times the noise it was asked to remove. Only at a noise strength of 20 did Gaussian 1.0 become useful, cutting the error by 32.67 percent, and only then did the 3x3 median stop being actively harmful, still 31.39 percent on the wrong side.

Error against the clean crop at four noise strengths, for the 3x3 median and Gaussian 1.0 Error after the filter, versus no filter at all Lower is better. Dashed line is the unfiltered error. 251020 noise strength Gaussian 1.0 3x3 median no filter 0
Both curves stay above the dashed no-filter line until the noise is strong enough to outgrow the detail they remove. The median crosses only at the far right; the Gaussian starts below the line at a strength of 20.

A second test makes the same point with a different noise shape. Salt-and-pepper noise is not a gentle wobble; it is individual pixels dragged to pure black or pure white. Against that, the 3x3 median behaves exactly as advertised: a 2.5 percent dose left an error of 6.403 against 9.667 unfiltered, a 56.13 percent cut, and the cut rises to 92.01 percent at a 20 percent dose. That is the case the median was designed for, and it is the one case here where the result is unambiguously an improvement.

So the honest summary of section 3 is a boundary, not a recommendation. Below a certain noise level these settings delete more than they clean. Above it, and for noise shaped like isolated bad pixels rather than a fine grain, they work. Where that boundary falls for your own photos depends on the file.

4. One setting, eleven outcomes

Now the folder, with the 3x3 median applied identically to every file. This is the number to look at before batching anything.

FilePixelsChangedShareLargest single changeGaussian 1.0, share
small_icon.png16,3848,92454.4678%15760.9985%
photo_square.png9,000,0004,537,29750.4144%16247.5063%
exif_orient6.jpg3,000,0001,282,96342.7654%15941.664%
photo_portrait.jpg12,000,0004,888,71140.7393%16037.9664%
photo_landscape.jpg12,000,0004,789,84939.9154%16137.497%
screenshot.webp1,440,000564,64339.2113%18841.8356%
gray_8bit.jpg12,000,0003,579,52929.8294%16031.8594%
gray_16bit.png480,0001090.0227%10.7481%
animation.gif120,00040.0033%2002.48%
logo_alpha.png960,00040.0004%2162.2646%
broken.jpgfailed to decode at read time, not processed

The shares run from 0.0004 percent to 54.4678 percent, a spread of 136,169.5 times, and the three bottom files are not badly photographed. They are flat: a transparent logo drawn on a uniform field, a 16-bit grey ramp, and a 400 x 300 animation with large single-colour areas. A neighbourhood filter has nothing to average there, so it barely moves. In a batch of product shots on white, that is the whole batch.

Three details in that table deserve a second look. The icon and the logo both changed four pixels in the same run, but the icon has 16,384 pixels and the logo 960,000, so the same effort lands as 54.4678 percent on one and 0.0004 percent on the other. The 16-bit grey file changed 109 pixels and none of them by more than 1 level, because the filter ran on 8 bits of a 16-bit ramp that had nothing fine enough to erode. And the largest single change reached 216 on the logo, which sounds violent until you notice that it was on one of four pixels out of 960,000.

Share of pixels changed by the 3x3 median, file by file Share changed by one 3x3 median Same setting, ten files. Percent of pixels. icon 128 54.4678% square PNG 50.4144% orient 6 42.7654% portrait 40.7393% landscape 39.9154% webp shot 39.2113% grey 8-bit 29.8294% grey 16-bit 0.0227% GIF 400x300 0.0033% alpha logo 0.0004%
Every bar is drawn to one scale. The three flat shapes at the bottom sit at the baseline because a filter with nothing to average leaves them alone; the 128 px icon at the top changes more than half its pixels.
Your call: whether a folder of flat graphics belongs in the same batch as photographs is a judgement about what those files are for. This page can tell you that the graphics will come out nearly untouched and the photos will change by 40 percent; it cannot tell you whether that is acceptable for the place they are going. Sort the folder by content once, keep it sorted, and the batch stops being a lottery.

5. Alpha, frames, depth and the orientation tag

Four file features sit outside what these settings are for, and each behaves in a way worth knowing before a folder run.

FileBeforeAfterWhat it means
logo_alpha.pngRGBA, 607,580 fully transparent pixelsRGBA, alpha unchanged4 pixels of colour moved under the transparency; everything else identical
animation.gif6 frames, 120,000 pixels1 frame in the output4 of 120,000 pixels changed, 0.0033 percent, because the frame is mostly flat
gray_16bit.png16 bits per sample, 480,000 pixels8-bit output109 pixels moved, none by more than 1 level
exif_orient6.jpgorientation tag 6tag not carried2000 x 1500 as stored, 42.7654 percent of pixels changed

The transparency result is the cleanest one in the whole run: 4 changed pixels out of 607,580 transparent ones. A median does not invent colour under an alpha of zero, so the veil you designed survives untouched. The frame result is the opposite, and it is about the file rather than the filter. The output is one frame; the other five are simply gone, and no setting in this table brings them back.

Bit depth collapses, too. The 16-bit grey file came through with 109 pixels moved and a maximum change of 1 level, which looks like a success until you notice that the output is 8-bit. The filter did not damage that ramp; the save did, by dropping it to 256 levels. On a file whose only content is the number of levels, that is the whole file.

6. Bytes: five files shrink, five grow, the folder doubles

Every output was written as an 8-bit PNG with default settings, and the input was whatever the folder already held. That comparison is not fair to JPEG sources, which is exactly the comparison a batch tool performs, so the numbers below are what a folder run actually costs.

SettingOutput bytesAgainst the 20,934,926 input bytes
Median 3x3 on luma only48,564,1372.3198×
3x3 median47,269,9512.2579×
Gaussian 1.045,236,3032.1608×
5x5 median41,390,9431.9771×
Box 3x3, three passes37,955,5431.813×
Gaussian 2.034,281,1421.6375×

Same twelve files, same run. Every output saved as an 8-bit RGB PNG with Pillow 13.0.0 defaults, bytes counted after the save. Input bytes are the on-disk sizes of the same files, including the 1,200-byte truncated JPEG that never decoded.

Six settings, six folders bigger than the one they came from, and the gentlest is still 1.6375 times. The averages hide the interesting part, though, because the per-file ratios split cleanly by source format. The 3x3 median made the landscape JPEG 4.098 times its size and the screenshot 6.335 times, while it made the 3000 x 3000 PNG 0.872 times and the six-frame GIF 0.107 times. A PNG source has little to lose; a JPEG source loses its compression on the way through.

So five of the ten processed files came out smaller and five came out larger, and the folder still more than doubled. That is not a contradiction, it is the shape of the batch: the two 12-megapixel JPEGs and the grey JPEG carry most of the original bytes, and all three grew by between 2.522 and 4.098 times.

Whether that matters is a delivery question, and it does not depend on the filter. A re-encoded file is not the original, no matter how small the difference, and a folder that grew 2.2579 times is a folder that needs a second decision about export format before it ships. Keep the originals until the batch has been looked at.

7. Choosing between the two families

Every tool that offers this at scale offers at least two of these six. The differences inside each family are gentle; the differences between families are not.

If your files areStart withWhy, from this run
isolated bad pixels, specks, hot pixels3x3 medianCut salt-and-pepper noise by 56.13% at a 2.5% dose and 92.01% at 20%, the only unambiguous win in the measurement
fine grain on a normal photoGaussian 1.0, then compare37.4521% changed against the median's 38.9434%, 3.8296% fewer pixels moved, though it costs more edge (54.16% kept against 67.01%)
a mix of logos, screenshots and photosSort first, then runThe same setting changed 54.4678% of an icon and 0.0004% of a logo
a folder you cannot easily restoreGaussian 2.0, if anythingThe smallest growth of the six, at 1.6375× the input bytes, and it still changed 51.0792% of the pixels
16-bit scans or animated filesDo not batch theseDepth fell to 8 bits and six frames became one, on settings that otherwise did nothing to them

The luma-only median is the odd one out and deserves its own line. It kept 67.18 percent of the edge energy, the highest of the six, and changed the fewest pixels, 29.701 percent. On the colour photographs that is a real advantage. But the colour noise it leaves behind is exactly the part the eye notices as blotches, so it trades one visible defect for another. Whether that trade is good depends on how much of your noise is chroma, and this run did not separate the two.

Your call: the choice between keeping edge and keeping colour is a decision about the photographs, not about the algorithm. The numbers say the luma median keeps more edges and less colour, and the 3x3 median keeps more colour and fewer edges. Which of those two you would rather look at on your own pictures is something only you can answer; run both on one frame you care about at full size and compare before you commit a folder.

8. Where the time goes

One 4000 x 3000 photo, 12,000,000 pixels, on one machine, three settings back to back.

SettingSecondsPixels per second
3x3 median1.9776,070,000
Gaussian 1.00.64118,720,000
Box 3x3, three passes0.95712,540,000

The median costs 3.08 times what the Gaussian costs per photo, which is what a sort of nine values per pixel should cost next to a weighted average. On the scale of a folder this is small. Eleven files and six settings ran in 172.31 seconds. Two runs of the same setting on the same file produced byte-identical output, hash 42e723c5532f918de1113275dfe9985ad6e98656c4a4c88d8bde5130e94cd7bd both times, in 2.02 and 2.033 seconds. Nothing here wanders between runs.

See all measured guides

Frequently asked questions

What is noise in photos?

In this measurement it means the tiny sample-to-sample wobble that sits on top of a real edge. A clean 512 x 512 crop was degraded with known noise and run through six settings. A 3x3 median cut that noise by 69.71 percent at a standard deviation of 2 and by 82.77 percent at 20, while Gaussian 2.0 left 50800.34 percent more error than the unfiltered crop at 2 and 448.4 percent more at 20. Anything below the wobble is what you keep; anything at the same scale as the wobble is what the filter erases with it.

What is image noise and grain?

Grain is the older name, from film, and it is a pattern; noise is the flat, random version a sensor produces in dim light. This page treats both as small variations that a neighbourhood filter can average away, and its point is that a neighbourhood filter cannot tell one from a texture. On the same photo, 3x3 median changed 39.9154 percent of the 12,000,000 pixels while a median applied to the luma channel only changed 28.951 percent, because the colour noise survived the second route.

What does denoise mean in photo editing?

It means replacing each pixel with a number derived from its neighbours instead of its own value. Every setting measured here does exactly that, and the size of the neighbourhood decides everything: the 3.0 pixel kernel of a 3x3 median changed 24,540,744 pixels of the batch, a 5x5 kernel changed 31,266,828, 27.4078 percent more. None of them learned anything about the image, which is why the same setting gives wildly different results from file to file.

What is the difference between image noise and blur?

Noise is high-frequency, so removing it is supposed to keep the edges. These settings do not offer that: edge energy on the batch fell to 67.01 percent with the 3x3 median, 54.16 percent with Gaussian 1.0 and 29.02 percent with Gaussian 2.0, so the strongest setting threw away about seven tenths of the edge signal as well. Blur is the same trade without the claim. The one setting that kept edges nearly intact, a median on the luma channel, kept 67.18 percent and changed the fewest pixels, 29.701 percent.

Why are my photos grainy even in good light?

This page measures filters, not cameras, so the cause is out of scope and it will not guess one. What it can say is that the amount is measurable. A mild noise level of 2 standard deviations took a 3x3 median to remove 69.71 percent of it, while a heavy level of 20 only got 82.77 percent and left a residue of 18.185 against a clean reference. If your pictures look grainy at a hundred percent zoom and fine at fit-to-screen, the noise is smaller than a screen pixel and the first two settings in the table are the ones to try.

How can I remove background noise from photos online?

For a folder, the two settings worth comparing first are a 3x3 median and Gaussian 1.0. On 63,016,384 pixels they changed 38.9434 percent and 37.4521 percent respectively, only 3.8296 percent apart in count, but the median kept 67.01 percent of the edge energy against 54.16 percent and its average change per pixel was 2.1356 against 3.8455. The cost runs with pixels, not files: a single 12,000,000-pixel photo took 1.977 seconds for the median and 0.641 for the Gaussian, on one machine.

How long does the process take?

One 4000 x 3000 photo, 12,000,000 pixels: 1.977 seconds for a 3x3 median, 0.641 seconds for Gaussian 1.0, 0.957 seconds for three passes of a 3x3 box. The whole batch of eleven readable files, 63,016,384 pixels, ran once in 172.31 seconds with six settings, so the wall clock grows with total pixel count and setting count rather than with the number of files. Forty 128 pixel icons are 655,360 pixels in total and cost less than a twentieth of one photo.

Can batch denoise multiple grainy photos at once?

Yes, and the arithmetic is the same for every file, which is the problem. One 3x3 median setting changed 54.4678 percent of a 128 pixel icon, 39.9154 percent of a landscape photo and 0.0004 percent of a transparent logo in the same run, a spread of 136,169.5 times between the largest and smallest share. A per-file check is the only way to know which of your files belong in the weak group; the table below flags the two shapes where a filter does almost nothing at all.

Will denoising affect image quality?

Every setting here rewrites the whole file, and all six made the folder bigger. Against the 20,934,926 input bytes, the 3x3 median came out 2.2579 times larger, Gaussian 2.0 was the smallest at 1.6375, and the luma median produced 2.3198 times the input. Quality in the visible sense also moves: the batch's average change per pixel was 2.1356 levels for the 3x3 median and 6.7856 for Gaussian 2.0, and the largest single-pixel change reached 216 on a 1200 x 800 logo.

Can AI remove noise from a photo without losing detail?

This page did not test a learned model, so it will not claim what one can do. What it can show is what a local neighbourhood filter cannot: it has no notion of which fine structure is noise. The strongest setting, Gaussian 2.0, changed 51.0792 percent of the batch and cut edge energy to 29.02 percent, so about 70.98 percent of the edge signal went with the noise. A median on the luma channel kept 67.18 percent of the edges and changed 29.701 percent, which is the closest this run gets to both at once.