True color matrice - image processing, MATLAB in Engineering

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

Posted Date: 10/22/2012 8:38:24 AM | Location : United States

Related Discussions:- True color matrice - image processing, Assignment Help, Ask Question on True color matrice - image processing, Get Answer, Expert's Help, True color matrice - image processing Discussions

Write discussion on True color matrice - image processing
Your posts are moderated
Related Questions
Illustration of Vectors of structures: In this illustration, the packages are vector which has three elements. It is shown as a column vector. Each and every element is a stru

Sorting Vectors of structures: Whenever working with vector of structures, it is very common to sort based on a particular field within the structures. For illustration, recal

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,

Execute a exponential function program: Running the script will take up the menu as shown in the figure: Then, what happens will totally depend on which button(s) the

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

FOR Loop: The for loop, or the for statement, is used whenever it is essential to repeat statement(s) in the script or function, and whenever it is known ahead of time how man

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

Function rmfield - structure: The function rmfield eliminates a field from the structure. It returns a new structure with field eliminated, but does not modify the original st

Use polyval to evaluate the derivative at xder. This will be the % slope of the tangent line, "a" (general form of a line: y = ax + b). % 4. Calculate the intercept, b, of t

Gauss-Jordan: The Gauss-Jordan elimination technique begins in similar way which the Gauss elimination technique does, but then rather than of back-substitution, the eliminati