Niv Sardi commited on
Commit
a271ced
·
1 Parent(s): 0d9abe9

python/imtool: crop() takes debug_out arg

Browse files
Files changed (1) hide show
  1. python/imtool.py +1 -2
python/imtool.py CHANGED
@@ -184,11 +184,10 @@ def _mix_alpha(a, b, ba, fx, fy):
184
 
185
  return BoundingBox(x, y, bw, bh)
186
 
187
- def crop(id, fn, logos: List[Centroid], out = './data/squares'):
188
  basename = os.path.basename(fn).replace('.png', '')
189
  img_out = f"{out}/images"
190
  txt_out = f"{out}/labels"
191
- debug_out = f"{out}/debug"
192
  mkdir.make_dirs([debug_out, img_out, txt_out])
193
 
194
  im = cv2.imread(fn)
 
184
 
185
  return BoundingBox(x, y, bw, bh)
186
 
187
+ def crop(id, fn, logos: List[Centroid], out = './data/squares', debug_out = './data/debug/'):
188
  basename = os.path.basename(fn).replace('.png', '')
189
  img_out = f"{out}/images"
190
  txt_out = f"{out}/labels"
 
191
  mkdir.make_dirs([debug_out, img_out, txt_out])
192
 
193
  im = cv2.imread(fn)