jolibrain / deepdetect

Deep Learning API and Server in C++14 support for Caffe, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE

Home Page:https://www.deepdetect.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image histogram equalization by the image input connector

beniz opened this issue · comments

Having OpenCV's histogram equalization directly executed by the input connector is useful in some cases for both training and inference.

We suggest a eqhist boolean parameter to be added to the input JSON object on both training and predict calls.

I guess this could go after the rgb check here: https://github.com/jolibrain/deepdetect/blob/master/src/imginputfileconn.h#L104

The function to apply from OpenCV should be:

/// Apply Histogram Equalization
cv::equalizeHist( src, dst );

Beware that equalization is per channel, so the call above may only work when the image is single channel B&W, which is our motivating use case actually. For RGB images, the equalization may need to be applied per channel.