|
From: Gustavo P. B. <gb...@us...> - 2005-05-28 21:29:39
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16695/src/methods/hsvcm Modified Files: hsvcm.cpp Log Message: - Fixed contrast calculation - Changed correlation calculation (but now it is getting a `nan' result :-S Index: hsvcm.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/hsvcm.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- hsvcm.cpp 24 May 2005 03:36:54 -0000 1.7 +++ hsvcm.cpp 28 May 2005 21:29:22 -0000 1.8 @@ -280,6 +280,16 @@ } } + + float max = width * height; + // Normalize the matrices + //kdDebug() << "Normalizing the matrices..." << endl; + for (int d=0; d < 9; d++) + for (int i=0; i < m_sizeV; i++) + for (int j=0; j < m_sizeH; j++) + for (int k=0; k < m_sizeS; k++) + m_cm[d][i][j][k] /= max; + } void *KTHSVCM::data(int direction) const |