Skip to content

Commit

Permalink
Calibration working
Browse files Browse the repository at this point in the history
Still need to comment
  • Loading branch information
RSKothari committed Apr 11, 2017
1 parent fe2e9a9 commit 3d82878
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 3 deletions.
Binary file modified Release2/LogData.iobj
Binary file not shown.
Binary file modified Release2/LogData.ipdb
Binary file not shown.
Binary file modified Release2/LogData.tlog/link.read.1.tlog
Binary file not shown.
6 changes: 5 additions & 1 deletion Release2/Tutorial-RemoteViewer-0-calibration.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<CalibrationChronicle Version="1.0">
<Calibration Timestamp="30628" Type="CALIBRATIONTYPE_3_POINT" ApplyAtFrame="-1" Distance="0">
<Calibration Timestamp="70506" Type="CALIBRATIONTYPE_3_POINT" ApplyAtFrame="-1" Distance="0">
<CalibrationData Timestamp="116709" SceneFrameIndex="11043" PointOfRegardX="105" PointOfRegardY="148" />
<CalibrationData Timestamp="128968" SceneFrameIndex="11409" PointOfRegardX="905" PointOfRegardY="88" />
<CalibrationData Timestamp="145735" SceneFrameIndex="11915" PointOfRegardX="493" PointOfRegardY="569" />
</Calibration>
19 changes: 19 additions & 0 deletions Release2/Tutorial-RemoteViewer-0-gazecorrection.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<GazeCorrectionChronicle Version="1.0">
<GazeCorrectionData ApplyAtFrame="11915" EyeId="EYEID_RIGHTEYE" CalibrationType="CALIBRATIONTYPE_3_POINT" Type="linear">
<Parameter Name="theta.x" Value="1.01249" />
<Parameter Name="theta.y" Value="-0.0321219" />
<Parameter Name="theta.z" Value="0.12585" />
<Parameter Name="phi.x" Value="0.0356098" />
<Parameter Name="phi.y" Value="1.17648" />
<Parameter Name="phi.z" Value="-0.310918" />
</GazeCorrectionData>
<GazeCorrectionData ApplyAtFrame="11915" EyeId="EYEID_LEFTEYE" CalibrationType="CALIBRATIONTYPE_3_POINT" Type="linear">
<Parameter Name="theta.x" Value="1.04836" />
<Parameter Name="theta.y" Value="0.00722901" />
<Parameter Name="theta.z" Value="-0.0794662" />
<Parameter Name="phi.x" Value="-0.106797" />
<Parameter Name="phi.y" Value="1.12921" />
<Parameter Name="phi.z" Value="-0.200512" />
</GazeCorrectionData>
</GazeCorrectionChronicle>
16 changes: 14 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,20 @@ void handleEyeImage (iViewDataStreamEyeImage * image) {
* This function will be called from MyCallback() when a new scene image is available.
*/
void handleSceneImageWithGaze (iViewDataStreamSceneImage * image) {
//gCurrentFrameNumber = image->sceneFrameNumber;
displaySceneImage (image->imageData);

if (gCalibrationPointsToDo <= 3 && gCalibrationPointsToDo >= 1)
{
drawGazeOverlay(image->imageData, gGazeX, gGazeY);
gCurrentFrameNumber = image->sceneFrameNumber;
displaySceneImage(image->imageData);

if (gCalibrationPointsToDo == 0)
{
closeSceneImageDisplay();
}

}

writeImage(image->imageData, image->sceneFrameNumber, SceneImageLoc, compression_params);

//bjohn: instead of writing image we add to queue using mutex lock.
Expand Down

0 comments on commit 3d82878

Please sign in to comment.