Edge detection in C #

I am trying to find an efficient way to trace the outlines of the uniformly colored areas of a bitmap and store them as GraphicsPath objects.

Check out this little sample image:

enter image description here

Now most of the types of cross detection I can find are too complex - working on photos with varying degrees of brightness, etc. - my edges are very easy to detect, just changing the minutes in RGB values ​​means the edge.

But also I have a more complicated situation than the simplest things that scan the whole image to find one blob to the edge. I have regions that share boundaries and I need to be as efficient as possible because speed is a big time problem.

Can anyone give me some pointers on how to do this? Pseudo code or real code would be awesome

Ideally, I can scan line by line, contouring each separate area at the same time. But this kind of coding is outside the scope of my skills, since I'm crap at math.


source to share

1 answer

I would try:

Perhaps you can find standard libraries that do this and do it efficiently and correctly. Once you have this working, you can consider optimizing, for example avoiding frequent edge detection.

If you want this optimization, I assume you will have to write this yourself. If you can't, make sure someone is hired who can.



All Articles