diff options
author | Thomas White <taw@physics.org> | 2010-01-06 16:46:02 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-01-06 16:46:21 +0100 |
commit | 8ca0c87e2fa62a2176eeec65743632116fe3974e (patch) | |
tree | c7c312cc39282fc6b8067a91ffdbeac8900faa86 /src | |
parent | 7f8bc10ea92c7e42c8bb0af175d42a3e55019210 (diff) |
Use only good areas for hit finding, adjust threshold appropriately
Diffstat (limited to 'src')
-rw-r--r-- | src/process_images.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/process_images.c b/src/process_images.c index 6695db2b..8effed1e 100644 --- a/src/process_images.c +++ b/src/process_images.c @@ -45,8 +45,8 @@ static int sum_of_peaks(struct image *image) int x, y; int integr = 0; - for ( x=0; x<image->width; x++ ) { - for ( y=0; y<image->height; y++ ) { + for ( x=0; x<400; x++ ) { + for ( y=600; y<1024; y++ ) { int val; @@ -56,6 +56,18 @@ static int sum_of_peaks(struct image *image) } } + for ( x=700; x<1023; x++ ) { + for ( y=600; y<1024; y++ ) { + + int val; + + val = image->data[x+image->height*y]; + + if ( val > 1000 ) integr+=val; + + } + } + return integr; } @@ -141,7 +153,7 @@ int main(int argc, char *argv[]) integr = sum_of_peaks(&image); printf("%6i %i\n", n_images, integr); - if ( integr > 1e7 ) { + if ( integr > 200000 ) { STATUS("Hit: %s\n", line); |