از shape استفاده کنید.
height,width,_= img.shape area = width * height #or area = np.prod(img.shape[:2])