If you are using OTB 6.6.1 or below, you should put the expression in the context file :
#M v1 {0.0219272, 0.00167021, -0.00430969, 0.000601005; -0.0147543, 0.0146592, 0.00119559, -0.000513982; -0.000439127, -0.0095992, 0.00404977, 0.00104122 ; 0.00113085, -0.00129218, 0.000491191, -0.000723041}
#M v2 {0.0206995, -0.0003979, -0.00565285, 0.000891043; -0.0156111, 0.0169544, 0.00101618, -0.001636; 0.000689719, -0.00998213, 0.00544778, 0.00182974; 0.00127694, -0.0016468, 0.000519441, -0.000763441}
#M m1 {442.212, 701.321, 677.34, 3039.14}
#M m2 {463.749, 689.889, 677.502, 2750.86}
#E (im1-m1)*v1 - (im2-m2)*v2
In OTB 7.0 you can define variables in the context file and use them in the “exp” parameter.
I think *
should be used, it is the usual matrix/vector product. mult
is the element wise product.
Maybe the best way to check if it works is to use BandMathX with your original images of 2015 and 2017 and compare with the result obtained with the MAD application.
Cédric