floatmin_agree,// minimal number of channels to agree on a point (real number to work with fuzzy averages)
float*chn_weights,// color channel weights, sum == 1.0
intdust_remove,// Do not reduce average weight when only one image differes much from the average
intkeep_weights,// return channel weights after A in RGBA - ALWAYS
intkeep_weights,// eturn channel weights and rms after A in RGBA (weight are always calculated, not so for the crms)
intdebug
)
{
float*alpha=rgba+(colors*(DTT_SIZE2*DTT_SIZE21));
float*port_weights=alpha+(DTT_SIZE2*DTT_SIZE21);
float*crms=port_weights+NUM_CAMS*(DTT_SIZE2*DTT_SIZE21);// results are never used?
float*crms=port_weights+NUM_CAMS*(DTT_SIZE2*DTT_SIZE21);// calculated only if keep_weights
floatthreshold2=diff_sigma*diff_threshold;
threshold2*=threshold2;// squared to compare with diff^2
floatpair_dist2r[NUM_CAMS*(NUM_CAMS-1)/2];// new double [ports*(ports-1)/2]; // reversed squared distance between images - to be used with gaussian. Can be calculated once !