Pages

Sunday, May 30, 2010

Simple Image Recognition in Java

Simple image recognition program written in Java using JOONE - neural network library.


You can download source and binaries here:
htthttp://sourceforge.net/projects/imgrecognition/

Saturday, May 29, 2010

Automatic Linguistic Indexing of Pictures (ALIP) By Artificial Neural Network Approach

Article from Codeproject.Com

While I have been coding some AI application I heard some mellow strains of a childish songstress coming from upstairs of the neighbours which they played repeatedly. It was sometimes hardly audible to catch the verses, but I managed to distinguish several characteristic phrases to have a look over some great web search engine (I like it, since it puts some of my codeproject code articles to first 1-2 pages of the search results). The only significant phrase from the song I submitted to the engine was (to prevent undue advertisment), say "фиолетовая паста" (violet paste). I expected it would have given scores of make up advertisments, but contrariwise, just one link from the first page of the search results among cosmetic industry spam pointed to some music web forum with exactly that phrase from the rhymes. The next click of mouse and second search over that engine gave me music group verses of the song, guitar tabs and put me to you tube so I was listening that marvelous music clip.

It is astounding how a person with permanent internet access can in few seconds, after having heard the music, be presented with the verses, group information and video clip to listen to. The process is described as searching on the media data content. As current web searches uses textual information to return results, consider you will be able to give it as a search query either audio, video or image sample the same way you submit your textual requests. Just as the computer was listening to some music it was able to present you the same information.

The concept known as Connected Visual Computing (CVC) is actively pursued by Intel. The CVC concerns the media data processing e.g. when in the field of view of your mobile phone cam emerges some object (ant for example) you can see on the screen its identification obtained by mobile analized its image, that it is say Camponotus herculeanus, or when you see some caption in the street on unknown language, you may view it through your mobile cam and it will display at the same location in the street the same caption but in your native language (augmented reality (AR), 2D/3D overlays), or the above presented example by the search using audio content. The market promises immense propagation. That introduced market will for the very long period of time keep the audience consuming modern hardware and software.

Here I'd like to present the general idia on how the computer may be used to desribe the image analyzing its pixel content known as the Automatic Linguistic Indexing of Pictures (ALIP). The approach is general and is always assumed to extract some descriptive features from the data and to use some rules to attibute the content to some category.

If you're intrested in the immediate applications you may contact the supporting firm System7 of the content based image recognition (CBIR) part of the project.

Background

Basic understanding of AI approaches e.g. neural networks, support vector machines, nearest neighbour classifiers. Image descriptive and transform methods as wavelets, edge extraction, image statistics, histograms. C++/C# experience as in this article you will find how to invoke C++ dll methods from within C# application.

Using the application

In my ALIP experiment I decided to annotate the simple natural image categories. There are 5 ANN classifiers in the project corresponding to:

  • Pictures that might contain animals
  • Pictures that might contain flowers
  • Pictures that might contain landscapes
  • Pictures that might contain sunsets
  • Others pictures that do not contain the above categories or simply unknown image type

You need to use unknown category along with the others you'd like to classify to. As otherwise AI classifier would be able to identify only e.g. animals, flowers, landscapes, sunsets with every image you give. But in real world there are other types of images that do not fall into either of the above presented categories, so you will need to meddle with AI classification thresholds which is rather cumbersome and awkward. But having additional unknown category AI classifier the results of the image identification will be as either one of the known image categories or simply unknown image type the computer can not identify using its petty knowledge.

I adore the image databases, they contain shots from all over the world really nice to observe. I've got about 20000 images for designers bought from a DVD shop. I've taken image samples from the animals, flowers, landscapes, sunsets image types and added all other image categories that do not come from the 4 ones to have unknown image type.

Now the usage of the program is simple enough. Just run the alip.exe and it will load all necessary AI classifiers files (in case of error you will have a message box and will not be able to use it). Then click the [...] button and select the directory that presumably contains some *.jpg files. You may use the ones supported in this demo under pics directory. All the found files will be added to the list box, then just click them to watch in the right panel and see the proposed category in the top left panel. In theory it should be able to comment the image as presented below.

Methodology

Due to the competing intrests with the former organizations and the current one I work for, I will not be able to describe in minute details the methodology and feature extraction methods. I would rather present the general trend and categories of the features used for description of images. As searching over internet for corresponding feature computation will reveal all the necessary papers with particular formulae.

There are some demos availabe online e.g. ALIPr. They use hidden markov models HMMs and wavelet features from the images. You may try the pictures from that article using their methods or vice versa my application with their pictures and compare the annotation results.

As the AI approach is general and assumes some reduction of the original data dimensionality using either features extraction or PCA transform or both, all that is needed is to collect some data, extract the features and train AI classifiers. If you understand my face detection articles you will be able to repeat the experiment:

After you converted your raw image data to the features, just train some AI classifiers to discriminate desired positive category from negative ones.

ALIP features

Generaly they are divided into:

  • Color features
  • Texture features
  • Shape features

The Color features are simply the original raw image data, histogram of the image channels, image profile. Texture features are the known edge extraction methods, wavelet transforms, image statistics (e.g. 1st order: mean, std, skew; 2nd order: contrast, correlation, entropy...). And Shape features tries to estimate the object shapes found in the images. Just have a look at wiki for CBIR.

Typically the original image color space RGB is transformed to alternative spaces as YCbCr, HSV, HSI, CIEXYZ, etc... As alternative spaces might give better discrimination of the data, but you need to experiment with them anyway.

Read More

Thursday, May 27, 2010

Computer solves 400-piece puzzle in 3 minutes; scary implications for photo manipulation

by Sebastian Anthony (RSS feed) May 24th 2010 at 9:30AM

Following on from a New Scientist article that was written a few days ago, I ended up on the website of Taeg Sang Cho -- a graduate student at MIT. He's been working on a bunch of advanced imaging algorithms -- with gifts and grants from big names like Microsoft, Adobe and Google.
His recent work -- three research papers -- is all about content-aware manipulation of photos. I'm struggling to pick one because they're all awesome, so I'll just give you the highlights:

  • A probabilistic jigsaw puzzle solver -- this is the technology featured in the New Scientist article, so there's lots of dumbed-down details if you don't want to read the paper itself. In essence, it does exactly what a human does: matches edges, but it does it quickly and very accurately. Similar technology could be used in photo manipulation (and may indeed already be used by Adobe's Content-Aware Fill) -- the biggest give-away when you manipulate images are edges. This technology could magic away those edges!
  • A content-aware image prior -- this is a funky way of saying 'image restoration', and I wouldn't be surprised if this is a sneak-peek at the technology you'll see in Photoshop CS6! Look at the sample photo -- the results speak for themselves.
  • Motion blur removal with orthogonal parabolic exposures -- (phew, just typing that gave me a bit of a hard-on) -- in layman's terms, this is blur removal by taking two photos from slightly different viewpoints and then... performing some magic. Again, look at the sample images for some fantastic proof. I wouldn't expect to see moving lenses in still cameras any time soon though...
It's all very exciting stuff that we'll likely begin to see in consumer software in the next year or two. I just wish there was a video of the jigsaw puzzle solving!

http://www.downloadsquad.com/2010/05/24/computer-solves-400-piece-puzzle-in-3-minutes-scary-implication/

PIXELS by PATRICK JEAN

New York invasion by 8-bits creatures !
PIXELS is Patrick Jean' latest short film, shot on location in New York.
Written, directed by : Patrick Jean
Director of Photograhy : Matias Boucard
SFX by Patrick Jean and guests
Produced by One More Production
www.onemoreprod.com

Microsoft Releases Robotics Studio Free

from Erico Guizzo at IEEE Spectrum:

Over the past year or so, Microsoft’s robotics group has been working quietly, very quietly. That’s because, among other things, they were busy planning a significant strategy shift.

Microsoft is upping the ante on its robotics ambitions by announcing today that its Robotics Developer Studio, or RDS, a big package of programming and simulation tools, is now available to anyone for free.

The Microsoft RDS supports a number of hardware platforms, including the Lego Mindstorms NXT, iRobot Create and Parallax Boe-Bot, and it provides a physics-based simulation environment to allow you to test your designs.

(please to note: the download is almost 500MB)

http://www.adafruit.com/blog/2010/05/26/microsoft-releases-robotics-studio-free/

Sunday, May 16, 2010

Similar

I have a philosophical question and wait for your answer.

How do you define the Term "Similar"?

When 2 images are considered as “Similar images”?

 

 

 

According to Google, as similar is defined:

  • marked by correspondence or resemblance; "similar food at similar prices"; "problems similar to mine"; "they wore similar coats"
  • alike(p): having the same or similar characteristics; "all politicians are alike"; "they looked utterly alike"; "friends are generally alike in background and taste"
  • like: resembling or similar; having the same or some of the same characteristics; often used in combination; "suits of like design"; "a limited circle of like minds"; "members of the cat family have like dispositions"; "as like as two peas in a pod"; "doglike devotion"; "a dreamlike quality"
  • (of words) expressing closely related meanings
  • exchangeable: capable of replacing or changing places with something else; permitting mutual substitution without loss of function or suitability; "interchangeable electric outlets" "interchangeable parts"
    wordnetweb.princeton.edu/perl/webwn
  • In linear algebra, two n-by-n matrices A and B are called similar if
    en.wikipedia.org/wiki/Similar_(linear_algebra)
  • Having traits or characteristics in common; alike, comparable; of triangles, etc., having corresponding angles equal and corresponding line ...
    en.wiktionary.org/wiki/Similar
  • similarly - in like or similar manner; "He was similarly affected"; "some people have little power to do good, and have likewise little strength to resist ...
    wordnetweb.princeton.edu/perl/webwn
  • similarly - in a like style or manner; Used to link similar items
    en.wiktionary.org/wiki/similarly
  • Figures that have the same shape but not necessarily the same size. Similar polygons have corresponding angles congruent and corresponding sides in proportion. Congruent is a special case of similar where the ratio of the corresponding sides is 1-1.
    www.aug.edu/~lcrawford/Web_3242/GLOSSARY.htm
  • Denotes meaning similarity between words that cannot always be used instead of each other, for instance because they only share a part of their ...
    www.hyperdic.net/en/doc/word
  • Selects like-color pixels throughout the image.
    www.uwec.edu/Help/PhotoshopCS3/terms.htm
  • When data are described as "similar" this indicates the difference is likely due to chance as opposed to a real difference between two populations, even if the data points are different. ...
    www.clark.wa.gov/public-health/reports/definitions.html
  • Two objects such that the distance between any two points of one object is a particular constant times the distance between the corresponding ...
    quizlet.com/769330/more-geometry-terms-flash-cards/
  • similarly - 2 ) has been synthesized in NSPs of at least two different shapes and crystalline structures, each of which may have different toxicities. ...
    www.azonano.com/Details.asp

Send me your opinion at savvash<at>gmail<dot>com and i will post it here.