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 is_center_black_line(lbot):
    frame = lbot.getImage()
    rois = va.detect_black_line(frame)
    maxIndex = np.argmax(rois)
    if maxIndex == 1 and rois[maxIndex] > 20:
        return True
    return False
示例#3
0
def right_black_line(lbot, params=None, verbose=False):
	frame = lbot.getImage()
	rois = va.detect_black_line(frame)
	if verbose:
		print("Black points", rois)
	
	maxIndex = np.argmax(rois)
	if maxIndex==2 and rois[maxIndex]>20:
		return True
	return False
示例#4
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
示例#5
0
def is_there_black_line(lbot):
    frame = lbot.getImage()
    rois = va.detect_black_line(frame)
    if rois[np.argmax(rois)] > 20:
        return True
    return False