Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,7 +72,7 @@ def rotation(img):
|
|
| 72 |
angle=90
|
| 73 |
r_x=img.shape[0]//2
|
| 74 |
r_y=img.shape[1]//2
|
| 75 |
-
rm=cv2.getRotationMatrix2D((
|
| 76 |
r_img=cv2.warpAffine(img,rm,(img.shape[1],img.shape[0]))
|
| 77 |
img_rgb = cv2.cvtColor(r_img, cv2.COLOR_BGR2RGB)
|
| 78 |
st.image(img_rgb, caption="Rotation Applied", use_container_width=True)
|
|
|
|
| 72 |
angle=90
|
| 73 |
r_x=img.shape[0]//2
|
| 74 |
r_y=img.shape[1]//2
|
| 75 |
+
rm=cv2.getRotationMatrix2D((r_x,r_y),angle,1)
|
| 76 |
r_img=cv2.warpAffine(img,rm,(img.shape[1],img.shape[0]))
|
| 77 |
img_rgb = cv2.cvtColor(r_img, cv2.COLOR_BGR2RGB)
|
| 78 |
st.image(img_rgb, caption="Rotation Applied", use_container_width=True)
|