Skip to content

Commit d20b979

Browse files
committed
Added All Camera Model Detailer in Python Scripts
1 parent a245680 commit d20b979

File tree

12 files changed

+1183
-0
lines changed

12 files changed

+1183
-0
lines changed

Diff for: GUIScripts/All Camera Model Detailer/Images/1.jpg

116 KB
Loading

Diff for: GUIScripts/All Camera Model Detailer/Images/2.jpg

196 KB
Loading

Diff for: GUIScripts/All Camera Model Detailer/Images/3.jpg

177 KB
Loading

Diff for: GUIScripts/All Camera Model Detailer/Images/4.jpg

184 KB
Loading

Diff for: GUIScripts/All Camera Model Detailer/Images/5.jpg

148 KB
Loading

Diff for: GUIScripts/All Camera Model Detailer/Images/6.jpg

192 KB
Loading

Diff for: GUIScripts/All Camera Model Detailer/Images/7.jpg

158 KB
Loading
880 KB
Loading

Diff for: GUIScripts/All Camera Model Detailer/README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# ✔ ALL CAMERA MODEL DETAILER
2+
- ### A "All Camera Model Detailer" is an application created in python with tkinter gui.
3+
- ### In this application, user can find details of about 1000's of different camera model till now.
4+
- ### The details will be in terms of Release date, Max resolution, Low resolution, Effective pixels, Zoom wide (W), Zoom tele (T), Normal focus range, Macro focus range, Storage included, Weight (inc. batteries), Dimensions, and Price.
5+
- ### for the data, used the camera_dataset.csv data, and read using pandas library.
6+
7+
****
8+
9+
# REQUIREMENTS :
10+
- ### python 3
11+
- ### tkinter module
12+
- ### from tkinter messagebox module
13+
- ### pandas
14+
15+
****
16+
17+
# How this Script works :
18+
- ### User just need to download the file and run the all_camera_model_detailer.py on their local system.
19+
- ### Now on the main window of the application the user needs to select the Camera Model from the drop down list Option Menu.
20+
- ### After user has chosen the Camera Model name, when user clicks on the DETAILS button, he/she will be able to see the details of that selected camera model in terms of Release date, Max resolution, Low resolution, Effective pixels, Zoom wide (W), Zoom tele (T), Normal focus range, Macro focus range, Storage included, Weight (inc. batteries), Dimensions, and Price.
21+
- ### Also there is a reset button, clicking on which user can resets both the Option Menu to default Camera Model Name i.e. "Agfa ePhoto 1280".
22+
- ### Also there is an exit button, clicking on which exit dialog box appears asking for the permission of the user for closing the window.
23+
24+
****
25+
26+
# SCREENSHOTS :
27+
28+
****
29+
30+
<p align="center">
31+
<img width = 1000 src="Images/1.jpg" /><br>
32+
<img width = 1000 src="Images/2.jpg" /><br>
33+
<img width = 1000 src="Images/3.jpg" /><br>
34+
<img width = 1000 src="Images/4.jpg" /><br>
35+
<img width = 1000 src="Images/5.jpg" /><br>
36+
<img width = 1000 src="Images/6.jpg" /><br>
37+
<img width = 1000 src="Images/7.jpg" /><br>
38+
</p>
39+
40+
****
41+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
2+
# All Camera Model Detailer
3+
4+
# imported necessary libraries
5+
import tkinter
6+
from tkinter import *
7+
import tkinter as tk
8+
import tkinter.messagebox as mbox
9+
import pandas as pd
10+
11+
# created a main window
12+
window = Tk()
13+
window.geometry("1000x700")
14+
window.title("All Camera Model Detailer")
15+
16+
# ------------------------- for showing gif image on the main window ------------------------------
17+
frameCnt = 4
18+
frames = [PhotoImage(file='Images/cameras.gif',format = 'gif -index %i' %(i)) for i in range(frameCnt)]
19+
20+
cnt = 0.0
21+
def update(ind):
22+
global cnt
23+
frame = frames[ind]
24+
if(cnt == 1.0):
25+
cnt = 0
26+
cnt = cnt + 0.2
27+
ind += int(cnt)
28+
if ind == frameCnt:
29+
ind = 0
30+
label.configure(image=frame)
31+
window.after(100, update, ind)
32+
label = Label(window)
33+
label.place(x = 130, y = 100)
34+
window.after(0, update, 0)
35+
# --------------------------------------------------------------------
36+
37+
# read the data using pandas library
38+
data = pd.read_csv("camera_dataset.csv")
39+
Model = data["Model"].tolist()
40+
Release_date = data["Release date"].tolist()
41+
Max_resolution = data["Max resolution"].tolist()
42+
Low_resolution = data["Low resolution"].tolist()
43+
Effective_pixels = data["Effective pixels"].tolist()
44+
Zoom_wide = data["Zoom wide (W)"].tolist()
45+
Zoom_tele = data["Zoom tele (T)"].tolist()
46+
Normal_focus_range = data["Normal focus range"].tolist()
47+
Macro_focus_range = data["Macro focus range"].tolist()
48+
Storage_included = data["Storage included"].tolist()
49+
Weight = data["Weight (inc. batteries)"].tolist()
50+
Dimensions = data["Dimensions"].tolist()
51+
Price = data["Price"].tolist()
52+
53+
54+
def get_details():
55+
model = model_var.get()
56+
for i in range(0, len(Model)):
57+
if(Model[i] == model):
58+
mbox.showinfo(model + "Details", str(model) + "\n\n1.) Release date : " + str(Release_date[i]) + "\n\n2.) Max resolution : " + str(Max_resolution[i]) + "\n\n3.) Low resolution : " + str(Low_resolution[i]) + "\n\n4.) Effective pixels : " + str(Effective_pixels[i]) + "\n\n5.) Zoom wide (W) : " + str(Zoom_wide[i]) + "\n\n6.) Zoom tele (T) : " + str(Zoom_tele[i]) + "\n\n7.) Normal Focus Range : " + str(Normal_focus_range[i]) + "\n\n8.) Macro Focus Range : " + str(Macro_focus_range[i]) + "\n\n9.) Storage Included : " + str(Storage_included[i]) + "\n\n10.) Weight (inc. batteries) : " + str(Weight[i]) + "\n\n11.) Dimensions : " + str(Dimensions[i]) + "\n\n12.) Price : " +str(Price[i]))
59+
60+
# top label
61+
start1 = tk.Label(text = "CAMERA MODEL DETAILER", font=("Arial", 50), fg="magenta",underline=0) # same way bg
62+
start1.place(x = 50, y = 10)
63+
64+
# label for camera model ---------------------------------------------------------------------------------
65+
modellbl = tk.Label(text = "CAMERA MODEL : ", font=("Arial", 30), fg="brown") # same way bg
66+
modellbl.place(x = 120, y = 550)
67+
68+
# creating the drop down menu button for selecting camera model
69+
model_var = tk.StringVar()
70+
model_choices = Model
71+
model_menu = OptionMenu(window, model_var, *model_choices)
72+
model_menu.config(font=("Arial", 20), bg = "light green", fg = "blue", borderwidth=3)
73+
model_menu["menu"].config(font=("Arial", 10), bg = "light yellow", fg = "blue")
74+
model_menu.place(x=500, y=545)
75+
model_var.set("Agfa ePhoto 1280") # size 1 is selected as by default, and we can
76+
77+
# details button
78+
getb2 = Button(window, text="DETAILS",command=get_details,font=("Arial", 20), bg = "light green", fg = "blue", borderwidth=3, relief="raised")
79+
getb2.place(x =150 , y =620 )
80+
81+
# function created for reset button
82+
def reset_label():
83+
model_var.set("Agfa ePhoto 1280")
84+
85+
# created reset button
86+
resetb = Button(window, text="RESET",command=reset_label,font=("Arial", 20), bg = "light green", fg = "blue", borderwidth=3, relief="raised")
87+
resetb.place(x =480 , y =620 )
88+
89+
# function for exiting
90+
def exit_win():
91+
if mbox.askokcancel("Exit", "Do you want to exit?"):
92+
window.destroy()
93+
94+
# created exit button
95+
exitb = Button(window, text="EXIT",command=exit_win,font=("Arial", 20), bg = "red", fg = "blue", borderwidth=3, relief="raised")
96+
exitb.place(x =770 , y =620 )
97+
98+
99+
window.protocol("WM_DELETE_WINDOW", exit_win)
100+
window.mainloop()

0 commit comments

Comments
 (0)