Branch: Tag:

1999-03-29

1999-03-29 18:41:40 by Henrik Wallin <hedda@lysator.liu.se>

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

Some better indentation.

Rev: src/modules/Image/match.h:1.5

177:    for(nx=0; nx<nxs; nx++) \    { \    int j=i+ny*xs+nx; \ -  { \ +     int h=0;\    int n=0;\    sum+= \    (MAXIMUM(CERTI1 R1, CERTI1 R1) * PIXEL_VALUE_DISTANCE(r))+ \    (MAXIMUM(CERTI1 G1, CERTI1 G1) * PIXEL_VALUE_DISTANCE(g))+ \    (MAXIMUM(CERTI1 B1, CERTI1 B1) * PIXEL_VALUE_DISTANCE(b)); \ -  }} \ +  } \    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))))); \    }\    }