fix warnings under win.
This commit is contained in:
parent
1ad7af3c3b
commit
238ea7f0f0
@ -63,14 +63,14 @@ typedef unsigned short ushort;
|
|||||||
|
|
||||||
struct Octave
|
struct Octave
|
||||||
{
|
{
|
||||||
|
float scale;
|
||||||
|
ushort2 size;
|
||||||
ushort index;
|
ushort index;
|
||||||
ushort stages;
|
ushort stages;
|
||||||
ushort shrinkage;
|
ushort shrinkage;
|
||||||
ushort2 size;
|
|
||||||
float scale;
|
|
||||||
|
|
||||||
Octave(const ushort i, const ushort s, const ushort sh, const ushort2 sz, const float sc)
|
Octave(const ushort i, const ushort s, const ushort sh, const ushort2 sz, const float sc)
|
||||||
: index(i), stages(s), shrinkage(sh), size(sz), scale(sc) {}
|
: scale(sc), size(sz), index(i), stages(s), shrinkage(sh) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Level
|
struct Level
|
||||||
@ -111,7 +111,7 @@ struct Detection
|
|||||||
|
|
||||||
Detection(){}
|
Detection(){}
|
||||||
__device_inline__ Detection(int _x, int _y, uchar _w, uchar _h, float c)
|
__device_inline__ Detection(int _x, int _y, uchar _w, uchar _h, float c)
|
||||||
: x(_x), y(_y), w(_w), h(_h), confidence(c), kind(0) {};
|
: x(static_cast<ushort>(_x)), y(static_cast<ushort>(_y)), w(_w), h(_h), confidence(c), kind(0) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GK107PolicyX4
|
struct GK107PolicyX4
|
||||||
|
@ -80,8 +80,8 @@ namespace
|
|||||||
cv::softcascade::device::Level::Level(int idx, const Octave& oct, const float scale, const int w, const int h)
|
cv::softcascade::device::Level::Level(int idx, const Octave& oct, const float scale, const int w, const int h)
|
||||||
: octave(idx), step(oct.stages), relScale(scale / oct.scale)
|
: octave(idx), step(oct.stages), relScale(scale / oct.scale)
|
||||||
{
|
{
|
||||||
workRect.x = cvRound(w / (float)oct.shrinkage);
|
workRect.x = (unsigned char)cvRound(w / (float)oct.shrinkage);
|
||||||
workRect.y = cvRound(h / (float)oct.shrinkage);
|
workRect.y = (unsigned char)cvRound(h / (float)oct.shrinkage);
|
||||||
|
|
||||||
objSize.x = cv::saturate_cast<uchar>(oct.size.x * relScale);
|
objSize.x = cv::saturate_cast<uchar>(oct.size.x * relScale);
|
||||||
objSize.y = cv::saturate_cast<uchar>(oct.size.y * relScale);
|
objSize.y = cv::saturate_cast<uchar>(oct.size.y * relScale);
|
||||||
@ -168,8 +168,8 @@ struct cv::softcascade::SCascade::Fields
|
|||||||
ushort nweaks = saturate_cast<ushort>((int)fns[SC_OCT_WEAKS]);
|
ushort nweaks = saturate_cast<ushort>((int)fns[SC_OCT_WEAKS]);
|
||||||
|
|
||||||
ushort2 size;
|
ushort2 size;
|
||||||
size.x = cvRound(origWidth * scale);
|
size.x = (unsigned short)cvRound(origWidth * scale);
|
||||||
size.y = cvRound(origHeight * scale);
|
size.y = (unsigned short)cvRound(origHeight * scale);
|
||||||
|
|
||||||
device::Octave octave(octIndex, nweaks, shrinkage, size, scale);
|
device::Octave octave(octIndex, nweaks, shrinkage, size, scale);
|
||||||
CV_Assert(octave.stages > 0);
|
CV_Assert(octave.stages > 0);
|
||||||
@ -274,7 +274,7 @@ struct cv::softcascade::SCascade::Fields
|
|||||||
|
|
||||||
bool check(float mins,float maxs, int scales)
|
bool check(float mins,float maxs, int scales)
|
||||||
{
|
{
|
||||||
bool updated = (minScale == mins) || (maxScale == maxs) || (totals = scales);
|
bool updated = ((minScale == mins) || (maxScale == maxs) || (totals = scales));
|
||||||
|
|
||||||
minScale = mins;
|
minScale = mins;
|
||||||
maxScale = maxScale;
|
maxScale = maxScale;
|
||||||
@ -463,6 +463,9 @@ public:
|
|||||||
DEFAULT_FRAME_HEIGHT = 480,
|
DEFAULT_FRAME_HEIGHT = 480,
|
||||||
HOG_LUV_BINS = 10
|
HOG_LUV_BINS = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
cv::softcascade::SCascade::Fields& operator=( const cv::softcascade::SCascade::Fields & );
|
||||||
};
|
};
|
||||||
|
|
||||||
cv::softcascade::SCascade::SCascade(const double mins, const double maxs, const int sc, const int fl)
|
cv::softcascade::SCascade::SCascade(const double mins, const double maxs, const int sc, const int fl)
|
||||||
@ -619,6 +622,7 @@ private:
|
|||||||
cv::gpu::GpuMat bgr;
|
cv::gpu::GpuMat bgr;
|
||||||
cv::gpu::GpuMat gray;
|
cv::gpu::GpuMat gray;
|
||||||
cv::gpu::GpuMat channels;
|
cv::gpu::GpuMat channels;
|
||||||
|
SeparablePreprocessor& operator=( const SeparablePreprocessor& );
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user