CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

28
CSE 291 Final Project: Adaptive Multi- Spectral Differencing Andrew Cosand UCSD CVRR
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    214
  • download

    1

Transcript of CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Page 1: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

CSE 291 Final Project:

Adaptive Multi-Spectral Differencing

Andrew Cosand

UCSD CVRR

Page 2: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Differencing

• Detect changes in a sequence of images.

• Pixels of reference image are subtracted from the current image to determine how different they are.

• Pixels with exceed some difference threshold are assumed to correspond to different objects in the images.

Page 3: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Differencing

Reference Image – Current Image = Difference

Page 4: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Problems

• Differences other than the object of interest may show up.– Pixel noise – Moving background objects (trees, water)– Lighting changes– Camera movement (small)– Shadows & Reflections

Page 5: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Pixel Noise

Page 6: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Solutions

• Variations can be included in a background model.– Reference frame may use eg Gaussian mixture

models to characterize pixels– Reference frame can be updated at different

rates. Very slow basically detects changes from when the system was started, very fast detects changes from the previous frame.

Page 7: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Camera Movement

Page 8: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Solutions

• Very small camera movements can be modeled in the background similar to pixel noise or moving background objects

• Other segmentation methods can be used to identify and track objects in the scene

• Camera motion can be identified and corrected (Optical flow, correspondence)

Page 9: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Shadows

Shadow

Detected Difference

Good

Bad

Page 10: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Solutions

• Color Space Conversion– Transform data into more useful form, eg

normalized chromaticity or Hue Saturation Intensity colorspace, which separates color and intensity for robust detection in the presence of shadows.

Page 11: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

HSI

• Hue angle determines color

• Saturation determines how ‘colorful’ or ‘washed out’

• Intensity determines brightness

Page 12: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

HIS Colorspace Detection

• Shadows simply decrease intensity without effecting hue

• Hue differencing is therefore quite robust to the presence of shadows

• Great

• But….

Page 13: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Hue Determination

• To decide what ‘color’ a pixel is, it must first have a ‘color’

• Conversion– Normalize R,G,B s.t. 0 r,g,b 1– h = acos (r-g)+(r-b)

2[(r-g)2 + (r-b)(g-b)]1/2

– Very sensitive when r g b

Page 14: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Hue Differencing

Hue ‘Noise’ Causes False Detects

Page 15: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Idea

• Since hue information is unreliable for grayish pixels, ignore hue difference results at these pixels and use intensity instead.

• Need some weighting function which determines how to do this.

Page 16: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Previous Solution

• Francois and Medioni used a saturation threshold to ignore hue information for gray pixels– Works well– Requires threshold to be set

Page 17: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Goal

• Want a weighting function which will specify a combination of hue and intensity differencing.– Intensity should receive more weight when hue

is unreliable– Hue should receive more weight when it can be

reliably determined

• Hope to find some underlying relationship

Page 18: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Implementation

• Using Euclidian distance to gray line as a color measure– Saturation is somewhat tricky (a la Matlab)

• Ideal system would determine weighting function based on training data, similar to backpropogation

Page 19: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Backpropogation

• Outputs are weighted combinations of inputs

• Determine errors at outputs

• Determine how much each input was responsible for the error

• Adjust each weight accordingly

Page 20: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Current Algorithm

• Examines each pixel, changes weight in proportion to the error– For pixels which should have detected, weight

is increased proportionally to 1-detection– For pixels which should NOT have detected,

weight is DECREASED proportionally to detection

Page 21: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Insights• Examination of hue errors shows a definite

correlation to coloration

Page 22: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Results Weighting Functions

Page 23: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Lack of Colorful Data

Page 24: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Results Combined Detection

Page 25: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Problems

• Correlation can vary widely from image to image.

• Weights are noisy, skewed by lack of colorful data

• Probably needs more data processing

• No good model determined yet

Page 26: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Conclusion

• System shows definite promise

• Model still needs to be determined and adaptively fit

Page 27: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

Shadow Supression

Page 28: CSE 291 Final Project: Adaptive Multi-Spectral Differencing Andrew Cosand UCSD CVRR.

References• A.R.J. Francois, G.G. Medioni, Adaptive Color

Background Modeling for Real-Time Segmentation of Video Streams

• A. Prati, I. Mikic, M. Trivedi, R. Cucchiara, Detecting Moving Shadows: Formulation, Algorithms and Evaluation

• T. Horprasert, D. Harwood, L.S. Davis, A statistical approach for real-time robust background subtraction and shadow detection