Individual project for CSE190a at UCSD Winter Quarter 2008. The project is based upon the design and requirements specified by the UCSD AUVSI team that is entering the AUVSI UAS competition for UAV reconnaissance.

Wednesday, January 30, 2008

Meeting With AUVSI Leader Scheduled

Meeting: I have eventually managed to tie down the leader of the payload section of the AUVSI to a meeting with me on Monday. He has sent me links to some of the papers they used previously. Such as a paper: here it seems to be quite useful from the images displayed, however i cannot find source code to sue based on this and the maths looks quite rigorous. I plan on viewing this over the weekend as well as securing the histogram analysis. I would like to get the previous code from the team to find out exactly how they interacted the system together as i am wary of building up an entire system in one direction to find it is difficult to combine with the system they will be using.

To Complete:
- method for histogram standardization (windows of images)
- classifier based on distance from training data mean and std (distance based classifier)
- read paper in entirety and try and find source code
- attempt to find reasonable method for location the targets within images

Colourspace Histograms

Colourspace Histogram's: I have managed to create a solution for appending images in open CV that lets me now display the histograms for different colour planes on one image. The results are shown below:



HSI



LAB



RGB







HSI



LAB





RGB









HSI



LAB




RGB













Idea's for Future:
Do the same comparisons for hsi and lab with the training set and see if they have any useful comparisions with the chi squared results or if they ahve any cleaner results that may be used. I.e replicate rgb functionality in hsi and lab and compare classification results.


Problems Ran into this Week: so far i've not been able to figure out a way of only creating histograms on a portion of an image, using the set window size. However i think today i may have stumbled upon something called setImageROI which operates only on a selected region of an image, however to do this over an image in the same way as a convolution would be very computational expensive and this first stage is supposed to be a quick check of a present target or not...and even before this inclusion it is already quite slow with the multiple operations being computed.

Monday, January 28, 2008

Colourspace Histograms Created

The varying colourspace histograms have been created, however, i can only display them as individual histograms for each plane (ie r,g,b or l,a,b or h,s,i) seperately. This is difficult to visualise the properties of each i have found, therefore i wish to find a way of appending images together using OpenCv before publishing the results here.

If i do not find a way by wednesday i shall manually do it, or simply submit the images as they are simply to show the results, but if possible i would like to have the images appended together so that RGB, LAB and HSI display together rather than each individual colourspace.

Sunday, January 27, 2008

Classification Results

Results: So far the results have been mixed. As we can see from the images below, a couple of positive images get classified into my "gray area" of dubious images. These are image that have traits of both target and empty images. However, the thresholding levels of the classification are hardcoded. I would like this to be more dynamic and autonomous, possibly using some form of Bayes or distance based classifier. Yet this would require gaining data for a positive set as well as just negative (empty images) or would need to calculate the distance of comparisions from the center of the negative class and threshold the classification based on some distance from this center point. Options to be discussed in meeting on Monday 28th Jan.


I have an idea or rather a hope that the images have been classified badly here because of the variety of the lighting offered. I imagine that in real conditions such a sharp difference in lighting would not be present. I shall attempt to get some more realistic data which has less variation in lighting.


Images:













Fake Sample Data

Sample Data: The sample data i was hoping to have recieved by now hasn't happened due to problems with the engineering side of the UAV. Therefore i have created some basic shapes myself using my carpet and several objects.

I am still trying to sort out something with the UCSD AUVSI team to get hold of some real data whether it be this years lats years or whatever. At least something to offer the system that is truly relative to the project rather than similar prepared images.


Images:













Friday, January 25, 2008

Update on Histogram

Found the bug in my code. However histogram results are more correct they do not show the results i had hoped.

Image With Target: 0.342762
Bright Green Empty: 0.333333
Image With Target: 0.334144
Bright Green Empty: 0.333333
dark Green Empty: 0.333333


As you can see the fact a target is present seems to have little improvement to the chi squared value. I was hoping to see a large jump in the difference. A possible direction i hope to take is to use the most common pixel colouring for each chanel and compare with that to boost different values.

Code Available Here: CODE

Thursday, January 24, 2008

Histogram Issues

Histogram Trouble:

The last few days i've been having some trouble getting histograms to do what i want in OpenCV. However after some building of my own functions specific to my needs i have what i think is conceptually a good setup. However, the results do not agree.

I start by having several labelled images of empty views. I then compose an average image, this takes all the values from each pixel (r,g,b) and averages over all test images. Thus creating an average empty image via supervision.

My intention was then to compare all new images against this average image, to do this i wanted to compare to the average image's histogram rather than he pixels directly, using chi squared. However this has some interesting results, but not good ones.

An empty image that is dark in comparision to the average empty image will be given a high chi squared return, i.e. looks very different, yet one that has the same background as the average image but contains a reasonably large target recieves a low score i.e similar.


Chi Value: 0.017876










Image with Target





Chi Value: 0.333333










Blank Image
















Average Image



Still working on debug info any possible hints for improvement here would be helpful.

Tuesday, January 22, 2008

OpenCV

Currently trying to get OpenCV to work with Visual Studio....having issues. Apparently there are missing .dll's. And the FAQ's response does not work as it should. I have a friend in ECE who has it compiled on his laptop and has it working with Visual Studio so am going to beg for some help.

Wednesday, January 16, 2008

Tracking Methods

Open CV: http://www.intel.com/technology/computing/opencv/

This is a C based library that can be used directly in C code to track moving objects, from first viewing of the project it seems to find regions of interest and track them. The idea behind this is using a filter over an image and taking the gradient values at each window, trying to detect possible regions of interest the video shows an example of a labeled result. This is quite noisy however and should i use it i would need to ensure parameters are set to help specifcy this for the application to remove or at least lower the effects of noise in the image.

Videos: Input and Output




Use: I intend to use this if possible to help give me possible locations for the targets and therefore create bounding boxes of the image so that processing does not need to be calculated for an entire image.

============================================================


Kalman Filters: Kalman filters offer a way of predicting possible error changes from measured data to give us a discription of a true result using probabilty and knowledge of the movement or abilities of the object being tracked. A former lecturer of mine Andrew Calway (University of Bristol) showed me a case study in the case of tracking objects using Kalman filters with a moving camcorder. It can achieve this by finding the object in one location to start with and given possible information about movement uses probability to look in certain expected positions for the target in question, it also considers error margins in these calculations. Thus saving searching an entire image for a target if it has been previously identified.

"The purpose of a Kalman filter is to estimate the state of a system from meaurements which contain random errors. An example is estimating the position and velocity of a satelite from radar data."

Benefits: A further benefit of Kalman filters is that it seems to have a toolbox available directly in matlab currently. This is a major bonus as Matlab will be essential for some fo the high powered matrix operations i will doubtlessly have to perform for varying image processing/segmentation and classification issues related with the project.

Papers: Video Object Tracking Using Region Split And Merge And A Kalman Filter Tracking Algorithm


Video:


Use: I propose to use a kalman filter technique to improve the accuracy of the bounding box of the target found using opencv and be able to predict where the target may occur in the next image. By doing so i can reduce computayional overhead and hopefully lower processing costs too. Thus giving me a smaller problem to work with which is localized to a bounding box of the image.

Monday, January 14, 2008

Sample Data

Full flight images (from 2006) can be found at: http://art1.mae.ncsu.edu/album.php?albumid=35