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 c790f88c116700214c4bd14a8d350f302ba12993 (commit)
from 62f5963ad7a384999f52b96a18f5c253cde5290c (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/c790f88c116700214c4bd14a8d350f302ba1…
commit c790f88c116700214c4bd14a8d350f302ba12993
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Jul 22 12:53:12 2012 +0200
doc: Add median filter docs.
diff --git a/doc/filters.txt b/doc/filters.txt
index 68d7180..d15b3aa 100644
--- a/doc/filters.txt
+++ b/doc/filters.txt
@@ -1068,3 +1068,60 @@ image:images/dither/lenna_RGB333_HP_small.png[
"3-bit RGB Hilbert-Peano",
link="images/dither/lenna_RGB333_HP.png"]
+Median
+~~~~~~
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <filters/GP_Median.h>
+/* or */
+#include <GP.h>
+
+int GP_FilterMedianEx(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,
+ int xmed, int ymed,
+ GP_ProgressCallback *callback);
+
+GP_Context *GP_FilterMedianExAlloc(const GP_Context *src,
+ GP_Coord x_src, GP_Coord y_src,
+ GP_Size w_src, GP_Size h_src,
+ int xmed, int ymed,
+ GP_ProgressCallback *callback);
+
+int GP_FilterMedian(const GP_Context *src,
+ GP_Context *dst,
+ int xmed, int ymed,
+ GP_ProgressCallback *callback);
+
+GP_Context *GP_FilterMedianAlloc(const GP_Context *src,
+ int xmed, int ymed,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Constant time median filters (the computational complexity is independent of
+radius size).
+
+The xmed and ymed are radius values for x and y. The algorithm uses xmed
+respectively ymed pixel neighbors from each side so the result is median of
+rectangle of 2 * xmed + 1 x 2 * ymed + 1 pixels.
+
+.Original Image; Median 3x3, 5x5, 7x7, 9x9
+image:images/dither/lenna_small.png[
+ "Original Image",
+ link="images/dither/lenna.png"]
+image:images/median/lenna_small_med_3_3.png[
+ "Median 3x3",
+ link="images/median/lenna_med_3_3.png"]
+image:images/median/lenna_small_med_5_5.png[
+ "Median 5x5",
+ link="images/median/lenna_med_5_5.png"]
+image:images/median/lenna_small_med_7_7.png[
+ "Median 7x7",
+ link="images/median/lenna_med_7_7.png"]
+image:images/median/lenna_small_med_9_9.png[
+ "Median 9x9",
+ link="images/median/lenna_med_9_9.png"]
+
diff --git a/doc/images/median/lenna_med_3_3.png b/doc/images/median/lenna_med_3_3.png
new file mode 100644
index 0000000..abbc202
Binary files /dev/null and b/doc/images/median/lenna_med_3_3.png differ
diff --git a/doc/images/median/lenna_med_5_5.png b/doc/images/median/lenna_med_5_5.png
new file mode 100644
index 0000000..f205d49
Binary files /dev/null and b/doc/images/median/lenna_med_5_5.png differ
diff --git a/doc/images/median/lenna_med_7_7.png b/doc/images/median/lenna_med_7_7.png
new file mode 100644
index 0000000..5b11b19
Binary files /dev/null and b/doc/images/median/lenna_med_7_7.png differ
diff --git a/doc/images/median/lenna_med_9_9.png b/doc/images/median/lenna_med_9_9.png
new file mode 100644
index 0000000..f068dbb
Binary files /dev/null and b/doc/images/median/lenna_med_9_9.png differ
diff --git a/doc/images/median/lenna_small_med_3_3.png b/doc/images/median/lenna_small_med_3_3.png
new file mode 100644
index 0000000..eef311d
Binary files /dev/null and b/doc/images/median/lenna_small_med_3_3.png differ
diff --git a/doc/images/median/lenna_small_med_5_5.png b/doc/images/median/lenna_small_med_5_5.png
new file mode 100644
index 0000000..fca6ab4
Binary files /dev/null and b/doc/images/median/lenna_small_med_5_5.png differ
diff --git a/doc/images/median/lenna_small_med_7_7.png b/doc/images/median/lenna_small_med_7_7.png
new file mode 100644
index 0000000..8ba3aab
Binary files /dev/null and b/doc/images/median/lenna_small_med_7_7.png differ
diff --git a/doc/images/median/lenna_small_med_9_9.png b/doc/images/median/lenna_small_med_9_9.png
new file mode 100644
index 0000000..0eec833
Binary files /dev/null and b/doc/images/median/lenna_small_med_9_9.png differ
diff --git a/include/filters/GP_Median.h b/include/filters/GP_Median.h
index 891ae70..0547793 100644
--- a/include/filters/GP_Median.h
+++ b/include/filters/GP_Median.h
@@ -22,12 +22,12 @@
/*
- Constant time Median Filter (the computational complexity is independend of
+ Constant time Median Filter (the computational complexity is independent of
radius).
The xmed and ymed are radius values for x and y. The algorithm uses xmed
- respectively ymed pixel neighbours from each side so the result is median
- of rectangle of 2 * xmed + 1 x 2 * ymed + 1 pixels.
+ respectively ymed pixel neighbors from each side so the result is median of
+ rectangle of 2 * xmed + 1 x 2 * ymed + 1 pixels.
*/
-----------------------------------------------------------------------
Summary of changes:
doc/filters.txt | 57 +++++++++++++++++++++++++++++
doc/images/median/lenna_med_3_3.png | Bin 0 -> 331859 bytes
doc/images/median/lenna_med_5_5.png | Bin 0 -> 275419 bytes
doc/images/median/lenna_med_7_7.png | Bin 0 -> 241894 bytes
doc/images/median/lenna_med_9_9.png | Bin 0 -> 218719 bytes
doc/images/median/lenna_small_med_3_3.png | Bin 0 -> 89004 bytes
doc/images/median/lenna_small_med_5_5.png | Bin 0 -> 74908 bytes
doc/images/median/lenna_small_med_7_7.png | Bin 0 -> 66044 bytes
doc/images/median/lenna_small_med_9_9.png | Bin 0 -> 59615 bytes
include/filters/GP_Median.h | 6 ++--
10 files changed, 60 insertions(+), 3 deletions(-)
create mode 100644 doc/images/median/lenna_med_3_3.png
create mode 100644 doc/images/median/lenna_med_5_5.png
create mode 100644 doc/images/median/lenna_med_7_7.png
create mode 100644 doc/images/median/lenna_med_9_9.png
create mode 100644 doc/images/median/lenna_small_med_3_3.png
create mode 100644 doc/images/median/lenna_small_med_5_5.png
create mode 100644 doc/images/median/lenna_small_med_7_7.png
create mode 100644 doc/images/median/lenna_small_med_9_9.png
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")