Update app.py
Browse files
app.py
CHANGED
|
@@ -148,8 +148,10 @@ def sharpest(fl, i):
|
|
| 148 |
blur_s = []
|
| 149 |
for jdx, fr in enumerate(break_vid[0]):
|
| 150 |
blur_s.append(cv2.Laplacian(cv2.cvtColor(cv2.imread(fr).astype(np.uint8), cv2.COLOR_BGR2GRAY), cv2.CV_64F).var())
|
| 151 |
-
|
| 152 |
-
|
|
|
|
|
|
|
| 153 |
|
| 154 |
def sortFiles(e):
|
| 155 |
e = e.split('/')
|
|
|
|
| 148 |
blur_s = []
|
| 149 |
for jdx, fr in enumerate(break_vid[0]):
|
| 150 |
blur_s.append(cv2.Laplacian(cv2.cvtColor(cv2.imread(fr).astype(np.uint8), cv2.COLOR_BGR2GRAY), cv2.CV_64F).var())
|
| 151 |
+
|
| 152 |
+
fl = break_vid[0][np.argmax(blur_s)]
|
| 153 |
+
print(str(i) +'th file, sharpest: '+str(np.max(blur_s)+', name: '+fl))
|
| 154 |
+
return fl
|
| 155 |
|
| 156 |
def sortFiles(e):
|
| 157 |
e = e.split('/')
|