def centerImage(img):
	"""
	Select center-square crop of non-square images.
	"""
	
	h,w,c = img.shape
	
	if h>w:
		# Image taller than wide: Chop top and bottom off.
		k = (h-w)//2
		return img[k:k+w,:]
	else:
		# Image wider  than tall: Chop left and right off.
		k = (w-h)//2
		return img[:,k:k+h]