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

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

Finding a sting - function findstr: The function findstr receives two strings as input arguments. It finds all the occurrences of shorter string contained by the longer, and r

Basic mathematical operations, Basic mathematical operations: All the ...

Basic mathematical operations: All the basic mathematical operations can be executed on symbolic expressions and variables (example, add, raise to a power, multiply, subtract,

Function used in binary search, Function used in binary search: The fu...

Function used in binary search: The function below implements this binary search algorithm. It receives two arguments: the sorted vector and a key (on the other hand, the func

Algorithm for the function e, Algorithm for the function e: The algori...

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

Displaying the cell arrays, Displaying the cell arrays: There are seve...

Displaying the cell arrays: There are several techniques of displaying the cell arrays. The celldisp function shows all elements of the cell array:   >> celldisp(cellro

Function strncmp, Function strncmp: The function strncmp compares only...

Function strncmp: The function strncmp compares only the first n characters in the strings and ignores the rest. The initial two arguments are strings to compare, and third ar

Showing cell array elements and attributes, Referring to and Showing Cell A...

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

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.

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

Filter, A matlab function to calculate filter order

A matlab function to calculate filter order

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