MCPcopy Create free account
hub / github.com/biometrics/openbr / project

Method project

openbr/plugins/classification/forest.cpp:51–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 }
50
51 void project(const Template &src, Template &dst) const
52 {
53 dst = src;
54
55 float response;
56 if (classification && returnConfidence) {
57 // Fuzzy class label
58 response = forest.predict_prob(src.m().reshape(1,1));
59 } else {
60 response = forest.predict(src.m().reshape(1,1));
61 }
62
63 if (overwriteMat) {
64 dst.m() = Mat(1, 1, CV_32F);
65 dst.m().at<float>(0, 0) = response;
66 } else {
67 dst.file.set(outputVariable, response);
68 }
69 }
70
71 void load(QDataStream &stream)
72 {

Callers

nothing calls this directly

Calls 2

predictMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected