freealise commited on
Commit
87789b8
·
verified ·
1 Parent(s): 20e2e3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -148,9 +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
- 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):
 
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
+ mx = np.argmax(blur_s)
153
+ fl = break_vid[0][mx]
154
+ print(str(i) +'th file, sharpest frame: '+str(mx)+', name: '+fl)
155
  return fl
156
 
157
  def sortFiles(e):