def image_shape(img):
    """return image shape

    Args:
        img (array, [HxWx(c) or HxW]): image
    
    Returns:
        a tuple containing
            - **h** (int) : image height
            - **w** (int) : image width
            - **c** (int) : image channel
    """
    if len(img.shape) == 3:
        return img.shape
    elif len(img.shape) == 2:
        h, w = img.shape
        return h, w, 1