Use of built-in colormaps - image processing, MATLAB in Engineering

Use of built-in colormaps:

MATLAB has built-in colormaps, it is also possible to generate others by using combinations of any colors. For illustration, the following generates a customized colormap with only three colors: black, white, & red. This is then set to be the present colormap by passing the color map matrix to the colormap function. Then, a 40× 40 matrix of arbitrary integers in the range from 1 to 3 (as there are just 3 colors) is generated, and that is passed to the image function; the results are as shown in figure:

237_Use of built-in colormaps.png

>> mycolormap = [0 0 0; 1 1 1; 1 0 0]

mycolormap =

0 0 0

1 1 1

1 0 0

>> colormap(mycolormap)

>> mat = randint(40,40,[1 3]);

>> image(mat)

Posted Date: 10/22/2012 8:37:33 AM | Location : United States







Related Discussions:- Use of built-in colormaps - image processing, Assignment Help, Ask Question on Use of built-in colormaps - image processing, Get Answer, Expert's Help, Use of built-in colormaps - image processing Discussions

Write discussion on Use of built-in colormaps - image processing
Your posts are moderated
Related Questions
Binary Search: The binary search supposes that the vector has been sorted first. The algorithm is just similar to the way it works whenever looking for a name in a phone direc

Illustration of Graphics properties: A particular property can also be exhibited, for illustration, to view the line width:     >> get(hl,'LineWidth')     ans =

Gauss-Jordan: The Gauss-Jordan elimination technique begins in similar way which the Gauss elimination technique does, but then rather than of back-substitution, the eliminati

Function cellplot - Cell array: The function cellplot place a graphical display of the cell array in a figure Window; though, it is a high-level view and fundamentally just di


Solving 2 × 2 systems of equations: However this may be easy in a MATLAB, in normal finding solutions to the systems of equations is not. The systems which are 2 × 2 are, thou


str2num function - String: The function str2num does the opposite; it takes the string in which a number is stored and converts it to the type double: >> num = str2num('123.

Illustration of Gauss elimination: For illustration, for a 2 × 2 system, an augmented matrix be: Then, the EROs is applied to obtain the augmented matrix into an upper

Uses of Function handles: The Function handles can also be generated for functions other than anonymous functions, both built-in & user-defined functions. For illustration, th