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

Assignment Help:

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)


Related Discussions:- Use of built-in colormaps - image processing

Illustration of gauss-jordan, Illustration of gauss-jordan: Here's an ...

Illustration of gauss-jordan: Here's an illustration of performing such substitutions by using MATLAB >> a = [1 3 0; 2 1 3; 4 2 3] a = 1 3 0 2 1 3 4 2

Removing whitespace characters, Removing Whitespace Characters: The MA...

Removing Whitespace Characters: The MATLAB has functions which will eliminate trailing blanks from the end of a string and/or leading blanks from the starting of a string.

Example of modular program, Example of modular program: In a modular p...

Example of modular program: In a modular program, there would be one main script which calls three separate functions to complete these tasks: A function to prompt an us

Sound files, Sound Files: The sound signal is an illustration of a con...

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

Example of plotting from a function, Example of Plotting from a Function: ...

Example of Plotting from a Function: For illustration, the function can be called as shown below:      >> y = [1:2:9].^3      y =     1  27  125  343  729

Changing case, Changing Case: The MATLAB has two functions which conve...

Changing Case: The MATLAB has two functions which convert strings to all uppercase letters, or all lowercase, known as the upper and lower. >> mystring = 'AbCDEfgh';

Creating a cell array - assign values to array, Creating a cell array: ...

Creating a cell array: The other method of creating a cell array is easy to assign values to particular array elements and build it up element by element. Though, as explained

Finding a sting - function strfind, Finding a sting - function strfind: ...

Finding a sting - function strfind: The function strfind does necessarily similar thing, except that the order of the arguments does make dissimilarity. The common form is str

Patch function - graphics objects, Patch function - graphics objects: ...

Patch function - graphics objects: The patch function is used to generate a patch graphics object, which is made from 2-dimensional polygons. The patch is defined by its verti

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd