SlideShare a Scribd company logo
Moving Object Detection
Tracking
       Tracking is the problem of estimating the trajectory of
        an object in the image plane as it moves around a
        scene.




    2                               DSG, CEERI Pilani   12/8/2011
What is Motion Tracking…?
•       Technologies that collect data on human movement
        (input) used to control sounds, music, recorded or
        projected text, video art, stage lighting (output) via
        performer actions / gestures / movements / bio-data.




    3                              DSG, CEERI Pilani   12/8/2011
What is Motion Tracking…?
•       other uses:

         •   Animation modeling (motion capture)

         •   Scientific research
             (musicology, semantics, ergonomics, medicine, sports
             medicine, architecture)

         •   Therapy for physically and mentally handicapped




    4                                  DSG, CEERI Pilani   12/8/2011
Motion tracking vs. Motion capture
Motion capture                Motion tracking

•Tracks location of fixed     •less equipment, less data,
positions on body
                              •less cost ($1k-2k)
•Highly
accurate,        expensive    •concerned    with     motion
($200k-2m)                    qualities                 like
                              dynamic, direction of motion
•Generally not realtime
                              •real time
•Used for data collection
(research) and for making      •used for live applications:
human or animal motion in      installation
animations                     art, dance, theater and
(films, games, etc.) more
5                              music
                             DSG, CEERI Pilani 12/8/2011
Motion capture
       Motion capture is defined as "The creation of a 3D representation of
        a live performance."
       Tracks location of fixed positions on body with reflective markers
       12-24 cameras, each lens is ringed with infrared lights




    6                                      DSG, CEERI Pilani   12/8/2011
Motion capture
       Motion capture is used to be considered a tool for
        creating animation.




    7                            DSG, CEERI Pilani   12/8/2011
Motion capture
       Typical uses
           Human                      movement                               research
            (sports, musicology, ergonomics, medicine,...)
           Film and Animation -- often used with 3-D animation (modeling)
            programs to make animations
               maya (http://www.animationarena.com)
               houdini (http://www.sidefx.com)




    8                                         DSG, CEERI Pilani   12/8/2011
Motion capture
       Vicon is a leading company in motion capture




9                                             DSG, CEERI Pilani   12/8/2011
Motion tracking



                                    media output
                                    sounds, musi
        input                       c, text, projec
       physical                     tions, lighting
     human action




10                  DSG, CEERI Pilani   12/8/2011
Motion tracking



                 sensor                        output device
               (e.g. video      computer         (e.g. loud       media output
                camera)                         speakers)
   input                                                          sounds, musi
  physical                                                        c, text, projec
human action                                                      tions, lighting


                  analogue to         digital to
                    digital           analogue
                  conversion         conversion




11                                     DSG, CEERI Pilani   12/8/2011
Digital vs. Analogue
                                           Digital data
 Analogue data

                                           • easy to reproduce
 • hard to reproduce
 • "rich data" (infinite values)           • lower resolution, less human-
 • very high resolution                    feel.
 • more details                            • easy to store
 • contaminated data (becomes              • easy to process
 noisy,     but      rarely    fails       • contaminated data remains
 completely)                               clean (errors can be filtered) or
                                           signal fails altogether




   12                                  DSG, CEERI Pilani   12/8/2011
What you need to track motion
     Computer needs video input

       Digital video (Firewire, USB2)
             + digital cameras (camcorder, webcams)
             + low noise
             + works with laptops
             - latency issues
             - image resolution issues (smaller chip sizes)
             - limited cable length

        Analog video
              + "unlimited" cable length
              + lower latency
              + even digital cams usually have analog output
              - cost more (although many older cameras work quite well)
              - works less well with laptops i.e. need an external or internal
            framegrabber

13                                        DSG, CEERI Pilani   12/8/2011
Who is using motion tracking?
        Palindrome Intermedia Performance Group
        Krisztina de Chatel
        Igloo
        Ventura Dance (Pablo Ventura)
        Robert Lepage
        André Werner
        Marlon Barrios Solano
        La la la Human Steps
        Georg Hobmeier
        Leine Roebana Dans Kompanie
        Troika Ranch
         Blue Man Group
         you



14                                 DSG, CEERI Pilani   12/8/2011
The Problem in Motion Tracking
    Given a set of images in time which are similar but not
     identical, derive a method for identifying the motion
     that has occurred (in 2d) between different images.
Motion Detection and Estimation
         in Literature
   Image differencing
       based on the threshold difference of successive images
       difficult to reconstruct moving areas
   Background subtraction
       foreground objects result by calculating the difference between
        an image in the sequence and the background image
        (previously obtained)
       remaining task: determine the movement of these foreground
        objects between successive frames
   Block motion estimation
       Calculates the motion vector between frames for sub-blocks of
        the image
        mainly used in image compression
        too coarse
What Is Optical Flow?
   Optical flow is the displacement field for each of the
    pixels in an image sequence.

   For every pixel, a velocity vector dx , dy
    is found which says:               dt dt
           how  quickly a pixel is moving across the
            image
           the direction of its movement.
Optical Flow Examples




     Image #1   Optical Flow Field                        Image #2




18                        DSG, CEERI Pilani   12/8/2011
Optical Flow Examples
    Translation   Rotation   Scaling
Estimation of the optical flow
    Sequences of ordered images allow the estimation
     of motion as either instantaneous image velocities or
     discrete image displacements.

    The optical flow methods try to calculate the motion
     between two image frames which are taken at times
                    t and
                    t + δt at every voxel position.




    20                          DSG, CEERI Pilani   12/8/2011
Voxel Position
    A voxel (volumetric pixel or Volumetric Picture
     Element) is a volume element, representing a value
     on a regular grid in three dimensional space.




               A series of voxels in a stack with a single voxel
    21         highlighted              DSG, CEERI Pilani 12/8/2011
Estimation of the optical flow
    Optical Flow methods are called differential since they
     are based on local Taylor series approximations of the
     image signal; that is, they use partial derivatives with
     respect to the spatial and temporal coordinates.

    In mathematics, a Taylor series is a representation of a
     function as an infinite sum of terms that are calculated
     from the values of the function's derivatives at a single
     point.




    22                            DSG, CEERI Pilani   12/8/2011
Taylor series
       The Taylor series of a real or complex function ƒ(x) that is infinitely
        differentiable in a neighborhood of a real or complex number a is the
        power series




            which can be written in the more compact sigma notation as




where n! denotes the factorial of n and ƒ (n)(a) denotes the nth derivative of ƒ
evaluated at the point a. The zeroth derivative of ƒ is defined to be ƒ itself and (x −
a)0 and 0! are both defined to be 1. In the case that a = 0, the series is also called
a Maclaurin series.
       23                                    DSG, CEERI Pilani   12/8/2011
Estimation of the optical flow
    For a 2D+t dimensional case (3D or n-D cases are similar) a voxel at
     location (x,y,t) with intensity I(x,y,t) will have moved by δx, δy and δt
     between the two image frames, and the following image constraint
     equation can be given:

                      I(x,y,t) = I(x + δx,y + δy,t + δt)

    Assuming the movement to be small, the image constraint at I(x,y,t)
     with Taylor series can be developed to get:


                                                                              H.O.T
                                                                            (higher-order terms)




    24                                      DSG, CEERI Pilani   12/8/2011
Estimation of the optical flow




25                   DSG, CEERI Pilani   12/8/2011
Estimation of the optical flow
   where Vx,Vy are the x and y components of the velocity or optical flow of
   I(x,y,t) and                   are the derivatives of the image at (x,y,t)
   in the

   corresponding directions. Ix,Iy and It can be written for the derivatives in
   the following.

   Thus:
                IxVx + IyVy = − It
   or


This is an equation in two unknowns and cannot be solved as such. This is
known as the aperture problem of the optical flow algorithms. To find the
optical flow another set of equations is needed, given by some additional
constraint. All optical flow methods introduce additional conditions for
estimating the actual flow.
   26                                   DSG, CEERI Pilani   12/8/2011
Our Solution
   Optical flow: maximum one pixel large movements

   Optical flow: larger movements

   Morphological filter

   Contour detection (demo purposes)
Optical Flow: maximum one pixel large
movements
   The optical flow for a pixeli, j     given 2 successive
    images and k           : k 1


            mk (i, j ) ( x, y) so that

           I k (i, j) I k 1 (i x, j y)   (1)

            is minimum for    1 x 1, 1 y 1



                k            k+1
Optical Flow: maximum one pixel
large movements
   More precision: consider a 3×3 window
    around the pixel:



   Optical flow for pixel i, j becomes:

              mk (i, j ) ( x, y)                    so that


          1        1                            1        1
                           I k (i u, j v)                        I k 1 (i u x, j v y)   (2)
      u       1v       1                    u       1v       1

                           is minimum for                1 x 1, 1 y 1
Optical Flow: larger movements
   Reduce the size of the image
       => reduced size of the movement




   Solution: multi-resolution analysis of the images
   Advantages: computing efficiency, stability
Multi-resolution Analysis
   Coarse to fine optical flow estimation:


                                                  32 32

                                                  64 64


                                                  128 128


                                                  256 256



         Original image k    Original image k+1
Optical Flow: Top-down Strategy
Algorithm (1/4 scale of resolution reduction):
   Step 1: compute optical flow vectors for the highest
    level of the pyramid l (smallest resolution)
   Step 2: double the values of the vectors
   Step 3: first approximation: optical flow vectors for the
    (2i, 2j), (2i+1, 2j), (2i, 2j+1), (2i+1, 2j+1) pixels in the l-
    1 level are assigned the value of the optical flow
    vector for the (i,j) pixel from the l level




                                     Level l        Level l-1
Optical Flow: Top-down Strategy
   Step 4:
     adjustment of the vectors of the l-1(one) level in the
      pyramid
     method: detection of maximum one pixel
      displacements around the initially approximated
      position




   Step 5:
    smoothing of the optical flow field (Gaussian
    filter)
Filtering the Size of the Detected Regions
   Small isolated regions of motion detected by the
    optical flow method are classified as noise and are
    eliminated with the help of morphological
    operations:
   Step 1: Apply the opening:

   Step 2: Apply the  B
                   X closing: B
                            X      B


                 X B      X    B    B
Contour Detection
   For demonstration purposes, the contours of the moving
    regions detected are outlined
   Method: the Sobel edge detector:
       Compute the intensity gradient:                     f f
                                      f x, y                 ,        fx, f y       (5)
                                                            x y
        using the Sobel masks:    1 0 1                           1   2         1
                             1                              1
                         Gx       2 0 2 , Gy                  0       0     0       (6)
                             4                              4
                                1 0 1                         1       2     1
       Compute the magnitude of the gradient:

                 M x, y      f x, y       fx
                                               2
                                                   fy
                                                        2
                                                             (7)

       if M x, y threshold edge pixel
                        then
        else non-edge pixel
A Block Diagram of the System
Conclusions
   What we did:
     We managed to estimate the motion with a certain
      level of accuracy
     The results might be good enough for some
      applications, while other applications might require
      better accuracy
   What remains to be done:
       Reduce computational complexity
         use the computed background image to separate
          foreground objects
         Parallelism of the algorithms
       Experiment with specific problems, calibrate the
        parameters of the algorithms
Thanks

38      DSG, CEERI Pilani   12/8/2011

More Related Content

What's hot (20)

PPTX
Introduction to Object recognition
Ashiq Ullah
 
PPTX
Object detection
Jksuryawanshi
 
PPTX
CNN Tutorial
Sungjoon Choi
 
PPTX
multiple object tracking using particle filter
SRIKANTH DANDE
 
PPT
Moving object detection
Manav Mittal
 
PPTX
Image classification using CNN
Noura Hussein
 
PPTX
Convolutional Neural Network and Its Applications
Kasun Chinthaka Piyarathna
 
PPTX
Convolution Neural Network (CNN)
Suraj Aavula
 
PPTX
Convolutional neural network from VGG to DenseNet
SungminYou
 
PPTX
Image classification using cnn
SumeraHangi
 
PPTX
Deep neural networks
Si Haem
 
PDF
Convolutional Neural Networks (CNN)
Gaurav Mittal
 
PPTX
Image classification using convolutional neural network
KIRAN R
 
PPTX
Object classification using CNN & VGG16 Model (Keras and Tensorflow)
Lalit Jain
 
PPTX
Diabetic Retinopathy.pptx
NGOKUL3
 
PPTX
Object recognition of CIFAR - 10
Ratul Alahy
 
PPTX
Object tracking
Sri vidhya k
 
PDF
Deep Learning: Application & Opportunity
iTrain
 
PPTX
Human age and gender Detection
AbhiAchalla
 
PDF
Object Detection with Transformers
Databricks
 
Introduction to Object recognition
Ashiq Ullah
 
Object detection
Jksuryawanshi
 
CNN Tutorial
Sungjoon Choi
 
multiple object tracking using particle filter
SRIKANTH DANDE
 
Moving object detection
Manav Mittal
 
Image classification using CNN
Noura Hussein
 
Convolutional Neural Network and Its Applications
Kasun Chinthaka Piyarathna
 
Convolution Neural Network (CNN)
Suraj Aavula
 
Convolutional neural network from VGG to DenseNet
SungminYou
 
Image classification using cnn
SumeraHangi
 
Deep neural networks
Si Haem
 
Convolutional Neural Networks (CNN)
Gaurav Mittal
 
Image classification using convolutional neural network
KIRAN R
 
Object classification using CNN & VGG16 Model (Keras and Tensorflow)
Lalit Jain
 
Diabetic Retinopathy.pptx
NGOKUL3
 
Object recognition of CIFAR - 10
Ratul Alahy
 
Object tracking
Sri vidhya k
 
Deep Learning: Application & Opportunity
iTrain
 
Human age and gender Detection
AbhiAchalla
 
Object Detection with Transformers
Databricks
 

Similar to Moving object detection (20)

PDF
matdid950092.pdf
lencho3d
 
PDF
It 603
manjunathan_g
 
PPT
ACIVS'12 Presentation by Francesco Flammini
Francesco Flammini
 
PPT
ACIVS'12: Evaluating the effects of MJPEG compression on Motion Tracking in m...
Francesco Flammini
 
PPTX
ECE-Digital-Image-Processing and transformations
PillalaMurali
 
PPT
Image processing1 introduction
Preeti Gupta
 
PPT
Graphic concept
student(MCA)
 
PDF
Object Detection and tracking in Video Sequences
IDES Editor
 
PDF
Improving image resolution through the cra algorithm involved recycling proce...
csandit
 
PDF
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
cscpconf
 
PDF
DIP-Questions.pdf
AratiKothari2
 
PPT
Digitized images and
Ashish Kumar
 
PPT
03 digital image fundamentals DIP
babak danyal
 
PDF
It 603
vanaja nakka
 
PDF
It 603
vanaja nakka
 
PPTX
DIP Lecture 1-8 (Digital Image Processing Presentation.pptx
whattsappstates
 
PDF
Implementation of features dynamic tracking filter to tracing pupils
sipij
 
PDF
Lecture24
zukun
 
PPT
Image processing SaltPepper Noise
Ankush Srivastava
 
matdid950092.pdf
lencho3d
 
ACIVS'12 Presentation by Francesco Flammini
Francesco Flammini
 
ACIVS'12: Evaluating the effects of MJPEG compression on Motion Tracking in m...
Francesco Flammini
 
ECE-Digital-Image-Processing and transformations
PillalaMurali
 
Image processing1 introduction
Preeti Gupta
 
Graphic concept
student(MCA)
 
Object Detection and tracking in Video Sequences
IDES Editor
 
Improving image resolution through the cra algorithm involved recycling proce...
csandit
 
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
cscpconf
 
DIP-Questions.pdf
AratiKothari2
 
Digitized images and
Ashish Kumar
 
03 digital image fundamentals DIP
babak danyal
 
It 603
vanaja nakka
 
It 603
vanaja nakka
 
DIP Lecture 1-8 (Digital Image Processing Presentation.pptx
whattsappstates
 
Implementation of features dynamic tracking filter to tracing pupils
sipij
 
Lecture24
zukun
 
Image processing SaltPepper Noise
Ankush Srivastava
 
Ad

Recently uploaded (20)

PPTX
Lec24_Software Configuration Management (1).pptx
khanjahanzaib1
 
PPTX
cell structure !.2.pptEIYFUEYFIUWYFIUYFWEYFW7YF78WYF87
viojancarljoseph
 
PDF
New Logo of Sylhet Engineering College: Symbol of Innovation and Excellence
Abdullah Al Nafees
 
PDF
Zagor EXTRA 334 - Indijansko Groblje.pdf
StripovizijaStripovi
 
PPTX
Day 2 - 1. Denial of Service (DoS) Attacks.pptx
pfeprojet
 
PPTX
法国电子毕业证巴黎第二大学成绩单激光标Paris 2学费发票办理学历认证
Taqyea
 
PPTX
Title Lorem Ipsummmmmmmmmmmmmmmmmmm.pptx
221520010
 
PPT
170268899987777654423678997665664626.ppt
fequeenethtomas
 
PPTX
DEVELOPMENT OF DIFFERENT ART FORMS.pptxEVELOPMENT OF DIFFERENT ART FORMS.pptx
MJEsquilloLaygo
 
PDF
Strip Zagor EXTRA 329 - Priznanje.pdf
Stripovizijacom
 
PPTX
Data analysis.pptx,,.,./sd,f./,sd./fd./c./d.a.d,
jettbernardoiii
 
PPTX
CONTENTS of the all marketing and art .pptx
thilinithakshilant04
 
PPTX
preporting 21st century aira and joseph clasio.pptx
jamescarllfelomino6
 
PDF
3581759.pdfdfdsfdsfdsfdsfdsffdsfdsfdsfdsfdsfds
SachinThanekar6
 
PPT
1 Baroque Architecture in Italy - the seed-bed
dolgalev
 
DOC
Philippine Standard Leeson of Filipinos Who are defying the broad situation t...
eisdtong
 
PDF
strip Zagor EXTRA 335 - Omča.pdf
StripovizijaStripovi
 
DOCX
legiimate crypto recovery expert. recuva hacker solutions
camilamichaelj7
 
PDF
El folclore dominicano cobra vida en cada trazo, con una paleta de colores qu...
EusebioVidal1
 
PPTX
Dell 5 - Copy.pptx sadklsad shalkdhlkasd,mnlkhasld
buibichphuong0708200
 
Lec24_Software Configuration Management (1).pptx
khanjahanzaib1
 
cell structure !.2.pptEIYFUEYFIUWYFIUYFWEYFW7YF78WYF87
viojancarljoseph
 
New Logo of Sylhet Engineering College: Symbol of Innovation and Excellence
Abdullah Al Nafees
 
Zagor EXTRA 334 - Indijansko Groblje.pdf
StripovizijaStripovi
 
Day 2 - 1. Denial of Service (DoS) Attacks.pptx
pfeprojet
 
法国电子毕业证巴黎第二大学成绩单激光标Paris 2学费发票办理学历认证
Taqyea
 
Title Lorem Ipsummmmmmmmmmmmmmmmmmm.pptx
221520010
 
170268899987777654423678997665664626.ppt
fequeenethtomas
 
DEVELOPMENT OF DIFFERENT ART FORMS.pptxEVELOPMENT OF DIFFERENT ART FORMS.pptx
MJEsquilloLaygo
 
Strip Zagor EXTRA 329 - Priznanje.pdf
Stripovizijacom
 
Data analysis.pptx,,.,./sd,f./,sd./fd./c./d.a.d,
jettbernardoiii
 
CONTENTS of the all marketing and art .pptx
thilinithakshilant04
 
preporting 21st century aira and joseph clasio.pptx
jamescarllfelomino6
 
3581759.pdfdfdsfdsfdsfdsfdsffdsfdsfdsfdsfdsfds
SachinThanekar6
 
1 Baroque Architecture in Italy - the seed-bed
dolgalev
 
Philippine Standard Leeson of Filipinos Who are defying the broad situation t...
eisdtong
 
strip Zagor EXTRA 335 - Omča.pdf
StripovizijaStripovi
 
legiimate crypto recovery expert. recuva hacker solutions
camilamichaelj7
 
El folclore dominicano cobra vida en cada trazo, con una paleta de colores qu...
EusebioVidal1
 
Dell 5 - Copy.pptx sadklsad shalkdhlkasd,mnlkhasld
buibichphuong0708200
 
Ad

Moving object detection

  • 2. Tracking  Tracking is the problem of estimating the trajectory of an object in the image plane as it moves around a scene. 2 DSG, CEERI Pilani 12/8/2011
  • 3. What is Motion Tracking…? • Technologies that collect data on human movement (input) used to control sounds, music, recorded or projected text, video art, stage lighting (output) via performer actions / gestures / movements / bio-data. 3 DSG, CEERI Pilani 12/8/2011
  • 4. What is Motion Tracking…? • other uses: • Animation modeling (motion capture) • Scientific research (musicology, semantics, ergonomics, medicine, sports medicine, architecture) • Therapy for physically and mentally handicapped 4 DSG, CEERI Pilani 12/8/2011
  • 5. Motion tracking vs. Motion capture Motion capture Motion tracking •Tracks location of fixed •less equipment, less data, positions on body •less cost ($1k-2k) •Highly accurate, expensive •concerned with motion ($200k-2m) qualities like dynamic, direction of motion •Generally not realtime •real time •Used for data collection (research) and for making •used for live applications: human or animal motion in installation animations art, dance, theater and (films, games, etc.) more 5 music DSG, CEERI Pilani 12/8/2011
  • 6. Motion capture  Motion capture is defined as "The creation of a 3D representation of a live performance."  Tracks location of fixed positions on body with reflective markers  12-24 cameras, each lens is ringed with infrared lights 6 DSG, CEERI Pilani 12/8/2011
  • 7. Motion capture  Motion capture is used to be considered a tool for creating animation. 7 DSG, CEERI Pilani 12/8/2011
  • 8. Motion capture  Typical uses  Human movement research (sports, musicology, ergonomics, medicine,...)  Film and Animation -- often used with 3-D animation (modeling) programs to make animations  maya (http://www.animationarena.com)  houdini (http://www.sidefx.com) 8 DSG, CEERI Pilani 12/8/2011
  • 9. Motion capture  Vicon is a leading company in motion capture 9 DSG, CEERI Pilani 12/8/2011
  • 10. Motion tracking media output sounds, musi input c, text, projec physical tions, lighting human action 10 DSG, CEERI Pilani 12/8/2011
  • 11. Motion tracking sensor output device (e.g. video computer (e.g. loud media output camera) speakers) input sounds, musi physical c, text, projec human action tions, lighting analogue to digital to digital analogue conversion conversion 11 DSG, CEERI Pilani 12/8/2011
  • 12. Digital vs. Analogue Digital data Analogue data • easy to reproduce • hard to reproduce • "rich data" (infinite values) • lower resolution, less human- • very high resolution feel. • more details • easy to store • contaminated data (becomes • easy to process noisy, but rarely fails • contaminated data remains completely) clean (errors can be filtered) or signal fails altogether 12 DSG, CEERI Pilani 12/8/2011
  • 13. What you need to track motion Computer needs video input Digital video (Firewire, USB2) + digital cameras (camcorder, webcams) + low noise + works with laptops - latency issues - image resolution issues (smaller chip sizes) - limited cable length Analog video + "unlimited" cable length + lower latency + even digital cams usually have analog output - cost more (although many older cameras work quite well) - works less well with laptops i.e. need an external or internal framegrabber 13 DSG, CEERI Pilani 12/8/2011
  • 14. Who is using motion tracking?  Palindrome Intermedia Performance Group  Krisztina de Chatel  Igloo  Ventura Dance (Pablo Ventura)  Robert Lepage  André Werner  Marlon Barrios Solano  La la la Human Steps  Georg Hobmeier  Leine Roebana Dans Kompanie  Troika Ranch  Blue Man Group  you 14 DSG, CEERI Pilani 12/8/2011
  • 15. The Problem in Motion Tracking  Given a set of images in time which are similar but not identical, derive a method for identifying the motion that has occurred (in 2d) between different images.
  • 16. Motion Detection and Estimation in Literature  Image differencing  based on the threshold difference of successive images  difficult to reconstruct moving areas  Background subtraction  foreground objects result by calculating the difference between an image in the sequence and the background image (previously obtained)  remaining task: determine the movement of these foreground objects between successive frames  Block motion estimation  Calculates the motion vector between frames for sub-blocks of the image  mainly used in image compression  too coarse
  • 17. What Is Optical Flow?  Optical flow is the displacement field for each of the pixels in an image sequence.  For every pixel, a velocity vector dx , dy is found which says: dt dt  how quickly a pixel is moving across the image  the direction of its movement.
  • 18. Optical Flow Examples Image #1 Optical Flow Field Image #2 18 DSG, CEERI Pilani 12/8/2011
  • 19. Optical Flow Examples Translation Rotation Scaling
  • 20. Estimation of the optical flow  Sequences of ordered images allow the estimation of motion as either instantaneous image velocities or discrete image displacements.  The optical flow methods try to calculate the motion between two image frames which are taken at times t and t + δt at every voxel position. 20 DSG, CEERI Pilani 12/8/2011
  • 21. Voxel Position  A voxel (volumetric pixel or Volumetric Picture Element) is a volume element, representing a value on a regular grid in three dimensional space. A series of voxels in a stack with a single voxel 21 highlighted DSG, CEERI Pilani 12/8/2011
  • 22. Estimation of the optical flow  Optical Flow methods are called differential since they are based on local Taylor series approximations of the image signal; that is, they use partial derivatives with respect to the spatial and temporal coordinates.  In mathematics, a Taylor series is a representation of a function as an infinite sum of terms that are calculated from the values of the function's derivatives at a single point. 22 DSG, CEERI Pilani 12/8/2011
  • 23. Taylor series  The Taylor series of a real or complex function ƒ(x) that is infinitely differentiable in a neighborhood of a real or complex number a is the power series which can be written in the more compact sigma notation as where n! denotes the factorial of n and ƒ (n)(a) denotes the nth derivative of ƒ evaluated at the point a. The zeroth derivative of ƒ is defined to be ƒ itself and (x − a)0 and 0! are both defined to be 1. In the case that a = 0, the series is also called a Maclaurin series. 23 DSG, CEERI Pilani 12/8/2011
  • 24. Estimation of the optical flow  For a 2D+t dimensional case (3D or n-D cases are similar) a voxel at location (x,y,t) with intensity I(x,y,t) will have moved by δx, δy and δt between the two image frames, and the following image constraint equation can be given: I(x,y,t) = I(x + δx,y + δy,t + δt) Assuming the movement to be small, the image constraint at I(x,y,t) with Taylor series can be developed to get: H.O.T (higher-order terms) 24 DSG, CEERI Pilani 12/8/2011
  • 25. Estimation of the optical flow 25 DSG, CEERI Pilani 12/8/2011
  • 26. Estimation of the optical flow where Vx,Vy are the x and y components of the velocity or optical flow of I(x,y,t) and are the derivatives of the image at (x,y,t) in the corresponding directions. Ix,Iy and It can be written for the derivatives in the following. Thus: IxVx + IyVy = − It or This is an equation in two unknowns and cannot be solved as such. This is known as the aperture problem of the optical flow algorithms. To find the optical flow another set of equations is needed, given by some additional constraint. All optical flow methods introduce additional conditions for estimating the actual flow. 26 DSG, CEERI Pilani 12/8/2011
  • 27. Our Solution  Optical flow: maximum one pixel large movements  Optical flow: larger movements  Morphological filter  Contour detection (demo purposes)
  • 28. Optical Flow: maximum one pixel large movements  The optical flow for a pixeli, j given 2 successive images and k : k 1 mk (i, j ) ( x, y) so that I k (i, j) I k 1 (i x, j y) (1) is minimum for 1 x 1, 1 y 1 k k+1
  • 29. Optical Flow: maximum one pixel large movements  More precision: consider a 3×3 window around the pixel:  Optical flow for pixel i, j becomes: mk (i, j ) ( x, y) so that 1 1 1 1 I k (i u, j v) I k 1 (i u x, j v y) (2) u 1v 1 u 1v 1 is minimum for 1 x 1, 1 y 1
  • 30. Optical Flow: larger movements  Reduce the size of the image => reduced size of the movement  Solution: multi-resolution analysis of the images  Advantages: computing efficiency, stability
  • 31. Multi-resolution Analysis  Coarse to fine optical flow estimation: 32 32 64 64 128 128 256 256 Original image k Original image k+1
  • 32. Optical Flow: Top-down Strategy Algorithm (1/4 scale of resolution reduction):  Step 1: compute optical flow vectors for the highest level of the pyramid l (smallest resolution)  Step 2: double the values of the vectors  Step 3: first approximation: optical flow vectors for the (2i, 2j), (2i+1, 2j), (2i, 2j+1), (2i+1, 2j+1) pixels in the l- 1 level are assigned the value of the optical flow vector for the (i,j) pixel from the l level Level l Level l-1
  • 33. Optical Flow: Top-down Strategy  Step 4:  adjustment of the vectors of the l-1(one) level in the pyramid  method: detection of maximum one pixel displacements around the initially approximated position  Step 5: smoothing of the optical flow field (Gaussian filter)
  • 34. Filtering the Size of the Detected Regions  Small isolated regions of motion detected by the optical flow method are classified as noise and are eliminated with the help of morphological operations:  Step 1: Apply the opening:  Step 2: Apply the  B X closing: B X B X B X B B
  • 35. Contour Detection  For demonstration purposes, the contours of the moving regions detected are outlined  Method: the Sobel edge detector:  Compute the intensity gradient: f f f x, y , fx, f y (5) x y using the Sobel masks: 1 0 1 1 2 1 1 1 Gx 2 0 2 , Gy 0 0 0 (6) 4 4 1 0 1 1 2 1  Compute the magnitude of the gradient: M x, y f x, y fx 2 fy 2 (7)  if M x, y threshold edge pixel then else non-edge pixel
  • 36. A Block Diagram of the System
  • 37. Conclusions  What we did:  We managed to estimate the motion with a certain level of accuracy  The results might be good enough for some applications, while other applications might require better accuracy  What remains to be done:  Reduce computational complexity  use the computed background image to separate foreground objects  Parallelism of the algorithms  Experiment with specific problems, calibrate the parameters of the algorithms
  • 38. Thanks 38 DSG, CEERI Pilani 12/8/2011