Click here to Skip to main content
15,559,455 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:

I'm looking for a way to detect points/pixels on an image, according to a data I get from the user.

I want the user to scan an item barcode, and by that- to find the relevant item in the image and mark it (I can settle with a red dot or something ..)

for example, if I have on my screen an image of a desk with a pen, a notebook and a stapler and now the user scan the barcode on (a real) pen, it will mark the pen on the image.
I guess I need to adjust the x,y of each item of any item on the image I want to find but then I ask myself how can I do it relatively (if the the user change the screen resolution for example)

Any idea how can I do that?
I think I rather use winform and not webform since the software suppose to be in a specific computers .

Updated 20-Jan-13 0:07am
Zoltán Zörgő 20-Jan-13 5:30am    
Shortly: if you imagined that object recognition on an image just as simple, I suggest you forget it. Actually there are algorithms, but none is absolutely precise, and all depend on several circumstances.
But it depends on your goals. Please describe the usage of your application.
Sergey Alexandrovich Kryukov 20-Jan-13 14:45pm    
I totally agree.
Nevertheless, I provided some advice and references in my answer, please see.
Your comment is of course credited.
danait25 20-Jan-13 8:04am    
ok, I thought about an option of building a database (a very sisyphean work..) that declare that for instance, the pen is at point (10,20), the notebook on (35,100) [thats all exaple for points on the screen ofcourse] etc.
and each of these item will have a code and when I scan the barcode of one of the items, the system will look for the item on the database and display a red circle or something like that to declare where is it on the image..
It's like a game of body parts - that you press on a place on the image and get the name of the body part (but vice versa...)
Is there a better way for doing something like that?
Zoltán Zörgő 20-Jan-13 14:56pm    
So all items are predefined by you (or an other user)?
Like this:
1 the user adds an image,
2 the app stores the image
3 the user clicks on a spot
4 the application asks for a code and description
5 the app stores the coordinates and the metadata
6 repeat from step 3 or 1 until are objects are defined

In that case you simply need to draw on an image. Right?
danait25 21-Jan-13 8:51am    
Can you explain me how can I "tell" the app to save the relative position of the point where I clicked, and also set the relevant details (code and stuff)

1 solution

I agree with Zoltán Zörgő.

However, if you want to dig in the field of image recognition, you need to read some literature on related topics. I would recommend you to use the computer vision and artificial intelligence library AForge.NET:[^],[^].

I'm using it, it's a very robust thing; and it's for .NET.

Also, see the CodeProject articles by the AForge.NET author, Andrew Kirillov ([^]):[^].

Good luck,
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900