Interactive Contrast/Brightness of Images [message #27803] |
Wed, 07 November 2001 10:39  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I've written a short article about how to interactively
change the contrast and brightness of an image. These
quantities are also called the window level and window
width of an image, too. This kind of functionality is
often required, for example, with 16-bit medical images.
You can find the article here:
http://www.dfanning.com/ip_tips/contrast.html
I also wrote a program, named WindowImage, to
demonstrate the idea. You can find the program
here:
http://www.dfanning.com/programs/windowimage.pro
You will need my TVImage program as well if you
want to run this program:
http://www.dfanning.com/programs/tvimage.pro
Run the program like this:
IDL> WindowImage
The trick in such a program is to find a neat
algorithm for changing the contrast and brightness
as you drag the cursor either horizontally or vertically
on the image. I'm not totally enamored with the one
I came up with and I suspect someone out there has
a better one. If so, I'd like to hear about it. :-)
If you haven't visited the Coyote lately, you might
want to have a look. I've been busy the past couple
of weeks. :-)
You can find over 20 new programming tips here:
http://www.dfanning.com/documents/tips.html#NewTips
As always, I appreciate the feedback.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|