📜  确定图像太暗opencv的功能 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:59.076000             🧑  作者: Mango

代码示例1
blur = cv2.blur(image, (5, 5))  # With kernel size depending upon image size
if cv2.mean(blur) > 127:  # The range for a pixel's value in grayscale is (0-255), 127 lies midway
    return 'light' # (127 - 255) denotes light image
else:
    return 'dark' # (0 - 127) denotes dark image