Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cnts = contours.sort_contours(questionCnts[i:i+30])[0]
- for (l ,k )in enumerate(cnts):
- (x, y, w, h) = cv2.boundingRect(k)
- if (w >= 20 and h >= 20) and (w <= 25 and h <= 25) and ar >= 0.7 and ar <= 1.3:
- box = [(x//5)*5, y]
- #print(x, y)
- posicaoRespostas = np.append(posicaoRespostas,(l))
- cv2.rectangle(bolhas, (x, y), (x+w, y+h), (0, 0, 255), 1) #desenho para visualização
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement