import cv2
import numpy as np


def is_blurry(image: np.ndarray, threshold: float = 100.0) -> bool:
    gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) if image.ndim == 3 else image
    variance = cv2.Laplacian(gray, cv2.CV_64F).var()
    return variance < threshold


def is_blown_out(image: np.ndarray, bright_threshold: int = 250, max_fraction: float = 0.05) -> bool:
    gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) if image.ndim == 3 else image
    overexposed_fraction = np.mean(gray >= bright_threshold)
    return overexposed_fraction > max_fraction


def is_low_resolution(image: np.ndarray, min_width: int = 1000, min_height: int = 1000) -> bool:
    height, width = image.shape[:2]
    return width < min_width or height < min_height
