PImage myImage; //define an image object myImage = loadImage("memorial.jpg"); //load it size(myImage.width,myImage.height); //size it to fit the window image(myImage, 0,0); //display the image // convert the image to grayscale filter(GRAY); color white = color(255,255,255); //define white color black = color(0,0,0); //define black //extract edges for(int y=0; y6) //if they are different set(x,y,black); //set the pixel’s color black else set(x,y,white); //else to white } save("memorial_edge.jpg"); // save the image as a file