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.

Tuesday, February 26, 2008

I lied...

One image fails with random chance...no idea why. It makes little to no sense to me. All the others look to be consistent.


HSV Based Histogram Analysis of Targets Gives CORRECT Separation

As the title says, it is working, with the images running against a viable target i am able to separate the actual data perfectly for my sample case. The actual data, believe it or not, personally not keeping my hopes too high is being gathered this weekend. Apaarently the camera fell off the gimball on the flight last time...trust Aeronautical Engineers and you get burned.

Output from my Matlab Code:

1: 0.152674 Empty
2: 0.208643 Empty
3: 0.166598 Empty
4: 0.005949 Present
5: 0.000491 Present
6: 0.138655 Empty
7: 0.188792 Empty
8: 0.203062 Empty
9: 0.977584 Empty
10: 0.177460 Empty
11: 0.136012 Empty
12: 0.204911 Empty
13: 0.111032 Empty


Images 4 and 5 are the 2 with the little red coke lids. At the moment i am partitioning the data based on, if it is a target it must return a chi squared less than 0.1. I have also run a sample on a bunch of targets to get a viable chi squared value and then doubled this limit and compared it against a variety of samples.

2: 0.087182 Present //actual target clear
3: 0.131061 Present //actual target clear
4: 0.114681 Present //actual target clear
5: 0.136188 Present //actual target on different but similar background
6: 0.250049 Empty //actual target on different and dark background
7: 0.065181 Present //actual target clear
8: 0.110614 Present //actual target clear
9: 0.396452 Empty //actual target with flash so very bright
10: 0.117868 Present //actual target clear
11: 0.094940 Present //actual target clear
12: 0.291048 Empty //actual target in the very dark
13: 0.094446 Present //actual target clear
14: 0.282812 Empty //actual target on a table with alot of light
15: 0.230164 Empty //actual target on table with alot of light and blurred
16: 0.738673 Empty //empty image
17: 0.249815 Empty //part of a pizza box
18: 0.275440 Empty //empty image
19: 0.151039 Present //bag strap
20: 0.167269 Present //chemistry book
21: 0.157746 Present //circular penny






















































Friday, February 15, 2008

Better than before

I have now updated the histogram to basically select the best chi value it finds from an image. If it is above a certain threshold then i can assume it has something in that portion of the image. However, this does work in the sense that all target values are passed through however some none targets seem to be creeping, i am going to play with the threshold level so that it works dynamically to maybe improve the efficiency of the program.

Currently the images 1-6 are TARGETS and 7-13 are EMPTY. The output from my matlab code gives the following results with no improvements or tweaking to the thresholds;

1: 0.037861 Present
2: 0.257812 Present
3: 0.033023 Present
4: 0.067213 Present
5: 0.094324 Present
6: 0.306998 Present
7: 0.015638 Empty
8: 0.015694 Empty
9: 0.949423 Present
10: 0.015573 Empty
11: 0.010490 Empty
12: 0.030843 Present
13: 0.012793 Empty

Thursday, February 14, 2008

Brute Force Histograms

I have improved a worked out the few obvious bugs with my former "histograms". Now as you can clearly see they are much more correct, and i have also altered my code to allow overlapping windows but they must differ by a window size of at least 1/4 this can be altered but i think for a start it is a good heuristic. It gives a decent coverage however the random generator doesn't seem to like the corners very much, i am not sure why as when i tested this at the start it gave me a variety of numbers from the minimum allowed to the maximum in the range, so i would expect them now maybe its simply a bad case?

The chi squared results though are lower than i had hoped, as you can see from these results they do not have a particular one which shines out as having or containing any useful information in fact the value is quite low and the margins not overly noticeable.

Chi Squared for sample image, larger values bolded.


0.0152 0.0146 0.0097 0.0097
0.0139 0.0143 0.0847 0.0050
0.0107 0.0022 0.0131 0.0086
0.0147 0.0125 0.0031 0.0152
0.0378 0.0108 0.0059 0.0035
0.0134 0.0511 0.0535 0.0062
0.0152 0.0052 0.0141 0.0929
0.0152 0.0470 0.0031 0.0102
0.0045 0.0029 0.0037 0.0071
0.0030 0.0038 0.0073 0.0105
0.0180 0.0050 0.0142 0.0061
0.0025 0.0074 0.0031 0.0138






Wednesday, February 13, 2008

Histogram Comparisons In Matlab

I have made some noticeable progress since Monday in that i have devised a system that finds me squares of images depending on a density and window size and for each creates a histogram and compares against a blank one. However i ahve had issues normalising these so that they equal 1. Some issue with the fact matlab doesn't properly bin the data but rather ranges it...explained better by an example image. It is infact the way matlab bins these histograms that ruins my chi squared algorithm.









Monday, February 11, 2008

Integral Histograms

Integral Histograms:

It has been decided that rgb is actually a useless colorspace for this project so after much playing around HSV has been chosen as an alternative. See bottom of post for examples of the HSI images...

After issues in OpenCv trying to reprogram again in Matlab. Can't really see the difference here, but the last bin is about 1%. Which may not seem substantial but here is the image the histogram was created from.



















HSI Image Examples:




Monday, February 4, 2008

Histogram Errors...

I have debugged my code and compared the histogram outputs to several other methods, i.e matlabs built in histogram functions, plus one histogram function i wrote for CSE166. They all give the save values as what i have in OpenCV so i think that this must just be an artifact of the image?