Update app.py
Browse files
app.py
CHANGED
@@ -159,9 +159,9 @@ def remove_bg(fl):
|
|
159 |
|
160 |
blur_s = []
|
161 |
edges = cv2.Laplacian(cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY), cv2.CV_64F)
|
162 |
-
for i in range(
|
163 |
blur_s.append([])
|
164 |
-
for j in range(
|
165 |
d = edges[i-2:i+2,j-2:j+2].var().astype(np.uint8)
|
166 |
blur_s[i].append(d)
|
167 |
|
|
|
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].append(d)
|
167 |
|