Commit 14c7b0fa432ec8214304e455938626d921797632
1 parent
22e5050c
descriptor tweaks
Showing
2 changed files
with
3 additions
and
2 deletions
openbr/plugins/integral.cpp
| @@ -182,11 +182,12 @@ class RecursiveIntegralSamplerTransform : public Transform | @@ -182,11 +182,12 @@ class RecursiveIntegralSamplerTransform : public Transform | ||
| 182 | const SecondOrderInputDescriptor d(tmp.ptr<float>(3), channels, 1); | 182 | const SecondOrderInputDescriptor d(tmp.ptr<float>(3), channels, 1); |
| 183 | const SecondOrderInputDescriptor e(tmp.ptr<float>(4), channels, 1); | 183 | const SecondOrderInputDescriptor e(tmp.ptr<float>(4), channels, 1); |
| 184 | 184 | ||
| 185 | - dst = Mat(4, channels, CV_32FC1); | 185 | + dst = Mat(5, channels, CV_32FC1); |
| 186 | OutputDescriptor(dst.ptr<float>(0), channels, 1) = (a+b+c+d)/4.f; | 186 | OutputDescriptor(dst.ptr<float>(0), channels, 1) = (a+b+c+d)/4.f; |
| 187 | OutputDescriptor(dst.ptr<float>(1), channels, 1) = ((a+b+c+d)/4.f-e); | 187 | OutputDescriptor(dst.ptr<float>(1), channels, 1) = ((a+b+c+d)/4.f-e); |
| 188 | OutputDescriptor(dst.ptr<float>(2), channels, 1) = ((a+b)-(c+d))/2.f; | 188 | OutputDescriptor(dst.ptr<float>(2), channels, 1) = ((a+b)-(c+d))/2.f; |
| 189 | OutputDescriptor(dst.ptr<float>(3), channels, 1) = ((a+c)-(b+d))/2.f; | 189 | OutputDescriptor(dst.ptr<float>(3), channels, 1) = ((a+c)-(b+d))/2.f; |
| 190 | + OutputDescriptor(dst.ptr<float>(4), channels, 1) = ((a+d)-(b+c))/2.f; | ||
| 190 | } | 191 | } |
| 191 | 192 | ||
| 192 | Template subdivide(const Template &src) const | 193 | Template subdivide(const Template &src) const |
openbr/plugins/quantize.cpp
| @@ -286,7 +286,7 @@ class RecursiveProductQuantizationDistance : public Distance | @@ -286,7 +286,7 @@ class RecursiveProductQuantizationDistance : public Distance | ||
| 286 | { | 286 | { |
| 287 | Q_OBJECT | 287 | Q_OBJECT |
| 288 | Q_PROPERTY(float t READ get_t WRITE set_t RESET reset_t STORED false) | 288 | Q_PROPERTY(float t READ get_t WRITE set_t RESET reset_t STORED false) |
| 289 | - BR_PROPERTY(float, t, -1) | 289 | + BR_PROPERTY(float, t, -std::numeric_limits<float>::max()) |
| 290 | 290 | ||
| 291 | float compare(const Template &a, const Template &b) const | 291 | float compare(const Template &a, const Template &b) const |
| 292 | { | 292 | { |