Steve on Image Processing with MATLAB

Image processing concepts, algorithms, and MATLAB

All about pixel colors: Window-level and CLim

Note

See the following posts for new or updated information about this topic:

  • MATLAB image display - from data values to pixel colors
  • MATLAB image display - truecolor and indexed images
  • MATLAB image display - scaled indexed images
  • MATLAB image display - grayscale and binary images
  • MATLAB image display - autoscaling values with imshow
  • In a comp.soft-sys.matlab newsgroup post on January 17, Kevin wanted to know how the brightness/contrast control in imtool worked. Image Processing Toolbox function imtool is an image viewing/navigation GUI.

    In medical imaging the brightness/contrast control is called the "window/level" control, and there is a reasonably standard set of mouse motions for changing the window and level. These mouse motions are supported by imtool.

    This diagram shows how the terms "window" and "level" are related to brightness and contrast adjustment. Making the window wider or narrower decreases or increases the display contrast; moving the level left or right changes the display brightness.

    This window-level scaling function is just like the CLim scaling function I described previously. I replied to Kevin that the brightness/contrast control in imtool worked by adjusting the axes CLim property.

    Here's an non-medical example of how adjusting the CLim can make previously unseen image details visible.

    I = imread('cameraman.tif');
    imshow(I)
    text(256, 265, 'Image courtesy of Massachusetts Institute of Technology', ...
       'HorizontalAlignment', 'right', 'FontWeight', 'light', 'FontSize', 7, ...
       'Color', [.7 .7 .7])

    Not much detail is visible in the coat or glove. But you can make out much more detail if you change the CLim property of the axes:

    imshow(I)
    set(gca, 'CLim', [6 21])  % caxis([6 21]) does the same thing.




    Published with MATLAB® 7.1

    |
    • print
    • send email

    댓글

    댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.