image = getImage() #get image from live feed global targetFound targetFound = False contours = getContour(image) print(count) cv2.imshow("hi",image) if targetFound: found+=1 if found == 1: target.firstImage(contours) print("first") print(target.getOrientation1()) elif found > 1: target.secondImage(contours) print("second") print(target.getOrientation2()) sleep(1) key = cv2.waitKey(10) if key == 27: cv2.destroyAllWindows() break finalOrient= target.finalOrientation() print(finalOrient) targetProcessor.loadTarget(target) azimuth = targetProcessor.findAzimuth() print(azimuth) network1.setAzimuth(azimuth) network1.setOrientation(finalOrient) cv2.destroyAllWindows()