Sign in to follow this  
Joshua Lamusga

Fuzzy Edge Detector

Recommended Posts

Overview
This is based on my previous edge detector, which went from top left to bottom right and checked each pixel to see if it contrasted with another pixel by some degree in the chosen channels. The pixel has a magnitude and angle, but the angle is randomized instead of being set as it was with my last edge detector. This effect now also has a quality setting to determine the number of passes it makes per-pixel. As a result, it hits all angles in a 'fuzzy' way, and may require multiple passes to get smooth edges.

 

Rx1JUhX.png6lb0Ps9.png


 
Purpose and Applications
This is used to make outlines that reduce the data needed to analyze an image, deducing areas of interest, and enabling the use of many interesting edge-based effects. I used it to make sharp or stylized outlines as needed. You can also get the edge data alone as white-on-black, then select the edge pixels and do as you wish with it. For programmers, it's easy to add an effect.  
 

Options 
Sampling range: the magnitude for the vector (the other component is the angle) that determines how thick edges are.
 
Quality: The number of passes to make.
 
Background color: This selects how the background appears. It may be black, transparent (replacing the image), or transparent (on top of the image). The foreground is black unless the background is black, in which case the foreground is white for visibility. You can always invert the colors later.
Intensity threshold: All thresholds are values that describe how 'different' pixels have to be to be detected as edges. This one deals with intensity.
 
Red, green, blue, and alpha thresholds: These deal with the rgba channels. See above.
 
Remarks
Located in the Stylize folder. Using blurs before edge detection might improve accuracy.
 

Download: Fuzzy Edge Detector

Source Code: Github

The MIT license added to the source code does not apply to past users of the source code.

I just needed to set an actual license to avoid ambiguity.

Edited by Joshua Lamusga
Source code platform changed
  • Upvote 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this