MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / stepInference

Method stepInference

dependency/densecrf3d/src/densecrf.cpp:282–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280 return Q;
281}
282void DenseCRF::stepInference( MatrixXf & Q, MatrixXf & tmp1, MatrixXf & tmp2 ) const{
283 tmp1.resize( Q.rows(), Q.cols() );
284 tmp1.fill(0);
285 if( unary_ )
286 tmp1 -= unary_->get();
287
288 // Add up all pairwise potentials
289 for( unsigned int k=0; k<pairwise_.size(); k++ ) {
290 pairwise_[k]->apply( tmp2, Q );
291 tmp1 -= tmp2;
292 }
293
294 // Exponentiate and normalize
295 expAndNormalize( Q, tmp1 );
296}
297VectorXs DenseCRF::currentMap( const MatrixXf & Q ) const{
298 VectorXs r(Q.cols());
299 // Find the map

Callers

nothing calls this directly

Calls 8

expAndNormalizeFunction · 0.70
resizeMethod · 0.45
rowsMethod · 0.45
colsMethod · 0.45
fillMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected