影像處理基本概念課件_第1頁
影像處理基本概念課件_第2頁
影像處理基本概念課件_第3頁
影像處理基本概念課件_第4頁
影像處理基本概念課件_第5頁
已閱讀5頁,還剩34頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、Image Processing Basic Concepts影像處理基本概念主講:周昌民Image Processing Basic ConceContentsImages sampling and resolutionManipulationFiltering, geometrical transformationscompression GIF, JPEG, JPEG2000ContentsImagesSampling and resolutionAn input device (e.g. camera or scanner) will sample (measure) the colo

2、urs in a scene at a number of finite points on a 2D rectangle.Resolution can refer to the number of points sampled (e.g. 640 by 480) or the size of the dots (e.g. 300 dpi).The pixel-depth is related to the number of quantisation levels used for each colour, e.g. 24-bit colourSampling and resolutionA

3、n inpuImage ManipulationWhy would we want to manipulate an image?Deficiencies in the imageFocus blur, motion blur, red-eye, poor lighting, noise, .Special effects requiredSepia, painting styles, combining images, .What methods are available?Pixel level processingStatistical processingGroup of pixel

4、processingGeometrical transformationsImage ManipulationWhy would weImage ManipulationPixel level changesBrightness add an equal value to the R, G and B values of each pixelImage ManipulationPixel level Image ManipulationPixel level changesContrast Multiply the RGB values by some value and reset over

5、all brightnessImage ManipulationPixel level Image ManipulationPixel level changesColour balance Vary the R, G and B brightnesses independentlyImage ManipulationPixel level Image ManipulationPixel level changesColour manipulationGrey scale average RGB weighted to human perceptual system: approx. 0.4R

6、+0.4G+0.2BGreying out (e.g. disabled button) Blend pixel values with grey: e.g. R = (R+200)/2, G = (G+200)/2, etcImage ManipulationPixel level Image ManipulationStatistical ProcessingHistogram equalisation (automatically adjust contrast) Create a histogram H with one bin for each grey scale allowed

7、e.g. for G grey scalesfor each pixel (x, y), Himage(x,y)+;Create a cummulative histogram HcHc0=H0;for each grey scale g from 1 to G-1, Hcg = Hcg-1+Hc;Hcg is now increasing and HcG-1 equals the number of pixels in the imageRescale Hc to the range of grey scales i.e. Hcg*=G/(width*height);Remap image

8、grey scalesfor each pixel (x, y), image(x,y) = Hcimage(x,y);Image ManipulationStatistical Image ManipulationHistogram equalisationexample image with 90 pixels and 10 grey scales 0-9 histogram = 0, 0, 0, 10, 20, 30, 20, 10, 0, 0Hc = 0, 0, 0, 10, 30, 60, 80, 90, 90, 90Hc = 0, 0, 0, 1, 3, 6, 8, 9, 9, 9

9、new histogram = 0, 10, 0, 20, 0, 0, 30, 0, 20, 10Pushes intensities apartdark pixels get darkerlight pixels get lighter Image ManipulationHistogram eqImage ManipulationPixel group processing e.g. ConvolutionNew pixel values are a weighted sum of neighbouring pixels original valuesA filter specifies

10、the weights in the sumCan often use separable 1-D filters for efficiency.filter(i,j)=filter_x(i)filter_y(j)Different (positive and negative) filter coefficients (weights) have different effects e.g. Values like 1, 4, 6, 4, 1/16 will blur the pixelsValues like -1, -3, 3, 1/8 will perform edge detecti

11、onImage ManipulationPixel group Image ManipulationPixel group processing changesBlurringUse a low-pass filter, e.g. 1,4,6,4,1/16 applied along rows then columns.Image ManipulationPixel group Image ManipulationPixel group processing changesEdge enhancement using unsharp masking.Subtracting the blurre

12、d version from the original leaves just the edgesAdd these edges back to the original to bring out the areas of contrast.Image ManipulationPixel group Image ManipulationPixel group processing changesEdge detecting filtersFilters such as 1, 3, -3, -1 can be applied either horizontally or vertically (

13、usually after smoothing) to locate the intensity changes (edges)Horizontal edges (+ 127)Vertical edges (+ 127)Image ManipulationPixel group Image ManipulationPixel level changesCombined effectse.g. embossed = a * original + b * (127+edges at angle q) e.g. b, 3b, 127+a, -3b , bImage ManipulationPixel

14、 level Image ManipulationPixel level changesArt effects e.g. charcoal sketch (looks like an edge detector)Also paint strokes that perform local, directional blending of colours for pointillism etc.Image ManipulationPixel level Image ManipulationGeometrical transformationsMap each pixel (x,y) to some

15、 other position (x,y)newImage(x,y) = oldImage(x,y)Uses backward coordinate mapping, can you see why?would usually sample the from oldImage at non-integer position (x, y) using bilinear interpolation.Many simple effects e.g.Shearing: x = x+ay, y = yRotation: x = xsin(T)+ycos(T), y = xcos(T)-ysin(T)Mo

16、re complex effectsInterpolate translations of points across imageFree-form deformations, thin-plate splines etcImage ManipulationGeometrical Image ManipulationGeometrical transformationsRotation: x = xsin(T)+ycos(T), y = xcos(T)-ysin(T)Image ManipulationGeometrical Image ManipulationGeometrical tran

17、sformationsUsing interpolated user-specified translationsImage ManipulationGeometrical Image CompressionImage compression is required for storage and transmissionLossless compression methodsNo data is lost in the compressionSuitable to all kinds of data e.g. textLossy compression methodsData is thro

18、wn away in compression cycleChoose data which the human visual system is insensitive to.e.g. small high frequency componentsFile formats: GIF, JPEG, JPEG2000Image CompressionImage compresImage CompressionRepetition supressione.g. Run-length encodingaaaaaabbbbbbccddddd. a6b6ccd5.Statistical encodinge

19、.g. Huffman encodingUse short binary strings for common charactersUse longer binary strings for uncommon charactersaaadaabbbaacaaabbaacaabaab 8bits each = 26*8=208bitsa 0 b 10, c 110 , d 111 000111001010100011000010100011000100010 = 39bitsImage CompressionRepetition suGIF image compressionGIF images

20、 use a mixtureRestricted colours (only 256 different colours)Run-length encodingStaistical encoding (LZW algorithm)Therefore GIF is lossless for images of less than 256 coloursi.e. they can be reconstructed exactly GIF image compressionGIF imageLossy Image CompressionHuman eye is fairly insensitive

21、to certain kinds of image informationLarge objects generally more important than fine detail, textures etcQuite different to audio compressionIntensity more important than hueCan quantise colours more coarsely Lossy Image CompressionHuman eJPEG Image CompressionAlgorithm overviewTransform and code e

22、ach 8x8 block independentlyPerform Discrete Cosine Transform (DCT) on each blockDifferentially quantise blocks DCT valuesRun length encode in zig-zag pathStatistical encode resulting stringJPEG Image CompressionAlgorithJPEG Image CompressionThe Discrete Cosine Transform (DCT)Separates the images hig

23、h and low frequency componentsRelated to the Fourier TransformThe DCT itself is reversible i.e. losslessJPEG Image CompressionThe DiscJPEG Image CompressionEach pixel in the DCT block is a weighted sum of the pixels in the input blockThis diagram shows which weights are applied for each pixel in the

24、 DCT.A visual map of the DCTJPEG Image CompressionEach pixDifferential QuantisationQuantise higher frequency components with fewer levelsHuman eye is relatively insensitive to high frequency componentsThis is where data is thrown awayMore coarsely quantised frequency components require fewer bits to

25、 storeVarying the values in the quantisation matrix allows different compression levelsTrade off quality for small file size.Differential QuantisationQuantZig-zag encodingThe lowest frequency component is at (0,0) and highest at (N,N)Use zig-zag path to encode blockUse run-length encoding on resulti

26、ng stringtends to group 0 coefficientsUse Huffman encoding on run-length encoded stringZig-zag encodingThe lowest freJPEG compressionAdditional stepsSome additional steps are performed to squeeze more compression out of the dataColourthe image is first converted to YUV colour space and the Y (lumina

27、nce) is coded with higher quality than the 2 colour channels (U and V).The colour channels are also often down sampled i.e. reduced by a factor of 2 along rows and/or columnsPredictive compressionThe first element in the DCT block is essentially the brightness of the block. These values are coded se

28、parately using predictive compression to remove redundancy between blocksJPEG compressionAdditional steJPEG decompressionDecode strings Reverse Huffman and run-length encodingzig-zag to reconstruct N by N blockDequantise block valuese.g. if quantised to 4 levels and decoded to 256 levels then multip

29、ly value by 64.Inverse DCT Very similar to DCTJPEG decompressionDecode strinJPEG 2000Completely different algorithm to standard JPEGUses EZW compressionBased on wavelet theoryDoesnt involve blocking of the data like standard JPEGBlocking artefacts are common in over-compressed JPEG images.JPEG 2000C

30、ompletely different JPEG 2000Wavelet transformsThe Fourier Transform (FT) converts a signal (or image) into its component frequenciesLooses spatial information e.g. doesnt tell us where the high frequencies are located in the imageDCT similar to an FT applied to each blockRetains some spatial inform

31、ation (i.e. the location of the block), but looses frequency correlations between blocksWavelet Transform (WT) a (smooth) trade off between frequency and spatial representationJPEG 2000Wavelet transformsWavelet transformsFilter horizontally with two filters even pixels: low-pass filterodd pixels: hi

32、gh-pass waveletGroup low pass filtered components to left and high pass filtered to rightRepeat verticallyRepeat recursively on low-pass image.Wavelet transformsFilter horizExploiting subband correlationSubband correlation Although the wavelet transform decorrelates image information within a subban

33、d, there is still a high degree of correlation between subbands.Early wavelet methods struggled to find a compact way to exploit this correlationExploiting subband correlationExploiting subband correlationZero-trees EZW encodes zeros, rather than the data.A zero at a coarse scale is a good predictor

34、 of zeros at a finer scale.Can encode a lot of information in specifying just the root of a zero-tree.Similar to RL encodingExploiting subband correlationSuccessive quantisationThe chances of finding a zero tree increase with a coarser quantisationMore small values are set to zero.Successive quantis

35、ationQuantise the (remaining) image data using successively finer quantisation steps.This leaves a binary image to encode at each stepValues only 0 or 1Encode using zero treesZero trees completely specify a binary imageSuccessive zero-trees encode less significant bitsSuccessive quantisationThe chaSuccessive quantisationSuccessive qua

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論