Skip to content

gdsc-ssu/Gymi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

819f125 · Mar 22, 2025

History

9 Commits
Mar 17, 2025
Mar 12, 2025
Mar 12, 2025
Mar 22, 2025
Mar 12, 2025
Mar 12, 2025
Mar 12, 2025
Mar 19, 2025
Mar 12, 2025
Mar 12, 2025
Mar 12, 2025
Mar 12, 2025
Mar 12, 2025
Mar 12, 2025
Mar 12, 2025

Repository files navigation

Eyedid_flutter

Eyedid SDK Flutter plugin project.

Eyedid SDK is a Eye Tracking library that calculates where the user is looking at on the screen in real time using RGB image from the camera.

All computation is done locally on the device.

Getting Started

1. Install

  • Check the Development key.

  • Create the new flutter project from terminal.

    flutter create --platforms android,ios sample_app
  • Added eyedid_flutter to sample_app's pubspec.yaml file.

    dependencies:
    flutter:
      sdk: flutter
    eyedid_flutter:1.0.0
  • Install pub packge from terminal.

    flutter pub get

Android

  • Add the maven repository URL https://seeso.jfrog.io/artifactory/visualcamp-eyedid-sdk-android-release to the build.gradle file where seeso is located.

    allprojects {
        repositories {
            ...
            maven {
                url "https://seeso.jfrog.io/artifactory/visualcamp-eyedid-sdk-android-release"
            }
        }
    }
  • Add the following dependencies to the app/build.gradle file.

    dependencies {
      ...
      implementation "camp.visual.eyedid.android.gazetracker:eyedid-gazetracker:{version}"
    }

2. Obtain a License Key

Eyedid SDK requires a License Key for operation. You can obtain the key from manage.eyedid.ai. [팀 노션에 적어놨습니다.]

3. How to use

  1. Add code to check if you have camera permission.

    Future<void> checkCameraPermission() async {
        _hasCameraPermission = await _eyedidFlutterPlugin.checkCameraPermission();
      }
  2. Add a function to request camera permission.

    Future<void> checkCameraPermission() async {
      _hasCameraPermission = await _eyedidFlutterPlugin.checkCameraPermission();
      ///If you do not have camera permission, call the requesting function.
      if (!_hasCameraPermission) {
        _hasCameraPermission = await _eyedidFlutterPlugin.requestCameraPermission();
      }
    }
  3. When camera permission is obtained through the user, authentication begins by calling the initGazeTracker function.

      Future<void> initSeeSo() async {
        await checkCameraPermission();
        String requestInitGazeTracker = "failed Request";
        if (_hasCameraPermission) {
          try {
            InitializedResult? initializedResult =
                await _eyedidFlutterPlugin.initGazeTracker(licenseKey: _licenseKey);
          } on PlatformException catch (e) {
            print( "Occur PlatformException (${e.message})");
          }
        }
      }
  4. When authentication is successful, eye tracking begins.

     if (initializedResult!.result) {
        try {
          _eyedidFlutterPlugin.startTracking();
        } on PlatformException catch (e) {
          print("Occur PlatformException (${e.message})");
        }
      }
  5. Set a listener to receive MetricsInfo.

      _eyedidFlutterPlugin.getTrackingEvent().listen((event) {
        final info = MetricsInfo(event);
        if (info.gazeInfo.trackingState == TrackingState.success) {
          setState(() {
            _x = info.gazeInfo.gaze.x;
            _y = info.gazeInfo.gaze.y;
            _gazeColor = Colors.green;
          });
        } else {
          setState(() {
            _gazeColor = Colors.red;
          });
        }
      });

    API

    https://docs.eyedid.ai/docs/api/flutter-api-docs

    Contact Us

    If you have any problems, feel free to [email protected]

    License

    Copyright (c) VisualCamp. All rights reserved.