aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-10-03 18:24:26 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:01 +0100
commit4d578184312386e83289a05f1ef5b85e1e6fec9c (patch)
tree36e4e8b4bce8dde411defbe945019412922a0f2c /src/peaks.c
parentfbb8f2157ccce73177ad2e0e0a7eb44c8d651db9 (diff)
Restore in_streak()
Partially reverts commit 18a6007573a8a797d9ea6b472806770e8bbf8950.
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/peaks.c b/src/peaks.c
index 44359973..4892d42f 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -50,6 +50,13 @@
#define MAX_PEAKS (2048)
#define INTEGRATION_RADIUS (10)
+static int in_streak(int x, int y)
+{
+ if ( (y>512) && (y<600) && (abs(x-489)<15) ) return 1;
+ if ( (y>600) && (abs(x-480)<25) ) return 1;
+ return 0;
+}
+
static int is_hot_pixel(struct image *image, int x, int y)
{
@@ -306,6 +313,9 @@ void search_peaks(struct image *image, float threshold)
/* Overall threshold */
if ( data[x+width*y] < threshold ) continue;
+ /* Ignore streak */
+ if ( in_streak(x, y) ) continue;
+
/* Get gradients */
dx1 = data[x+width*y] - data[(x+1)+width*y];
dx2 = data[(x-1)+width*y] - data[x+width*y];