sem 8 ppt

30
MOVING OBJECT DETECTION Guided By :- Mrs. Amisha J. Shah PREPARED BY :- Rathod Prashesh R (5255) Tandel Ankit N (5260) Rana Manoj R (72918) Makwana Jignesh P (5222)

Upload: shahmayana

Post on 10-Mar-2015

137 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Sem 8 Ppt

MOVING OBJECT DETECTION

Guided By :-

Mrs. Amisha J. Shah

PREPARED BY :-

Rathod Prashesh R (5255)

Tandel Ankit N (5260)

Rana Manoj R (72918)

Makwana Jignesh P (5222)

Page 2: Sem 8 Ppt

INTRODUCTION

“Moving object detection” is a software based MATLAB program, with the help of which we can observe the motion of any object in 2Dimension

Our Project is based on the principles of “Motion vector”.

In motion vector there are different approaches available among these one way of detecting motion is using “Optical flow”.

Page 3: Sem 8 Ppt

WHAT IS MOTION DETECTION ?A motion is basically the difference between

two consequent frames of a video stream.The grater is the difference the greater is the

motion levelStationary BackgroundMoving BackgroundMoving Background and ObjectsIn our project we are taking a fix back-

ground.

Page 4: Sem 8 Ppt

TYPES OF MOTION ESTIMATION1. Pixel Based Motion Estimation The pixel based motion estimation approach seeks to

determine motion vectors for every pixel in the image.

2. Block-Based Motion Estimation In this method, the candidates frame is divided into non-

overlapping blocks ( of size 16 x 16, or 8 x8 or even 4 x 4 pixels in the recent standards) and for each such candidate block, the best motion vector is determined in the reference frame.

Page 5: Sem 8 Ppt

METHODS FOR MOTION DETECTION1. Two frames difference motion detector.

2. Motion detectors based on background modeling.

3. Counting Motion Detectors.

4. Optical flow.

Page 6: Sem 8 Ppt

MOTION VECTORMotion Vector is the difference in position between the

candidates and its match in the reference frame and is defined as the displacement vector or more commonly, the motion vector.

It is called a vector since it has both horizontal and vertical components of displacement after determining the motion vectors one can predict the current frame by applying the displacements corresponding to the motion vectors on the reference frame.

Page 7: Sem 8 Ppt

Background subtraction method:-Motion detectors based on background

modeling finds the difference between current video frame and a frame representing background.

Page 8: Sem 8 Ppt

Algorithm :-Read the video sequence.Arrange the frames parallel and find the maximum occurrence of the

intensity pixel by pixel among all the frames.

Obtain the static background image by marking the intensity value of a pixel obtained from step (2) as a background pixel.

To extract the moving object from any frame of the video sequence, subtract the particular frame from the background image obtained from step (3).

Apply thresholding to the resultant image of step (4) to obtain binary image.

Page 9: Sem 8 Ppt

Original grayscale image Extracted background image

Page 10: Sem 8 Ppt

Output of background subtraction method

Page 11: Sem 8 Ppt

Drawback :-The stationary objects like tree also detects.Filtering is required to overcome this

problem.

Original gray scale image Output image

Page 12: Sem 8 Ppt

Optical flow:-Optical flow is the 2-D projection into the

camera plane of the 3-D motion information presented at the world scenario.

Page 13: Sem 8 Ppt

continue.. Optical flow is the distribution of apparent velocities of movement of

brightness patterns in an image. Optical flow can arise from relative motion of objects and the viewer [1, 2].

The optic flow experienced by a rotating observer (in this case a fly). The direction and magnitude of optic flow at each location is represented by the direction and length of each arrow.

Page 14: Sem 8 Ppt

ESTIMASTION OF THE OPTICAL FLOW:Image constraint equation can be given: (x,y,t) = I(x+δx,y+δy,t+δt)Assuming the movement to be small, Then by Taylor

series we get:

Which results inThus: IxVx + IyVy = − It Or

IT.= -I

Page 15: Sem 8 Ppt

Optical Flow In Motion Analysis:

Page 16: Sem 8 Ppt

Methods for determining optical flow:(1) Horn-Schunck method:-

(2) Lucas kanade method:

Page 17: Sem 8 Ppt

The Lucas-Kanade method assumes that the displacement of the image contents between two nearby instants frames is small and approximately constant.

So the optical flow equation is

Ix(q1)Vx + Iy(q1)Vy = − It(q1)

Ix(q2)Vx + Iy(q2)Vy = − It(q2)

. . .

. . .Ix(qn)Vx + Iy(qn)Vy = − It(qn)

where q1,q2…qn are the pixels inside the window, and Ix(qi), Iy(qi), It(qi) are the partial derivatives of the image I with respect to position x, y and time t

Page 18: Sem 8 Ppt

• These equations can be written in matrix form Av = b

• Now ATAv = ATb or

v = (ATA) − 1ATb

Where AT is the transpose of matrix A. That is, it computes

Page 19: Sem 8 Ppt

Uses of optical flow:Motion estimation and video compression

have developed as a major aspect of optical flow research.

Optical flow was used by robotics researchers in many areas such as: object detection and tracking, image dominant plane extraction, movement detection, robot navigation and visual odometry.

In estimating the three-dimensional nature and structure of the scene, as well as the 3D motion of objects and the observer relative to the scene.

Page 20: Sem 8 Ppt

IMPLEMENTATION METHOD

Page 21: Sem 8 Ppt

Video and frames:-Fix background videoVideo = number of framesTake two consecutive frames.

Page 22: Sem 8 Ppt

Grayscale conversion:-A grayscale or grayscale digital image is an image in which the

value of each pixel is a single sample.Displayed images of this sort are typically composed of shades of

gray, varying from black at the weakest intensity to white at the strongest.

Original color image Grayscale image

Page 23: Sem 8 Ppt

Grayscale result:-

Original color image Grayscale image

Page 24: Sem 8 Ppt

Lucas kanade (motion vector):-

Motion vector output

Page 25: Sem 8 Ppt

Thresholding :-Thresholding is useful to separate out the

regions of the image corresponding to objects of interest, from the background.

Original image Output of thresholding

Page 26: Sem 8 Ppt

Thresholding results:-

Original image Output of thresholding

Page 27: Sem 8 Ppt

Dilation and Erosion:-Dilation adds pixels to the boundaries of

objects in an image, while erosion removes pixels on object boundaries.

The number of pixels added or removed from the objects in an image depends on the size and shape of the structuring element used to process the image.

(a) (b) (c)

Page 28: Sem 8 Ppt

Bounding box:-

Output in bounding box

Page 29: Sem 8 Ppt

Thank you

Page 30: Sem 8 Ppt