Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Shape recognition in VB

Posted on 2004-04-30
15
Medium Priority
?
2,611 Views
Last Modified: 2008-01-09
Hi yall,

i'm looking in to a project where we need to develop a program (preferably in VB.NET) that scans an image and recognizes contours of several similar chapes. After the contours have been recognized i need to compute the measures of each shape and compute those numbers around a bit more.

I've been looking around on the net for libraries and example code of things that can do that, mostly the shape recognition and contour assignment, but i havent been very succesfull. So my question is, firstly is it actually possible to program this (i think it is, but hey i could be wrong), and secondly where could i find more information, libraries / controlles i would need and perhaps even same sample code on the subject?

Any help is appreciated!!
Kind regards,
rigor mortis
0
Comment
Question by:rigor_mortis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
  • +1
15 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 10959228
Good luck! ;)
0
 
LVL 4

Author Comment

by:rigor_mortis
ID: 10959262
hehe, i dont hope you want points for that remark ;)
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 10959280
Cute:

An idea though popped up perhaps you can read each pixel and get its color and based on the Color change you can determine what shape it is (same color shapes pending though)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 6

Expert Comment

by:mmusante
ID: 10959466
As I can remember (from the Image Processing course that I followed years ago) the shape recognition is usually made of the following steps:

1) contour extraction (usually made by a convolution mask applied on the image)

2) Removal of isolated pixels (and small groups of pixels too)

3)Recognition of the borders (previously extracted and cleaned) you have to find coordinates of segments that best fit with the contour pixels

I think that VB NET could be a little slow for this purpose but I don't know other problems
0
 
LVL 6

Expert Comment

by:mmusante
ID: 10959489
Do your shapes have some similarity that can simplify your work? Or are you trying to do a more general program?
0
 
LVL 8

Expert Comment

by:bukko
ID: 10959699
Make sure the image doesn't use too many colors.
16 colors would be a good idea.
Then make the the difference between background and foreground flexible so you can try to see which value works best.
Should then be fairly easy to write code to trace the image, then choose waypoints every 100 pixels or so to more clearly define the shape.

Good luck, and I hope this isn't homework.

bukko
0
 
LVL 4

Author Comment

by:rigor_mortis
ID: 10966712
mmusante,

yeah those are the steps i was thinking of as well (sounds like we had the same course :)), the thing just is that i can hardly find any information on how to program that, or where to purchase function libraries that support those steps, and dont even get me started on sample sources on the matter...

So that's really my problem, finding function libraries that incorporate functions to take those steps and some sample code on how to best implement them...

thanks for the help so far guys...
0
 
LVL 4

Author Comment

by:rigor_mortis
ID: 10966726
Bukko,

the supplied image will come from a b/w camera (perhaps with an infrared lamp connected for pictures taken at night), so it's all greyscale.

Well i was thinking of applying a threshold and making it a 2-bit picture, i hope the pictures will be 'clear' enough to make a certain range in the colors 1 and converting the rest to 0. Then cleaning up the picture (removal of isolated pixels as mmusante put it so elequently) and then computing the remaining contours.

I will get some sample pictures on monday, so hopefully i can make an education judgment on whether or not they are usuable...

and no it's not homework :) it's a project for a customer, so well, perhaps you might interpret that as homework :)
0
 
LVL 4

Author Comment

by:rigor_mortis
ID: 10966734
Oh btw, if anybody knows of a good book on the subject, they're welcome to recommend something...
0
 
LVL 6

Expert Comment

by:mmusante
ID: 11003388
Hi I'm back :)

have a look here ... (http://omni.isr.ist.utl.pt/~alex/resources.html)

mostly C and C++ things but two ActiveX too ...

I hope it can help you
0
 
LVL 6

Accepted Solution

by:
mmusante earned 1500 total points
ID: 11005935
a lot of links here too but all C or C++
(http://www-2.cs.cmu.edu/~cil/v-source.html)

Autotrace is also interesting ...
(http://autotrace.sourceforge.net/)

you can try having a look to the code
may be you get an idea
0
 
LVL 4

Author Comment

by:rigor_mortis
ID: 11170269
Hey guys,

sorry for my abscence, was on holiday last couple of weeks. I'll check out the links asap and get back to you lot.
0
 
LVL 4

Author Comment

by:rigor_mortis
ID: 11433644
sorry for the delay, the project is still on hold because we haven't sorted out the camera problem yet, i.e. getting decent, workable, feed to the computer... i'll accept mmusante's answers because he put in the most effort and because his links will prove helpfull once the thing finally gets from the ground...

kind regards,
rigor mortis
0
 
LVL 6

Expert Comment

by:mmusante
ID: 11433693
Thanks!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question