public Mat frame(VisionOpMode opmode, Mat rgba, Mat gray) {
    try {
      // Get screen orientation data
      ScreenOrientation orientation =
          ScreenOrientation.getFromAngle(VisionOpMode.rotation.getRotationCompensationAngle());

      // Get color analysis
      this.analysis = beacon.analyzeFrame(rgba, gray, orientation);

    } catch (Exception e) {
      e.printStackTrace();
    }

    return rgba;
  }