def cropToROI(input_image,
              SIDE_MARGIN=(20.0, 80.0),
              TOP_BOTTOM_MARGIN=(20.0, 80.0)):

    """
    Method:
        Crops image to include only the
        Region of Interest (ROI)

    Parameters:
        input_image       - Image to crop.
        SIDE_MARGIN       - Tuple of margins on left and right sides (in percent).
        TOP_BOTTOM_MARGIN - Tuple of margines on top and bottom sides (in percent).

    Returns:
        A cropped SimpleCV.Image
    """
    width, height = input_image.width, input_image.height

    top_left = width * SIDE_MARGIN[0] / 100, height * TOP_BOTTOM_MARGIN[0] / 100
    bottom_right = width * SIDE_MARGIN[1] / 100, height * TOP_BOTTOM_MARGIN[1] / 100

    cropped_img = input_image.crop(top_left, bottom_right)

    return cropped_img