Theoretical correct Gaussian noise image? #19

Open
opened 2024-03-22 12:15:21 +01:00 by Benjamin_Loison · 2 comments

Would like to view these images without a not zero offset.
How to clip between 0 and 255?

Current approach consists in generating all the images we are interested in and then normalize to have the best realistic contrast by linear transformation. However, to avoid not zero offset, I possibly move away from theoretical correct approach by taking maximum between the actual pixel value and 0. Maybe taking the absolute pixel, thanks to np.abs, value would make more sense.

# Is such `np.maximum` probabilistically correct with our theoretical method?

Working only with floats:

  • ease theory
  • TODO

Let us try float image rendering, possibly with unwanted color scales.

PIL with floats keep them but seem to interprete them when rendering between 0 and 255.

Would like to view these images without a not zero offset. How to clip between 0 and 255? Current approach consists in generating all the images we are interested in and then normalize to have the best realistic contrast by linear transformation. However, to avoid not zero offset, I possibly move away from theoretical correct approach by taking maximum between the actual pixel value and 0. Maybe taking the absolute pixel, thanks to `np.abs`, value would make more sense. https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/src/commit/a9adf2d53d786ebcee2ac5ffff01cfbd2ca3c577/datasets/fake/generate_dataset.py#L16 Working only with `float`s: - ease theory - TODO Let us try float image rendering, possibly with unwanted color scales. PIL with `float`s keep them but seem to interprete them when rendering between 0 and 255.
Benjamin_Loison added the
Context-Adaptive Interpolator
label 2024-03-22 12:15:21 +01:00
Author
Owner
help(scipy.ndimage.gaussian_filter)

mode

```py help(scipy.ndimage.gaussian_filter) ``` `mode`
Benjamin_Loison added the
medium
low priority
labels 2024-03-26 02:14:23 +01:00
Author
Owner
https://pillow.readthedocs.io/en/latest/handbook/concepts.html#modes > - `F` (32-bit floating point pixels)
Sign in to join this conversation.
No description provided.