DOC PREVIEW
UCSD CSE 152 - Filtering

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1CSE152, Spr 04 Intro Computer VisionFiltering Introduction to Computer VisionCSE 152Lecture 7CSE152, Spr 04 Intro Computer VisionAnnouncements• Assignment 2: Posted on web site, due 4/27• See links on web page for reading on binary image processing (e-reserves)• Text for filteringCSE152, Spr 04 Intro Computer VisionBinary System Summary1. Acquire images and binarize (tresholding, color labels, etc.).2. Possibly clean up image using morphological operators.3. Determine regions (blobs) using connected component exploration4. Compute position, area, and orientation of each blob using Moments5. Compute features that are rotation, scale, and orientation invariant using Moments (e.g., Eigenvalues of Normalized Moments).CSE152, Spr 04 Intro Computer Vision(From Bill Freeman)CSE152, Spr 04 Intro Computer VisionLinear Filters• General process:– Form new image whose pixels are a weighted sum of original pixel values, using the same set of weights at each point.• Properties– Output is a linear function of the input– Output is a shift-invariant function of the input (i.e. shift the input image two pixels to the left, the output is shifted two pixels to the left)• Example: smoothing by averaging– form the average of pixels in a neighbourhood• Example: smoothing with a Gaussian– form a weighted average of pixels in a neighbourhood• Example: finding a derivative– form a weighted average of pixels in a neighbourhoodCSE152, Spr 04 Intro Computer VisionConvolution: R= K*IIR∑∑−=−=−−=2/2/2/2/),(),(),(mmhmmkkjhiIkhKjiRKernel sizeis m+1 by m+1m=22CSE152, Spr 04 Intro Computer VisionConvolutionIf f and g are two 1-D function, their convolution f * g is:Properties:– Commutativity: f *g = g *f– Associativity: f *(g*h) = (f *g) * h– Derivatives: (f *g)’ = f’ * g =f *g’∫∞−∞=−=tdttgtxfxgxf )()()(*)(CSE152, Spr 04 Intro Computer VisionNoise• Simplest noise model– independent stationary additive Gaussian noise– N(i,j) is a GaussianRandom Variable– the noise value at each pixel is given by an independent draw from the same normal probability distribution• Issues– this model allows noise values that could be greater than maximum camera output or less than zero– for small standard deviations, this isn’t too much of a problem - it’s a fairly good model– independence may not be justified (e.g. damage to lens)– may not be stationary (e.g. thermal gradients in the ccd)),(),(ˆ),( jiNjiIjiI +=CSE152, Spr 04 Intro Computer VisionGaussian Noise:sigma=1Gaussian Noise: sigma=16CSE152, Spr 04 Intro Computer VisionAverage (Box) Filter• Mask with positive entries, that sum 1.• Replaces each pixel with an average of its neighborhood.• If all weights are equal, it is called a BOX filter.111111111111111111FF1/91/9(Camps)CSE152, Spr 04 Intro Computer VisionSmoothing by AveragingKernel:CSE152, Spr 04 Intro Computer Visionexp −x2+ y22σ2            An Isotropic Gaussian• The picture shows a smoothing kernel proportional to (which is a reasonable model of a circularly symmetric fuzzy blob)3CSE152, Spr 04 Intro Computer VisionSmoothing with a GaussianKernel:CSE152, Spr 04 Intro Computer VisionThe effects of smoothingEach row shows smoothingwith Gaussians of differentwidth; each column showsdifferent realizations of an image of gaussian noise.CSE152, Spr 04 Intro Computer VisionEfficient ImplementationBoth, the BOX filter and the Gaussian filter are separable:– First convolve each row with a 1-D filter– Then convolve each column with a 1-D filter.For Gaussian kernels g1(x) and g2(x),• If g1& g2respectively have variance σ12& σ22• Then g1*g2has varianceσ12+ σ22CSE152, Spr 04 Intro Computer VisionOther Types of Noise• Impulsive noise– randomly pick a pixel and randomly set to a value– saturated version is called salt and pepper noise• Quantization effects– Often called noise although it is not statistical• Unanticipated image structures– Also often called noise although it is a real repeatable signal.CSE152, Spr 04 Intro Computer VisionSome other useful filtering techniques• Median filter• Anisotropic diffusionCSE152, Spr 04 Intro Computer VisionMedian filters : PrincipleMethod :1. rank-order neighborhood intensities in a window2. take middle value• non-linear filter• no new grey levels emerge...4CSE152, Spr 04 Intro Computer VisionMedian filters: Example for window size of 3advantage of this type of filter is that itEliminates spikes (salt & pepper noise).1,1,1,7,1,1,1,1↓?,1,1,1.1,1,1,?CSE152, Spr 04 Intro Computer VisionMedian filters : examplefilters have width 5 : CSE152, Spr 04 Intro Computer VisionMedian filters : analysismedian completely discards the spike,linear filter always responds to all aspectsmedian filter preserves discontinuities,linear filter produces rounding-off effectsDON’T become all too optimisticCSE152, Spr 04 Intro Computer VisionMedian filter : images3 x 3 median filter : sharpens edges, destroys edge cusps and protrusionsCSE152, Spr 04 Intro Computer VisionMedian filters : Gauss revisitedComparison with Gaussian : e.g. upper lip smoother, eye better preservedCSE152, Spr 04 Intro Computer VisionExample of median10 times 3 X 3 medianpatchy effectimportant details lost (e.g. ear-ring)5CSE152, Spr 04 Intro Computer VisionFilters are templates• Applying a filter at some point can be seen as taking a dot-product between the image and some vector• Filtering the image is a set of dot products• Insight – filters look like the effects they are intended to find– filters find effects they look likeCSE152, Spr 04 Intro Computer VisionEdgesCSE152, Spr 04 Intro Computer VisionPhysical causes of edges1. Object boundaries2. Surface normal discontinuities3. Reflectance (albedo) discontinuities4. Lighting discontinuities CSE152, Spr 04 Intro Computer VisionObject BoundariesCSE152, Spr 04 Intro Computer VisionSurface normal discontinuitiesCSE152, Spr 04 Intro Computer VisionBoundaries of materials properties6CSE152, Spr 04 Intro Computer VisionBoundaries of lightingCSE152, Spr 04 Intro Computer VisionEdge is Where Change Occurs: 1-D• Change is measured by derivative in 1DSmoothed EdgeFirst DerivativeSecond DerivativeIdeal Edge• Biggest change, derivative has maximum magnitude• Or 2nd derivative is zero.CSE152, Spr 04 Intro Computer VisionNoisy Step Edge• Derivative is high everywhere.• Must smooth before taking


View Full Document

UCSD CSE 152 - Filtering

Download Filtering
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Filtering and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Filtering 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?