You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script uses the OpenCV library to process images and outputs cartoon-like images and allows the user to process images without worrying about the directory of the image with a terminal based basic UI.
4
+
5
+
### The Significance of This Particular Cartoon Converter Script
6
+
7
+
This script finds your image file in your pc and automatically changes its the working directory before it starts processing the image. This operation saves the time and energy of the user.
8
+
9
+
#### Future Of This Project
10
+
11
+
Please keep in mind that this is the first version of the project and currenty only has 2 options for the cartoon styles. I will add much more depth to the cartoonify-ing process later on.
image_name=input("Enter the name of the image file : ") ## User input for the name of the image file.
6
+
image_directory=input("Enter the directory that may contain the image: ") ## User input for the path of the image file.
7
+
8
+
## This function looks for and finds the desired file. You can specify a parent directory for the fundtion to look for, however if you have no idea where a file is; this functio will find it for you, just slower. If you have no idea where a file is, just type "/".
9
+
deffind_the_image(file_name, directory_name):
10
+
files_found= []
11
+
forpath, subdirs, filesinos.walk(directory_name):
12
+
fornameinfiles:
13
+
if(file_name==name):
14
+
file_path=os.path.join(path,name)
15
+
files_found.append(file_path)
16
+
17
+
print(files_found[0])
18
+
returnfiles_found[0] ## Return the path.
19
+
20
+
21
+
image_path=Path(find_the_image(image_name, image_directory)) ## Inıtialize the path of the image file.
0 commit comments