Skip to content
Snippets Groups Projects
Commit 08dc15e1 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: wrong loop count

parent ab589fa1
No related branches found
No related tags found
No related merge requests found
......@@ -193,13 +193,13 @@ MDMDNMFImageFilter<TInputImage, TOutputImage>
// = (A*S-X) * (transpose(S)) + m_LambdD*(A-1/nbBands*ones(L, L)*A)
// = (A*S-X) * (transpose(S)) + m_LambdD*A- m_LambdD*/nbBands*ones(L, L)*A)
MatrixType onesA;
VectorType sumColulmnsOfA;
sumColulmnsOfA.set_size(A.cols());
unsigned int nbBands = A.rows();
// Computing vector onesA
for (unsigned int j=0; j<onesA.size(); ++j)
// Computing ones*A : all rows are the same,
// (ones*A)[i,j] = sum(k=0 to nbBands, A[k,j])
for (unsigned int j=0; j<A.cols(); ++j)
{
sumColulmnsOfA(j) = A.get_column(j).sum();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment