WEEK 7 - VIDEO
LINK TO SKETCH
This week, I created a video filter that uses the principles of a brightness mirror and manipulates the color scheme of a live video feed. The user can cycle through a series of color changes by clicking the “change” button.
After watching the Coding Train brightness mirror video, the base of this sketch was pretty simple. I set the variable counter that increased by 1 whenever the mouse was pressed and used that to control a series of if statements. With each if statement, the color was changed. The only part of this that was difficult was dealing with the scale. Originally, I wanted to increase the size of each circle or rectangle in line with the vScale variable (which is set to zero in setup). I thought that I would just have to include a line in each if statement saying something like:
if (counter ==1){
vScale =20;
fill(random(100, 255), 0, 0);
rect(x * vScale, y * vScale, w, w);}
OR
if (counter ==1){
fill(random(100, 255), 0, 0);
rect((x * vScale*2), (y * vScale*2), w, w);}
However, neither of these worked. With both, the scale of the entire video was warped, so it only captured the top left corner of the feed.