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
Passing arguments to functions: In all these functions examples faraway, at least one of the arguments was passed in the function call to be the value(s) of the equivalent inp

Inverse of square matrix: The inverse is, hence the result of multiplying the scalar 1/D by each and every element in the preceding matrix. Note that this is not the matrix A,


Execution steps: Whenever the program is executed, the steps below will take place: The script calcandprintarea starts executing. The calcandprintarea calls the readr

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

Illustration of Matrix solutions: For illustration, consider the three equations below with 3unknowns x 1 ,x 2 , and x 3 : We can write this in the form Ax = b here A

Sound Files: The sound signal is an illustration of a continuous signal which is sampled to result in a discrete signal. In this situation, sound waves traveling through the a

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

Symbolic Variables and expressions: The MATLAB has a type known as sym for the symbolic variables and expressions; these work with strings. The illustration, to generate a sym

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