MCPcopy Create free account
hub / github.com/BIT-DataLab/Edit-Banana / is_complex_image

Function is_complex_image

modules/icon_picture_processor.py:431–434  ·  view source on GitHub ↗

Whether image is complex enough to treat as picture.

(image_arr: np.ndarray, laplacian_threshold: float = 800, std_threshold: float = 50)

Source from the content-addressed store, hash-verified

429
430
431def 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 ========================

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected