Whether image is complex enough to treat as picture.
(image_arr: np.ndarray, laplacian_threshold: float = 800, std_threshold: float = 50)
| 429 | |
| 430 | |
| 431 | def is_complex_image(image_arr: np.ndarray, laplacian_threshold: float = 800, std_threshold: float = 50) -> bool: |
| 432 | """Whether image is complex enough to treat as picture.""" |
| 433 | l_var, s_dev = calculate_image_complexity(image_arr) |
| 434 | return l_var > laplacian_threshold or s_dev > std_threshold |
| 435 | |
| 436 | |
| 437 | # ======================== Convenience ======================== |
nothing calls this directly
no test coverage detected