I’m looking for the algorithm (C#) or some info about how detect the edge of some object on the image (the target is the melanoma). I’ve found the AForge.NET library but I need to detect an edge without losing the image color. The examples below were prepared using the Paint.NET
Before:

after

I need only that blue edge (the color inside doesn’t matter) or the that blue pixels coordinates
EDIT
Matthew Chambers was right, converting the image to the grayscale improves the effectiveness of the algorithm.
The first result image is based on the original coloured image, and the second one is based on the grayscaled image. The blue pixels corresponds to the HSV’s Value < 30. You can see the differences by yourself. Thanks m8 !

You need to consider a few points related to the problem you are trying to solve.
What is an edge in a picture? Generally it is when the colour changes at a high rate. I.e. from dark to light in a short space.
But this has an issue about what a high rate of change for a colour actually is. For example, the Red and Green values could stay the same, while the Blue value changes at a high rate. Would we count this as an edge? This could occur for any combination of the RGB values.
For this reason, images are typically converted to greyscale for edge detection – otherwise you could get different edge results for each RGB value.
For this reason, the simplest approach would be to use a typical edge detection algorithm that works on a greyscale image, and then overlay the result onto the original image.