import processing.video.*; // Size of each cell in the grid, ratio of window size to video size int videoScale = 1; // Number of columns and rows in our system int cols, rows; // Variable to hold onto Capture object //Capture video; // collection of colors ArrayList pics; // Adjust contrast float maxBrightness; float minBrightness; float lastMinB; float lastAveB; PImage p, p2; int jim=1; String zip = "10003"; float windspeed, iwindspeed; int temp; String condition; float v = 1.0/9.0; float[][] kernel = { { v, v, v } , { v, v, v } , { v, v, v } }; void setup() { size(640,610); // Initialize columns and rows cols = width/videoScale; rows = height/videoScale; //video = new Capture(this,cols,rows,30); // set base lastMinB = 0; lastAveB = 255; //background(255); XMLElement xml = new XMLElement(this, "http://weather.yahooapis.com/forecastrss?p=" + zip); iwindspeed = windspeed = float(xml.getChild("channel/yweather:wind").getStringAttribute("speed")); temp = int(xml.getChild("channel/item/yweather:condition").getStringAttribute("temp")); condition = xml.getChild("channel/item/yweather:condition").getStringAttribute("text"); println(windspeed+" "+temp+" "+condition); p = loadImage("rain3.png"); image(p,0,0); } void draw() { // Read image from the camera /*if (video.available()) { video.read(); } video.loadPixels(); */ p.loadPixels(); int k =0; PImage edgeImg = createImage(p.width, p.height, ARGB); // Begin loop for columns for (int i = 1; i < p.width-1; i++) { // Begin loop for rows for (int j = 1; j < p.height-1; j++) { float rsum=0,bsum=0,gsum=0; // Where are we, pixel-wise? int x = i*videoScale; int y = j*videoScale; // Looking up the appropriate color in the pixel array color c = p.pixels[i + j*p.width]; if(j>1 && i>1 && i