Create a new version of the lineDetect function (Program 55 (page 128)) that takes in a threshold

Question:

Create a new version of the lineDetect function (Program 55 (page 128)) that takes in a threshold and create a movie using lineDetect where the threshold changes depending on the frame number.


Data from Program 55

def luminance (pixel): r = getRed(pixel) g = getGreen (pixel) b = getBlue (pixel) return (r+g+b)/3 %3D def edgedetect(source): for px in getPixels(source): = getX(px) y = getY(px) if y < getHeight(source)-1 and x < getWidth(source)-1: botrt = getPixel(source, x+1, y+1) thislum = luminance (px) brlum = luminance (botrt) if

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: