This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 0bd5967d27831f240bd4e401332ef494d94f60c5 (commit) from b0ae037dbd8678fe2eade3de055b7d120b6dc8d9 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/0bd5967d27831f240bd4e401332ef494d94f6...
commit 0bd5967d27831f240bd4e401332ef494d94f60c5 Author: Cyril Hrubis metan@ucw.cz Date: Fri Sep 27 23:38:33 2013 +0200
doc: filters: Generate Gaussian noise example imgs
* Generate gaussian noise example images
* Update filters and python filters docs accordingly
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/doc/Makefile b/doc/Makefile index 8c2aca6..c07d94a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -32,7 +32,7 @@ $(PAGES): asciidoc.conf # Dependencies # IMG_INCLUDES=images/blur/images.txt images/median/images.txt- images/edge_sharpening/images.txt + images/edge_sharpening/images.txt images/gaussian_noise/images.txt
filters_python.html: $(IMG_INCLUDES) filters.html: $(IMG_INCLUDES) @@ -61,8 +61,6 @@ $(PAGES): %.html: %.txt examples.html: examples.txt ../demos/c_simple/*.c ../demos/py_simple/*.py asciidoc.conf asciidoc $(ASCIIDOC_PARAMS) -a toc examples.txt
-filters.html: filter_additive_gaussian_noise.txt - # # Clean up generated images # diff --git a/doc/filter_additive_gaussian_noise.txt b/doc/filter_additive_gaussian_noise.txt deleted file mode 100644 index 8acba98..0000000 --- a/doc/filter_additive_gaussian_noise.txt +++ /dev/null @@ -1,66 +0,0 @@ -Gaussian additive noise filter -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -[source,c] -------------------------------------------------------------------------------- -#include <GP_Filters.h> -/* or */ -#include <filters/GP_GaussianNoise.h> - -int GP_FilterGaussianNoiseAddEx(const GP_Context *src, - GP_Coord x_src, GP_Coord y_src, - GP_Size w_src, GP_Size h_src, - GP_Context *dst, - GP_Coord x_dst, GP_Coord y_dst, - float sigma, float mu, - GP_ProgressCallback *callback); - -GP_Context *GP_FilterGaussianNoiseAddExAlloc(const GP_Context *src, - GP_Coord x_src, GP_Coord y_src, - GP_Size w_src, GP_Size h_src, - float sigma, float mu, - GP_ProgressCallback *callback); - -static inline int GP_FilterGaussianNoiseAdd(const GP_Context *src, - GP_Context *dst, - float sigma, float mu, - GP_ProgressCallback *callback); - -static inline GP_Context * -GP_FilterGaussianNoiseAddAlloc(const GP_Context *src, - float sigma, float mu, - GP_ProgressCallback *callback); -------------------------------------------------------------------------------- - -Gaussian additive noise filter adds gaussian distributed noise to an image -with a defined sigma and mu. Both sigma and mu are from [0,1] interval. - -TIP: See the link:example_gaussian_noise.html[source code] used to generate - following images. - -.Original Image; Gaussian Additive Noise s=0.01, s=0.02, s=0.05, s=0.7, s=0.1, s=0.05 m=0.1, s=0.05 m=-0.1 -image:images/dither/lenna_small.png[ - "Original Image", - link="images/dither/lenna.png"] -image:images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png[ - "Additive Noise sigma = 0.01 mu = 0.0", - link="images/gaussian_noise/lenna_noise_s_0_01_m_0.png"] -image:images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png[ - "Additive Noise sigma = 0.02 mu = 0.0", - link="images/gaussian_noise/lenna_noise_s_0_02_m_0.png"] -image:images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png[ - "Additive Noise sigma = 0.05 mu = 0.0", - link="images/gaussian_noise/lenna_noise_s_0_05_m_0.png"] -image:images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png[ - "Additive Noise sigma = 0.07 mu = 0.0", - link="images/gaussian_noise/lenna_noise_s_0_07_m_0.png"] -image:images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png[ - "Additive Noise sigma = 0.1 mu = 0.0", - link="images/gaussian_noise/lenna_noise_s_0_1_m_0.png"] -image:images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png[ - "Additive Noise sigma = 0.1 mu = 0.1", - link="images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png"] -image:images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png[ - "Additive Noise sigma = 0.1 mu = -0.1", - link="images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png"] - diff --git a/doc/filters.txt b/doc/filters.txt index c7ed191..ed39486 100644 --- a/doc/filters.txt +++ b/doc/filters.txt @@ -253,7 +253,47 @@ GP_Context *GP_FilterInvert(const GP_Context *src, GP_Context *dst, Inverts the image, for each channel the result value is computed as "chan_max - val".
-include::filter_additive_gaussian_noise.txt[] +Gaussian additive noise filter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[source,c] +------------------------------------------------------------------------------- +#include <GP_Filters.h> +/* or */ +#include <filters/GP_GaussianNoise.h> + +int GP_FilterGaussianNoiseAddEx(const GP_Context *src, + GP_Coord x_src, GP_Coord y_src, + GP_Size w_src, GP_Size h_src, + GP_Context *dst, + GP_Coord x_dst, GP_Coord y_dst, + float sigma, float mu, + GP_ProgressCallback *callback); + +GP_Context *GP_FilterGaussianNoiseAddExAlloc(const GP_Context *src, + GP_Coord x_src, GP_Coord y_src, + GP_Size w_src, GP_Size h_src, + float sigma, float mu, + GP_ProgressCallback *callback); + +static inline int GP_FilterGaussianNoiseAdd(const GP_Context *src, + GP_Context *dst, + float sigma, float mu, + GP_ProgressCallback *callback); + +static inline GP_Context * +GP_FilterGaussianNoiseAddAlloc(const GP_Context *src, + float sigma, float mu, + GP_ProgressCallback *callback); +------------------------------------------------------------------------------- + +Gaussian additive noise filter adds gaussian distributed noise to an image +with a defined sigma and mu. Both sigma and mu weights mapped to [0,1] +interval. + +TIP: See the link:example_gaussian_noise.html[gaussian noise example]. + +include::images/gaussian_noise/images.txt[]
Arithmetic filters ~~~~~~~~~~~~~~~~~~ diff --git a/doc/filters_python.txt b/doc/filters_python.txt index f29cb44..db7eb9d 100644 --- a/doc/filters_python.txt +++ b/doc/filters_python.txt @@ -11,6 +11,27 @@ image is passed automatically as a first parameter. If filter has been aborted from callback 'OSError' with 'errno' set to 'ECANCELED' is raised.
+Gaussian Additive Noise +~~~~~~~~~~~~~~~~~~~~~~~ + +[source,python] +------------------------------------------------------------------------------- +import gfxprim.core as core +import gfxprim.filters as filters + + # Adds Gaussian noise in-place with sigma=0.2 mu=0.0 + filters.GaussianNoiseAdd(img, img, 0.2, 0.0, callback=None) + + # Returns newly allocated noisy image + res = img.filters.GaussianNoiseAddAlloc(0.2, 0.0, callback=None) + +------------------------------------------------------------------------------- + +Gaussian additive noise filter adds gaussian distributed noise to an image +with a defined sigma and mu. Both sigma and mu weights mapped to '[0,1]' +interval. + +include::images/gaussian_noise/images.txt[]
Laplacian Edge Sharpening ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/images/Makefile b/doc/images/Makefile index adc0fe2..76c4501 100644 --- a/doc/images/Makefile +++ b/doc/images/Makefile @@ -1,4 +1,4 @@ -SUBDIRS=blur median edge_sharpening +SUBDIRS=blur median edge_sharpening gaussian_noise
TARGETS=$(addsuffix /images.txt,$(SUBDIRS)) IMGS=$(addsuffix /*.png,$(SUBDIRS)) diff --git a/doc/images/gaussian_noise/images.txt b/doc/images/gaussian_noise/images.txt new file mode 100644 index 0000000..6304c7a --- /dev/null +++ b/doc/images/gaussian_noise/images.txt @@ -0,0 +1,20 @@ +.Example Images: Original Image; Gaussian Additive Noise 0.03 0, 0.05 0, 0.05 -0.1, 0.05 0.1, 0.07 0.0 +image:images/orig/lenna_small.png[ + "Original Image", + link="images/orig/lenna.png"] +image:images/gaussian_noise/lenna_small_0.03_0.png[ + "Gaussian Additive Noise 0.03 0", + link="images/gaussian_noise/lenna_0.03_0.png"] +image:images/gaussian_noise/lenna_small_0.05_0.png[ + "Gaussian Additive Noise 0.05 0", + link="images/gaussian_noise/lenna_0.05_0.png"] +image:images/gaussian_noise/lenna_small_0.05_-0.1.png[ + "Gaussian Additive Noise 0.05 -0.1", + link="images/gaussian_noise/lenna_0.05_-0.1.png"] +image:images/gaussian_noise/lenna_small_0.05_0.1.png[ + "Gaussian Additive Noise 0.05 0.1", + link="images/gaussian_noise/lenna_0.05_0.1.png"] +image:images/gaussian_noise/lenna_small_0.07_0.0.png[ + "Gaussian Additive Noise 0.07 0.0", + link="images/gaussian_noise/lenna_0.07_0.0.png"] + diff --git a/doc/images/gaussian_noise/lenna_0.03_0.png b/doc/images/gaussian_noise/lenna_0.03_0.png new file mode 100644 index 0000000..37cc9f1 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_0.03_0.png differ diff --git a/doc/images/gaussian_noise/lenna_0.05_-0.1.png b/doc/images/gaussian_noise/lenna_0.05_-0.1.png new file mode 100644 index 0000000..94c3474 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_0.05_-0.1.png differ diff --git a/doc/images/gaussian_noise/lenna_0.05_0.1.png b/doc/images/gaussian_noise/lenna_0.05_0.1.png new file mode 100644 index 0000000..8b65db7 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_0.05_0.1.png differ diff --git a/doc/images/gaussian_noise/lenna_0.05_0.png b/doc/images/gaussian_noise/lenna_0.05_0.png new file mode 100644 index 0000000..3564844 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_0.05_0.png differ diff --git a/doc/images/gaussian_noise/lenna_0.07_0.0.png b/doc/images/gaussian_noise/lenna_0.07_0.0.png new file mode 100644 index 0000000..9fce1bf Binary files /dev/null and b/doc/images/gaussian_noise/lenna_0.07_0.0.png differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_01_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_01_m_0.png deleted file mode 100644 index bc12a44..0000000 Binary files a/doc/images/gaussian_noise/lenna_noise_s_0_01_m_0.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png deleted file mode 100644 index ae7fa9d..0000000 Binary files a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0.png deleted file mode 100644 index e62bfa1..0000000 Binary files a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png deleted file mode 100644 index 61cc142..0000000 Binary files a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_07_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_07_m_0.png deleted file mode 100644 index bc33cbe..0000000 Binary files a/doc/images/gaussian_noise/lenna_noise_s_0_07_m_0.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_1_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_1_m_0.png deleted file mode 100644 index abbb1d3..0000000 Binary files a/doc/images/gaussian_noise/lenna_noise_s_0_1_m_0.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_small_0.02_0.png b/doc/images/gaussian_noise/lenna_small_0.02_0.png new file mode 100644 index 0000000..c658937 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_0.02_0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_0.03_0.png b/doc/images/gaussian_noise/lenna_small_0.03_0.png new file mode 100644 index 0000000..067c46d Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_0.03_0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_0.05_-0.1.png b/doc/images/gaussian_noise/lenna_small_0.05_-0.1.png new file mode 100644 index 0000000..38f796c Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_0.05_-0.1.png differ diff --git a/doc/images/gaussian_noise/lenna_small_0.05_0.1.png b/doc/images/gaussian_noise/lenna_small_0.05_0.1.png new file mode 100644 index 0000000..2980d39 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_0.05_0.1.png differ diff --git a/doc/images/gaussian_noise/lenna_small_0.05_0.png b/doc/images/gaussian_noise/lenna_small_0.05_0.png new file mode 100644 index 0000000..e2a7cbb Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_0.05_0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_0.07_0.0.png b/doc/images/gaussian_noise/lenna_small_0.07_0.0.png new file mode 100644 index 0000000..3498915 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_0.07_0.0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png deleted file mode 100644 index 6ea5246..0000000 Binary files a/doc/images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png deleted file mode 100644 index a1e89c1..0000000 Binary files a/doc/images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png deleted file mode 100644 index 55f5165..0000000 Binary files a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png deleted file mode 100644 index 745431a..0000000 Binary files a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png deleted file mode 100644 index d70c7d6..0000000 Binary files a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png deleted file mode 100644 index cb773b6..0000000 Binary files a/doc/images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png and /dev/null differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png deleted file mode 100644 index 82ffaad..0000000 Binary files a/doc/images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png and /dev/null differ diff --git a/doc/images/regen.py b/doc/images/regen.py index cc0e944..b1a8788 100755 --- a/doc/images/regen.py +++ b/doc/images/regen.py @@ -72,5 +72,9 @@ def main(): [[0.1], [0.3], [0.5], [0.8], [1.0]], 'images/edge_sharpening/', 'Edge Sharpening')
+ imggen.gen(filters.GaussianNoiseAddAlloc, + [[0.03, 0], [0.05, 0], [0.05, -0.1], [0.05, 0.1], [0.07, 0.0]], + 'images/gaussian_noise/', 'Gaussian Additive Noise') + if __name__ == '__main__': main()
-----------------------------------------------------------------------
Summary of changes: doc/Makefile | 4 +- doc/filter_additive_gaussian_noise.txt | 66 -------------------- doc/filters.txt | 42 ++++++++++++- doc/filters_python.txt | 21 ++++++ doc/images/Makefile | 2 +- doc/images/gaussian_noise/images.txt | 20 ++++++ ...lenna_noise_s_0_02_m_0.png => lenna_0.02_0.png} | Bin 499974 -> 499974 bytes doc/images/gaussian_noise/lenna_0.03_0.png | Bin 0 -> 534481 bytes doc/images/gaussian_noise/lenna_0.05_-0.1.png | Bin 0 -> 595526 bytes doc/images/gaussian_noise/lenna_0.05_0.1.png | Bin 0 -> 600660 bytes doc/images/gaussian_noise/lenna_0.05_0.png | Bin 0 -> 597194 bytes doc/images/gaussian_noise/lenna_0.07_0.0.png | Bin 0 -> 640739 bytes .../gaussian_noise/lenna_noise_s_0_01_m_0.png | Bin 437216 -> 0 bytes .../gaussian_noise/lenna_noise_s_0_05_m_-0_1.png | Bin 595580 -> 0 bytes .../gaussian_noise/lenna_noise_s_0_05_m_0.png | Bin 597207 -> 0 bytes .../gaussian_noise/lenna_noise_s_0_05_m_0_1.png | Bin 600729 -> 0 bytes .../gaussian_noise/lenna_noise_s_0_07_m_0.png | Bin 640843 -> 0 bytes .../gaussian_noise/lenna_noise_s_0_1_m_0.png | Bin 692490 -> 0 bytes doc/images/gaussian_noise/lenna_small_0.02_0.png | Bin 0 -> 35601 bytes doc/images/gaussian_noise/lenna_small_0.03_0.png | Bin 0 -> 36875 bytes .../gaussian_noise/lenna_small_0.05_-0.1.png | Bin 0 -> 39579 bytes doc/images/gaussian_noise/lenna_small_0.05_0.1.png | Bin 0 -> 39898 bytes doc/images/gaussian_noise/lenna_small_0.05_0.png | Bin 0 -> 39680 bytes doc/images/gaussian_noise/lenna_small_0.07_0.0.png | Bin 0 -> 41654 bytes .../lenna_small_noise_s_0_01_m_0.png | Bin 121712 -> 0 bytes .../lenna_small_noise_s_0_02_m_0.png | Bin 133915 -> 0 bytes .../lenna_small_noise_s_0_05_m_-0_1.png | Bin 152935 -> 0 bytes .../lenna_small_noise_s_0_05_m_0.png | Bin 153507 -> 0 bytes .../lenna_small_noise_s_0_05_m_0_1.png | Bin 154283 -> 0 bytes .../lenna_small_noise_s_0_07_m_0.png | Bin 162795 -> 0 bytes .../gaussian_noise/lenna_small_noise_s_0_1_m_0.png | Bin 174738 -> 0 bytes doc/images/regen.py | 4 + 32 files changed, 88 insertions(+), 71 deletions(-) delete mode 100644 doc/filter_additive_gaussian_noise.txt create mode 100644 doc/images/gaussian_noise/images.txt rename doc/images/gaussian_noise/{lenna_noise_s_0_02_m_0.png => lenna_0.02_0.png} (100%) create mode 100644 doc/images/gaussian_noise/lenna_0.03_0.png create mode 100644 doc/images/gaussian_noise/lenna_0.05_-0.1.png create mode 100644 doc/images/gaussian_noise/lenna_0.05_0.1.png create mode 100644 doc/images/gaussian_noise/lenna_0.05_0.png create mode 100644 doc/images/gaussian_noise/lenna_0.07_0.0.png delete mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_01_m_0.png delete mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png delete mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_05_m_0.png delete mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png delete mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_07_m_0.png delete mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_1_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_0.02_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_0.03_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_0.05_-0.1.png create mode 100644 doc/images/gaussian_noise/lenna_small_0.05_0.1.png create mode 100644 doc/images/gaussian_noise/lenna_small_0.05_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_0.07_0.0.png delete mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png delete mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png delete mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png delete mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png delete mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png delete mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png delete mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.