2008年10月17日 星期五

week5:



現在開始讀到第二章
果然
不試著自己動手做過一遍 真的會不知到哪裡會有問題
而這個張圖片是我總和第二章所教的指令所打出來的結果
2.1節
設w=imread('檔案名稱.TIF');
接下來開啟figure,imshow(w),pixval on
但不太懂那ㄍ下面黑色的座標功用是什麼?


而2.2介紹了>>size(w)
印出w的長寬
答案是ans =

640 614 3
分別是 RED GREEN BLACK的值
>> w(100,200,:)
ans(:,:,1) =

151


ans(:,:,2) =

99


ans(:,:,3) =

85
>> impixel(w,200,100)

ans =

151 99 85
但我不懂IMPIXEL(g,100,200)這邊是做什麼的
2.3節講到imfinfo('檔案名稱.TIF')
打出這個指令可以秀出這個圖片ㄉ資訊
ns =

Filename: '1288807412[1].tif'
FileModDate: '16-Oct-2008 23:46:57'
FileSize: 1106612
Format: 'tif'
FormatVersion: []
Width: 614
Height: 640
BitDepth: 24
ColorType: 'truecolor'
FormatSignature: [73 73 42 0]
ByteOrder: 'little-endian'
NewSubFileType: 0
BitsPerSample: [8 8 8]
Compression: 'LZW'
PhotometricInterpretation: 'RGB'
StripOffsets: [107x1 double]
SamplesPerPixel: 3
RowsPerStrip: 6
StripByteCounts: [107x1 double]
XResolution: 96
YResolution: 96
ResolutionUnit: 'Inch'
Colormap: []
PlanarConfiguration: 'Chunky'
TileWidth: []
TileLength: []
TileOffsets: []
TileByteCounts: []
Orientation: 1
FillOrder: 1
GrayResponseUnit: 0.0100
MaxSampleValue: [255 255 255]
MinSampleValue: 0
Thresholding: 1
但有些英文我看不懂= ="
接下來2.4節交資訊轉換
>> a=23
>>b=uint8(a)
>> b
b =
23
>>whos a b
Name Size Bytes Class
a 1x1 8 double array
b 1x1 1 uint8 array
他將b設為unsigned integer,並把a放進去
whos a b可以秀出內容
而whos是查詢工作區正使用中的變數 並列出資訊
而2.5則是介紹了PEG、TIFF、GIF、BMP、PNG、HDF
、PCX、XWD、ICO、CUR的檔案
但到P.35之後就完全看不懂了= ="

沒有留言:

張貼留言