added Matx<4,4>*Scalar operator (ticket #1830)

This commit is contained in:
Vadim Pisarevsky
2012-04-25 08:59:37 +00:00
parent ed1932dfa1
commit 87888984a5
2 changed files with 29 additions and 4 deletions

View File

@@ -808,6 +808,22 @@ bool CV_OperationsTest::TestMatxMultiplication()
if(res2[0] != 14.0) throw test_excep();
if(res2[1] != 6.0) throw test_excep();
if(res2[2] != 1.0) throw test_excep();
Matx44f mat44f(1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1);
Matx44d mat44d(1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1);
Scalar s(4, 3, 2, 1);
Scalar sf = mat44f*s;
Scalar sd = mat44d*s;
if(sf[0] != 10.0) throw test_excep();
if(sf[1] != 6.0) throw test_excep();
if(sf[2] != 3.0) throw test_excep();
if(sf[3] != 1.0) throw test_excep();
if(sd[0] != 10.0) throw test_excep();
if(sd[1] != 6.0) throw test_excep();
if(sd[2] != 3.0) throw test_excep();
if(sd[3] != 1.0) throw test_excep();
}
catch(const test_excep&)
{