[Insight-users] Rgb image bright and contrast adjust
Dan Mueller
dan.muel at gmail.com
Thu Sep 15 23:48:25 EDT 2011
Hi Liqin,
According to Wikipedia (reliability questionable), GIMP uses the
following formula:
http://en.wikipedia.org/wiki/Image_editing
if (brightness < 0.0) value = value * ( 1.0 + brightness);
else value = value + ((1 - value) * brightness);
value = (value - 0.5) * (tan ((contrast + 1) * PI/4) ) + 0.5;
where value is the input color value in the 0..1 range and brightness
and contrast are in the -1..1 range.
I have implemented this formula in my own applications, and it seems
to work quite well.
HTH
Cheers, Dan
On 16 September 2011 00:00, Wang, Liqin <Wang.Liqin at mayo.edu> wrote:
> Dear All,
>
> I am working at Mayo clinic for some clinical image applications. Now we
> need to adjust RGB image bright and contrast.
> Could you please point some reference as how to adjust rgb image bright and
> contrast?
>
> Thanks,
>
> Liqin
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list