diff --git a/albumentations/augmentations/functional.py b/albumentations/augmentations/functional.py
index <HASH>..<HASH> 100644
--- a/albumentations/augmentations/functional.py
+++ b/albumentations/augmentations/functional.py
@@ -57,21 +57,20 @@ def shift_scale_rotate(img, angle, scale, dx, dy, interpolation=cv2.INTER_LINEAR
 
 def center_crop(img, crop_height, crop_width):
     height, width = img.shape[:2]
-
-    if height < crop_height:
-        y1 = 0
-        y2 = height
-    else:
-        y1 = (height - crop_height) // 2
-        y2 = y1 + crop_height
-
-    if width < crop_width:
-        x1 = 0
-        x2 = width
-    else:
-        x1 = (width - crop_width) // 2
-        x2 = x1 + crop_width
-
+    if height < crop_height or width < crop_width:
+        raise ValueError(
+            'Requested crop size ({crop_height}, {crop_width}) is larger than the image size ({height}, {width})'
+            .format(
+                crop_height=crop_height,
+                crop_width=crop_width,
+                height=height,
+                width=width,
+            )
+        )
+    y1 = (height - crop_height) // 2
+    y2 = y1 + crop_height
+    x1 = (width - crop_width) // 2
+    x2 = x1 + crop_width
     img = img[y1:y2, x1:x2, :]
     return img
Raise an exception if crop size for center_crop is larger than the image size