diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f7e6463..4f6884d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,9 +4,10 @@
-
+
+
@@ -65,7 +66,7 @@
1732108904989
-
+
@@ -83,7 +84,15 @@
1732118799936
-
+
+
+ 1732368525825
+
+
+
+ 1732368525826
+
+
@@ -103,6 +112,7 @@
-
+
+
\ No newline at end of file
diff --git a/src/main/java/GraphicsProgram.java b/src/main/java/GraphicsProgram.java
index 424ed2f..7e7e941 100644
--- a/src/main/java/GraphicsProgram.java
+++ b/src/main/java/GraphicsProgram.java
@@ -10,7 +10,7 @@ public class GraphicsProgram extends PApplet {
PImage imgRed;
public static void main(String[] args) {
- PApplet.main("Grafics");
+ PApplet.main("GraficsProgram");
}
public void settings() {
diff --git a/src/main/java/Tracker.java b/src/main/java/Tracker.java
index 708dc65..a320f5d 100644
--- a/src/main/java/Tracker.java
+++ b/src/main/java/Tracker.java
@@ -13,4 +13,48 @@ import java.util.LinkedList;
import java.util.Queue;
public class Tracker {
+
+ private final int CAM = 0; // Kamera-ID (0 für Webcam, 1 für andere Cams)
+ private final int EXP = -7; // Belichtungszeit (idealerweise: 0)
+ private final int FPS = 60; // FPS
+
+ public Tracker(){
+
+ }
+
+ public static void main(String[] args){
+ Tracker tracker = new Tracker();
+ tracker.run();
+ }
+
+ private void run(){
+ VideoCapture capture = setUp();
+
+ if (!capture.isOpened()) {
+ System.out.println("Fehler: Die Webcam konnte nicht geöffnet werden.");
+ return;
+ }
+ }
+
+ public int getX(){
+ return x;
+ }
+
+ public int getY(){
+ return y;
+ }
+
+ private VideoCapture setUp() {
+ System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
+ VideoCapture capture = new VideoCapture(CAM);
+
+ if (!capture.isOpened()) {
+ System.out.println("Fehler: Die Webcam konnte nicht geöffnet werden.");
+ }
+
+ capture.set(Videoio.CAP_PROP_EXPOSURE, EXP);
+ capture.set(Videoio.CAP_PROP_FPS, FPS);
+
+ return capture;
+ }
}