Basic-Image-Processing icon indicating copy to clipboard operation
Basic-Image-Processing copied to clipboard

Another problem

Open noorulain3 opened this issue 4 years ago • 0 comments

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

noorulain3 avatar Mar 13 '20 11:03 noorulain3