2 1 cameraman tif 3 2 2 RGB
2. 1 灰階影像 cameraman. tif 3
2. 2 RGB 影像 >> a=imread(‘autumn. tif’); >> figure, imshow(a), impixelinfo 4
2. 3 索引彩色影像 >> figure, imshow(‘forest. tif’), impixelinfo >> c=imread(‘forest. tif’); >> figure, imshow(c), impixelinfo 9
2. 3 索引彩色影像 >> [c, cmap]=imread(‘forest. tif’); >> figure, imshow(c, cmap), impixelinfo • 2. 3. 1 影像資訊 – imfinfo函數可以顯示很多影像資訊。 >> imfinfo(‘forest. tif’) 10
16進位傾印函數 • A HEXADECIMAL DUMP FUNCTION 17
2. 5. 3 微軟BMP 19
2. 5. 3 微軟BMP 20
2. 5. 5 JPEG • JPEG演算法的壓縮會失真,原始資料無法完 全復原。 >> dumphex('football. jpg', 4) ans = FF D 8 00 01 03 03 07 06 FF E 0 00 10 4 A 46 49 46 00 01 01 00 00 01. . . JFIF. . . 00 00 FF DB 00 43 00 03 02 02 03. . . . C. . . . 03 04 03 03 04 05 08 05 05 04 04 05 0 A 07. . . . 08 0 C 0 A 0 C 0 C 0 B 0 A 0 B 0 B 0 D 0 E 12 10 0 D. . . . 24
2. 5. 5 JPEG 25
2. 5. 6 TIFF 27
Exercise • The following shows the hexadecimal dump of a BMP file: 42 4 D 7 E 05 02 00 00 00 36 04 00 00 28 00 00 00 23 01 00 00 C 2 01 00 00 01 00 08 00 00 00 48 01 02 00 00 00 00 00 01 01 01 00 02 02 Determine the height and width of this image (in pixels) and state whether it is a grayscale or color image. 31
- Slides: 31