def user_input() -> int:
    """Displays a menu of the available actions and asks user's input
    :return sel: integer representing user's choice"""

    print("")
    print("=" * 50)
    print("1 - Collect images for calibration")
    print("2 - Perform calibration")
    print("3 - Disparity map tuning on sample images")
    print("4 - Real time disparity map")
    print("5 - Exit")

    while True:
        try:
            sel = input("Select one of the options [1, 2, 3, 4, 5]: ")
            sel = int(sel)
            if sel not in [1, 2, 3, 4, 5]:
                print("The option inserted is not valid, retry.")
            else:
                break
        except ValueError:
            print("The option inserted is not numeric, retry.")
    print("-" * 50)
    return sel