def get_matching_points(requested_file_names, all_file_names, object_points, image_points):
    """
        Gets the object points and image points of a requested set of files

    :param requested_file_names: files to look through
    :param all_file_names: the list of file names
    :param object_points: the object points list of the images in the given directory
    :param image_points: the image points list of the images in the given directory
    :return: the requested object points and image points
    """
    requested_file_nameset = set(requested_file_names)
    requested_object_points = []
    requested_image_points = []

    for index, filename in enumerate(all_file_names):
        if filename in requested_file_nameset:
            requested_object_points.append(object_points[index])
            requested_image_points.append(image_points[index])

    return requested_object_points, requested_image_points