🎨 String Art Generator

High-performance Go implementation - Latest: v30.0 (7/10)

v34.0 - LATEST ⭐ 8/10 Quality

v34.0: Perceptual SSIM-based scoring (+19.75% SSIM)

Latest self-learning improvement - Generated on 2026-05-03 19:41:47

300
Pins
2179
Lines
28.5s
Generation Time
8/10
Visual Quality
String Art v34.0
SVG Output v34.0 (Zoomable)

300 pins, 2179 lines, perceptual scoring

String Art v34.0 PNG Preview
PNG Preview v34.0
v33.0 - LATEST ⭐ 8/10 Quality

v33.0: Multi-scale edge detection (Sobel + Canny + Laplacian)

Latest self-learning improvement - Generated on 2026-05-03 19:18:54

300
Pins
2761
Lines
24.99s
Generation Time
8/10
Visual Quality
String Art v33.0
SVG Output v33.0 (Zoomable)

300 pins, 2761 lines, weight 27

String Art v33.0 PNG Preview
PNG Preview v33.0
v30.0 - LATEST ⭐ 7/10 Quality

v30.0: Canny Edge Detection + morphological operations

Latest self-learning improvement - Generated on 2026-05-03 18:21:38

300
Pins
3200
Lines
34.1s
Generation Time
7/10
Visual Quality
String Art v30.0
SVG Output v30.0 (Zoomable)

300 pins, 3200 lines, weight 27, Canny edge detection with Gaussian blur + non-maximum suppression + double threshold + hysteresis + morphological closing

String Art v30.0 PNG Preview
PNG Preview v30.0
v9.0 - BIRSAK ALGORITHM ⭐ 6/10 Quality

v9.0: Birsak Supersampling + Enhanced Scoring

Major algorithm rewrite with proper error reduction scoring, anti-aliased rendering, and adaptive line weight.

300
Pins
2500
Lines
11.4s
Generation Time
7/10
Visual Quality
800px
Resolution
String Art v9.0
SVG Output v9.0 (Zoomable)

300 pins, 3200 lines, weight 27

🚀 Key Improvements in v5.0

  • Proper error reduction scoring: Measures actual squared-error improvement per line (not just "remaining darkness")
  • Anti-aliased rendering: Xiaolin Wu's algorithm for smooth sub-pixel lines
  • Fear removal: Ignores temporarily worsening pixels, enabling fine detail capture
  • Contrast enhancement: Automatic histogram stretching for better tonal range
  • Adaptive line weight: Starts heavy (20) for broad strokes, reduces to 12 for fine details
  • Line removal pass: Removes lines that hurt overall quality (Birsak 2018 method)
  • Higher resolution: 800×800 processing (was 600×600)
  • Fixed target image: Uses raw grayscale as target (v3.x incorrectly used edge-blended image)
v5.0 - 360 PINS 7.5/10 Quality

v5.0 with 360 Pins (Physical Construction Ready)

Maximum pin count for physical construction (1 pin per degree). More lines for finer detail.

360
Max Pins
3000
Lines
11.4s
Generation Time
7/10
Visual Quality
String Art v9.0
SVG Output v9.0 (Physical Construction Ready)

300 pins, 3200 lines, weight 27

Quality Progression

Evolution from v3.x to v5.0 — the algorithm rewrite made the biggest difference.

v3.4 - 500 pins (old)
v3.4: 500 pins - 3/10 ❌

Edge-blended target, no error reduction

v7.0 (new)
v6.3: 300 pins - 6/10 ⭐

BEST - Source-over + calibrated gamma

💡 What Made the Difference?

The v3.x algorithm had a critical bug: it used an edge-blended image (70% edges + 30% original) as the target for string art generation. This meant the algorithm was trying to reproduce edge artifacts instead of the actual photograph. v5.0 fixes this by using the raw grayscale image as the target, combined with proper squared-error reduction scoring. The result: 300 pins in v5.0 beats 500 pins in v3.4.

Key Features

Technical Specifications

Optimal Parameters (v5.0):

Command:

./string-art-gen --input photo.jpg --pins 300 --lines 4000 --weight 20 --edge-weight 3.0

For physical construction (360 pins max):

./string-art-gen --input photo.jpg --pins 360 --lines 5000 --weight 18 --min-dist 12 --edge-weight 2.5
View on GitHub →

🤖 Self-Learning System

The generator has an autonomous learning system that runs during idle time.

View Self-Learning Gallery →

Lessons Learned