def select_region(image):
    """
    It keeps the region surrounded by the `vertices` (i.e. polygon).  
    Other area is set to 0 (black).
    :param image: |Image| camera frame
    :return: image with street region only
    """
    # first, define the polygon by vertices
    rows, cols = image.shape[:2]
    bottom_left = [cols * 0.1, rows * 0.95]
    top_left = [cols * 0.3, rows * 0.3]
    bottom_right = [cols * 0.9, rows * 0.95]
    top_right = [cols * 0.7, rows * 0.3]
    # the vertices are an array of polygons (i.e array of arrays) and the data type must be integer
    vertices = np.array([[bottom_left, top_left, top_right, bottom_right]], dtype=np.int32)

    return filter_region(image, vertices)

    It keeps the region surrounded by the `vertices` (i.e. polygon).  
    Other area is set to 0 (black).
    :param image: |Image| camera frame
    :return: image with street region only
    
apps/driving_pi/lane_detector.py