def crop_kps(img,kps,size,h_cent):
    """
    Converts keypoints calculated on full image to corresponding cropped locations.

    Parameters
    ----------
    img : numpy.ndarray
        A sample frame at full size.
    kps : numpy.ndarray
        The keypoints for the full size image.
    size : int
        The size of the cropped image.
    h_cent : int
        The horizontal centre of the frame.

    Returns
    -------
    new_kps : list of list of int
        The keypoints rescaled to the cropped image.
    """
    scale = img.shape[0] / size;
    new_w = img.shape[1] / scale;
    h_dif = int((new_w - size) / 2);
    new_kps = [];
    for kp in kps:
        x = int(kp[0] / scale) - h_dif;
        y = int(kp[1] / scale);
        new_kps.append([x,y]);
    return new_kps;