473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Image Search / recognition

Jmc
Hi
I would like to build an image search system, that can match both
colors and/or shapes.
The pictures will be quite simple picture with normaly 4-10 colors
(maybe 20 in extreme cases).
Large areas with the same color (no photographs) or extremely details.
Gor any poiters how to do this, what technique should I use, has anyone
done this in c# and sql server?
The picture database will probably contain millions of pictures when
its done, the pictures wont be very large, probably 200-300 pixels in
height and width.

/Jimmy

Jul 12 '06 #1
3 5331
KJ
Hello Jmc,

I have some ideas for you based on my limited experience. The Image
object has a Palette.Entries property which is a Color[] array. You can
store these values (i.e., call the ToArgb() method of each entry) in a
table when you load your images into your repository, then search for
them later.

An easy way to check if two files are identical is to create MD5 hash
codes for all your files, store them as varbinary(16), then compare
these values. Use the MD5CryptoServiceProvider to create the hashes,
e.g.,

byte[] MD5hash (byte[] data)
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] result = md5.ComputeHash(data);
return result;
}

As far as finding shapes goes, I have no idea. I have a feeling it
would require some intimate knowledge of byte arrangement in the file
types you are using. Perhaps not.

HTH.
-KJ

Jmc wrote:
Hi
I would like to build an image search system, that can match both
colors and/or shapes.
The pictures will be quite simple picture with normaly 4-10 colors
(maybe 20 in extreme cases).
Large areas with the same color (no photographs) or extremely details.
Gor any poiters how to do this, what technique should I use, has anyone
done this in c# and sql server?
The picture database will probably contain millions of pictures when
its done, the pictures wont be very large, probably 200-300 pixels in
height and width.

/Jimmy
Jul 12 '06 #2
Jmc
Hi KJ
I need a bit more advanced functionality.
To break it down I would need 3 different recognition functions.
1.
Basically what I would like to do is to have a picture lets say a ball,
the image regognision system should be able to identify an exakt copy
of the picture (OR the same placement of pixels regardless of color).
Imagine that I have a picture of a green ball and some one colors it
yellow, I would still like it to identify it as the "same" picture but
with color variation.

2.
Also I would like to be able to store patterns in a database, lets say
the shape of a balloon, I want my application to be able to identify a
simular shape and then suggest that the picture might illustrate a
baloon.

3. And simularities in colors a red picture should find other red
pictures (but not the exact rgb value but rather a red-ish color) That
part I think I can handle using the CIE algoritm.

The most imortant function is no 1 (and perhaps the most simple(?))

Hope someone can point me in the right direction.
/Jimmy

Jul 13 '06 #3
Task 1) You may be able to do task one using as method similar to the
following:

1) Convert the images to monochrome
2) Increase their contrast without regard to clipping, bring them close
to black & white
3) Compare them, if a (very) close match, you have a hit
4) If no match, invert one of them and compare them again, if a very
close match you have a hit, otherwise you have a miss.

There probably is a bit more to it than that but its a start.

Task 2) That's a tough one...not really sure...something similar to the
MPEG motion estimation algorithm perhaps, extended to account for
rotation of an object? (I'm sure there are better ideas out there.)

Task 3) Not familiar with the CIE algorithim. Is that a heuristics
algorithm (which is something that could work.)

Hope this helps a little.

-Ted

Jmc wrote:
Hi KJ
I need a bit more advanced functionality.
To break it down I would need 3 different recognition functions.
1.
Basically what I would like to do is to have a picture lets say a ball,
the image regognision system should be able to identify an exakt copy
of the picture (OR the same placement of pixels regardless of color).
Imagine that I have a picture of a green ball and some one colors it
yellow, I would still like it to identify it as the "same" picture but
with color variation.

2.
Also I would like to be able to store patterns in a database, lets say
the shape of a balloon, I want my application to be able to identify a
simular shape and then suggest that the picture might illustrate a
baloon.

3. And simularities in colors a red picture should find other red
pictures (but not the exact rgb value but rather a red-ish color) That
part I think I can handle using the CIE algoritm.

The most imortant function is no 1 (and perhaps the most simple(?))

Hope someone can point me in the right direction.
/Jimmy
Jul 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mad Scientist Jr | last post by:
Has anyone worked with code that can look at two JPG images (I am talking about relatively small ones, 40x40 pixels or less) and quickly analyzing them to see how similar or different they are? Is...
2
by: Andreas Viklund via DotNetMonster.com | last post by:
Hi! I am developing an application in ASP.NET that takes an image, that have been created with a digital camera or camera phone, and processes it, to get data from it. The image taken by the user...
2
by: gau.tai | last post by:
Is there an existing package for python that will perform simple letter recognition from image files? I'm specifically looking for a way to read from a png file, but that can be changed.
7
by: bcutting | last post by:
I am looking for a way to take a large number of images and find matches among them. These images may not be exact replicas. Images may have been resized, cropped, faded, color corrected, etc. ...
16
by: Andreas Prilop | last post by:
I have three test pages that are marked as Italian, Spanish, Portuguese, resp. by Content-Language: it <html lang="it"> <body lang="it"> and the same for "es" and "pt". Yahoo regards all...
0
by: tavares | last post by:
--------------------------------------------------------------------------------------------------------------------------------------------- (Apologies for cross-posting) Symposium...
0
by: tavares | last post by:
------------------------------------------------------------------------------------------------------------------------------------------- (Apologies for cross-posting) Symposium...
15
by: Anoopnegi | last post by:
if i have to make a c program for image recognition which algorithm i must follow n how can i implements that technique in c programming. either to use openGl libraries.
0
by: Sagar Raj | last post by:
We are doing final year project in Optical Mark Recognition for automatic answer sheet processing using visual C#. We have completed the preprocessing techniques like converting it to gray scale,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.