True color matrice - image processing, MATLAB in Engineering

Assignment Help:

True color matrice:

The true color matrices are the other way to represent images. The true color matrices are 3-dimensional matrices. The first two coordinates are the coordinates of pixel. The third index is the color component; (:,:,1) is the red, (:,:,2) is the green, & (:,:,3) is the blue component. Each and every element in the matrix is of the type uint8 that is an unsigned integer type by using 8 bits. With 8 bits, 28 (or 256) values can be stored and therefore the range of values is 0 to 255. The minimum value, 0, shows the darkest hue available so all 0's answers in a black pixel. The maximum value, 255, shows the brightest hue. For illustration, when the values for a given pixel coordinates px and py (px,py,1) is 255, (px,py,2) is 0 and (px,py,3) is 0 then that pixel will be bright red. All 255's outcomes in a white pixel.

The image function shows the information in the 3-dimensional matrix as an image.

For illustration, this generates a 2× 2 image as shown in figure below. The matrix is 2×2×3, where the third dimension is the color. The pixel in position (1,1) is red, the pixel in position (1,2) is blue, the pixel in position (2,1) is green, and the pixel in position (2,2) is black.

 

>> mat(1,1,1) = 255;

>> mat(1,1,2) = 0;

>> mat(1,1,3) = 0;

>> mat(1,2,1) = 0;

>> mat(1,2,2) = 0;

>> mat(1,2,3) = 255;

>> mat(2,1,1) = 0;

>> mat(2,1,2) = 255;

>> mat(2,1,3) = 0;

>> mat(2,2,1) = 0;

>> mat(2,2,2) = 0;

>> mat(2,2,3) = 0;

>> mat = uint8(mat);

>> image(mat)

673_true color matrixc.png


Related Discussions:- True color matrice - image processing

Example to change the line width from the default, Example to change the li...

Example to change the line width from the default: For illustration, to change the line width from the default of 0.5 to 1.5: >> set(hl,'LineWidth',1.5) As long as the

Splits a string - strtok function, Splits a string : The strtok functi...

Splits a string : The strtok function splits a string into pieces; it can be called in many ways. The function receives one string as an input argument. It appears for the fir

Plotting from a function, Plotting from a Function: The following func...

Plotting from a Function: The following function creates a Figure Window as shown in figure, which shows various types of plots for similar y vector. The vector is passed as a

Gauss elimination, Gauss Elimination: The Gauss elimination technique ...

Gauss Elimination: The Gauss elimination technique consists of:    Generating the augmented matrix [A b]    Applying EROs to augmented matrix to obtain an upper trian

Function call - modular program, Function call: In the function call, ...

Function call: In the function call, not any arguments are passed so there are no input arguments in the function header. The function returns an output argument, therefore th

Function used in sound files, Function used in sound files: The MATLAB...

Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel

Algorithm for subfunction, Algorithm for subfunction: The algorithm fo...

Algorithm for subfunction: The algorithm for subfunction askforn is as shown:  Prompt the user for the positive integer n.  Loop to print an error message and reprom

Num2str function - string, num2str function: The num2str function, tha...

num2str function: The num2str function, that converts real numbers, can be called in many ways. If only the real number is passed to the num2str function, it will generate a s

Replacement - gauss-jordan elimination, Replacement : Replace a row b...

Replacement : Replace a row by adding it to (or subtract from it) a multiple of the other row. For a given row ri, this is written as   ri  - srj →  ri Note that when r

Matlab assignment, 1. Write a MATLAB function (upperTriangle) using the fun...

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

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