Research – Detection & Tracking

When I started doing the research for this project I was to a degree thinking of the terms ‘detection and ‘tracking’ in an interchangeable way that was not helpful in developing the program we are going to need fulfill the brief.

This was drawn into sharp focus when I was exploring HOG (Histogram of Oriented Gradients) and SVM (Support Vector Machine) as a possible combined approach to the project.

Image courtesy of software.intel.com

A Histogram of Oriented Gradients (HOG) is a feature descriptor that works by counting the occurences of a gradient orientation within an image (detection). As gradients tend to represent a sharp change in intensity value there is a high likelihood that a gradient could be an edge. HOG trys to #

There is also a an SVM Training function

 

REFERENCES:

HOG Descriptor Struct Reference (accessed 31.10.2018)
https://docs.opencv.org/3.4.1/d5/d33/structcv_1_1HOGDescriptor.html#details

Histogram of Oriented Gradients (HOG) Descriptor (accessed 31.10.2018)
https://software.intel.com/en-us/ipp-dev-reference-histogram-of-oriented-gradients-hog-descriptor

Dalal N. Triggs B. Histograms of oriented gradients for human detection. 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05).
https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1467360

Juliano E. C. Cruza, Elcio H. Shiguemorib, Lamartine N. F. Guimaraes. A comparison of Haar-like, LBP and HOG approaches to concrete and asphalt
runway detection in high resolution imagery
http://epacis.net/jcis/PDF_JCIS/JCIS11-art.0101.pdf

Histograms of Oriented Gradients (accessed October 31st 2018)
https://www2.cs.duke.edu/courses/fall17/compsci527/notes/hog.pdf

Research – Tracking Texture & Tracking Motion

Part 1 – Tracking Texture

Our project has decided to explore four different approaches as described in an earlier post in this blog. My project partner is focusing on Shape Based & Colour Based tracking and I am going to focus my efforts on tracking which focuses on motion and texture.

Kalman Filtering

The first thing I notice while researching this topic is that Kalman filtering seems to be a popular algorithm when it comes to this approach.

Kalman filtering has a variety of applications and like all filters it allows certain things to pass through and other things not. The Kalman filter’s aim is to filter imperfect information, sort out the useful parts of interest and reduce the uncertainty and noise.

Apparently an early application of Kalman filtering was used for guided missiles and was also used as part of the onboard navigation system aboard the Apollo 11 Lunar module.

Particle Filtering

Unlike the Kalman Filter, particle filtering takes a non-linear approach. Particle filtering in a nutshell involves representing a posterior function by a set of random samples (particles).

Initial research into the area of texture tracking seems to suggest that it’s effectiveness is dependent on the image in question possessing strong textures (unsurprisingly) and texture tracking techniques tend to get used in conjunction with other means of detection and tracking.

The series of images we are working with in this project is neither rich in texture or indeed detail as the image is quite limited in terms of resolution.

So with that in mind, I am going to park this avenue of research here for now and may revisit it later should I decide to use this technique in combination with another approach

OpenCV offers its own Kalman filter function, the constructor of which I have included below.

 

REFERENCES:

Pressigout M, Marchand E. Real-Time Hybrid Tracking using Edge and Texture Information. The International Journal of Robotics Research Vol 26, No 7, July 2007
http://www.irisa.fr/lagadic/pdf/2007_ijrr_pressigout.pdf

Particle filter (accessed 25.10 2018)
https://en.wikipedia.org/wiki/Particle_filter

Motion Analysis and Object Tracking (accessed 25.10 2018)
https://docs.opencv.org/3.0-beta/modules/video/doc/motion_analysis_and_object_tracking.html

Tracking – Tracking by Background Subtraction (accessed 25.10 2018)
https://www.hdm-stuttgart.de/~maucher/Python/ComputerVision/html/Tracking.html

Vacchetti L. Lepetit V. Fua P. Combining Edge and Texture Information
for Real-Time Accurate 3D Camera Tracking. CVlab. Swiss Federal Institute of Technology, 1015 Lausanne, Switzerland
https://www.labri.fr/perso/vlepetit/pubs/vacchetti_ismar04.pdf

Research – Haar Cascades

A Haar Cascade is an object detection algorithm.

image courtesy of: https://docs.opencv.org

It uses a classifier which is trained to detect an object and does this by superimposing a positive image over a set of negative images over a number of stages. Quite a large number of stages.

This machine learning approach is computationally heavy and reliant upon possession of a training set. However there seem to be a number of them available online. Each with their own focus of object detection.

 

Haar-cascade Detection in OpenCV

OpenCV has it’s own trainer and detector which can be used to train your own classifier, which in our case would need to track the left eye of a person over a series of three images.

By applying some demo code kindly provided by OpenCV to one of our project images, we can see that this could well be a viable approach to take with our project and worthy of further research.

Similar to HAAR Cascades are LBP (Local Binary Pattern) Cascades which seem to operate similarly in the respect that they both use training sets. However, LBP Cascades can provide quicker results with slightly less accuracy.

Local Binary Patterns could be thought of as a computationally cheaper version of the Haar Cascade. LBP works by thresholding with the use of a 3×3 grid. The value of the centre pixel in the grid is used as a threshold value and the surrounding pixels in the grid are thresholded and summed together to form the descriptor used. LBP yields results that would be similar to Haar Cascades while offering a much simpler process.

References:

Face Detection using Haar Cascades (accessed 25.10 2018)
https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_objdetect/py_face_detection/py_face_detection.html#face-detection

Viola P. Jones MJ. Rapid Object Detection using a Boosted Cascade of Simple Features. IEEE Computer Society Conference on Computer Vision and Pattern Recognition 1:I-511- I-518 vol.1
https://www.researchgate.net/publication/3940582_Rapid_Object_Detection_using_a_Boosted_Cascade_of_Simple_Features

Deep Learning Haar Cascaded Explained (accessed 25.10 2018)
http://www.willberger.org/cascade-haar-explained/

Pietikäinen M. Local Binary Patterns. Machine Vision Group, Department of Electrical and Information Engineering, University of Oulu, Finland.
http://www.scholarpedia.org/article/Local_Binary_Patterns

Huang D. Shan C. Ardebilian M. Wang Y. Chen L. Local Binary Patterns and Its Application to Facial Image Analysis: A Survey
https://liris.cnrs.fr/Documents/Liris-5004.pdf

Week 6 – Lab Work

 

Assignement 1 – Lighting

 

Week 5 – Lab Work

Today we explored kernels in more depth.

The second part of this lab was used to finish off our first modules .assignment.

Project Research – Preliminary Stage

To succeed in the aims of our project to track an item within an image across a series of similar images we are going to need to explore the technology within four potential ways of tackling this challenge before deciding on any particular approach.

Tracking motion – Looking for things that are different between images, if it doesn’t move and the pixel value hasn’t changed we are not interested, we are only interested in what has changed.

Tracking texture – The gradient orientation that occurs in the localized portions of an image is counted in texture based technique. It is then computed using overlapping local contrast normalization on a dense grid of uniformly spaced cells for improving accuracy.

Shape based – Simple pattern matching can be applied with appropriate templates.

Colour based – Creates a gaussian mixture model to describe the colour disrtibution within the sequence of images and to segment the images into background and objects.

References:

Klimek RB. Wright TW. Sielken RS. Color Image Processing and Object
Tracking System. Lewis Research Center, Cleveland, Ohio. Trinity University, San Antonio, Texas .
https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19960016954.pdf

Yazdi M. Bouwmans T. New Trends on Moving Object Detection in Video
Images Captured by a moving Camera: A Survey. HAL Archives
https://hal.archives-ouvertes.fr/hal-01724322/document

Object tracking & Motion detection in video sequences (accessed 16.10.2018)
http://sccg.sk/~cernekova/

Balaji S RDr. S. Karthikeyan. A survey on moving object tracking using image processing. Conference: 2017 11 th International Conference on Intelligent Systems and Control (ISCO)
https://www.researchgate.net/publication/315711962_A_survey_on_moving_object_tracking_using_image_processing

Pramod Patil SP. Techniques and Methods for Detection and Tracking of Moving Object in a Video . International Journal of Innovative Research in Computer and Communication Engineering. Vol. 4, Issue 5, May 2016
http://www.rroij.com/open-access/techniques-and-methods-for-detection-and-tracking-f-moving-object-in-a-video-.pdf

The First Computer I used

Today in class I was asked, what was the first computer I used and I had to think waaaaay back. It also took a while.

Was it the Aston 3 I though! A primitive beast that looked like it had been made in somebody’s shed and generated TV captions. It stored everything on a fearsome looking 7″ floppy disc that could be erased by a change of wind direction.

 

Or was it the Abekas A72, another Caption Generator with a sleek futuristic keyboard and half a rack of hardware to support its amazing ant-aliasing powers.

 

Or could it have been the CMX Edit control system, driven by Unix command prompt with GPI’s for external FX units such as Vision Mixers and DVE’s.

 

Or maybe it the Quantel Paintbox, which was the forerunner to Adobe Photoshop but was definitely not as portable.

 

No it was in fact the Amiga 500.

This was a popular gaming machine in its day but we used it for generating info trivia boxes for the 1980’s Channel 4/ITV music Show ‘The Chart Show’. An illegible example of this can be seen at around 2 minutes on this clip from the show.

Week 4 – Lab Material

Transformation along with more image adjustments such as cropping, rotating, scaling. We also covered image Math such as adding, dividing, subtraction and multiplication. Finally we had in introduction to Kernels, yikes…

Code for the lab tasks: