//M*/
#include "precomp.hpp"
+#include <iostream>
namespace {
float scale;
cv::Size size;
- int shrinkage;
static const char *const SC_OCT_SCALE;
static const char *const SC_OCT_WEAKS;
static const char *const SC_F_CHANNEL;
static const char *const SC_F_RECT;
-
};
const char *const Octave::SC_OCT_SCALE = "scale";
workRect(cv::Size(cvRound(w / (float)shrinkage),cvRound(h / (float)shrinkage))),
objSize(cv::Size(cvRound(oct.size.width * relScale), cvRound(oct.size.height * relScale)))
{
+ std::cout << "Level " << oct.scale << " " << scale << " " << shrinkage << " " << w << " " << h << std::endl;
+
scaling[0] = ((relScale >= 1.f)? 1.f : (0.89f * pow(relScale, 1.099f / log(2.f)))) / (relScale * relScale);
scaling[1] = 1.f;
scaleshift = static_cast<int>(relScale * (1 << 16));
const Octave& octave = *(level.octave);
- int stBegin = octave.index * octave.weaks, stEnd = stBegin + ((octave.index)? 1024 : 416;
+ int stBegin = octave.index * octave.weaks, stEnd = stBegin + ((octave.index)? 1024 : 416);
int st = stBegin;
int offset = (octave.index)? -2: 0;
static const char *const SC_INTERNAL = "internalNodes";
static const char *const SC_LEAF = "leafValues";
-
// only Ada Boost supported
std::string stageTypeStr = (string)root[SC_STAGE_TYPE];
CV_Assert(stageTypeStr == SC_BOOST);
fns = (*st)[SC_LEAF];
inIt = fns.begin(), inIt_end = fns.end();
- int l = 0;
+ // int l = 0;
for (; inIt != inIt_end; ++inIt)
{
leaves.push_back((float)(*inIt));
feature_offset += octave.weaks * 3;
++octIndex;
+
+ std::cout << "octaves " << octaves.size() << std::endl;
+ std::cout << "stages " << stages.size() << std::endl;
+ std::cout << "nodes " << nodes.size() << std::endl;
+ std::cout << "leaves " << leaves.size() << std::endl;
+ std::cout << "features " << features.size() << std::endl;
}
- shrinkage = octaves[0].shrinkage;
+ // exit(0);
return true;
}
};
{
const Level& level = *it;
- if (i++ == 26) return;
+ if (level.octave->index != 2) continue;
+
+ std::cout << level.origScale << std::endl;
for (int dy = 0; dy < level.workRect.height; ++dy)
{