CodeForge.comFree Open Source Codes Forge and Sharing |
function g = intrans(f, varargin)
%INTRANS Performs intensity (gray-level) transformations.
% G = INTRANS(F, 'neg') computes the negative of input image F.
%
% G = INTRANS(F, 'log', C, CLASS) computes C*log(1 + F) and
% multiplies the result by (positive) constant C. If the last two
% parameters are omitted, C defaults to 1. Because the log is used
% frequently to display Fourier spectra, parameter CLASS offers the
% option to specify the class of the output as 'uint8' or
% 'uint16'. If parameter CLASS is omitted, the output is of the
% same class as the input.
%
% G = INTRANS(F, 'gamma', GAM) performs a gamma transformation on
% the input image using parameter GAM (a required input).
%
% G = INTRANS(F, 'stretch', M, E) computes a contrast-stretching
% transformation using the expression 1./(1 + (M./(F +
% eps)).^E). Parameter M must be in the range [0, 1]. The default
% value for M is mean2(im2double(F)), and the default value for E
% is 4.
%
% For the 'neg', 'gamma', and 'stretch' transformations, double
% input images whose maximum value is greater than 1 are scaled
% first using MAT2GRAY. Other images are converted to double first
% using IM2DOUBLE. For the 'log' transformation, double images are
% transformed without being scaled; other images are converted to
% double first using IM2DOUBLE.
%
% The output is of the same class as the input, except if a
% different class is specified for the 'log' option.
% Copyright 2002-2004 R. C. Gonzalez, R. E. Woods, & S. L. Eddins
% Digital Image Processing Using MATLAB, Prentice-Hall, 2004
% $Revision
...
...
... to be continued.
This is a preview. To get the complete source file,
please click here to download the whole source code package.
| Name | Size | Date |
| 5.00 kB | 16-12-04 13:36 | |
| 1.54 kB | 16-12-04 13:36 | |
| 651.00 B | 16-12-04 13:36 | |
| 2.96 kB | 16-12-04 13:36 | |
| 2.99 kB | 16-12-04 13:36 | |
| 2.42 kB | 16-12-04 13:36 | |
| 2.17 kB | 16-12-04 13:36 | |
| 5.64 kB | 16-12-04 13:36 | |
| 3.87 kB | 16-12-04 13:36 | |
| 592.00 B | 16-12-04 13:36 | |
| 2.30 kB | 16-12-04 13:36 | |
| 2.37 kB | 16-12-04 13:36 | |
| 1.15 kB | 16-12-04 13:36 | |
| 1.02 kB | 16-12-04 13:36 | |
| 5.98 kB | 16-12-04 13:36 | |
| 799.00 B | 16-12-04 13:36 | |
| 977.00 B | 16-12-04 13:36 | |
| 687.00 B | 16-12-04 13:36 | |
| 882.00 B | 16-12-04 13:36 | |
| 736.00 B | 16-12-04 13:36 | |
| 6.47 kB | 16-12-04 13:36 | |
| 874.00 B | 16-12-04 13:36 | |
| 1.00 kB | 16-12-04 13:36 | |
| 8.55 kB | 16-12-04 13:36 | |
| 1.42 kB | 16-12-04 13:36 | |
| 992.00 B | 16-12-04 13:36 | |
| 447.00 B | 16-12-04 13:36 | |
| 2.04 kB | 16-12-04 13:36 | |
| 920.00 B | 16-12-04 13:36 | |
| 2.64 kB | 16-12-04 13:36 | |
| 2.82 kB | 16-12-04 13:36 | |
| 2.65 kB | 16-12-04 13:36 | |
| 1.02 kB | 16-12-04 13:36 | |
| 1.23 kB | 16-12-04 13:36 | |
| 1.94 kB | 16-12-04 13:36 | |
| 2.46 kB | 16-12-04 13:36 | |
| 2.82 kB | 16-12-04 13:36 | |
| 45.71 kB | 16-12-04 13:36 | |
| 26.30 kB | 16-12-04 13:36 | |
| 46.55 kB | 16-12-04 13:36 | |
| 60.11 kB | 13-04-09 20:38 | |
| 1.38 kB | 16-12-04 13:36 | |
| 1.12 kB | 16-12-04 13:36 | |
| 2.90 kB | 16-12-04 13:36 | |
| 3.97 kB | 16-12-04 13:36 | |
| 4.20 kB | 16-12-04 13:36 | |
| 2.12 kB | 16-12-04 13:36 | |
| 791.00 B | 16-12-04 13:36 | |
| 1.30 kB | 16-12-04 13:36 | |
| 1.83 kB | 16-12-04 13:36 | |
| 1.20 kB | 16-12-04 13:36 | |
| 3.25 kB | 16-12-04 13:36 | |
| 3.24 kB | 16-12-04 13:36 | |
| 2.41 kB | 16-12-04 13:36 | |
| 1.90 kB | 16-12-04 13:36 | |
| 1.42 kB | 16-12-04 13:36 | |
| 1.44 kB | 16-12-04 13:36 | |
| 1.97 kB | 16-12-04 13:36 | |
| 1.75 kB | 16-12-04 13:36 | |
| 2.75 kB | 16-12-04 13:36 | |
| 1.28 kB | 16-12-04 13:36 | |
| 7.15 kB | 16-12-04 13:36 | |
| 1.29 kB | 16-12-04 13:36 | |
| 950.00 B | 16-12-04 13:36 | |
| 6.14 kB | 16-12-04 13:36 | |
| 2.88 kB | 16-12-04 13:36 | |
| 1.33 kB | 16-12-04 13:36 | |
| 1.15 kB | 16-12-04 13:36 | |
| 5.30 kB | 16-12-04 13:36 | |
| 1.66 kB | 16-12-04 13:36 | |
| 1.46 kB | 16-12-04 13:36 | |
| 1.98 kB | 16-12-04 13:36 | |
| 4.45 kB | 16-12-04 13:36 | |
| 2.57 kB | 16-12-04 13:36 | |
| 3.78 kB | 16-12-04 13:36 | |
| 4.13 kB | 16-12-04 13:36 | |
| 1.72 kB | 16-12-04 13:36 | |
| 1.55 kB | 16-12-04 13:36 | |
| 1.78 kB | 16-12-04 13:36 | |
| 713.00 B | 16-12-04 13:36 | |
| 1.04 kB | 16-12-04 13:36 | |
| 1.16 kB | 16-12-04 13:36 | |
| 7.00 kB | 16-12-04 13:36 | |
| 967.00 B | 16-12-04 13:36 | |
| 24.00 kB | 16-12-04 13:36 | |
| 18.97 kB | 16-12-04 13:36 | |
| 12.00 kB | 16-12-04 13:36 | |
| 8.68 kB | 16-12-04 13:36 | |
| 2.71 kB | 16-12-04 13:36 | |
| 24.44 kB | 16-12-04 13:36 | |
| 8.54 kB | 16-12-04 13:36 | |
| 1.66 kB | 16-12-04 13:36 | |
| 4.67 kB | 16-12-04 13:36 | |
| 4.52 kB | 16-12-04 13:36 | |
| 940.00 B | 16-12-04 13:36 | |
| 1.06 kB | 16-12-04 13:36 | |
| 4.14 kB | 16-12-04 13:36 | |
| 4.77 kB | 16-12-04 13:36 | |
| 1.04 kB | 16-12-04 13:36 | |
| 3.45 kB | 16-12-04 13:36 | |
| 696.00 B | 16-12-04 13:36 | |
| 3.59 kB | 16-12-04 13:36 | |
| 85.71 kB | 13-04-09 20:39 | |
| 0.00 B | 02-07-09 16:26 | |
| 0.00 B | 02-07-09 16:26 | |
| 0.00 B | 02-07-09 16:26 |