shubham680 commited on
Commit
ef96fd2
·
verified ·
1 Parent(s): 87184ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -86,6 +86,18 @@ def scaling(img):
86
  s_img=cv2.warpAffine(img,sm,(img.shape[1],img.shape[0]))
87
  img_scal_rgb=cv2.cvtColor(s_img,cv2.COLOR_BGR2RGB)
88
  st.image(img_scal_rgb, caption="Scaling Applied", use_container_width=True)
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
 
91
 
 
86
  s_img=cv2.warpAffine(img,sm,(img.shape[1],img.shape[0]))
87
  img_scal_rgb=cv2.cvtColor(s_img,cv2.COLOR_BGR2RGB)
88
  st.image(img_scal_rgb, caption="Scaling Applied", use_container_width=True)
89
+
90
+ def shearing(img):
91
+ sx=1
92
+ shx=0.1
93
+ tx=0
94
+ shy=0.1
95
+ sy=1
96
+ ty=0
97
+ shm=np.array([[sx,shx,tx],[shy,sy,ty]],dtype=np.float32)
98
+ img_all=cv2.warpAffine(img,shm,(img.shape[1],img.shape[0]))
99
+ img_shear_rgb=cv2.cvtColor(s_img,cv2.COLOR_BGR2RGB)
100
+ st.image(img_shear_rgb, caption="Shearing Applied", use_container_width=True)
101
 
102
 
103