| Version 5.0 (R14) Image Processing Toolbox™ Release Notes | ![]() |
This table summarizes what's new in Version 5.0 (R14SP2):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | Yes—Details labeled as Compatibility Considerations, below. See also Summary. | Bug Fixes Details | No |
New features and changes introduced in this version are:
The Image Processing Toolbox includes a new, open-architecture, image exploration and enhancement tool, called the Image Tool.
The Image Tool replaces the Image Viewer, providing all the display and exploration capabilities of its predecessor. For example, you can use the Image Tool to display an image, view general information about the image, get information about individual pixels or regions of pixels in the image, and navigate large images using the Overview navigation window, scroll bars, and magnification tools.
In addition, the Image Tool introduces several new tools, such as the Adjust Contrast tool and the Choose Colormap tool. You can use the Adjust Contrast tool to adjust the brightness and contrast of an image interactively. You can use the Choose Colormap tool to change the colormap for indexed and intensity images to any of MATLAB colormaps or to a user-defined colormap.
Unlike the Image Viewer, the Image Tool is built using standard features of MATLAB Handle Graphics®. This enables the Image Tool to provide access to the image being displayed using standard Handle Graphics techniques. For example, you can use annotations and overlay vector graphics on images displayed in the Image Tool. You can use imtool as an example to follow or as a base to use to create your own application.
To start the Image Tool, use the imtool function:
imtool('moon.tif')
The toolbox includes several new modular interactive tools that you can activate from the command line and use with images displayed in a MATLAB figure window, called the target image in this documentation. The tools are modular because they can be used independently or in combination to create custom graphical interfaces for image processing applications. The Image Tool uses these modular tools.
The following table lists these modular tools along with the functions you use to create them.
Modular Tool | Description | Function |
|---|---|---|
Adjust Contrast tool | Display histogram of image pixel values in the target image and enable interactive adjustment of contrast and brightness by manipulating the range. | Use imcontrast to create the tool in a separate figure window and associate it with an image. |
Display Range tool | Display a text string identifying the display range values of the target image. | Use imdisplayrange to create the tool, associate it with an image, and embed it in a figure or uipanel. |
Image Information tool | Display basic information about an image, along with any metadata the image might contain. | Use imageinfo to create the tool. To collect image information, use imattributes, imfinfo, and dicominfo. |
Magnification box | Create a text edit box containing the current magnification of the target image. Users can type in the desired magnification. | Use immagbox to create the tool, associate it with an image, and embed it in a figure or uipanel. |
Overview tool | Display the target image in its entirety with the portion currently visible in the scroll panel outlined by a rectangle superimposed on the image. Moving the rectangle changes the portion of the target image that is currently visible in the scroll panel. | Use imoverview to create the tool in a separate figure window and associate it with an image. Use imoverviewpanel to create the tool in a uipanel that can be embedded within another figure uipanel. |
Pixel Information tool | Display information about the pixel the mouse is over in the target image. | Use impixelinfo to create the tool, associate it with an image, and display it in a figure or uipanel. If you want to display only the pixel values, without the text label, use impixelinfoval. |
Pixel Region tool | Display pixel values for a specified region in the target image. | Use impixelregion to create the tool in a separate figure window and associate it with an image. Use impixelregionpanel to create the tool as a uipanel that can be embedded within another figure or uipanel. |
Scroll Panel | Display target image in a uipanel with scroll bars. | Use imscrollpanel to add a scroll panel to an image displayed in a figure window. |
In addition to the modular tools listed above, the toolbox includes a number of new utility functions that make GUI building easier. The following table lists these utility functions in alphabetical order. The tools reside in the $MATLAB/toolbox/images/imuitools directory, where $MATLAB represents your MATLAB installation directory.
Function | Description |
|---|---|
Retrieve imagemodel objects from image handles | |
Return information about image attributes | |
Get handle to current image axes | |
Get handle to current image figure | |
Image Open File dialog box | |
Get all image handles | |
Create position rectangle | |
Add function handle to callback list | |
Check validity of handle | |
Get Application Programmer Interface from a handle | |
Directories containing IPT and MATLAB icons | |
Delete function handle from callback list | |
Align figure windows |
The toolbox now includes three new functions that provide support for the Hough transform.
The hough function implements the Standard Hough Transform (SHT). The Hough transform is designed to detect lines, using the parametric representation of a line:
rho = x*cos(theta) + y*sin(theta).
The variable rho is the distance from the origin to the line along a vector perpendicular to the line. theta is the angle between the x-axis and this vector. The hough function generates a parameter space matrix whose rows and columns correspond to these rho and theta values, respectively.
The houghpeaks functions finds peak values in this space, which represent potential lines in the input image.
The houghlines function finds the endpoints of the line segments corresponding to peaks in the Hough transform, and it automatically fills in small gaps.
The toolbox now supports a set of functions that you can use for texture analysis. These functions include
entropy — Calculates the entropy of an intensity image
entropyfilt — Calculates the local entropy of an intensity image
graycomatrix — Computes the gray-level co-occurrence matrix from an image
graycoprops — Extracts properties from a gray-level co-occurrence matrix
rangefilt — Calculates the local range of an image
stdfilt — Calculates the standard deviation of an image
Texture analysis refers to the characterization of regions in an image by their texture content. Texture analysis attempts to quantify intuitive qualities described by terms such as rough, silky, or bumpy in the context of an image. In this case, the roughness or bumpiness refers to variations in the brightness values or gray levels.
Some of the most commonly used texture measures are derived from the Grey Level Co-occurrence Matrix (GLCM). The GLCM is a tabulation of how often different combinations of pixel brightness values (gray levels) occur in a pixel pair in an image. You can use the graycomatrix function to create a GLCM and then use graycoprops to extract feature information (e.g., contrast, correlation, energy, and homogeneity) from the GLCM.
The texture analysis support also includes several new functions that filter using standard statistical measures, such as range, standard deviation, and entropy. (Entropy is a statistical measure of randomness.) To see an example of using these filtering functions, view the "Texture Segmentation Using Texture Filters" demo. Use the iptdemos function to access toolbox demos.
The toolbox includes a new function, iccwrite, that you can use to write International Color Consortium (ICC) color profile data to a file. ICC profiles provide color management systems with the information necessary to convert color data between native device color spaces and device-independent color spaces, called Profile Connection Space (PCS).
The toolbox also includes a function, isicc, that can verify whether the data is a valid ICC profile. The iccwrite function can output profile data in accordance with both Version 2 (ICC.1:2001-04) and Version 4 (ICC.1:2001-12) of the ICC specification. For more information about the changes between Version 2 and Version 4 of the specification, go to the ICC Web site, www.color.org.
In addition, iccread, makecform, and applycform all now work with Version 4 profiles as well as Version 2 profiles, and with color profiles with more than four channels.
To add color profile export support, and to accommodate Version 4 of the specification, there are some differences in the way data is returned by iccread. In the structure returned by iccread some of the fields that contained text strings in previous releases are now structures. Accessing the text string in the fields requires an additional level of dereferencing. For example, the value of the Description field was a text string.
P.Description ans = sRGB IEC61966-2.1 991203
Now, the value of this field is a structure with two fields: String and Optional. To access the text string, you must access the String field in this structure.
P.Description.String ans = sRGB IEC61966-2.1 991203
The toolbox includes two new demos:
Texture Segmentation Using the Text Filters
Analyzing a Multispectral LANDSAT Image
In addition, some of the existing demos have been reorganized into new categories. The Color Segmentation and Morphological Segmentation demos have been moved to the new Image Segmentation category.
The toolbox now includes a new function, dicomanon, that can remove all confidential data from a DICOM file.
The toolbox now includes a new function, intlut, that can convert arrays of uint8, uint16, and int16 integer values using a lookup table.
The toolbox includes several new utility functions that can help with input argument parsing. These functions check the validity of arguments and issue standard error messages, if the argument is invalid. The toolbox includes other utility functions to get the dynamic range of an image and convert a positive integer to an ordinal string.
The following table lists these functions in alphabetical order. The functions reside in the $MATLAB/toolbox/images/iptutils directory, where $MATLAB represents your MATLAB installation directory.
Function | Description |
|---|---|
Check dynamic range of image | |
Check validity of connectivity argument | |
Check validity of input arguments | |
Check validity of colormap argument | |
Check number of arguments | |
Check validity of string arguments | |
Convert positive integer to ordinal string |
There have been several changes to the behavior and syntaxes supported by the imshow function. The following sections describe these changes.
The imshow function when called with a filename
imshow(filename)
no longer automatically displays the filename as a title in the figure window border. In previous releases, the gray space was proportional to image size. Often, this left too little space for small images and too much for big images, making positioning the title in the figure window problematic.
Changes to the algorithm imshow uses to calculate the border size when the 'ImshowBorder' preference is set to 'loose' should allow plenty of room for title, axes tick marks, and axes labels in a way that is independent of the image size. (See New Image Display Range Syntax for more information.)
The imshow syntax for specifying nondefault spatial coordinates has changed to use parameter/value pairs. The old syntax
imshow(x,y,...)
is now
imshow(...,'XData',x,'YData',y)
imshow still accepts the old syntax, automatically translating it to the new syntax and issuing the following warning.
IMSHOW(x,y,...) is an obsolete syntax. Use IMSHOW(...,'XData',x,'YData',y) instead.
The imshow display_option syntax is obsolete. The old syntax,
imshow(...,display_option)
where display_option was either 'truesize' or 'notruesize', has been replaced by the following parameter/value pair syntax:
imshow(...,'InitialMagnification',initial_mag)
As the value, you can specify a numeric magnification percentage value or the text string 'fit'.
imshow still accepts the old syntax, automatically translating the old display_option values to the new syntax, as shown in the following table. The table also includes the text of the warning message issued by imshow.
Old Syntax | Automatic Translation to New Syntax |
|---|---|
imshow(...,'truesize') | imshow(...,'InitialMagnification',100) where 100% magnification specifies the same one-image-pixel to one-screen-pixel magnification achieved by the 'truesize' option. imshow also issues the following warning message: Warning: IMSHOW(...,'truesize') is an obsolete syntax. Use IMSHOW(...,'InitialMagnification',100) instead. |
imshow(...,'notruesize') | imshow(...,'InitialMagnification','fit') where the behavior is similar to the 'notruesize' behavior. imshow issues the following warning message: Warning: IMSHOW(...,'notruesize') is an obsolete syntax. Use IMSHOW(...,'InitialMagnification','fit') instead. |
When you specify a numeric magnification percentage value, imshow performs the following processing to determine how to display the image:
Calculate the gutter dimensions (gray space around image) and figure window decoration dimensions.
Determine the screen dimensions for the image at the requested display magnification.
Determine if the figure fits on the screen at the specified magnification.
If the image in the figure window fits on the screen, display it.
If the image in the figure window does not fit on the screen, imshow reduces the magnification until the image fits on the screen and displays it. imshow issues a warning message that the image has been scaled, including the magnification value in the message.
Note imshow now uses the same magnification increments as the zoom tool (100%, 67%, 50%, 33%,...). |
The imshow syntax in which you specify the display range of the image
imshow(I,[LOW HIGH])
has been augmented to use a parameter/value pair syntax
imshow(...,'DisplayRange',[LOW HIGH])
imshow still accepts the old syntax.
Note, however, that with the new parameter/value syntax, you can specify the target image as a filename, as in the following example.
imshow(filename,'DisplayRange'[LOW HIGH])
If you want to specify the display range for an intensity image specified by a filename, you must use the 'DisplayRange' parameter.
The imshow syntax in which you specified the number of gray levels used to display the image
imshow(I,N)
has been obsoleted.
Compatibility Considerations. If you use this syntax, imshow outputs the following warning message:
IMSHOW(I,N) is an obsolete syntax. Your intensity image will be displayed using 256 shades of gray.
The names of several Image Processing Toolbox preferences have changed in Version 5. The following table lists these preferences with the new name, where available.
Obsolete Preference | New Preference |
|---|---|
'ImshowTruesize' | 'ImshowInitialMagnification' |
'ImviewInitialMagnification' | 'ImtoolInitialMagnification' |
'TruesizeWarning' | No replacement. Use the MATLAB warning function to control whether you see the warning that appears when displaying a large image with imshow. warning off Images:initSize:adjustingMag warning on Images:initSize:adjustingMag |
The following table lists toolbox functions that have been changed in Version 5 of the Image Processing Toolbox.
Function | Enhancement |
|---|---|
The fun argument must be specified as a function handle; it can no longer be specified as an inline function or text string. The syntax blkprc(...,fun,P1,P2...) is no longer supported. Use an anonymous function instead. | |
See the entry for blkprc in this table. It describes the change made to this function. | |
See the entry for blkprc in this table. It describes the change made to this function. | |
No longer supports the 'Dictionary' and 'Raw' parameters. | |
Supports new syntaxes that return the gradient components when gradient-based methods are used (Sobel, Prewitt, Roberts). | |
No longer accepts a handle to a texture-mapped surface as an input argument or returns a texture-mapped surface as an image. getimage now only returns data for image objects. getimage also returns a new flag identifying a binary image. | |
Now implements Otsu's class separability metric, which measures the effectiveness of a threshold computation. For this metric, the lower bound of 0 represents a monotone image and the upper bound of 1 represents a two-valued image. | |
See the entry for iradon in this table. | |
Might produce different results when used in conjunction
with the graythresh function. The graythresh function
uses Otsu's method which, by definition, splits the pixels in an image
into two classes based on the calculated threshold. All the pixels
up to and including the pixels equal to the threshold belong to the
first class and the remaining pixels belong to the other class. | |
Now automatically detects and exploits filter separability to speed up the filter computation. This change in the computational algorithm can result in small differences in the output values because of a combination of floating-point roundoff differences and integer rounding effects. | |
Now supports all interpolation types supported by interp1. Previously, only 'linear', 'nearest', and 'spline' were supported. | |
See the entry for blkprc in this table. It describes the change made to this function. | |
See the entry for blkprc in this table. It describes the change made to this function. | |
See the entry for blkprc in this table. It describes the change made to this function. | |
Now calculates the perimeter of each labeled region in a label matrix. | |
The fun argument must be specified as a function handle; it can no longer be specified as an inline function or text string. The syntax roifilt(...,fun,P1,P2...) is no longer supported. Use anonymous function instead. |
The performance of several existing toolbox functions has been improved in this release, including:
regionprops (six times faster than previous version)
imfilter (faster for separable filters)
The dicomread function has a five to 10 times performance improvement over the previous version.
The performance of the following morphology functions has been improved when used with large rectangular structuring elements.
imdilate
imerode
Functions that call imdilate and imerode, specifying large rectangular structuring elements, might also see a speed improvement, i.e., imopen, imclose, imtophat, and imbothat.
The performance of the following image type conversion functions and color space conversion functions has been improved by using the intlut function with data of classes uint8 and uint16.
imadjust
imcomplement
ind2gray
rgb2gray
rgb2ntsc
rgb2ycbcr
rcbcr2rgb
The memory usage of the following deblurring functions has been improved by clearing temporary variables as the algorithms proceed.
deconvblind
deconvlucy
deconvreg
deconvwnr
The edgetaper function now uses single precision in its calculations for images with an integer data type in order to reduce memory usage. This means that edgetaper returns an answer that is slightly different from the answer returned by previous versions of the toolbox. If you want edgetaper to use double precision for integer data types, convert your image to double before calling edgetaper.
The improfile function used to cast input images to double if the image was of class logical or if the image was of a nondouble class that uses an interpolation method other than nearest-neighbor.
The function now casts them to single to reduce memory overhead. In these cases, the output of improfile might differ slightly from previous versions of the toolbox.
The following are important bug fixes in Version 5 of the Image Processing Toolbox software.
The Canny edge detector now accepts single-valued images, also called monotone images, constant-value images, or flat images. Instead of issuing an error when an input image is single-valued, the edge function used with Canny edge detection now returns an output image containing all zeros, indicating that it found no edges.
imcomplement was incorrectly calculating the complement of an image with signed integer data type. This problem has been fixed.
imlincomb was giving an incorrect answer when combining int16 data with a scalar that had 0.5 as a fractional part. This problem has been fixed.
The iradon function now correctly calculates the vertical origin of the input projections. Previously the calculated origin was off by one for inputs with an even number of projection samples. The effect of this problem could be observed by computing the Radon transform (using radon) of a test pattern containing horizontal edges, followed by computing the inverse Radon transform (using iradon). Careful comparison of the test pattern with the output of iradon showed a vertical misregistration of one pixel.
On the Windows® platform, imshow now sets the figure's 'Renderer' property to 'zbuffer' for indexed images with associated colormaps having more than 256 entries, so they render correctly. Previously these images would appear black.
The issues mentioned here are all described in more detail in previous sections.
Changes to imshow syntax and to toolbox preferences. Old syntaxes and preferences will still work as expected, but they will now warn.
The functions edgetaper, im2bw, imfilter, and improfile may give slightly different answers from previous releases in certain cases.
The following tables lists toolbox functions that have been made obsolete or removed in Version 5.
Function | Status |
|---|---|
dctmtx2 | This function, which was obsoleted in previous release, has been removed from the toolbox. |
im2mis | This function, which was obsoleted in previous release, has been removed from the toolbox. |
imview | This function is obsolete. It now warns and passes its arguments to the imtool function. |
imzoom | This function, which was obsoleted in previous release, has been removed from the toolbox. |
uintlut | This function, which only accepted uint8 and uint16 data, now warns and passes arguments to the intlut function, which also handles int16 data. |
The following are known issues.
imoverview, imoverviewpanel, imscrollpanel and imtool Performance with Large Intensity Images
Adjust Contrast Tool Does Not React to Changes in CLim, CData, or CDataMapping
impixelregionpanel Might Interfere with ButtonDown events in Parent Figure
imagemodel, imageinfo, and imattributes Return Incorrect Data Type
Example in warp Function Reference Page Displays Incorrectly
There is a performance problem with the Image Tool and its related navigation tools when used with large intensity images.
Possible workarounds:
For images of any class, the image can be treated as an RGB image via repmat.
I = imread('concordorthophoto.png');
imtool(repmat(I,[1 1 3]))For images of class uint8 or uint16, the image can be treated as an indexed image.
I = imread('concordorthophoto.png');
n = double(intmax(class(I)));
map = gray(n);
imtool(I,map)Both workarounds will make imcontrast unusable and pixel reporting will be for the wrong image type. The first workaround uses more memory than the second workaround.
If you run the Image Tool and activate one of the navigational tools (zoom in, zoom out, pan) prior to turning on the Adjust Contrast tool, the navigational tool will be turned off and will be replaced by the mouse behavior of imcontrast. Conversely, if you run imtool, start the Adjust Contrast tool, and then start a navigation tool, the mouse behavior of imcontrast is turned off.
If you turn on the Adjust Contrast tool using imcontrast or imtool, and then set the axes CLim property or the image CData or CDataMapping properties, the Adjust Contrast tool does respond to these changes in the image or axes. Once you click on the tool, it updates based on changes to the CLim values.
If you create an impixelregionpanel and another imscrollpanel in the same figure, the impixelregionpanel can interfere with ButtonDown events throughout the figure. This can, for example, prevent the user from clicking and dragging a position rectangle located in an imscrollpanel elsewhere in the figure.
Workaround: After creating all of the panels needed for your GUI, execute this code:
uistack(hPixelRegionPanel, 'bottom')
where hPixelRegionPanel is the handle returned by impixelregionpanel.
The imagemodel, imageinfo, and imattributes functions return class double for int16 or single images. These functions determine the data type by querying the image object's CData. For int16 and single images, the image object converts its CData to class double.
For example,
h = imshow(int16(ones(10))); class(get(h,'CData'));
returns 'double'. Consequently, imageinfo and imattributes would return a class type of double and calling the image model object's getClassType method returns double.
You cannot compile MATLAB applications that call the cpselect function.
On some Windows XP systems, the example on the warp function reference page does not display correctly. When warp is called, the axes is empty. To work around this problem, switch the renderer to the Zbuffer renderer, as follows.
set(gcf,'renderer','ZBuffer')
The following are known issues with Image Processing Toolbox 5 on Linux systems.
On Linux systems, if the Alt+Click combination is defined for any other Window Manager behavior, when you choose the zoom in or zoom out tools in the Image Tool, Alt+click will not zoom in the opposite direction from the currently selected tool.
The following issues are unique to Macintosh systems.
On Macintosh systems, the Image Tool (imtool) has the following limitations:
The Magnification tool is not supported.
The Image Information toolbar button is not functional.
On Macintosh systems, the imageinfo function is not supported because it require Java™ figures, which are not available on this platform.
On Macintosh systems, the impixelinfo and imdisplayrange functions do not resize correctly because they require Java figures, which are not available on this platform.
On Macintosh systems, if you create a scroll panel (imscrollpanel) and drag the scroll bars, the image does not update until you release the mouse from the drag. On other platforms, the image updates continuously during the drag.
On Macintosh systems, the impixelregion and impixelregionpanel are slower than on other platforms.
On Macintosh systems, if you are using the Image Tool and choose the zoom in or zoom out tool, Alt+click does not zoom in the opposite direction from the currently selected tool.
![]() | Version 5.0.1 (R14SP1) Image Processing Toolbox | Version 4.2 (R13SP2) Image Processing Toolbox | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |