问题
Im a noob.
I need to write some vb.net code that looks at a picture and "removes" the blackish pixels.
Here's the scenario. A wound care doctor takes a picture of a persons hand on a flat bed scanner. The nice pink palm print is there but it is surrounded by blackish pictures. I want to make the picture pop by programatically "removing" or recoloring the pixels that are in the blackish range. i.e. the Photoshop magic wand select and delete.
I have not code to start off. Hoping for some reference code and not just pcode. Searching stackoverflow, I have not yet found an answer. Got ideas? Please discuss and many thanks for considering..
回答1:
This is very similar to the Flood Fill algorithm, that finds a zone of similar colors in a picture, and replaces all the pixels in that zone into a different color (like paint does).
You just need to define a threshold, and instead of painting the pixels, keep track of them without doing any modification.
Here are some Flood Fill questions in SO that might help:
- Different Methods of Performing FloodFill
- Flood Fill Algorithms
- QuickFill/flood fill algorithm in C#/VB.NET
来源:https://stackoverflow.com/questions/7437945/photoshop-like-magic-wand-for-selecting-pixels-of-a-similar-color-but-in-vb-net