Files
2026-01-26 18:08:00 -05:00

139 lines
4.2 KiB
Markdown

# Pixel Sorting Examples
This directory contains comprehensive examples of all pixel sorting modes, sorting functions, and parameter variations.
**Source Image:** Urban scene with person in pink/purple tones
**Total Examples:** 31 (including original)
---
## Original
- `00_original.png` - Original unmodified image
---
## Interval Modes
Different ways to define which parts of the image get sorted:
- `01_interval_bright.png` - **Bright mode** - Sorts pixels with brightness ≥ threshold (subtle: 109)
- `02_interval_dark.png` - **Dark mode** - Sorts pixels with brightness ≤ threshold (subtle: 33)
- `03_interval_white.png` - **White mode** - Sorts pixels with value ≥ threshold (ASDF-style)
- `04_interval_black.png` - **Black mode** - Sorts pixels with value ≤ threshold (ASDF-style)
- `05_interval_threshold.png` - **Threshold mode** - Sorts pixels between 0.3-0.7 brightness
- `06_interval_random.png` - **Random intervals** - Randomly generated intervals (char_length=80)
- `07_interval_waves.png` - **Wave intervals** - Uniform wave-like intervals (char_length=60)
- `08_interval_edges.png` - **Edge detection** - Intervals defined by edge detection
- `09_interval_none.png` - **No intervals** - Sorts entire rows without boundaries
---
## Sorting Functions
Different ways to sort pixels within intervals (all using bright mode):
- `10_sort_lightness.png` - **Lightness** - Sort by brightness (HLS lightness)
- `11_sort_hue.png` - **Hue** - Sort by color hue (creates rainbow effects)
- `12_sort_saturation.png` - **Saturation** - Sort by color saturation intensity
- `13_sort_intensity.png` - **Intensity** - Sort by sum of RGB values
- `14_sort_minimum.png` - **Minimum** - Sort by minimum RGB channel value
- `15_sort_value.png` - **Value** - Sort by pixel integer value (ASDF original)
---
## Angle Variations
Diagonal and vertical sorting effects:
- `16_angle_45.png` - **45° diagonal** - Diagonal sorting at 45 degrees
- `17_angle_90.png` - **90° vertical** - Vertical sorting (perpendicular to default)
- `18_angle_-45.png` - **-45° diagonal** - Diagonal sorting in opposite direction
---
## Randomness
Skip some intervals randomly for variation:
- `19_randomness_25.png` - **25% random skip** - Randomly skip 25% of intervals
- `20_randomness_50.png` - **50% random skip** - Half of intervals left unsorted
- `21_randomness_75.png` - **75% random skip** - Most intervals skipped (with random mode)
---
## Multiple Passes
Apply sorting multiple times:
- `22_loops_2.png` - **2 passes** - Sort the image twice
- `23_loops_3.png` - **3 passes** - Sort the image three times (stronger effect)
---
## Creative Combinations
Complex effects combining multiple parameters:
- `24_combo_random_hue.png` - **Random + Hue + 20% randomness**
- Interval: random (char_length=100)
- Sorting: hue
- Randomness: 20%
- `25_combo_edges_saturation.png` - **Edge detection + Saturation**
- Interval: edges (lower_threshold=0.3)
- Sorting: saturation
- `26_combo_waves_hue.png` - **Waves + Hue**
- Interval: waves (char_length=50)
- Sorting: hue
- `27_combo_diagonal_random_hue.png` - **Diagonal + Random + Hue**
- Interval: random (char_length=80)
- Sorting: hue
- Angle: 45°
- `28_combo_dark_lightness_loops.png` - **Dark + Lightness + Multiple passes**
- Interval: dark (subtle threshold)
- Sorting: lightness
- Loops: 2
- `29_combo_bright_saturation_90.png` - **Bright + Saturation + Vertical**
- Interval: bright (subtle threshold)
- Sorting: saturation
- Angle: 90°
- `30_combo_threshold_hue_rand.png` - **Threshold + Hue + Randomness**
- Interval: threshold (0.2-0.8)
- Sorting: hue
- Randomness: 30%
---
## Analysis Results
For this image, the analysis suggested:
**Brightness thresholds:**
- Bright (subtle): 109
- Dark (subtle): 33
These values were used for the examples to ensure good results for this specific image.
---
## Regenerating Examples
To regenerate all examples with a different image:
```bash
# Edit generate_examples.py to point to your image
uv run python generate_examples.py
```
The script automatically:
1. Analyzes the image to find optimal thresholds
2. Generates examples for all modes
3. Creates organized, numbered output files