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

Method addPairwiseBilateral1Mod

dependency/densecrf3d/src/densecrf.cpp:105–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 addPairwiseEnergy( feature, function, kernel_type, normalization_type );
104}
105void DenseCRF3D::addPairwiseBilateral1Mod ( float sx, float sy, float sz, float sMod1, const unsigned char* im, LabelCompatibility * function, KernelType kernel_type, NormalizationType normalization_type ) {
106 MatrixXf feature( 4, N_ );
107 for( int k=0; k<Z_; k++ )
108 for( int j=0; j<H_; j++ )
109 for( int i=0; i<W_; i++ ){
110 feature(0,k*H_*W_ + j*W_+i) = i / sx;
111 feature(1,k*H_*W_ + j*W_+i) = j / sy;
112 feature(2,k*H_*W_ + j*W_+i) = k / sz;
113 feature(3,k*H_*W_ + j*W_+i) = im[(i+j*W_+k*H_*W_)*1+0] / sMod1;
114 }
115 addPairwiseEnergy( feature, function, kernel_type, normalization_type );
116}
117void DenseCRF3D::addPairwiseBilateral2Mod ( float sx, float sy, float sz, float sMod1, float sMod2, const unsigned char* im, LabelCompatibility * function, KernelType kernel_type, NormalizationType normalization_type ) {
118 MatrixXf feature( 5, N_ );
119 for( int k=0; k<Z_; k++ )

Calls

no outgoing calls

Tested by

no test coverage detected