This Python script demonstrates basic image processing using the OpenCV library. It loads an image, displays it, resizes it, and saves the resized version. The script serves as a simple example for those interested in getting started with image manipulation using OpenCV.
- Python 3.x
- OpenCV (
pip install opencv-python)
-
Clone the repository:
git clone https://github.com/omm-prog/Image-Processing-with-OpenCV cd opencv-image-processing python image_processing.py
The script loads the image (hi.png) using OpenCV. Displays the original image in a window titled "Original." Resizes the image to 250x250 pixels. Saves the resized image as new_hi.png. Displays the resized image in a window titled "Resized."
If the image fails to load, a warning message is displayed in the console.
Feel free to use and modify this script for your image processing needs!