1 / 37

Image Compression : Basic Concept

Image Compression : Basic Concept. Image is accessed ( 存取 ) as a 2-D array ( 陣列 ) of data, where each data point is referred to as a pixel ( 像素 ) Notation: I(r,c) = Brightness ( 亮度 ) of image at the pt (r,c) where r = row( 列 ), and c = column( 行 ). Visible Light Imaging.

rimona
Download Presentation

Image Compression : Basic Concept

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Image Compression : Basic Concept

  2. Image is accessed (存取) as a 2-D array (陣列) of data, where each data point is referred to as a pixel (像素) Notation: I(r,c) = Brightness (亮度) of image at the pt (r,c) where r = row(列), and c = column(行)

  3. Visible Light Imaging • Reflectance (反射) function determines manner in which objects (物體) reflect light

  4. Sensors : Converts (轉換) light energy into electrical energy a) Single imaging sensor ; b) Linear ( line) sensor ; c) 2-D or array sensor • CCD: 4kx4k CMOS: less power, cheaper, image quality not as good as CCD

  5. Image Representation • Optical (光學) image : Collection of spatially distributed (空間分佈) light energy measured by an image sensor to generate I(r,c) • Matrix: 2-D array like the image model, I(r,c) • Vector: One row or column in a matrix

  6. Image Types • Binary (二元化) images: Simplest type of images, which can take two values, typically black or white, or “0” or “1” • Gray scale (灰階) images: One-color or monochrome images that contains only brightness information and no color information • Color images: 3 band monochrome images, where each band corresponds to a different color, typically red, blue and green or RGB

  7. Color pixel vector: Single pixel’s values for a color image, (R,G,B) • Multispectral(多光譜)Images: Images of many bands containing information outside of the visible spectrum(可見光譜)

  8. Color Transform/Color Model • Mathematical model or algorithm to map(映射) RGB data into another color space (色彩空間) • Decouples (分開) brightness and color information • Hue(色調)/Saturation(飽和度)/Lightness(亮度) (HSL) Color Transform: • Describes colors in terms that we can more readily understand

  9. Hue corresponds to color, saturation corresponds to the amount of white in color, and lightness is the brightness • For example: a deep, bright orange color would have a large intensity (bright), a hue of “orange” , and a high value of saturation (“deep(深度)”) But in terms of RGB components, this color would have the values as R =245, G= 110, and B=20

  10. Equations for mapping RGB to HSL are: where

  11. Digital Image File Formats • Bitmap images (raster images): Images that can be represented by our image model, I (r,c)

  12. Image file header (檔案標頭): A set of parameters (參數) found at the start of the file image and contains information regarding: • Number of rows (列數)(height, 高) • Number of columns (行數)(width, 寬) • Number of bands (頻帶數) • Number of bits per pixel (每個像數之位 元數)(bpp) • File type (檔案形式)

  13. Look-up table (LUT): Used for storing RGB values for 8-bit color images

  14. Common image file formats are: • BIN, RAW • PPM,PBM,PGM • BMP • JPEG • TIFF • GIF • RAS • SGI • PNG • PICT, FPX • EPS • VIP

  15. Matlab 影像處理I/O相關指令簡介 • 在Matlab中,每一個像素(pixel)之顏色係以0到1之數值來表示。1代表最亮,0代表最暗。 • 彩色的組成係由RGB,也就是 red(紅) 、green(綠) 、blue(籃)的色階來構成。 • 影像之處理係基於矩陣的運算,矩陣內的數值,代表了影像的強弱。

  16. Matlab 影像處理I/O相關指令簡介 • 黑白影像用二維的矩陣來表示,彩色的影像則需藉助三維的矩陣來表示RGB 在該一位置的色濃度。

  17. Matlab 影像處理I/O相關指令簡介 • Show 圖指令imshow( ) • 其指令格式為:imshow(影像矩陣 A,色階 N) ,代表影像矩陣 A以N個色階來顯示黑白影像。 • 若N未設定,則對24位元之影像,內定為256色階。 • 影像矩陣A以三維空間A( : , : , 3)來表示彩色影像,A(: , : , 1)表示紅色之色階; A(: , : , 2)表示綠色之色階; A(: , : , 3)表示籃色之色階。

  18. Matlab 影像處理I/O相關指令簡介 • 另外一種設定為設定界限值,以便讓圖形在範圍以下顯示黑色,在範圍以上顯示白色。指令格式為:imshow(影像矩陣 A, [ lim_l lim_h]) • 代表影像矩陣 A 中的值若小於lim_l,則顯示黑色;若大於lim_h,則顯示白色。

  19. Matlab 影像處理I/O相關指令簡介 • 若已經有了現成的影像檔,希望讀入Matlab的workspace中,可用imread(‘檔案名稱’)讀入,再用imshow( )顯示出來即可。 • imwrite( )可用來將影像寫入影像檔中,其指令格式為:imwrite(影像來源, 寫入之影像檔名稱, ‘影像格式’)

  20. Ex2_1.m • clear; close all; • A=imread('1.bmp'); • figure % 開繪圖視窗 • imshow(A); • size(A) • figure • imshow(A(:,:,2)); %僅show綠色部份 • imwrite(A(:,:,2),'ex2_1.tif','tif'); • B=A(100:150,150:200,1); %取紅色之部份影像 • figure • imshow(B); • figure • imshow(B,[100 200]);

  21. Image Compression using Artificial Neural Networks

  22. Image compression using artificial neural networks • Conventional compression techniques are designed for low noise environments, i.e., bit error rate • Neural networks are suitable for high noise environments, i.e., bit error rate S/N for JPAG algorithm under compression ratio 8:1

  23. Image compression using artificial neural networks 10張(256x256, 24bits)訓練影像

  24. Image compression using artificial neural networks 8 256 8 256 3 64-8-64 networks

  25. Image compression using artificial neural networks Original image Decompressed image 33.0405db Peak S/N: 30.1983db

  26. Image compression using artificial neural networks Comparison of the S/N under compression ratio 8:1

  27. 影像處理 • 影像的空間資料結構表示法---四分樹表示法 • 以四分樹為基礎之類神經網路影像壓縮

  28. 黑白影像的四分樹表示法 • 四分樹切割 給一張黑白影像如圖1所示。利用四分樹的切割方式,可將圖1的影像以樹狀的方式表示成圖2。 圖1 黑白影像 圖2 四分樹表示法

  29. 灰階影像的四分樹表示法 • 給一張灰階影像,利用四分樹的切割方式,亦可將影像以樹狀的方式來表示。 • 某子影像(block)是否繼續分割是依據該子影像內之gray level 範圍是否超出臨界值(0<threshold<1)

  30. 灰階影像的四分樹表示法 Threshold = 0.27 S為一稀疏矩陣其非零 元素表一block之左上角 之位置而其非零元素之 值表該Block之size

  31. 灰階影像的四分樹表示法 Threshold = 0.5 Threshold 愈大, block 數目愈少

  32. 灰階影像的四分樹表示法 Threshold = 0.75 Threshold 愈大, block 數目愈少

  33. 類神經網路影像壓縮 • Conventional compression techniques are designed for low noise environments, i.e., bit error rate • Neural networks are suitable for high noise environments, i.e., bit error rate S/N for JPAG algorithm under compression ratio 8:1

  34. 類神經網路影像壓縮 8 256 8 256 64-8-64, 16-4-16, and 4-2-4 networks

  35. 類神經網路影像壓縮 Block size 64 (8 x 8) 上限 16 (4 x 4) 4 (2 x 2) 下限 Depth first search

  36. 類神經網路影像壓縮 Comparison of the S/N under compression ratio 8:1

More Related