CS 1112 Lecture Notes - Lecture 15: Cmyk Color Model
Document Summary
Submatrices: subsections of an array, matrix(4, 5) accesses a single element of a two dimensional array, matrix(2:4, 3:5) accesses rows 2 through 4 and columns 3 through 5. Results in a 3 x 3 array. Images: images are matrices of pixels, jpeg is the most common image format because it compresses the data effectively. Uses less bandwidth: built in functions. Imread reads the . jpg data in to a rectangular array that can be accessed and modified. Imwrite writes data into an image: grayness values. Integer values of type uint8 (unsigned integer 8 bits) 255 is white: example: p = imread("picturename. jpg"); reads in a jpeg file. Creates an array of type uint8 and stores it in p: example: imshow(p) displays the image, iterate through pixels using nested for loops, override color values by assigning that value within the array to a different color. Matlab automatically converts double values to uint8 within these statements.