Skip to content

Commit

Permalink
Merge pull request #1 from docentYT/master
Browse files Browse the repository at this point in the history
Cross-platform path, requirments.txt, handling tkinter import error
  • Loading branch information
Shilish authored Apr 24, 2023
2 parents c480b19 + 2bafe3e commit d244124
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
12 changes: 9 additions & 3 deletions Front End/Front End.py → FrontEnd/FrontEnd.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
from tkinter import *
try:
from tkinter import *
except ImportError:
raise ImportError("Please install Tcl/Tk.")
from tkinter import messagebox
from tkinter import filedialog
from PIL import ImageTk,Image
import cv2
import numpy as np
import os

window = Tk()

window.title("NIO Internship")
window.config(bg='#e1f1f7')
window.geometry("1280x720")

logo_img = ImageTk.PhotoImage(Image.open("nio.png"))
dirname = os.path.dirname(__file__)
logo_path = os.path.join(dirname, "..", "nio.png")

logo_img = ImageTk.PhotoImage(Image.open(logo_path))
logo_label = Label(image=logo_img)
logo_label.grid(row=0, column=0, columnspan=3)

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
A GUI Interface that allows a user to sharpen any given image with minimal effort.

#### How to use:
- Run the python file (*Front End.py*) located in the 'Front End' folder.
- The rest should be self explanatory.
- Install requirements.txt: `pip install -r requirements.txt`.
- Run the python file (*FrontEnd.py*) located in the 'FrontEnd' folder.
- The rest should be self explanatory.
1 change: 0 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import cv2
import numpy as np

#Reading the image
in_img = cv2.imread('original.jpg')
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opencv-python==4.7.0.72

0 comments on commit d244124

Please sign in to comment.