Loading and saving images in OpenCV is quite limited, so... what is the preferred ways to load all images from a given folder? Should I search for files in that folder with .png
I used skimage. You can create a collection and access elements the standard way, i.e. col[index]. This will give you the RGB values.
from skimage.io import imread_collection
#your path
col_dir = 'cats/*.jpg'
#creating a collection with the available images
col = imread_collection(col_dir)