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

I am getting another error

Open noorulain3 opened this issue 5 years ago • 0 comments

ValueError Traceback (most recent call last) in 55 return n 56 ---> 57 boundingBox = findBB(binary) 58 cropImg = binary[boundingBox[0]:boundingBox[1], boundingBox[2]:boundingBox[3]] 59 centroid = findCentroid(cropImg)

in findBB(im) 13 for x in range(h): 14 for y in range(w): ---> 15 if (im[x,y] == 0): 16 right = x if x > right else right 17 left = x if x < left else left

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

I have tried a lot but still not able to solve this error. Please help

noorulain3 avatar Mar 13 '20 07:03 noorulain3