Search code examples
c#image-processingemgucvimage-enhancement

Enhancing details of an image


I have a C# app and I am using Emgu.

I want to brighten up dull images. When I use EqualHist the detail is there but a bit too strong. Are there ways to enhance the existing details of an image but not as vibrant as the EqualHist? Thanks..

Sample images:

enter image description here


Solution

  • Try using StretchContrast (AForge.NET). http://www.aforgenet.com/framework/docs/html/e7e63ac5-7c1b-5dc2-40b2-8c80e217a946.htm

    Update: Well I do not know much about color and lighting correction, but I can recommend these algorithms:

    Global: Gray-World - http://scien.stanford.edu/pages/labsite/2000/psych221/projects/00/trek/GWimages.html

    (I think that a C# version exist)

             code: http://www.fer.unizg.hr/ipg/resources/color_constancy    
             (repository at the bottom)
    

    White-Patch - http://staff.science.uva.nl/~gijsenij/colorconstancy/index_how.php

    (I think that a C# version exists)

             code: http://www.fer.unizg.hr/ipg/resources/color_constancy
             (repository at the bottom)
    

    Local: (performs local corrections): Light Random Sprays Retinex - http://en.wikipedia.org/wiki/Color_constancy

             code: http://www.fer.unizg.hr/ipg/resources/color_constancy
             (repository at the bottom)
    

    The codes are written in C++ but they are easy to read (and compile) so you can try them on your samples.

    The problem with these algorithms is that some of them are slow and can not be directly applied for real-time applications; the codes on http://www.fer.unizg.hr/ipg/resources/color_constancy greatly improve their performance (all improvements are done by changing the algorithm, not by using special C++ tricks nor SIMD instructions).