0% found this document useful (0 votes)
4 views31 pages

Lecture160 3

The document discusses medical image processing and computer vision, focusing on convolution techniques and their applications. It explains the differences between convolution and correlation, methods for applying convolution, and various types of noise encountered in image processing. Additionally, it covers low pass filters used for smoothing and denoising images.

Uploaded by

hanaahmedghanem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views31 pages

Lecture160 3

The document discusses medical image processing and computer vision, focusing on convolution techniques and their applications. It explains the differences between convolution and correlation, methods for applying convolution, and various types of noise encountered in image processing. Additionally, it covers low pass filters used for smoothing and denoising images.

Uploaded by

hanaahmedghanem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Medical

Image
processing &
computer
vision
SBES 160
By: Dr. Eman N. Marzban
[email protected]

Instantly relieve stress by filling The following doodles were Instructions:


in whimsical drawings with the inspired by plants and animals. Print. Color. Repeat.
colors of your choice.
Convolution DOODLE SPIRALS COLORING BOOK - PICTURE 2

32
https://medium.com/@bdhuma/6-basic-things-to-know-about-convolution-daef5e1bc411
Convolution vs. Correlation

Vanderbilt University School of Engineering

33
Convolution vs. Correlation

34
https://en.m.wikipedia.org/wiki/File:Comparison_convolution_correlation.svg
Convolution or Correlation:
Outputs

35
Convolution: First Step
First: Flip the kernel around its horizontal and vertical axes
or rotate be 180 degrees

36
Convolution: Second step

First Method: Moving the mask over the


image with minimum overlap of one cell

Second Method: Moving the mask over the


image with complete overlap of one cell

Third Method: Padding and moving the


mask over the image

37
Convolution: Move the kernel
over the image FULL

First Row = 5 16 28 20 3

38
Convolution: Move image over
the kernel (2)

Second Row = 20 41 43 21 7

39
Convolution: Move image over
the kernel (3)
Using this method:
[5 3] * [3 3] =

[5+3-1 3+3-1] =

[7 5]

40
Convolution: Move the kernel wo
padding VALID
The mask is moved over
the defined points in the
image only, first row is
done in one step yielding
116 and so on.
The output

[5 3] * [3 3] =

[5-3+1 3-3+1]=

[3 1]

41
Convolution: Move the kernel
with padding SAME
Pad the image with [N-1] for every dimension; i.e
increase rows by number of rows of the filter minus one
and increase columns by number of columns of the filter
minus one (zero padding or replicating).

42
Convolution: Move the kernel
with padding (2)

First row: [41 43 21]

43
Convolution: Move the kernel
with padding (3)

Second row: [87 116 71]

44
Convolution: Move the kernel
with padding (4)

This method yields:

[5 3] * [3 3] =

[max(5,3) max(3,3)]=

[ 5 3]

45
Convolution: Notes

Convolving MxK with NxF;


where MxK is > NxF; i.e. image is
larger than the mask

First Method: M+N-1 x K+F-1

Second Method: M-N+1 x K-F+1

Third Method: MxK 46


Sigma-Size Relationship
Gaussian Filter Sigma Gaussian Filter Sigma

47
Sigma-Size Relationship:
1D, size 11

48
Low pass filters: Smoothing
or denoising
➢ Linear: Gaussian and Box(average)
Linear since each pixel is a linear combination of the neighboring
input pixels

https://ethz.ch/content/dam/ethz/special-interest/mavt/dynamic-systems-n-control/idsc-
49
dam/Lectures/amod/AMOD_2020/20201102-03%20-%20ETHZ%20-%20Image%20Gradients.pdf
Low pass filters: Smoothing
or denoising
➢ Linear: Box(average) and Gaussian

50
Burger and Burge, “Digital Image Processing: An Algorithmic Introduction Using Java”, 2016
Low pass filters: Smoothing
or denoising
➢ Important Gaussian Properties

Symmetric and Separable

Less in complexity
Convolution and Correlation are the same

51
Low pass filters: Smoothing
or denoising
➢ Non Linear: Median and Weighted median

52
Sundararajan, “Digital Image Processing: A Signal Processing and Algorithmic Approach”, 2017
Low pass filters: Example

53
Low pass filters: Example (2)

Corner:
Intersection of two
edges

Edge:
Change in intensity

54
Noise

What are the types of these noise?


55
https://en.wikipedia.org/wiki/Image_noise
Common types of Noise:

56
Fig 5.2, Gonzalez and Woods, “Digital Image Processing”
Gaussian Noise

Take care of the AXES!


https://medium.com/@ms_somanna/guide-to-adding-noise-to-your-data-using-python-
57
and-numpy-c8be815df524
Gaussian (2)

Again: Take care of the AXES!


https://medium.com/@ms_somanna/guide-to-adding-noise-to-your-data-using-python-
58
and-numpy-c8be815df524
Adding Gaussian Noise

59
Uniform Noise

60
Impulse Noise:
Aka salt and pepper

61

You might also like