9

Before I reinvent the wheel ...

I'm coding in C#, so need a .NET solution. I want to process a gray-scale image which can be broken down into areas, which can be defined as having a lower & upper colour threshold (or "darkness") - none of which overlap and to identify various sections of the image - lasso style, as in a paint program.

When identified I want the software to either deliniate the areas with a border of a given colo(u)r or to return a list of x/y co-ords which represent the border.

Is there a FOSS solution which can be used in a commercial project? (the more liberal the license the better, in case I have to tweak the source) Failing that, can anyone point me at an algorithm?

Thansk in advance

Steve
  • 8,469
  • 1
  • 26
  • 37
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
  • 2
    It is a big package, but Paint.NET was modified MIT license before version 3.36. Any fork < 3.36 would have this functionality with MIT license compatibility. It sounds like you are just wanting the lasso, but that is going to be a hard find in a single library. – Brandon Mar 18 '11 at 02:45
  • +1 Thanks, I'll look into that. Yes, it's a big package, but may have to live with it. Otehrwise, roll my own. – Mawg says reinstate Monica Mar 19 '11 at 03:05

3 Answers3

5

AForge.net is really good, i've used it in a few projects.

http://code.google.com/p/aforge/

I remember it has the following at least:

  • Edge detectors: sobel, difference, canny, homogeneity
  • Corners' detectors: SUSAN, Moravec

However it is GNU Lesser GPL

Sam Giles
  • 650
  • 6
  • 16
  • +1 Thanks. LPGL? not optimal, but as long as I can use it as a library and don't have to change any of it's code then it's ok use commercially. I'll try it & see - it will either work or it won't – Mawg says reinstate Monica Apr 04 '11 at 02:57
2

It sounds like you need an edge detection algorithm. If so, a quick web search shows that there are various libraries and source available, for example http://www.codeproject.com/KB/GDI-plus/Laplace_Gaussion_edge.aspx.

A similar question was also asked on here: Edge detection on C# (similar but not quite the same, so I don't think your question is a duplicate).

Community
  • 1
  • 1
Steve
  • 8,469
  • 1
  • 26
  • 37
  • I googled, of course. There are soem interesting pojects on google source, but that link to a previous question alwo opened up new avenues of exploration. Thanks (+1) – Mawg says reinstate Monica Apr 02 '11 at 02:14
  • Great. I think just realizing that this is a form of edge detection is a good start, so I'm glad that was helpful. Even if you want to write it yourself the algorithms are not too hard and it's quite interesting (although I may be biased as image proc was my Masters thesis topic...). – Steve Apr 02 '11 at 08:20
1

If you don't mind the license which is free for FOSS projects, but not for commerical (http://www.emgu.com/wiki/index.php/Licensing:). I think you'll find everything you need. I haven't used, but I've seen other recommend http://code.google.com/p/aforge/

kenny
  • 21,522
  • 8
  • 49
  • 87