g6mandicsc490.files.wordpress.com · Author: Amanda Manarin Created Date: 3/31/2010 8:38:37 PM
Transcript of g6mandicsc490.files.wordpress.com · Author: Amanda Manarin Created Date: 3/31/2010 8:38:37 PM
Computer Generated String Art
Motivation
String Art by Kim Kamens
The ProblemGiven:
- Input Image as a grayscale image- A set of points on the image
Want:-An output image consisting of the points (nails) connected by strings.
-Strings are densely connected in areas of high intensity.-Strings are loosely connected in areas of low intensity
In other words, we want to simulate the intensity of the image with strings.
Example Input Image
(We will use this image throughout the rest of the slides)
Attempts at A Solution
- Create a graph using all the nails
- For each nail n, consider it's X closest neighbours (m)
- For each edge (n,m) add this string to the output image, and check whether the edge brings the intensity of the region in the output image closer to the intensity in the input image
Problems- Color of the string may throw off the algorithm
- Strings that should be used get discarded- Error tolerance didn't help much
- Scale + Sampling- only considers how the string will improve one (small) part of the image! - It may work for a single area, but may throw the overall appearance off.
- Didn't create a pleasant string pattern
A Better Solution...
Notice how nails are dense around the edges...
A Better Solution
- First perform edge detection on the image- Place nails all along the edges and connect them.
Next Step...Place nails on the rest of the image, evenly spaced.
Connect Remaining Nails
- Next, detect levels of gray within a range.- Based on gray level, connect strings together within that level.- At each level increase the number of connections allowed per node.
Example
Example
Example
Example
Example
Example
Example
Example
Example
Additional Effects- Wanted to simulate the original String Art- User can add a background gradient, shadow effect and nails
Program Output