def _blur_index(self, img): img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) return cv2.Laplacian(img_gray, cv2.CV_64F).var()