Skip to content

Nima-Mollaei/Color-Spectrum-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Color Spectrum Analyzer

A simple Python project to analyze the color spectrum of an image using OpenCV and Matplotlib.

πŸ“Œ Project Description

This tool loads an image and calculates the distribution of colors (in RGB format), then visualizes them as a color spectrum (pie chart). It's useful for:

  • Basic image analysis
  • Understanding dominant colors
  • Learning OpenCV and matplotlib

πŸ–ΌοΈ Example Output

Color Spectrum Output

πŸ§ͺ Technologies Used

  • Python 3.x
  • OpenCV (cv2)
  • Matplotlib
  • NumPy

πŸ“‚ File Structure


color-spectrum-analyzer/
β”œβ”€β”€ main.py               # Main script
β”œβ”€β”€ image.jpg       # Input image
β”œβ”€β”€ output.png            # Generated color spectrum
β”œβ”€β”€ requirements.txt      # Required packages
└── README.md             # Project description

▢️ How to Run

  1. Clone the repository:

    git clone https://github.com/your-username/color-spectrum-analyzer.git
    cd color-spectrum-analyzer
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the script:

    python main.py

βœ… Notes

  • Make sure your image file is named your_image.jpg and is in the same folder as main.py
  • The output chart will be saved as output.png.

🀝 Contributing

Contributions are welcome! Feel free to fork this repo, open issues, or submit pull requests.

About

A simple Python project that analyzes and visualizes the color spectrum of an image using OpenCV and matplotlib.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages