@@ -38,6 +38,7 @@ def quit_button_pressed():
38
38
_mirror = BooleanVar ()
39
39
_rotate = BooleanVar ()
40
40
_five_fold = BooleanVar ()
41
+ _resize = BooleanVar ()
41
42
_rotate_ang = IntVar (0 )
42
43
_blur_thresh = IntVar (0 )
43
44
@@ -51,16 +52,17 @@ def quit_button_pressed():
51
52
Checkbutton (root , text = "Sharpen" , variable = _sharpen ).grid (row = 6 , sticky = W )
52
53
Checkbutton (root , text = "Mirror" , variable = _mirror ).grid (row = 7 , sticky = W )
53
54
Checkbutton (root , text = "Rotate All" , variable = _rotate ).grid (row = 8 , sticky = W )
55
+ Checkbutton (root , text = "Resize (400 x 400)" , variable = _resize ).grid (row = 10 , sticky = W )
54
56
55
57
Label (root , text = "Angle Span in Degrees: " ).grid (row = 8 , column = 2 )
56
58
Label (root , text = "(Default: 45)" ).grid (row = 9 , column = 2 )
57
59
Entry (root , textvariable = _rotate_ang ).grid (row = 8 , column = 3 )
58
60
Label (root , text = "Blur Threshold (Default=7):" ).grid (row = 0 , column = 2 )
59
61
Entry (root , textvariable = _blur_thresh ).grid (row = 0 , column = 3 )
60
62
61
- Checkbutton (root , text = "Five-Fold (Default: Single-Fold)" , variable = _five_fold ).grid (row = 10 , sticky = W )
62
- Button (root , text = "Quit" , command = quit_button_pressed , width = 15 ).grid (row = 11 , column = 2 , sticky = W )
63
- Button (root , text = "Apply" , command = apply_button_pressed , width = 15 ).grid (row = 11 , column = 3 , sticky = W )
63
+ Checkbutton (root , text = "Five-Fold (Default: Single-Fold)" , variable = _five_fold ).grid (row = 11 , sticky = W )
64
+ Button (root , text = "Quit" , command = quit_button_pressed , width = 15 ).grid (row = 12 , column = 2 , sticky = W )
65
+ Button (root , text = "Apply" , command = apply_button_pressed , width = 15 ).grid (row = 12 , column = 3 , sticky = W )
64
66
65
67
root .mainloop ()
66
68
@@ -75,6 +77,7 @@ def quit_button_pressed():
75
77
sharpen = _sharpen .get ()
76
78
mirror = _mirror .get ()
77
79
rotate = _rotate .get ()
80
+ resize = _resize .get ()
78
81
global five_fold
79
82
five_fold = _five_fold .get ()
80
83
rot_ang = _rotate_ang .get ()
@@ -102,7 +105,7 @@ def quit_button_pressed():
102
105
if del_blur :
103
106
if blur_thresh is 0 :
104
107
blur_thresh = 7
105
- blur_detection .main (blur_thresh )
108
+ melNET_blur_detection .main (blur_thresh )
106
109
107
110
# Number of folds
108
111
global fold_num
@@ -140,6 +143,12 @@ def quit_button_pressed():
140
143
for img in image_list :
141
144
set_counter += 1
142
145
146
+ # Resizing
147
+ if resize :
148
+ width = 400
149
+ height = 400
150
+ img = cv2 .resize (img , (width , height ))
151
+
143
152
# Original Saving Code
144
153
if original :
145
154
file_naming (img , "O" , folder , set_counter )
0 commit comments