Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,8 +99,8 @@ def zip_file(folder_name="output_images"):
|
|
| 99 |
|
| 100 |
def translation(img,n=5):
|
| 101 |
for i in range(n):
|
| 102 |
-
tx=np.random.randint(2,
|
| 103 |
-
ty=np.random.randint(1,
|
| 104 |
tm=np.array([[1,0,tx],[0,1,ty]],dtype=np.float32)
|
| 105 |
trans_img=cv2.warpAffine(img,tm,dsize=(img.shape[1],img.shape[0]),borderMode=cv2.BORDER_REFLECT)
|
| 106 |
#img_trans_rgb = cv2.cvtColor(trans_img, cv2.COLOR_BGR2RGB)
|
|
|
|
| 99 |
|
| 100 |
def translation(img,n=5):
|
| 101 |
for i in range(n):
|
| 102 |
+
tx=np.random.randint(2,50)
|
| 103 |
+
ty=np.random.randint(1,50)
|
| 104 |
tm=np.array([[1,0,tx],[0,1,ty]],dtype=np.float32)
|
| 105 |
trans_img=cv2.warpAffine(img,tm,dsize=(img.shape[1],img.shape[0]),borderMode=cv2.BORDER_REFLECT)
|
| 106 |
#img_trans_rgb = cv2.cvtColor(trans_img, cv2.COLOR_BGR2RGB)
|