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

Scaling - gauss-jordan elimination, Scaling:   change a row by multiplying ...

Scaling:   change a row by multiplying it by a non-zero scalar sri →  ri For illustration, for the matrix:

Algorithm for appex subfunction, Algorithm for appex subfunction: The ...

Algorithm for appex subfunction: The algorithm for appex subfunction is as shown:  Receives x & n as the input arguments.  Initializes a variable for running sum of t

Program to counting in a while loop, Program to Counting in a while loop: ...

Program to Counting in a while loop: The script initializes variable counter to 0. Then, in the while loop action, each and every time the user successfully enter a number, th

Modular programs, Modular programs: In a modular program, the answer i...

Modular programs: In a modular program, the answer is broken down into modules, and each is executed as a function. The script is usually known as the main program. In orde

Cross product of matrix, Cross Product: The cross or outer product a ×...

Cross Product: The cross or outer product a × b of two vectors a and b is defined only whenever both a and b are the vectors in three-dimensional space, that means that they b

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

Filter, A matlab function to calculate filter order

A matlab function to calculate filter order

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

Anonymous functions, Anonymous Functions: The anonymous function is a ...

Anonymous Functions: The anonymous function is a very easy, one-line function. The benefit of an anonymous function is that it does not have to be stored in an M-file. This ca

Distributed computing on linux cluster, i want to run 4 instances of my mat...

i want to run 4 instances of my matlab code on 4 processor cores. im executing the job from head node. i created a parallel job and assigned number of workers. but i don''t get bac

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