Hello lwg,
Based on the description of your problem, I would suggest that an
Artificial Neural Net approach (NN) would have a good chance at
success. In general, neural nets are fairly effective at taking
complex raw numerical data and filtering that data into a simple
numerical classification. They have been used successfully at
classifying image data into simple categories, very similar to the
type of classifiction you want to create.
Programming a neural net approach isn't too difficult, and there are
premade NN classes available. For example, a set of neural net
classes for Java can be downloaded for free (see the references
below).
A brief description (off the top of my head, no pun intended) is that
artificial neural nets are modelled after the way that human / animal
neurons function in the brain. While there are many variations on
programmed neural nets, the simple model is multiple layers of nodes.
The first layer is the input layer, where each numerical input (ie.
each element of the image grid) is fed into the network.
The next layers are the "hidden" layers, with each node of a layer
fully connected to each node of the next layer. At each node, inputs
from the previous layer are weighted by a multiplier, then summed, and
the total value determines what the output of that node will be.
Hidden layers can have a variable number of nodes in each, with more
nodes and more layers adding a higher level of complexity to the
overall NN function.
Once the input is passed through all the hidden layers, it ends up at
the output layer, which in the simplest case is a single node. The
output of this node is, in theory, the numerical representation the NN
gives to the original input. When one is first training a NN, this
output value will be compared to the expected value to give an error
amount. This error value is then used by the learning mechanism to
correct the NN's weighting values at each node. A popular and
effective learning mechanism is back propagation, which follows a
pattern of pushing the error value back through the NN's layers to
correct the nodes that added the wrong influence.
This was just to give you an idea of how NNs work, but again, you can
probably use a premade code module of some sort for your needs. The
hard work will more likely be in training the network to tell the
difference between your two classifications of images. The net will
only learn patterns based on what you train it with, so for this to be
effective you need a wide variety of "natural" images and an equally
wide variety of "unnatural" images. The key in choosing training data
is to ensure that the only common difference between the two groups of
training data is going to be the key difference you're trying to make
it learn.
A classic example of this is one I heard in class - a military project
tried teaching a NN to tell the difference between images with a tank
in them, and images without. What they didn't realize is that all of
their non-tank images happened to be photographed in the daytime,
while all the tank images were later at night - so the NN learned to
classify images by the time of day instead! (Don't quote me on this,
it might be a computer science urban legend, but it does illustrate
the point.) :)
Further references:
comp.ai.neural-nets FAQ:
http://www-2.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/faqs/ai/neural/faq.html
LANE C++-based Neural Net
http://sourceforge.net/projects/lane
Neural Networks with Java
http://rfhs8012.fh-regensburg.de/~saj39122/jfroehl/diplom/e-index.html
Search terms used:
C++ neural net
(some other references were taken directly from my bookmarks) :)
I hope this helps!
- josh_g-ga |