mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:18:52 +02:00
Merge pull request #1547 from ZappoMan/windows_build
removed unneeded redundant #ifdefs and fixed compiler warning
This commit is contained in:
commit
84a5d75131
3 changed files with 2 additions and 10 deletions
|
@ -86,7 +86,7 @@ void Webcam::reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Webcam::renderPreview(int screenWidth, int screenHeight) {
|
void Webcam::renderPreview(int screenWidth, int screenHeight) {
|
||||||
#ifdef HAVE_LIBVPX
|
#ifdef HAVE_LIBVPX
|
||||||
if (_enabled) {
|
if (_enabled) {
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
glColor3f(1.0f, 1.0f, 1.0f);
|
glColor3f(1.0f, 1.0f, 1.0f);
|
||||||
|
@ -431,9 +431,7 @@ static SimpleBlobDetector::Params createBlobDetectorParams() {
|
||||||
|
|
||||||
FrameGrabber::FrameGrabber() : _initialized(false), _videoSendMode(FULL_FRAME_VIDEO), _depthOnly(false), _ledTrackingOn(false),
|
FrameGrabber::FrameGrabber() : _initialized(false), _videoSendMode(FULL_FRAME_VIDEO), _depthOnly(false), _ledTrackingOn(false),
|
||||||
_capture(0), _searchWindow(0, 0, 0, 0), _smoothedMidFaceDepth(UNINITIALIZED_FACE_DEPTH),
|
_capture(0), _searchWindow(0, 0, 0, 0), _smoothedMidFaceDepth(UNINITIALIZED_FACE_DEPTH),
|
||||||
#ifdef HAVE_LIBVPX
|
|
||||||
_colorCodec(), _depthCodec(),
|
_colorCodec(), _depthCodec(),
|
||||||
#endif
|
|
||||||
_frameCount(0), _blobDetector(createBlobDetectorParams()) {
|
_frameCount(0), _blobDetector(createBlobDetectorParams()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -575,7 +573,6 @@ static Point clip(const Point& point, const Rect& bounds) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameGrabber::grabFrame() {
|
void FrameGrabber::grabFrame() {
|
||||||
#ifdef HAVE_LIBVPX
|
|
||||||
if (!(_initialized || init())) {
|
if (!(_initialized || init())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -957,7 +954,6 @@ void FrameGrabber::grabFrame() {
|
||||||
Q_ARG(cv::Mat, color), Q_ARG(int, format), Q_ARG(cv::Mat, _grayDepthFrame), Q_ARG(float, _smoothedMidFaceDepth),
|
Q_ARG(cv::Mat, color), Q_ARG(int, format), Q_ARG(cv::Mat, _grayDepthFrame), Q_ARG(float, _smoothedMidFaceDepth),
|
||||||
Q_ARG(float, aspectRatio), Q_ARG(cv::RotatedRect, _smoothedFaceRect), Q_ARG(bool, !payload.isEmpty()),
|
Q_ARG(float, aspectRatio), Q_ARG(cv::RotatedRect, _smoothedFaceRect), Q_ARG(bool, !payload.isEmpty()),
|
||||||
Q_ARG(JointVector, joints), Q_ARG(KeyPointVector, keyPoints));
|
Q_ARG(JointVector, joints), Q_ARG(KeyPointVector, keyPoints));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FrameGrabber::init() {
|
bool FrameGrabber::init() {
|
||||||
|
@ -1037,7 +1033,6 @@ void FrameGrabber::updateHSVFrame(const Mat& frame, int format) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameGrabber::destroyCodecs() {
|
void FrameGrabber::destroyCodecs() {
|
||||||
#ifdef HAVE_LIBVPX
|
|
||||||
if (_colorCodec.name != 0) {
|
if (_colorCodec.name != 0) {
|
||||||
vpx_codec_destroy(&_colorCodec);
|
vpx_codec_destroy(&_colorCodec);
|
||||||
_colorCodec.name = 0;
|
_colorCodec.name = 0;
|
||||||
|
@ -1046,7 +1041,6 @@ void FrameGrabber::destroyCodecs() {
|
||||||
vpx_codec_destroy(&_depthCodec);
|
vpx_codec_destroy(&_depthCodec);
|
||||||
_depthCodec.name = 0;
|
_depthCodec.name = 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -152,10 +152,8 @@ private:
|
||||||
cv::Mat _grayDepthFrame;
|
cv::Mat _grayDepthFrame;
|
||||||
float _smoothedMidFaceDepth;
|
float _smoothedMidFaceDepth;
|
||||||
|
|
||||||
#ifdef HAVE_LIBVPX
|
|
||||||
vpx_codec_ctx_t _colorCodec;
|
vpx_codec_ctx_t _colorCodec;
|
||||||
vpx_codec_ctx_t _depthCodec;
|
vpx_codec_ctx_t _depthCodec;
|
||||||
#endif
|
|
||||||
int _frameCount;
|
int _frameCount;
|
||||||
cv::Mat _faceColor;
|
cv::Mat _faceColor;
|
||||||
cv::Mat _faceDepth;
|
cv::Mat _faceDepth;
|
||||||
|
|
|
@ -41,7 +41,7 @@ PalmData& HandData::addNewPalm() {
|
||||||
const PalmData* HandData::getPalm(int sixSenseID) const {
|
const PalmData* HandData::getPalm(int sixSenseID) const {
|
||||||
// the palms are not necessarily added in left-right order,
|
// the palms are not necessarily added in left-right order,
|
||||||
// so we have to search for the right SixSenseID
|
// so we have to search for the right SixSenseID
|
||||||
for (int i = 0; i < _palms.size(); i++) {
|
for (unsigned int i = 0; i < _palms.size(); i++) {
|
||||||
const PalmData* palm = &(_palms[i]);
|
const PalmData* palm = &(_palms[i]);
|
||||||
if (palm->getSixenseID() == sixSenseID) {
|
if (palm->getSixenseID() == sixSenseID) {
|
||||||
return palm->isActive() ? palm : NULL;
|
return palm->isActive() ? palm : NULL;
|
||||||
|
|
Loading…
Reference in a new issue