Skip to content

Commit

Permalink
Solved compilation problems related to non-static member initializati…
Browse files Browse the repository at this point in the history
…on in header files (for some compilers)
  • Loading branch information
tiendan committed May 10, 2016
1 parent 28429e2 commit 0dc40e3
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 10 deletions.
1 change: 1 addition & 0 deletions AnchorPointSelector.cpp
Expand Up @@ -6,6 +6,7 @@
#include "utils.h"

AnchorPointSelector::AnchorPointSelector() {
_pointTracker = NULL;
loadCascades();
}

Expand Down
2 changes: 1 addition & 1 deletion AnchorPointSelector.h
Expand Up @@ -11,7 +11,7 @@ class AnchorPointSelector: public Component {
cv::CascadeClassifier eyeCascade;
cv::CascadeClassifier noseCascade;
cv::CascadeClassifier mouthCascade;
PointTracker* _pointTracker = NULL;
PointTracker* _pointTracker;

void choosePoints();
void loadCascades();
Expand Down
4 changes: 3 additions & 1 deletion EyeCenterDetector.cpp
Expand Up @@ -12,7 +12,9 @@

#include "Application.h"

EyeCenterDetector::EyeCenterDetector() {}
EyeCenterDetector::EyeCenterDetector() {
_eyeExtractor = NULL;
}


void EyeCenterDetector::process() {
Expand Down
2 changes: 1 addition & 1 deletion EyeCenterDetector.h
Expand Up @@ -46,7 +46,7 @@ class EyeCenterDetector: public Component {
cv::Point eyeCenterLeft;

private:
EyeExtractor* _eyeExtractor = NULL;
EyeExtractor* _eyeExtractor;

//cv::Point unscalePoint(cv::Point p, cv::Mat origSize);
//void scaleToFastSize(const cv::Mat &src,cv::Mat &dst);
Expand Down
2 changes: 2 additions & 0 deletions EyeExtractor.cpp
Expand Up @@ -12,6 +12,8 @@ const int EyeExtractor::eyeDY = 32;
const cv::Size EyeExtractor::eyeSize = cv::Size(eyeDX * 2, eyeDY * 2);

EyeExtractor::EyeExtractor(bool fromGroundTruth):
_pointTracker(NULL),

eyeGrey(eyeSize, CV_8UC1),
eyeFloat(eyeSize, CV_32FC1),

Expand Down
2 changes: 1 addition & 1 deletion EyeExtractor.h
Expand Up @@ -35,7 +35,7 @@ class EyeExtractor: public Component {
BlinkDetector _blinkDetectorLeft;
bool _isBlinking;
bool _fromGroundTruth;
PointTracker *_pointTracker = NULL;
PointTracker *_pointTracker;

void extractEye(const cv::Mat originalImage);
void extractEyeLeft(const cv::Mat originalImage);
Expand Down
3 changes: 3 additions & 0 deletions GazeTracker.cpp
Expand Up @@ -17,6 +17,9 @@ GazeTracker::GazeTracker()
{
gazePoint.x = 0;
gazePoint.y = 0;

_eyeExtractor = NULL;
_pointTracker = NULL;
}

bool GazeTracker::isActive() {
Expand Down
4 changes: 2 additions & 2 deletions GazeTracker.h
Expand Up @@ -33,8 +33,8 @@ class GazeTracker: public GazeTrackerComponent {
boost::scoped_ptr<ImProcess> _gaussianProcessX, _gaussianProcessY;
boost::scoped_ptr<ImProcess> _gaussianProcessXLeft, _gaussianProcessYLeft;

EyeExtractor* _eyeExtractor = NULL;
PointTracker* _pointTracker = NULL;
EyeExtractor* _eyeExtractor;
PointTracker* _pointTracker;

static double imageDistance(const cv::Mat *image1, const cv::Mat *image2);
static double covarianceFunction(const Utils::SharedImage &image1, const Utils::SharedImage &image2);
Expand Down
3 changes: 3 additions & 0 deletions GazeTrackerHistogramFeatures.cpp
Expand Up @@ -20,6 +20,9 @@ GazeTrackerHistogramFeatures::GazeTrackerHistogramFeatures()

gazePoint.x = 0;
gazePoint.y = 0;

_histFeatureExtractor = NULL;
_eyeExtractor = NULL;
}

void GazeTrackerHistogramFeatures::process() {
Expand Down
4 changes: 2 additions & 2 deletions GazeTrackerHistogramFeatures.h
Expand Up @@ -31,8 +31,8 @@ class GazeTrackerHistogramFeatures: public GazeTrackerComponent {
std::vector<cv::Mat> _exemplars, _exemplarsLeft;
int _currentTargetSampleCount;

HistogramFeatureExtractor *_histFeatureExtractor = NULL;
EyeExtractor* _eyeExtractor = NULL;
HistogramFeatureExtractor *_histFeatureExtractor;
EyeExtractor *_eyeExtractor;

// Gaussian Process estimators for right and left eye and both directions (X, Y)
boost::scoped_ptr<HistProcess> _histX, _histY, _histXLeft, _histYLeft;
Expand Down
1 change: 1 addition & 0 deletions HeadTracker.cpp
Expand Up @@ -41,6 +41,7 @@ static Point predictPoint(Point p, double depth, double dMeanX, double dMeanY, d

HeadTracker::HeadTracker()
{
_pointTracker = NULL;
}

void HeadTracker::draw() {
Expand Down
2 changes: 1 addition & 1 deletion HeadTracker.h
Expand Up @@ -16,7 +16,7 @@ class HeadTracker: public Component {

private:
std::vector<double> _depths;
PointTracker* _pointTracker = NULL;
PointTracker* _pointTracker;

std::vector<bool> detectInliers(std::vector<Point> const &prev, std::vector<Point> const &now, double radius=30.0);
void predictPoints(double xx0, double yy0, double xx1, double yy1, double rotX, double rotY, double atX, double atY);
Expand Down
1 change: 1 addition & 0 deletions HistogramFeatureExtractor.cpp
Expand Up @@ -28,6 +28,7 @@ HistogramFeatureExtractor::HistogramFeatureExtractor() {
this->verticalFeaturesLeft.create(cv::Size(1, VERTICAL_BIN_SIZE), CV_32SC1);

_groundTruth = new EyeExtractor(true);
_eyeExtractor = NULL;
}

HistogramFeatureExtractor::~HistogramFeatureExtractor() {
Expand Down
2 changes: 1 addition & 1 deletion MainGazeTracker.h
Expand Up @@ -45,7 +45,7 @@ public slots:
std::vector<Command> _commands;
int _commandIndex;

EyeExtractor* _eyeExtractor = NULL;
EyeExtractor* _eyeExtractor;

int _headDistance;
QTimer _timer;
Expand Down

0 comments on commit 0dc40e3

Please sign in to comment.