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

Method filter

dependency/densecrf3d/src/pairwise.cpp:64–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63 }
64 void filter( MatrixXf & out, const MatrixXf & in, bool transpose ) const {
65 // Read in the values
66 if( ntype_ == NORMALIZE_SYMMETRIC || (ntype_ == NORMALIZE_BEFORE && !transpose) || (ntype_ == NORMALIZE_AFTER && transpose))
67 out = in*norm_.asDiagonal();
68 else
69 out = in;
70
71 // Filter
72 if( transpose )
73 lattice_.compute( out, out, true );
74 else
75 lattice_.compute( out, out );
76// lattice_.compute( out.data(), out.data(), out.rows() );
77
78 // Normalize again
79 if( ntype_ == NORMALIZE_SYMMETRIC || (ntype_ == NORMALIZE_BEFORE && transpose) || (ntype_ == NORMALIZE_AFTER && !transpose))
80 out = out*norm_.asDiagonal();
81 }
82 // Compute d/df a^T*K*b
83 MatrixXf kernelGradient( const MatrixXf & a, const MatrixXf & b ) const {
84 MatrixXf g = 0*f_;

Callers

nothing calls this directly

Calls 2

asDiagonalMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected