Skip to content
Snippets Groups Projects
Commit 7ff650d7 authored by Henrik Wallin's avatar Henrik Wallin
Browse files

Bug with integer-division fixed. Should only affect match_norm_corr.

Some better indentation.

Rev: src/modules/Image/match.h:1.5
parent 1d463a67
No related branches found
No related tags found
No related merge requests found
...@@ -177,16 +177,15 @@ THREADS_ALLOW(); ...@@ -177,16 +177,15 @@ THREADS_ALLOW();
for(nx=0; nx<nxs; nx++) \ for(nx=0; nx<nxs; nx++) \
{ \ { \
int j=i+ny*xs+nx; \ int j=i+ny*xs+nx; \
{ \
int h=0;\ int h=0;\
int n=0;\ int n=0;\
sum+= \ sum+= \
(MAXIMUM(CERTI1 R1, CERTI1 R1) * PIXEL_VALUE_DISTANCE(r))+ \ (MAXIMUM(CERTI1 R1, CERTI1 R1) * PIXEL_VALUE_DISTANCE(r))+ \
(MAXIMUM(CERTI1 G1, CERTI1 G1) * PIXEL_VALUE_DISTANCE(g))+ \ (MAXIMUM(CERTI1 G1, CERTI1 G1) * PIXEL_VALUE_DISTANCE(g))+ \
(MAXIMUM(CERTI1 B1, CERTI1 B1) * PIXEL_VALUE_DISTANCE(b)); \ (MAXIMUM(CERTI1 B1, CERTI1 B1) * PIXEL_VALUE_DISTANCE(b)); \
}} \ } \
imgi[i+(nys/2)*xs+(nxs/2)].r=\ imgi[i+(nys/2)*xs+(nxs/2)].r=\
(int)(255.99/(1+((scale * SCALE_MODIFY(sum))))); \ (int)(255.99/(1.0+((((float)scale) * SCALE_MODIFY((float)sum))))); \
}\ }\
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment