1 / 19

Predicting Image values

CS6825: More Dealings with Probability Expected Values (signal prediction), Mean Squared Error (signal error), Crosscorrelation function (signal similarity). Predicting Image values.

verataylor
Download Presentation

Predicting Image values

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. CS6825: More Dealings with Probability Expected Values (signal prediction), Mean Squared Error (signal error), Crosscorrelation function (signal similarity)

  2. Predicting Image values • Sometimes you may want to model image values….to predict the chance of an image value. • We discussed the Probability function as one way. • Another metric used with probability is--- the Expected Value …here the image value is treated as a random variable • Expect value = Mean value

  3. å P ( i ) = weighted sum of possible values, weighted by Probability = E ( f ) i Expected Image values • Expected value of a random variableis the integral of the random variable with respect to its probability (definition from wikipedia) measure • The Expected Value of an image f is represented mathematically as: i Where P is the probability function of the image f.

  4. Expected Value • You will see the use of E(f) = expected value of image in many algorithms.

  5. Changing subjects--- Signal Error • A useful concept that can be related to probability is signal (image) error.

  6. Error in Images (or any signal) • Sensor Errors • Transmission Errors • Human Operator Errors

  7. What to do? • Understand you error – measure it • Try to recover from the error • In case of images at the low-level part of a vision system (the beginning) this might be applying filters to try to recover as close as possible the original signal. (note we will talk about such filters in our lecture on noise)

  8. Measuring Error • Error can be random or can follow a trend. • Trends  generally we model with some kind of statistical model. That means probability. • Common metric = Mean Squared Error. (recall we equated Expected value E(f) = Mean of f)

  9. Measuring Error • We could simple measure error as the difference in the received signal f and the original signal s. Error = f-s • Problem f-g could be negative. • Well …square it = (f-s)*(f-s) • Problem if the images are changing over time (most applications this is the case..outdoor scenes, manufacturing conveyor belt) • Error = E((f-s)*(f-s)) = Mean Squared Error

  10. Using MSE to improve things s(x,y) = image no noisef(x,y) = input image we are given with noise and other distortions g(x,y) = new image we produce through filtering with H that we hope is more like s • PROPOSAL: create a filter H to produce a new image g that will hopefully be more like s • ?? Can we use Mean Squared Error to help us??

  11. Minimizing Mean Squared Error SOLUTION: calculate H to minimize the MSE Now the math starts!....fun…we will see an instance of this problem later in the Noise Lecture with the application of the Wienner Filter for reducing image blur

  12. Moving On – Signal Similarity • Moving on…..lets look at a concept that can use probability - Signal similarity. • Suppose you have an image of a tank you want to recognize. • Possible Solution: take an image of the scene and see if this image is present or similar to the tank image.

  13. Signal Similarity as Pattern Recognition • Possible Solution: take an image of the scene and see if this image is present or similar to the tank image. • This is a simple (crude) form of Pattern Recognition.

  14. Signal Similarity as Error Reduction Measure • Another Use of Signal Similarity--- related to error. • If the signal g is similar to s then we have reduced the error.

  15. Signal Similarity – expressed as Crosscorrelation You may want to know how similar the signal g is to the original s. This can be measured by the statistical function called the CROSS CORRELATION. The more similar g and s are, the less error there is.

  16. å s(r,c) * g(r+i, j+c) s g [i,j] = i Crosscorrelation - similarity in s and g. i,j are the 2D shift we are moving the signals apart by. i,j are the correlation variables. If g=s or very similar to g we get a peak (not necessarily the largest/maximum) at the value i=0, j=0 which is not true usually if s and g are dissimilar. Hence, if a local maximum at i=0,j=0 there is some similarity between the two, if this is global maximum it may be s=g å j

  17. s(c) * g(j+c) s g [j] = Crosscorrelation - if similar why a peak at i=0, j=0 å To make it easier to understand, lets think of one row of an image (a 1D signal…j only). Suppose we have the s(j) function Now, let’s suppose we have g be identical to s (the best we can have). This is what will look like. Maximum is at j=0 but, note it is not 0 for other j. j s( c) Maximum at j = 0 s  g [j] s g [j]

  18. f(c) * g(j+c) f g [j] = Crosscorrelation - if similar why a peak at i=0, j=0 å j = 0 is a peak j = 30 is NOT a peak f( c) g( 0+c) f( c) f  g [i] g(30+c) What is happening when there is no overlap….the signal ends…one option is to multiple by 0.

  19. Signal Similarity with Crosscorrelation • We will see this later when we look atremoving blur in images to try to makeimage more similar to original. • This will be the Wienner filter in our lecture on noise.

More Related