[DEV] some patch integration
This commit is contained in:
parent
52df49663f
commit
7fb415f696
@ -12,7 +12,7 @@ dollar::Results::Results() {
|
||||
// nothing to do ...
|
||||
}
|
||||
|
||||
bool dollar::Results::haveMath() const {
|
||||
bool dollar::Results::haveMatch() const {
|
||||
return m_values.size() != 0;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ std::string dollar::Results::getName(size_t _id) const {
|
||||
DOLLAR_ERROR("request acces error result out of range (name)");
|
||||
return "";
|
||||
}
|
||||
return m_values[_id].first;
|
||||
return m_values[_id].value;
|
||||
}
|
||||
|
||||
float dollar::Results::getConfidence(size_t _id) const {
|
||||
@ -33,11 +33,11 @@ float dollar::Results::getConfidence(size_t _id) const {
|
||||
DOLLAR_ERROR("request acces error result out of range (value)");
|
||||
return 0;
|
||||
}
|
||||
return m_values[_id].second;
|
||||
return m_values[_id].confidence;
|
||||
}
|
||||
|
||||
void dollar::Results::addValue(const std::string& _name, float _confidence) {
|
||||
m_values.push_back(std::make_pair(_name, _confidence));
|
||||
m_values.push_back(ResultData(_name, _confidence));
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,12 +11,29 @@
|
||||
#include <vector>
|
||||
|
||||
namespace dollar {
|
||||
class ResultData {
|
||||
public:
|
||||
std::string value;
|
||||
float confidence;
|
||||
#ifdef DOLLAR_ANNALYSER_ENABLE
|
||||
float distance;
|
||||
int32_t deltaLines; //!< number of line in delta if > 0 ==> more lines in the reference
|
||||
float deltaRatio:
|
||||
int32_t deltaDots; //!< number of dots in delta if > 0 ==> more dots in the reference
|
||||
#endif
|
||||
public:
|
||||
ResultData(const std::string& _value, float _confidence):
|
||||
value(_value),
|
||||
confidence(_confidence) {
|
||||
|
||||
}
|
||||
};
|
||||
class Results {
|
||||
protected:
|
||||
std::vector<std::pair<std::string,float>> m_values;
|
||||
std::vector<ResultData> m_values;
|
||||
public:
|
||||
Results();
|
||||
bool haveMath() const;
|
||||
bool haveMatch() const;
|
||||
size_t getSize() const;
|
||||
std::string getName(size_t _id=0) const;
|
||||
float getConfidence(size_t _id=0) const;
|
||||
|
@ -228,7 +228,7 @@ bool testCorpus(const std::string& _srcGesture, const std::string& _srcCorpus) {
|
||||
//agregateResults[label+" "+type].push_back(std::make_pair(res,it));
|
||||
agregateResults[label].push_back(std::make_pair(res,it));
|
||||
|
||||
if (res.haveMath() == false) {
|
||||
if (res.haveMatch() == false) {
|
||||
TEST_INFO(" Recognise noting ...");
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user