Amould commited on
Commit
84f2108
·
verified ·
1 Parent(s): c1a8f2f

Update codes.py

Browse files
Files changed (1) hide show
  1. codes.py +6 -6
codes.py CHANGED
@@ -148,12 +148,12 @@ def transform_standard_points(Affine_mat, x,y):
148
  yt0 = XYt[1]
149
  return xt0, yt0
150
 
151
- def wrap_points(img, x_source, y_source, l=1, DIM =128):
152
- for i in range(len(y_source)):
153
- x0 = x_source[i].int()
154
- y0 = y_source[i].int()
155
- if (x0<DIM) and (x0>0):# and (y0<DIM) and (y0>0):
156
- img[:,:,x0-l:x0+l,y0-l:y0+l] = 0
157
  return img
158
 
159
 
 
148
  yt0 = XYt[1]
149
  return xt0, yt0
150
 
151
+ def wrap_points(img, x_source, y_source, l=1, DIM =dim):
152
+ for i in range(len(y_source)):
153
+ x0 = x_source[i].int()
154
+ y0 = y_source[i].int()
155
+ if (x0<DIM) and (x0>0) and (y0<DIM) and (y0>0):
156
+ img[:,:,x0-l:x0+l,y0-l:y0+l] = 0
157
  return img
158
 
159