# Fractals/Image noise

< Fractals

Jump to navigation
Jump to search
Image noise ^{[1]}

- set of all pixels which are not rendered properly
- "aberrant pixels. That means pixels that are not representing the colour ... correctly. " Barry J Brady
^{[2]}

Noise can be in different situations. Here only noise in the rendered images is incuded. So there is no original image^{[3]}, no photo, no signal, ...

## Contents

# types[edit]

## Moire patterns[edit]

"A uniform grid is known to produce Moire patterns from the interaction of thin near-parallel lines with the regularly spaced sampling points."^{[4]}

## aliasing[edit]

" Our images look noisy and grainy near the boundary of the Mandelbrot set. The escape time bands get closer and closer, while the pixel spacing is fixed. The pixel grid samples isolated points of a mathematically abstract image defined on the continuous plane. The Nyquist-Shannon sampling theorem shows that sampling isolated points from a continuum is a valid approximation only so long as the values don’t change too quickly between the points. Aliasing occurs when the values do change too quickly compared to the sampling rate, with the grainy noisy visual effects as we have been. Because the escape time bands increase in number without bound as we approach the boundary of the Mandelbrot set, no sampling rate can be high enough." Claude Heiland-Allen^{[5]}

# How to[edit]

## detect noise[edit]

"To detect noise you first need to know the properties of your useful data. So if you have no prior knowledge of the input images then you Can not reliably detect noise." Spektre^{[6]}

## measure noise[edit]

- "an objective measurement for image quality based on" the structural similarity
^{[7]} - noise rate = number of pixels that were recognized as noise. "To differentiate normal pixels from noise, I just calculated the medium value of its neighbor pixels and if its value was bigger than some critical value, we say that this one is noise."
^{[8]} - " Instead of classifying a pixel as noise if it exceeds such a threshold, you could measure the "error" and compute the variance or standard deviation for all of the pixels in the image. This would help you distinguish between having n pixels just above the threshold and n pixels way out whack. It also avoids the need to select a threshold." Adrian McCarthy
- estimate the noise variance
^{[9]}If you get sigma > 10.0, then you have a noisy image ( only for grayscale)

```
// https://stackoverflow.com/questions/8960462/how-can-i-measure-image-noise
// noise rate by Vitalii Boiarskyi
if (ABS(1 - (currentPixel.R+currentPixel.G+currentPixel.B)/(neigborsMediumValues.R + neigboursMediumValues.G + neigboursMediumValues.B))) > criticalValue)
then
{
currentPixelIsNoise = TRUE;
}
```

```
# https://stackoverflow.com/questions/2440504/noise-estimation-noise-measurement-in-image
# J. Immerkær, “Fast Noise Variance Estimation”, Computer Vision and Image Understanding, Vol. 64, No. 2, pp. 300-302, Sep. 1996
import math,
import numpy as np
from scipy.signal import convolve2d
def estimate_noise(I):
H, W = I.shape # Tuple of image array dimensions.
M = [[1, -2, 1],
[-2, 4, -2],
[1, -2, 1]]
sigma = np.sum(np.sum(np.absolute(convolve2d(I, M))))
sigma = sigma * math.sqrt(0.5 * math.pi) / (6 * (W-2) * (H-2))
return sigma
```

## remove noise[edit]

### precision[edit]

- increasing precision

### sampling[edit]

- increasing sampling (subpixel accuracy )
- jittering the sampling points
^{[10]}

### postprocessing[edit]

- with Image Magic
^{[11]}

### mask[edit]

- mask the grainy noise from aliasing ( fading-out)

# Examples[edit]

## glitches[edit]

glitches

- Incorrect parts of renders
^{[12]}using perturbation techique - pixel which dynamics differ significantly from the dynamics of the reference pixel
^{[13]}

How to detect glitches:

- heuristic developed by Pauldelbrot ( most common)
^{[14]} - heuristic using interval arithmetic developed by knighty
^{[15]}

How to choose reference point ( by Claude):

- simple method: "take the first reference to be the center of the image, and correct any glitches that result (including those resulting from the reference escaping too early) by adding more references within the glitches, recalculating only those pixels that need it. A simple approach can still yield accurate results, albeit in less than optimal time"
- " trying periodic points (the nuclei of the minibrot islands deep in the set) and preperiodic points (the Misiurewicz points at the centers of spirals), both of which can be found by Newton's method (finding their (pre)periods is a bit harder, but not impossible). Higher-period "structural" minibrot nuclei seem to be the most favoured as they are relatively easy to find while also emitting fewer glitched pixels than lower period nuclei"

Locations:

- "a minibrot near -2+0i at very deep zooms, chances are you'll end up with a Moire mess of stars, instead of concentric rings of rays (because the rays will be regularly spaced finer than the pixel spacing, leading to interference)."

# See also[edit]

**Dither**is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images.^{[16]}^{[17]}**Jitter**is an- Jittered grid in supresampling = "random displacements of the center of the pixel withing the square of the actual pixel" ( Gerrit)
^{[18]} - variation of a periodic item
^{[19]}

- Jittered grid in supresampling = "random displacements of the center of the pixel withing the square of the actual pixel" ( Gerrit)

# References[edit]

- ↑ wikipedia: Image noise
- ↑ digital-photography-school : how-to-avoid-and-reduce-noise-in-your-images
- ↑ scikit-image.org docs: denoise
- ↑ fractalforums.org : jitter-for-moire-reduction
- ↑ mandelbrot-book: noise
- ↑ stackoverflow question: javascript-image-noise-detection
- ↑ Image Quality Assessment: From Error Visibility to Structural Similarity by Zhou Wang, at al.
- ↑ stackoverflow question: how-can-i-measure-image-noise
- ↑ stackoverflow question : noise-estimation-noise-measurement-in-image
- ↑ fractalforums.org: jitter-for-moire-reduction
- ↑ fractalforums.org: analytic-logde-post-processed-with-imagemagick
- ↑ dinkydauset at deviantar :Perturbation-for-the-Mandelbrot-set-450766847
- ↑ math.stackexchange question: selecting-reference-orbit-for-fractal-rendering-with-perturbation-theory
- ↑ fractalforums " pertubation-theory-glitches-improvement
- ↑ fractalforums : *continued*-superfractalthing-arbitrary-precision-mandelbrot-set-rendering-in-ja/msg91505/#msg91505
- ↑ Dither in wikipedia
- ↑ Marek Fiser: Is-16-million-colors-enough
- ↑ fractalforums.org: are-the-mandelbrot-sets-generated-different-in-appearance-to-the-actual-set
- ↑ Jitter in wikipedia