diff --git a/mdata/crop.py b/mdata/crop.py index 20874d7..93b5dfc 100644 --- a/mdata/crop.py +++ b/mdata/crop.py @@ -35,8 +35,9 @@ def crop_Test(): h, w = img.shape[:2] left, upper = np.random.randint(w - 300), np.random.randint(h - 300) img_crop = img[upper:upper + 300, left:left + 300] - cv2.imwrite(os.path.join(base_dir, category + '_crop_cv', name)) - except: + cv2.imwrite(os.path.join(base_dir, category + '_crop_cv', name),img_crop) + except Exception as e: + print '[EXCPT]',e pass -- libgit2 0.21.2