Update app.py
Browse files
app.py
CHANGED
|
@@ -157,10 +157,10 @@ def remove_bg(fl):
|
|
| 157 |
frame_c = (frame.astype(np.int16)-bg_diff).astype(np.uint8)
|
| 158 |
|
| 159 |
|
| 160 |
-
blur_s = []
|
| 161 |
edges = cv2.Laplacian(cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY), cv2.CV_64F)
|
| 162 |
for i in range(2, frame.shape[0]-2):
|
| 163 |
-
blur_s.append([])
|
| 164 |
for j in range(2, frame.shape[1]-2):
|
| 165 |
d = edges[i-2:i+2,j-2:j+2].var().astype(np.uint8)
|
| 166 |
blur_s[i-2].append(np.array([d]))
|
|
|
|
| 157 |
frame_c = (frame.astype(np.int16)-bg_diff).astype(np.uint8)
|
| 158 |
|
| 159 |
|
| 160 |
+
blur_s = np.array([])
|
| 161 |
edges = cv2.Laplacian(cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY), cv2.CV_64F)
|
| 162 |
for i in range(2, frame.shape[0]-2):
|
| 163 |
+
blur_s.append(np.array([]))
|
| 164 |
for j in range(2, frame.shape[1]-2):
|
| 165 |
d = edges[i-2:i+2,j-2:j+2].var().astype(np.uint8)
|
| 166 |
blur_s[i-2].append(np.array([d]))
|