[gimp-gap/gap-2-8] applied fix as suggested at bugreport #723818
- From: Wolfgang Hofer <wolfgangh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-gap/gap-2-8] applied fix as suggested at bugreport #723818
- Date: Sat, 15 Feb 2014 09:42:23 +0000 (UTC)
commit c032805e55af814e0af9f744cf9906fcf602de98
Author: Wolfgang Hofer <wolfgangh svn gnome org>
Date: Sat Feb 15 10:40:38 2014 +0100
applied fix as suggested at bugreport #723818
ChangeLog | 12 ++++++++++++
gap/gap_fg_matting.c | 2 +-
gap/gap_fg_matting_main.c | 2 +-
3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index eac42f2..169984b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2014-02-15 Wolfgang Hofer <hof gimp org>
+- applied fix for the foreground matting feature as suggested at bug #723818
+ The warning "Problem!: final_confidence: %f\n" now shall be printed only in critical case.
+
+ TODO: Note that GAP still uses a copy of the old foreground matting implementation
+ The already available GEGL implementation will be used in future GAP versions
+ targeted for the use with GIMP 2.10.
+
+ * gap/gap_fg_matting.c
+ * gap/gap_fg_matting_main.c
+
+2014-02-15 Wolfgang Hofer <hof gimp org>
+
- added LAYER GROUP support for the "FramesModify" feature.
- Added Groupname and delimiter entry widgets where the user can
diff --git a/gap/gap_fg_matting.c b/gap/gap_fg_matting.c
index b0c1c65..db4994b 100644
--- a/gap/gap_fg_matting.c
+++ b/gap/gap_fg_matting.c
@@ -897,7 +897,7 @@ local_smoothing (HashEntry* entry, GHashTable* unknown_hash, GappMattingState *s
¤t_alpha);
final_confidence *= exp(-LAMBDA * sqrt(mp));
- if (!(final_confidence <= 1 || final_confidence >= 0))
+ if (!(final_confidence <= 1 && final_confidence >= 0))
g_printf("Problem!: final_confidence: %f\n", final_confidence);
entry->alpha = (final_confidence * current_alpha + (1 - final_confidence) * low_freq_alpha) * 255;
diff --git a/gap/gap_fg_matting_main.c b/gap/gap_fg_matting_main.c
index 25c38d1..4871cd5 100644
--- a/gap/gap_fg_matting_main.c
+++ b/gap/gap_fg_matting_main.c
@@ -35,7 +35,7 @@
/* Revision history
* (2011/10/05) 2.7.0 hof: created
*/
-int gap_debug = 1; /* 1 == print debug infos , 0 dont print debug infos */
+int gap_debug = 0; /* 1 == print debug infos , 0 dont print debug infos */
#define GAP_DEBUG_DECLARED 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]