#### Archived

This topic is now archived and is closed to further replies.

# Pattern Recognition

This topic is 6230 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Does ANYONE know some pattern recognition algorithms?!?!? please code, links, pesuedo <-??(spell)?? code, what ever! Thanx ahead.

##### Share on other sites
There are alot of things to this. The images usually go through
alot of preprocessing, I''ll try to explain the more important ones.

One thing done alot is a simple edge filter. If you don''t know how
this is done, I''ll tell you. Basically, the value of a pixel is
equal to the difference of its original value and the average of
all the values of the pixels surround it (the eight around it).

___ ___ ___ In the diagram, the current pixel is E. E will be
|a| |b| |c| the original value and E2 the new value.
--- --- ---
___ ___ ___ E2 = |E - (a+b+c+d+f+g+h+i)/8 |
|d| |E| |f|
--- --- --- Keep in mind you probably have to do this for each
___ ___ ___ color element in the pixel, unless its black and
|g| |h| |i| white.
--- --- ---

This gives a more defined image that is much better for these sort of things to work with. Lines and edges will show up more than flat areas. Basically, what the algo does is create an image that is like a map of color changes.

Another thing to do is gray-scale. Many images will be alot easier to recognize if things are in gray-scale. It''s less information. This doesn''t mean you should do things only in grayscale. Try a tally system where each method add''s ''points'' to the image in question and then the points are added up. The image with the most points is the closest. You can do each method then in grayscale and color both.

Yet another way of making the recognition easier is scaling. Scale the images to the same size and things are much easier. Also, scaling images smaller makes the information alot simpler and two images that should be recognized as similer will be more similar at smaller sizes.

As for the actual comparison of the images, there are a few ways of doing it. The simplest would be that for each value (RGB or grayscale value) you just result in the difference between the corrosponding pixel in the other image (for this they must be the same size).

Thats actually the best way to do it. Try alot of the preprocs in different combinations. Find what works best. I never did enough work in this to actually find how to use all these nicely. Maybe now I will tho :o)

Actually, I think I''m going to go code an edge filter! Woohoo!

BTW, http://www.generation5.org/ is a great AI site with alot of stuff on this!

##### Share on other sites
Hey ironfroggy, thanx for the info and sight. I am really glad that there are people out there who take there to time to help others.

If anyone else knows any other pattern recognition stuff, I am also looking for an algo that finds patterns in the data an edge filter will give. Also anyone know much about sound?

Thanx alot

##### Share on other sites
There is, of course, much more to all of this. I only gave you one of the simplest and quickest ways of doing things.

I am actually working on such a thing. For more depth, you could break up the image of have a sort "view box" that the computer saw and could analyze directly. It could move it around and learn as it goes, possibly learning lines and curves and other shapes. It''s a very complex operation and not something I am prepared to explain here or anytime soon.

Sound could work alot the same. Smooth it out, change bitrates, etc.

If you want to talk abuot this more, catch me on ICQ or e-mail me. Although it is nice I think to keep such discussions on forums so others can learn as well.

For the best recognition it would have to be taught. Shown hundreds and thousands of images, learning what they are. This of course is VERY difficult and time consuming, but it works the best in the long run. And from there you can study how it learned to do the work itself, and then optimize it hard-coded.

##### Share on other sites
I was kinda figuring that you could let it slowly learn, and then learn from what learned. (one to many "learn"''s in there.

But One thing I can''t figure out is a way to come up with the non-linear functions describing everything in our world. I think you would have to use calculus or statics to do it, but if anyone knows where I could even start to find stuff on this could you PLZ reply on this post or mail me tazzeld@hotmail.com? Thanx abunch

I also had an idea that might make sense: here it is:

You give the AI sterio vision which would give it the ability to see true depth. It would then also be able to compute the true dimentions of all of the objects around it.
Since it would take forever for an AI descover everything out, could you not give it a huge hierchary <-(spell?) of common objects. sort of like the animal kingdom esxcept for all objects. Would it not be sort of Object Oriented then? I just had this idea and don''t know if it practical, though. I know sterio vision would take a while to prossess <-(spell?) but it could observe, mostly, durring the day, when people could use it, then prossess the info at night. I don''t know how or if this would work, but I just thought it was worth thinking outloud.

~~ Zach Dwiel ~ Tazzel3D ~ ZDProgramming ~ chaos ~~

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 22
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631766
• Total Posts
3002219
×