Beispiel #1
0
            #thresholded = cv2.morphologyEx(thresholded, cv2.MORPH_OPEN, kernel)
            #thresholded = cv2.morphologyEx(thresholded, cv2.MORPH_CLOSE, kernel)
            pass

    #abilitazione modalita automatica
    if manualMode:
        modeManual()
    else:
        x=findCircles(thresholded, hsvFrame)
        if (found and (ball_state >= 2)):
            follow(x)
            print "follow"
        elif (enableMotor and (ball_state==0)):
            print "spirale"

    if not (client_socket is None):
        tXrX(cameraFeed, thresholded)

    cv2.imshow(hsvWindow, hsvFrame) #immagine con colori HSV
    cv2.imshow(thresholdWindow,thresholded) #immagine Threshold
    escKey = cv2.waitKey(delta_t)

    if exit:
        break

saveValue()
cv2.destroyAllWindows()
cv2.VideoCapture(0).release()
motor.onClose()
server_socket.close()