Martin Landa 5e8d12b3e5 add missing header when compiled without GDAL and PostgreSQL support %!s(int64=11) %!d(string=hai) anos
..
Makefile 0f46a5c405 imagerylib: include VECT_INC %!s(int64=13) %!d(string=hai) anos
README db49180dd7 welcome to GRASS 7.0.svn %!s(int64=17) %!d(string=hai) anos
alloc.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
eol.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
find.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
fopen.c 98dbc68757 fixed unlucky formatted messages (thanks to Glynn) %!s(int64=17) %!d(string=hai) anos
georef.c 5ae5d66d61 move polynomial transformation to imagery lib %!s(int64=13) %!d(string=hai) anos
georef_tps.c df20bea26c imagery lib: add thin plate spline coordinate transformation %!s(int64=12) %!d(string=hai) anos
group.c a927cf1428 use G_getl2(), i18n (merge from devbr6) %!s(int64=15) %!d(string=hai) anos
iclass.c 6214629352 iclass backend: make subgroup optional %!s(int64=11) %!d(string=hai) anos
iclass_bands.c e1d5fc9103 imagerylib: functions used by wxIClass, based on i.class (co-author V. Petras) %!s(int64=13) %!d(string=hai) anos
iclass_local_proto.h 08a91ed99f Don't use // comments (C89 compatibility) %!s(int64=12) %!d(string=hai) anos
iclass_perimeter.c 08a91ed99f Don't use // comments (C89 compatibility) %!s(int64=12) %!d(string=hai) anos
iclass_signatures.c 08a91ed99f Don't use // comments (C89 compatibility) %!s(int64=12) %!d(string=hai) anos
iclass_statistics.c a6c86f7b56 imagerylib: avoid the compiler warning (discards 'const' qualifier) by explicit const cast %!s(int64=12) %!d(string=hai) anos
imagerylib.dox bd5fd6b638 doxygen updated %!s(int64=16) %!d(string=hai) anos
iscatt_core.c 5e8d12b3e5 add missing header when compiled without GDAL and PostgreSQL support %!s(int64=11) %!d(string=hai) anos
iscatt_structs.c 5a8bbb7db8 wx.iscatt: c backend %!s(int64=11) %!d(string=hai) anos
list_gp.c a4f35de12d imagerylib: i18n, message cosmetics %!s(int64=16) %!d(string=hai) anos
list_subgp.c 717583d7bf list subgroup: wrong pointer type fix %!s(int64=11) %!d(string=hai) anos
loc_info.c 3a539ed71b Fix: return the allocated buffer %!s(int64=15) %!d(string=hai) anos
points.c a927cf1428 use G_getl2(), i18n (merge from devbr6) %!s(int64=15) %!d(string=hai) anos
ref.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
sig.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
sigfile.c 79ea9c0b06 imagerylib: update signature functions to use G_unqualified_name() %!s(int64=12) %!d(string=hai) anos
sigset.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
sigsetfile.c 79ea9c0b06 imagerylib: update signature functions to use G_unqualified_name() %!s(int64=12) %!d(string=hai) anos
target.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
title.c a927cf1428 use G_getl2(), i18n (merge from devbr6) %!s(int64=15) %!d(string=hai) anos
var.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos

README

To merge 2 signatures

n1 number of points in sig 1
n2 number of points in sig 2

mean1[nbands] means per band for sig 1
mean2[nbands] means per band for sig 2

var1[b1][b2] covariance band 1 with band 2 for sig 1
var2[b1][b2] covariance band 1 with band 2 for sig 2

the meger is

n = n1+n2
mean[b] = (mean1[b]*n1 + mean2[b]*n2)/n

sum1 = var1[b1][b2] * (n1-1) + n1 * mean[b1] * mean[b2];
sum2 = var2[b1][b2] * (n2-1) + n2 * mean[b1] * mean[b2];

var[b1][b2] = (sum1+sum2 - n*mean[b1]*mean[b2) / (n-1)