def is_right_red_line(lbot): frame = lbot.getImage() rois = va.detect_red_line(frame) maxIndex = np.argmax(rois) if maxIndex == 2 and rois[maxIndex] > 20: return True return False
def is_line_crossing(lbot): frame = lbot.getImage() roisR = va.detect_red_line(frame) roisB = va.detect_black_line(frame) if roisR[1] > 40 and roisB[1] > 40: return True return False
def linea_roja_centro(lbot, params=None, verbose=False): frame = lbot.getImage() rois = va.detect_red_line(frame) if verbose: print("Red points", rois) maxIndex = np.argmax(rois) if maxIndex == 1 and rois[maxIndex] > 20: return True return False
def left_red_line(lbot, params=None, verbose=False): frame = lbot.getImage() cv2.imwrite('messigray.png', frame) rois = va.detect_red_line(frame) if verbose: print("Red points", rois) maxIndex = np.argmax(rois) if maxIndex == 0 and rois[maxIndex] > 20: return True return False
def line_crossing(lbot, params=None, verbose=False): frame = lbot.getImage() roisR = va.detect_red_line(frame) roisB = va.detect_black_line(frame) if verbose: print("Red points", roisR) print("Black points", roisB) if roisR[1]>40 and roisB[1]>40: return True return False
def is_there_red_line(lbot): frame = lbot.getImage() rois = va.detect_red_line(frame) if rois[np.argmax(rois)]>20: return True return False