I want to apply a OpenCV colormap filter in all my Train images, but i'm using the flow_from_directory method as follows:
train_datagen = ImageDataGenerator()
train_generator = train_datagen.flow_from_directory(TRAIN_DIR,
target_size=(224, 224),
batch_size=50,
class_mode='binary')
How can I add the colormap in this case?

