I have a folder having bunch of images, out of which few images are almost dark like this: Dark Images, and few images are good images like this: Good images
Basically i am able to identify the darker images by using the below code, for the darker images the np.mean(image) comes below 0.1, and for good images it comes above 0.1 range:
from skimage import io, img_as_float
import numpy as np
image = io.imread('C:/Data/Testing/Image_0_5.jpg')
image = img_as_float(image)
print(np.mean(image))
But what i want is to pass the specific folder having all the images so that my code can parse through all the images, and list down the images having dark images. Need help on this.