INNER CODE UNIT · C++
unary
lucasb-eyer/pydensecrf · pydensecrf/densecrf/src/densecrf.cpp:119
unary = unary_->get();
expAndNormalize( Q, -unary );
for( int it=0; it<n_iterations; it++ ) {
tmp1 = -unary;
for( unsigned int k=0; k<pairwise_.size(); k++ ) {
pairwise_[k]->apply( tmp2, Q );
tmp1 -= tmp2;
}
expAndNormalize( Q, tmp1 );
}
return Q;
}
VectorXs DenseCRF::map ( int n_iterations ) const {
// Run inference
MatrixXf Q = inference( n_iterations );
// Find the map
return currentMap( Q );