Skip to content

madmattp/PixelLuminanceSorter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PixelLuminanceSorter

This Python script processes an image by sorting its pixels based on brightness. The sorting can be done either horizontally or vertically within masked regions of the image, determined by brightness thresholds. Inspired by Kim Asendorf's ASDF Pixel Sort

sorted_image

Features!

  • Sort pixels by brightness
  • Supports vertical and horizontal sorting
  • Customizable brightness thresholds

Installation

  1. Clone this repository:
    git clone https://github.com/madmattp/PixelLuminanceSorter.git
  2. Install the required dependencies:
    pip install pillow

Usage

  1. Adjust the settings inside the script:
    • image_name: Image to be sorted
    • min_bright: Minimum brightness threshold
    • max_bright: Maximum brightness threshold
    • opt: Sorting direction (0 for vertical, 1 for horizontal)
    • reverse: Whether to reverse the sorting order
  2. Run the script:
    python PixelLuminanceSorter.py
  3. The sorted image will be saved as sorted_image.png.

Acknowledgements

This project is inspired by the work of Kim Asendorf.

About

Sorts image pixels by brightness.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages