Basic-Image-Processing
Basic-Image-Processing copied to clipboard
Another problem
def calculateTransitions(im): h, w = im.shape[0], im.shape[1] prev = im[0,0] n = 0 for x in range(1, h): for y in range(1, w): curr = im[x,y] # check if the is black to white transition n = n+1 if curr == 255 and prev == 0 else n prev = curr return n
There is something wrong with n = n+1 if curr == 255 and prev == 0 else n prev = curr return n this part
please solve getting the same error