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
Beispiel #3
0
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
Beispiel #4
0
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
Beispiel #5
0
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