Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,7 @@ def transalation(img):
|
|
| 70 |
tx=np.random.randint(2,60)
|
| 71 |
ty=np.random.randint(2,55)
|
| 72 |
tm=np.array([[1,0,tx],[0,1,ty]],dtype=np.float32)
|
| 73 |
-
trans_img=cv2.warpAffine(img,tm)
|
| 74 |
img=cv2.imdecode(trans_img,cv2.IMREAD_COLOR)
|
| 75 |
img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
| 76 |
st.image(img_rgb, caption="Uploaded Image (OpenCV)", use_container_width=True)
|
|
|
|
| 70 |
tx=np.random.randint(2,60)
|
| 71 |
ty=np.random.randint(2,55)
|
| 72 |
tm=np.array([[1,0,tx],[0,1,ty]],dtype=np.float32)
|
| 73 |
+
trans_img=cv2.warpAffine(img,tm,dsize=(300,300))
|
| 74 |
img=cv2.imdecode(trans_img,cv2.IMREAD_COLOR)
|
| 75 |
img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
| 76 |
st.image(img_rgb, caption="Uploaded Image (OpenCV)", use_container_width=True)
|