Detecting Edges in Images: Day 2 - PowerPoint PPT Presentation

1 / 96
About This Presentation
Title:

Detecting Edges in Images: Day 2

Description:

Computer Vision: Helpful Mirror. Computer Vision: Driverless Cars. Battlefield. Urban Driving ... This is an example of a picture you might see on a computer screen. ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 97
Provided by: exce1
Category:
Tags: day | detecting | edges | images

less

Transcript and Presenter's Notes

Title: Detecting Edges in Images: Day 2


1
Detecting Edges in Images Day 2
  • by
  • Dr. Niels Lobo
  • UCF EXCEL Applications of Calculus

2
Images and their Edges
  • Computer Vision
  • Good for substituting machine in place of eye
  • Can assist with recognition
  • Can assist with navigation
  • Can assist with manipulation

3
Computer Vision Helpful Mirror
  • .

4
Computer Vision Driverless Cars
Automated Driver Console
Driverless Taxis
5
Surveillance for Safety
Camera Network
Airport Security
Title
Your Text here
Speaker
Crowd
Border Control
Monitor U.S. assets abroad
6
Computer Vision
  • Crime Watch

7
Computer Vision
  • Airport Security

8
Computer Vision
  • Monitor U.S. Assets Abroad

9
Computer Vision
  • Border Security

10
Medical Imaging
3D Models
Image Guided Surgery
Revolutionizing Medical Science
Automated Cancer Scans
Computerized Fracture Estimation
11
Computer Vision
  • A Basic Task Detect Edges of Regions

12
Detecting Edges in an image
  • This is an example of a picture you might see on
    a computer screen.
  • 20 X 20 pixel image of black box
  • on square white background.

  • Pixel Values for image

13
Black Rectangle on White Background
  • A

14
Computer Vision
  • To

15
Plot values from a row
  • To

16
Find jumps in the plot
  • Denote the plot by , then we Compute
  • We can think of two values, A and B, moving
  • along the row.
  • So we get the calculation being merely (B-A)/1

17
Again, the plot of a row
18
Plot of difference of pairs B-A
19
Absolute Value of B-A
20
How to find strong edges
  • To find an edge from this derivative plot,
  • use a threshold.

21
Effect of Thresholding
Threshold Bar
22
Back to the other example
23
Back to the other example
24
This one has a drop and then a rise
  • .

25
Difference of pairs, B-A
  • .

26
Absolute Value of (B-A)
  • .

27
Thresholding
  • .

28
Back to Complete Image
  • A Basic Task Detect Edges of Regions

29
Consider a typical image
  • .

30
For this typical image
  • We know we can
  • find the edges
  • as we proceed along the
  • horizontal direction
  • i.e., along a row
  • i.e., the x-direction

31
For this typical image
  • What about the vertical direction???
  • i.e., along a column? i.e., along the
    y-direction?

32
The y-direction
  • .

33
Compute the Vertical Edges
  • So, just as for the x-direction, we can compute
  • the difference quotient for the y-direction
  • which means we are to compute the difference
  • between two neighboring points that are
  • vertical.

34
Computer Vision
  • So, at all points on the image, we have 2 answers
  • (one from x-direction and one from y-direction.)
    How to give a unified answer at
  • all the points on the image?

35
Computer Vision
  • So, denote image
  • by
  • Then, the two
  • Difference quotients are
  • and

36
What to call these two?
  • So, get the notion of the Gradient.
  • The two quantities combine to give the Gradient
    Vector. Page 1095 of text.

37
The Gradient
  • .

38
Back to the complete image
  • The Gradient Vector is a physical descriptor of
    two dimensional functions
  • The symbol for the gradient vector is
    ,
  • and to repeat, it has two parts, the partial
    derivatives
  • and

39
Back to the complete image
  • The magnitude of the gradient vector can be
    obtained by squaring the individual components,
    adding them, and taking the square root, to get
    one scalar number. This concept is introduced in
    your Calculus textbook on page 1095, Chapter 17.

40
Back to the complete image
  • The magnitude of the gradient vector can be
    obtained by squaring the individual components,
    adding them, and taking the square root,
  • s magn

41
Computer Vision
  • Apply the gradient
  • magnitude
  • computation to this
  • image

42
Gradient Magnitude
  • .

43
Use a Threshold
  • .

44
Use a LOWER Threshold


  • Edges too Thick !!

45
These Edges are Thick
  • The edges are thick. Let us see how we can
  • get thinner edges.

46
Thick edges How to fix
  • Let us examine the values in the data near an
    edge.

47
Thickness of edges How to fix
  • Plot these values

48
Plot the derivative (the diff quotient)
  • .

49
Plot the derivative (the diff quotient)
  • .

50
Threshold this plot
  • .

51
Plot the derivative (the diff quotient)
  • .
  • So, there are several nearby points that
  • are above threshold.
  • This leads to the thick edges.
  • Need to be thinner.
  • Find the peaks of the curves.

52
Plot the derivative (the diff quotient)
  • .
  • So, there are several nearby points that
  • are above threshold.
  • This leads to the thick edges.
  • Need to be thinner.
  • Find the peaks of the curves.

53
Finding Peaks in First derivative
  • With any curve, a flat section can be
  • found by taking its derivative, and identifying
  • where the derivative is zero.
  • We want a flat section that is a peak (or trough)
  • in the first derivative.

54
Finding Peaks of Derivative plot
  • Take another derivative of the plot. (Section
    3.8)

55
To find peaks, take second derivative

56
To find the peaks

57
To Find Peaks of First Derivative plot
  • So, just find places where values progress
  • from positive to negative, and vice-versa.
  • Need to make sure that the jump from positive
  • to negative (or vice versa) is large enough.

58
Finding Peaks of Derivative plot
  • We know

59
What about Vertical direction?
  • Similarly,

60
Peaks
  • Combining the two values, gives the Laplacian
  • Which is defined as

  • And is given the symbol
  • Note that this is not a vector.

61
Computing , the Laplacian
  • So, given
  • Can compute
  • and
  • Then add them up.

62
The Laplacian of the Picture
  • .

63
To Find Peaks of Derivative plot
  • So, just find places where values progress
  • from positive to negative, and vice-versa.
  • Mark the centers of these changing patterns.

64
Mark these positions of change
  • .

65
Review of Laplacian
  • Combine the two partial derivative values,
  • to get the Laplacian
  • Which is defined as

  • Note that this is not a vector.

66
After Find Edges, Lay them Straight
  • To Straighten out edges, can use the calculus
    topic of Optimization (Section 4.7).
  • This generally involves trying to find a choice
  • from among many alternatives. The choice
  • is one that minimizes (or maximizes) some
  • Function. So, it is common to solve this by
    taking the
  • Derivative of the Function, setting it to zero
    and
  • determining where the derivative is zero.

67
Straightening is best line thru region
68
Best line is measured by distancesDistance
between point and line
69
Total Squared Distances
  • Now, we can add up the total of all distances

  • (1)

70
Find line that minimizes total distances
  • Our task then is to find the line that
  • minimizes

71
Straighten Curves
  • We do not delve into details of the
  • Straightening-out process here.

72
Some Arty stuff
  • A

73
Computer Vision
  • A

74
Computer Vision
  • A

75
Computer Vision
  • A

76
Computer Vision
  • A

77
Computer Vision
  • A

78
Computer Vision
  • A

79
Computer Vision
  • A

80
Can use Derivative in time, as well
  • .

81
Can use Derivative in time
  • This is good for video data (movies).
  • So, we can take derivatives of
  • If we hold x,y constant, we are
  • fixing a pixel, and asking how it
  • changes in time.
  • Compute at all fixed x,y.

82
How to use Derivative in time?
  • The derivative in time tells us where
  • in the image, the pixels are changing, and
  • what those changes are. Zero means
  • no change at those pixels.
  • It is the same as subtracting one frame
  • of the movie from another.

83
Vehicle Guard An Example
original.avi
84
Vehicle Guard Example Results
Key
Object is near vehicle Object touching
vehicle Reach-in on left side Reach-in on right
side Note Purple spots are where vehicle is
touched
results.avi
85
Person-on-Person Violence
Detecting Person-On-Person Violence
  • People Hitting Each Other

86
Detecting Person-On-Person Violence
  • Some examples

87

Detecting Person-On-Person Violence
  • Need to compute Jerk of limbs and head

This involves third derivative in time
Section 3.8
88
Finding Faces (Frontal)
Use Two different methods
One uses Calculus, other uses Statistics
89
Person-on-Person Violence
Detecting Person-On-Person Violence
  • People Hitting Each Other

90
Person-on-Person Violence
Detecting Person-On-Person Violence
  • People Hitting Each Other

91
Face Eye Intersection
92
Counting Heads (not just faces)
93
Face Orientations
94
Person-on-Person Violence
Face orientations
  • Uses a method from Matrix Algebra

95
Face Orientations
96
Detector Results
Write a Comment
User Comments (0)
About PowerShow.com