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
Referring to and Showing Cell Array Elements and Attributes: Just as with the other vectors, we can refer to individual elements of the cell arrays. The only difference is tha

Technique to creating this structure: An alternative technique of creating this structure, that is not as efficient, includes using the dot operator to refer to fields in the

Defined a variable in work space: The variables defined in the script will become a part of the workspace: >> clear >> who >> mysummfile    15 >> who

1. Write a MATLAB function (upperTriangle) using the functions you previously created to convert a matrix to upper triangular form. Start with row 1, column1. Find the row that has

Function cirarea - Anonymous functions: The function handle name is cirarea. The one argument is passed to the input argument radius. The body of the function is an expression

Algorithm for the function e: The algorithm for the function eoption is as shown: Use the menu function to show the 4 choices. Error-check (an error would take place

Reading from a File in a While Loop: Though in most languages the combination of a loop and an if statement would be essential to determine whether or not the elements in a ve

Subfunctions: Though, it is possible to have more than one function in a given M-file. For illustration, if one function calls the other, the first function would be the prima

Illustration of Preallocating a Vector: Illustration of calling the function: >> myveccumsum([5 9 4]) ans =     5  14  18 At the first time in the loop, outvec wil

Structures: The Structures are data structures which group together values which are logically related in what are known as the fields of structure. The benefit of structures