Skip to content

Commit

Permalink
Some tweaks to inter-process comm and adding calibration points back in
Browse files Browse the repository at this point in the history
  • Loading branch information
David Pitman committed Dec 9, 2011
1 parent 5b5c8ff commit e51afed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
18 changes: 9 additions & 9 deletions Calibrator.mm
Expand Up @@ -87,15 +87,15 @@
const OpenGazer::Point Calibrator::defaultpointarr[] = {OpenGazer::Point(0.5, 0.5),
OpenGazer::Point(0.1, 0.5), OpenGazer::Point(0.9, 0.5),
OpenGazer::Point(0.5, 0.1), OpenGazer::Point(0.5, 0.9),
// OpenGazer::Point(0.1, 0.1), OpenGazer::Point(0.1, 0.9),
// OpenGazer::Point(0.9, 0.9), OpenGazer::Point(0.9, 0.1),
// OpenGazer::Point(0.33, 0.33), OpenGazer::Point(0.33, 0.66),
// OpenGazer::Point(0.66, 0.66), OpenGazer::Point(0.66, 0.33),
// OpenGazer::Point(0.05, 0.5), OpenGazer::Point(0.95, 0.5),
// OpenGazer::Point(0.5, 0.05), OpenGazer::Point(0.5, 0.95),
// OpenGazer::Point(0.05, 0.05), OpenGazer::Point(0.05, 0.95),
// OpenGazer::Point(0.95, 0.95), OpenGazer::Point(0.95, 0.05),
// OpenGazer::Point(0.25, 0.25), OpenGazer::Point(0.25, 0.75),
OpenGazer::Point(0.1, 0.1), OpenGazer::Point(0.1, 0.9),
OpenGazer::Point(0.9, 0.9), OpenGazer::Point(0.9, 0.1),
OpenGazer::Point(0.33, 0.33), OpenGazer::Point(0.33, 0.66),
OpenGazer::Point(0.66, 0.66), OpenGazer::Point(0.66, 0.33),
OpenGazer::Point(0.05, 0.5), OpenGazer::Point(0.95, 0.5),
OpenGazer::Point(0.5, 0.05), OpenGazer::Point(0.5, 0.95),
OpenGazer::Point(0.05, 0.05), OpenGazer::Point(0.05, 0.95),
OpenGazer::Point(0.95, 0.95), OpenGazer::Point(0.95, 0.05),
OpenGazer::Point(0.25, 0.25), OpenGazer::Point(0.25, 0.75),
OpenGazer::Point(0.75, 0.75), OpenGazer::Point(0.75, 0.25)};

vector<OpenGazer::Point>
Expand Down
17 changes: 12 additions & 5 deletions og3/AppDelegate.mm
Expand Up @@ -150,7 +150,7 @@ -(void)launchGazeTracking{


#ifdef CONFIGURATION_Debug_OpenCV
NSLog(@"\n\n\n\n FYI - OpenCV debug is enabled\n\n");
NSLog(@"\n\n FYI - OpenCV debug is enabled\n\n");
cvNamedWindow(MAIN_WINDOW_NAME, CV_GUI_EXPANDED);
cvResizeWindow(MAIN_WINDOW_NAME, 640, 480);
// createButtons();
Expand Down Expand Up @@ -230,25 +230,32 @@ -(void)moveCalibrationPoint:(NSNotification*)note{

// The calibration process has started
-(void)calibrationStarted:(NSNotification*)note{
NSLog(@"Calibration Started");
NSLog(@"Notification :: Calibration Started");
[gazeWindowController window];
}

// There was a request to show the calibration GUI and such
-(void)calibrationStartRequested:(NSNotification*)note{
NSLog(@"Calibration Requested");
NSLog(@"Notification :: Calibration Requested");
[self launchCalibrationGUI];
}

// The calibration process ended, wbut we'll still show a GUI with the results
-(void)finishedCalibration:(NSNotification*)note{
NSLog(@"\n\n\n\n\n finishedCalibration");
NSLog(@"Notification :: Calibration Finished");
self.gazeTrackerStatus = kGazeTrackerCalibrated;
[calibrationWindowController finishCalibration:self.gazeTrackerStatus];
}

// Called when the user closes the calibration interface
-(void) calibrationClosed:(NSNotification*)note{
NSLog(@"Notification :: Calibration UI Closed");

// Close the Gaze Target window
[[gazeWindowController window] close];

// Resign focus
//[[NSApplication sharedApplication] hide:self];

// Send out a note that we've finished calibrating with the current status of the gaze tracker
[[NSDistributedNotificationCenter defaultCenter] postNotificationName:kGrazeTrackerCalibrationEnded
Expand All @@ -258,7 +265,7 @@ -(void) calibrationClosed:(NSNotification*)note{
}

-(void)terminationRequested:(NSNotification*)note{
NSLog(@"Termination requested");
NSLog(@"Notification :: Termination requested");
[[NSApplication sharedApplication] terminate:self];
}

Expand Down

0 comments on commit e51afed

Please sign in to comment.