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?

how can it detect vertical edges too? This code does horizontal edge

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!