19-3 8-bit ������

b MATLAB 4 ɡAvƳOxsbǡ]Double-precision^x}A]C@ӤαF 8 bytes]64 bits^Ay\hnŶOCb MATLAB 5 AѤF uint8 ƫAA]iHNxsŶK@C]uint8 N 8-bit unsigned integerAYO 8 줸BaŸƭȡC^

ѩ uint8 u 8 Ӧ줸AҥHܪƭȽd 0 255]=28-1^ ơAo@޼vƤwgFC

ѩ 8-bit vƪ̤pȬ 0AM@몺ǯ޼vƬۮt 1A]bظƬۤഫɡAnSOpߡCҦpG

Example 1: 19-vܻPŪg/uint801.mload clown.mat Z8 = uint8(X-1); % N X-1 ন uint8 ƫA close all % Ҧϧε image(Z8); colormap(map); colorbar;

bWҤAX OǪ޼vAݱN 1 A~ഫ unit8 榡C]image iHظƮ榡AӥTaܼvC^vҦŶjpAiJpUG

>> whos X Z8 Name Size Bytes Class X 200x320 512000 double array Z8 200x320 64000 uint8 array Grand total is 128000 elements using 576000 bytes

ѤWҥiAZ8 ҦΪŶu X K@CYnN 8-bit v^ǼvAiJpUG

>> Z64 = double(Z8)+1;

uint8 ƫAiΩmvơAɨC@]RAG B^d 0 255 ơAӤAO 0 1 ơCimage OiH uint8 mvơC

NǪmv@ uint8 ƫAAiJpUG

>> RGB8 = uint8(round(RGB64*255));

䤤 RGB64 ǪmvơA RGB8 hO unit8 8-bit vơCϤAYiഫAiJpUG

>> RGB64 = double(RGB8)/255;

vOΨƫAYAiUG

vOƫA
doubleuint8
޼v (Indexed Images) vx}jpGmn
Lx}jpGk3, k$\leq$256
LƽdG [0, 1]
vܫOGimage
vƽdG [1, k] vƽdG [0, k-1]
j׼v (Intensity Images) vx}jpGmn
Lx}jpGk3, k$\leq$256]Lq`OǶ^
LƽdG [0, 1]
vܫOGimagesc
vƽdGN(q`O[0,1])vƽdG [0, 255]
mv (Truecolor Images) vx}jpGmn3
vܫOGimage
vƽdG [0A1] vƽdG [0, 255]


MATLAB{]pGJg