4
votes

I am struggling with pre-processing images in image recognition.

Up to now, I have tried:

But recently I compared CLAHE with the Auto Contrast feature of Photoshop on gray scale images - and results of Auto Contrast are impressive. I am excited to know about algorithm behind this feature.

Note: I know that Photoshop is proprietary software, and its code may be closed source. So any hint related to improving the CLAHE results, or any other algorithm, would be by me appreciated.

1
Please add the Photoshop tag.Royi
I added, but then removed, as only 5 tags are alowed at maximum, wait I will add in place of machine-learning.Ravinder Payal

1 Answers

2
votes

While CLAHE Algorithm is local by nature Photoshop's Auto Contrast is probably a global method.

I'd say it works on the Histogram of the image only by stretching the values in the image - Image Normalization.
For instant, take RGB image and for each channel stretch its histogram as following (MATLAB Code):

for ii = 1:numChannels
    mOutputImage(:, :, ii) = (mOutputImage(:, :, ii) - max(max(mOutputImage(:, :, ii)))) ./ (max(max(mOutputImage(:, :, ii))) -  min(min(mOutputImage(:, :, ii))));
end

Another approach would be Histogram Equalization.

Probably Photoshop is doing something more Advanced.
Maybe like doing it in the YUV Color Space, mixing the two or using more robust methods which looks on the percentiles of the histogram.

But this is the direction you should experiment with.