Laser pen is used to draw. Camera on laptop takes video of screen. Program searches for red pixel in video. Program places blue square where it locates the red pixel. This is projected using the projector.
Processing Program
import processing.video.*; //imports the library to work in video
Capture cam; //Access camera
color trackColor; //global variables: used all over the program.
float threshold = 10; //+ and - to track color. A specific color might not be avail ble at particular time because of light variations
String s ="CLEAR";
float threshold = 10; //+ and - to track color. A specific color might not be avail ble at particular time because of light variations
String s ="CLEAR";
void setup() { // fixed things in program
size(1280,960); //size of frame it is set to 1280,960 to cover display with black.
String[] cameras = Capture.list();
printArray(cameras);
cam = new Capture(this, cameras[3]);
printArray(cameras);
//frameRate(30); // 30 makes it slow
background(0); //black background
cam = new Capture(this, 1280,960);// It is multiple of basic 640, 480 resolution of video availa ble
cam.start();
trackColor = color(255,100,100); //r,g,b (pastel red)
}
String[] cameras = Capture.list();
printArray(cameras);
cam = new Capture(this, cameras[3]);
printArray(cameras);
//frameRate(30); // 30 makes it slow
background(0); //black background
cam = new Capture(this, 1280,960);// It is multiple of basic 640, 480 resolution of video availa ble
cam.start();
trackColor = color(255,100,100); //r,g,b (pastel red)
}
.............................
.......................
Project duration : One Week