Update corrected the name of the threshold function

This commit is contained in:
Lev
2021-08-02 18:31:45 -05:00
parent 20a38f4d85
commit d96256c5c0

View File

@ -14,11 +14,11 @@ function setup() {
function draw() { function draw() {
background(255, 0, 255); background(255, 0, 255);
image(imgIn, 0, 0); image(imgIn, 0, 0);
image(grayScaleFilter(imgIn), imgIn.width, 0); image(thresholdFilter(imgIn), imgIn.width, 0);
//noLoop(); //noLoop();
} }
function grayScaleFilter(img) { function thresholdFilter(img) {
imgOut = createImage(img.width, img.height); imgOut = createImage(img.width, img.height);
imgOut.loadPixels(); imgOut.loadPixels();
img.loadPixels(); img.loadPixels();