Question: how can it detect vertical edges too? This code does horizontal edge detection. How can we make it detect vertical edges too? def edge_detect (img
how can it detect vertical edges too?

This code does horizontal edge detection. How can we make it detect vertical edges too? def edge_detect (img ) : for x in range ( img . getWidth( ) ) : for y in range (img . getHeight ( )-1) : pixl = img . getPixel(x, y) pix2 = img . getPixel(x, y+1) avgl = pixl . getRGBAverage( ) avg2 = pix2 . getRGBAverage ( ) if (abs (avgl - avg2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
