A simple Python program that converts an image into a sketch and stores it in the containing folder of the program.
Before running this program, ensure that you have the following:
- Python installed on your system
-
Clone the repository or download the program file
image_to_sketch.py
. -
Open a terminal or command prompt and navigate to the directory containing the
image_to_sketch.py
file. -
Run the following command:
python image_to_sketch.py
The program works as follows:
-
The program will prompt you to enter the path to the image file you want to convert into a sketch. Provide the path and press Enter.
-
The program will convert the image into a sketch and save it in the same directory as the input image with the prefix "sketch_" added to the file name.
Let's say you have an image file named my_photo.jpg
in the same directory as the image_to_sketch.py
program. After running the program and providing the path to my_photo.jpg
, it will convert the image into a sketch and save it as sketch_my_photo.jpg
in the same directory.
This Python program allows you to convert an image into a sketch easily. You can use it for various purposes such as artistic effects, image preprocessing, or adding a unique touch to your images.