<table>
<tr><td><img src="images/logo.jpg" alt="logo" width="110" height="110" /></td></tr>
<tr><td><h5>Guru Nanak Dev Engineering College<h5></td></tr>
<tr><td><h6>Ludhiana, Punjab, India</h6></td></tr>
<tr><td><h2>SPATIAL OPERATORS</h2></td></tr>
</table>
- Each output pixel is a function of the corresponding input pixel
- The function is the same for all pixels
- The function can capture something about the uniformity or variation over the local pixel window W
- The average over the window
- can reduce noise
- reduces the resolution
- Features smaller than the window size will be strongly attenuated
- we say the image is blurry, fuzzy, lower resolution etc.
Code screenshots Note: speaker notes FTW!
- Some solutions:
- don't compute the output value when the window "falls off the edge"
- assume the image is surrounded by zero pixels
- assume the edge pixels are replicated outward
code
- The window is:
- square
- always centred on the input pixel
- edge is integer h pixels from the centre
- The window width is 2h + 1
- always odd
- Can lead to ringing
- faint vertical & horizontal lines are introduced
- Not all values used in the average are the same distance away
- Undue influence by distant values
- Ideally we'd like to extract a circular region
- but that would involve taking fractions of pixels
- Circle of diameter 2.5 pixels
- The scale factor is
- Typically make S = 1 to keep grey levels the same as the input image
- Choose the size of the square kernel to fit the Gaussian
- Rule of thumb h=3sigma
code
- This is the definition of 2-dimensional correlation
- Correlation is closely related to convolution ????
- Convolution is the same as correlation if the kernel is symmetric
- Often written in operator form ????
- Commutative ???
- Associative ???
- Distributive ???
- Linear ???
- Convolving an image with a Gaussian kernel twice ???
- Is the same as convolving the image with a kernel that is the Gaussian convolved with itself
- Convolve image with the derivative kernel D
- If we smooth the image then ???
- The Laplacian is an isotropic second derivative
- gives the gradient maxima in both the u- and v- directions
- image
- image2
code
- image
- output image
- Morphology is about shape
- Output image contains shapes compatible with a structuring element S
- Output is true if all pixels in S are true (white)
- Output is true if any pixels in S are true (white)
- Opening operation
- Only compatible shapes remain
- Closing Operation