View Question
Q: Function to return the probability of a given image being of natural origin ( Answered,   1 Comment )
 Question
 Subject: Function to return the probability of a given image being of natural origin Category: Computers > Algorithms Asked by: lwg-ga List Price: \$2.00 Posted: 02 Nov 2002 11:47 PST Expires: 02 Dec 2002 11:47 PST Question ID: 96662
 ```I'd like to know if a function/algorithm/iterative process exists that given image data can return a value between 0 and 1 representing the probability that the image is a photograph, scan or photo realistic rendering of a scene rather than simply a mess of colored pixels without any form? It should work for an image that has x pixels by y pixels and each pixel is represented by an n bit number where 4<=n<=24 It doesn't have to be too specific, I am looking for leads to pursue, I do not expect (nor particularly want) to find a ready made function in any particular programming language.```
 ```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```
 ```This might be worth checking out: http://www.neatvision.com/ NeatVision 1.0 is a Java based image analysis and software development environment, which provides high level access to a wide range of image processing algorithms through well defined and easy to use graphical interface. NeatVision is distributed as a shareware product. It can be downloaded and evaluated for 30 days but after this time it must be either registered or deleted. NeatVision contains over 200 image and general data processing algorithms. Users can extend the core NeatVision library using the developers interface, a plug-in which features, automatic source code generation, compilation with full error feedback and dynamic algorithm updates. The Developers interface supports algorithm development based on Java AWT Imaging, Java 2D Imaging and Java Advanced Imaging. NeatVision is primarily an image processing application and offers an extensive range of image analysis and visualisation tools (these include zoom, pseudo colour, intensity scan, histogram and 3D profile mesh). In addition, the ability to read and write a wide range of image file formats is supported.```