Commit 76a8de15b82acee1b8bfd0e28ac61749b3477a20

Authored by Chunk
1 parent 48cd6ed7
Exists in master and in 1 other branch refactor

staged.

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
mdata/crop.py
... ... @@ -35,8 +35,9 @@ def crop_Test():
35 35 h, w = img.shape[:2]
36 36 left, upper = np.random.randint(w - 300), np.random.randint(h - 300)
37 37 img_crop = img[upper:upper + 300, left:left + 300]
38   - cv2.imwrite(os.path.join(base_dir, category + '_crop_cv', name))
39   - except:
  38 + cv2.imwrite(os.path.join(base_dir, category + '_crop_cv', name),img_crop)
  39 + except Exception as e:
  40 + print '[EXCPT]',e
40 41 pass
41 42  
42 43  
... ...