低对比度图像/帧会产生什么问题? 以及我们如何检测到它们?
低对比度图像在明暗区域之间的差异很小,因此很难看到对象边界的起点和场景背景的起点。如下图。
但是可以识别对比度相对比较低的排除掉。
参考代码如下:
# import the necessary packages
from skimage.exposure import is_low_contrast
from imutils.paths import list_images
import argparse
import imutils
import cv2
image = cv2.imread('C:/Users/zyh/Desktop/123.png')
image = imutils.resize(image, width=450)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# blur the image slightly and perform edge detection
blurred = cv2.GaussianBlur(gray, (5, 5), 0)
edged = cv2.Canny(blurred, 30, 150)
# initialize the text and color to indicate that the input image
# i