资源描述
Click to edit the title text format,Click to edit the outline text format,Second Outline Level,Third Outline Level,Fourth Outline Level,Fifth Outline Level,Sixth Outline Level,Seventh Outline Level,Eighth Outline Level,Ninth Outline Level,Image Processing Basic Concepts,影像處理基本概念,主講,:,周昌民,Image Processing Basic Conce,Contents,Images,sampling and resolution,Manipulation,Filtering,geometrical transformations,compression,GIF,JPEG,JPEG2000,ContentsImages,Sampling and resolution,An input device(e.g.camera or scanner)will,sample,(measure)the colours 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 colour,Sampling and resolutionAn inpu,Image Manipulation,Why would we want to manipulate an image?,Deficiencies in the image,Focus blur,motion blur,red-eye,poor lighting,noise,.,Special effects required,Sepia,painting styles,combining images,.,What methods are available?,Pixel level processing,Statistical processing,Group of pixel processing,Geometrical transformations,Image ManipulationWhy would we,Image Manipulation,Pixel level changes,Brightness add an equal value to the R,G and B values of each pixel,Image ManipulationPixel level,Image Manipulation,Pixel level changes,Contrast Multiply the RGB values by some value and reset overall brightness,Image ManipulationPixel level,Image Manipulation,Pixel level changes,Colour balance Vary the R,G and B brightnesses independently,Image ManipulationPixel level,Image Manipulation,Pixel level changes,Colour manipulation,Grey scale average RGB weighted to human perceptual system:approx.0.4R+0.4G+0.2B,Greying out(e.g.disabled button)Blend pixel values with grey:e.g.R=(R+200)/2,G=(G+200)/2,etc,Image ManipulationPixel level,Image Manipulation,Statistical Processing,Histogram equalisation,(automatically adjust contrast),Create a histogram H with one bin for each grey scale allowed e.g.for G grey scales,for each pixel(x,y),Himage(x,y)+;,Create a cummulative histogram Hc,Hc0=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 image,Rescale Hc to the range of grey scales i.e.,Hcg*=G/(width*height);,Remap image grey scales,for each pixel(x,y),image(x,y)=Hcimage(x,y);,Image ManipulationStatistical,Image Manipulation,Histogram equalisation,example image with 90 pixels and 10 grey scales 0-9,histogram=0,0,0,10,20,30,20,10,0,0,Hc=0,0,0,10,30,60,80,90,90,90,Hc=0,0,0,1,3,6,8,9,9,9,new histogram=0,10,0,20,0,0,30,0,20,10,Pushes intensities apart,dark pixels get darker,light pixels get lighter,Image ManipulationHistogram eq,Image Manipulation,Pixel group processing,e.g.Convolution,New pixel values are a weighted sum of neighbouring pixels original values,A,filter,specifies the weights in the sum,Can 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 pixels,Values like-1,-3,3,1/8 will perform edge detection,Image ManipulationPixel group,Image Manipulation,Pixel group processing changes,Blurring,Use a low-pass filter,e.g.1,4,6,4,1/16 applied along rows then columns.,Image ManipulationPixel group,Image Manipulation,Pixel group processing changes,Edge enhancement using unsharp masking.,Subtracting the blurred version from the original leaves just the edges,Add these edges back to the original to bring out the areas of contrast.,Image ManipulationPixel group,Image Manipulation,Pixel group processing changes,Edge detecting filters,Filters such as 1,3,-3,-1 can be applied either horizontally or vertically(usually after smoothing)to locate the intensity changes(edges),Horizontal edges,(+127),Vertical edges,(+127),Image ManipulationPixel group,Image Manipulation,Pixel level changes,Combined effects,e.g.embossed=,a,*original+,b,*(127+edges at angle,q,),e.g.,b,3,b,127+,a,-3,b,b,Image ManipulationPixel level,Image Manipulation,Pixel level changes,Art 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 Manipulation,Geometrical transformations,Map each pixel(x,y)to some 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=y,Rotation:x=xsin(T)+ycos(T),y=xcos(T)-ysin(T),More complex effects,Interpolate translations of points across image,Free-form deformations,thin-plate splines etc,Image ManipulationGeometrical,Image Manipulation,Geometrical transformations,Rotation:x=xsin(T)+ycos(T),y=xcos(T)-ysin(T),Image ManipulationGeometrical,Image Manipulation,Geometrical transfor
展开阅读全文