-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Inbasekaran Perumal edited this page Jul 22, 2024
·
2 revisions
Welcome to the VisionGuard wiki!
---
title: VisionGuard Core Architecture
---
classDiagram
class VisionGuardCore {
+processFrame(cv::Mat &frame)
+toggle(int key)
+getAvailableDevices() std::vector<std::string>
}
class GazeDetectionEngine {
-FaceDetector faceDetector
-GazeEstimator gazeEstimator
-HeadPoseEstimator headPoseEstimator
-LandmarksEstimator landmarksEstimator
-EyeStateEstimator eyeStateEstimator
-ResultsMarker resultsMarker
+processFrame(cv::Mat &frame)
+toggle(int key)
+getGazeVector() cv::Point3f
+getAvailableDevices() std::vector<std::string>
}
class VectorCalibration {
-std::vector<cv::Point2f> points
-bool isCalibratedFlag
+calibrateScreen(std::vector<cv::Point2f> calibrationPoints)
+showCalibrationWindow(cv::Size imageSize)
+isCalibrated() bool
+isPointInsidePolygon(std::vector<cv::Point2f> polygon, cv::Point2f point) bool
+getDefaultCalibrationPoints(cv::Size imageSize, int numPoints) std::vector<cv::Point2f>
}
class EyeGazeTimeTracker {
-double accumulatedGazeTime
-double accumulatedGazeTimeThreshold
-double gazeLostThreshold
-bool isGazingAtScreen
-std::chrono::steady_clock::time_point gazeLostTime
-std::chrono::steady_clock::time_point lastCheckTime
+updateGazeTime(cv::Point3f gazeVector, cv::Size imageSize)
+resetGazeTime()
+getAccumulatedGazeTime() double
+checkGazeTimeExceeded() bool
+setAccumulatedGazeTimeThreshold(double threshold)
+setGazeLostThreshold(double threshold)
}
class BreakNotificationSystem {
+notifyBreak()
}
class PerformanceTracker {
-PerformanceMetrics metrics
+startTracking()
+stopTracking()
+getMetrics() PerformanceMetrics
}
class ScreenTimeMetricLogger {
-std::string dataFilePath
-std::chrono::steady_clock::time_point start_time
+logGazeData()
+createEmptyDataFile()
+cleanOldData()
+getDailyStats() std::map<std::string, double>
+getWeeklyStats() std::map<std::string, double>
+readDataFile() nlohmann::json
+saveJsonData(nlohmann::json data, std::string filePath)
+getHourlyTimestamp() std::string
+updateHourlyData(nlohmann::json &data, std::string key, double value)
}
VisionGuardCore <|-- GazeDetectionEngine
VisionGuardCore <|-- VectorCalibration
VisionGuardCore <|-- EyeGazeTimeTracker
VisionGuardCore <|-- BreakNotificationSystem
VisionGuardCore <|-- PerformanceTracker
VisionGuardCore <|-- ScreenTimeMetricLogger
GazeDetectionEngine "1" *-- "1" FaceDetector
GazeDetectionEngine "1" *-- "1" GazeEstimator
GazeDetectionEngine "1" *-- "1" HeadPoseEstimator
GazeDetectionEngine "1" *-- "1" LandmarksEstimator
GazeDetectionEngine "1" *-- "1" EyeStateEstimator
GazeDetectionEngine "1" *-- "1" ResultsMarker
EyeGazeTimeTracker "1" o-- "1" VisionGuardCore
BreakNotificationSystem "1" o-- "1" VisionGuardCore
PerformanceTracker "1" o-- "1" VisionGuardCore
ScreenTimeMetricLogger "1" o-- "1" VisionGuardCore
FaceDetector <|-- GazeDetectionEngine
GazeEstimator <|-- GazeDetectionEngine
HeadPoseEstimator <|-- GazeDetectionEngine
LandmarksEstimator <|-- GazeDetectionEngine
EyeStateEstimator <|-- GazeDetectionEngine
ResultsMarker <|-- GazeDetectionEngine