A simple Python project for image creation and basic processing using PIL, NumPy, and Matplotlib.
This project generates a grayscale image with geometric shapes and saves it as an output file, serving as an introductory exercise in image processing.
- Image generation: Creates a 100Γ100 grayscale image
- Shape drawing: Adds white rectangles on a black background using
ImageDraw
- File saving: Saves generated image (
simple_image.png
) - Visualization: Uses Matplotlib to display the image
- Python 3.x
- NumPy (array operations)
- Pillow (PIL) (image creation & drawing)
- Matplotlib (visualization)
Image_OpenCV_Project/
βββ hw1.py # Main script (image generation & drawing)
βββ README.md # Documentation
βββ simple_image.png # Output image (generated after running)
- Clone the repository:
git clone https://github.com/KhaledYaish0/Image_OpenCV_Project.git cd Image_OpenCV_Project
2.Install dependencies:
pip install numpy pillow matplotlib
- Run the project:
python hw1.py
- The script will generate and save simple_image.png. It will also open a Matplotlib window to display the result.\
A 100Γ100 grayscale image with four white rectangles on a black background.
For educational use (Image Processing course project).