Image filter to webcam filter
in
Programming Questions
•
1 year ago
I'm attempting to modify this code so that instead of filtering the picture it with filter a live webcam feed. Any suggestions will help. Thanks!
PImage myPic;
void setup(){
size(640,480);
myPic = loadImage("Photo 1.jpg");
noStroke();
smooth();
}
int cellSize = 100;
void draw(){
for(int y=0; y <= width; y+=cellSize){
for(int x=0; x <= height; x+=cellSize){
color myColor = myPic.get(x,y);
fill(myColor);
rect(x,y,cellSize,cellSize);
}
}
noLoop();
}
PImage myPic;
void setup(){
size(640,480);
myPic = loadImage("Photo 1.jpg");
noStroke();
smooth();
}
int cellSize = 100;
void draw(){
for(int y=0; y <= width; y+=cellSize){
for(int x=0; x <= height; x+=cellSize){
color myColor = myPic.get(x,y);
fill(myColor);
rect(x,y,cellSize,cellSize);
}
}
noLoop();
}
1