MCPcopy Create free account
hub / github.com/creatale/node-dv / EMD

Method EMD

deps/opencv/modules/imgproc/src/emd.cpp:1141–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1139
1140
1141float cv::EMD( InputArray _signature1, InputArray _signature2,
1142 int distType, InputArray _cost,
1143 float* lowerBound, OutputArray _flow )
1144{
1145 Mat signature1 = _signature1.getMat(), signature2 = _signature2.getMat();
1146 Mat cost = _cost.getMat(), flow;
1147
1148 CvMat _csignature1 = signature1;
1149 CvMat _csignature2 = signature2;
1150 CvMat _ccost = cost, _cflow;
1151 if( _flow.needed() )
1152 {
1153 _flow.create(signature1.rows, signature2.rows, CV_32F);
1154 flow = _flow.getMat();
1155 _cflow = flow;
1156 }
1157
1158 return cvCalcEMD2( &_csignature1, &_csignature2, distType, 0, cost.empty() ? 0 : &_ccost,
1159 _flow.needed() ? &_cflow : 0, lowerBound, 0 );
1160}
1161
1162/* End of file. */

Callers

nothing calls this directly

Calls 5

cvCalcEMD2Function · 0.85
neededMethod · 0.80
getMatMethod · 0.45
createMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected