Skip to content

Commit da7a9c0

Browse files
committed
UI Design & HE Results
1 parent 6284aad commit da7a9c0

20 files changed

+935
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Display RGB Histogram
2+
from PyQt5.QtWidgets import *
3+
from PyQt5 import QtWidgets
4+
import sys
5+
6+
from demo_result import Ui_MainWindow
7+
8+
class Ui_MainWindow(QtWidgets.QMainWindow,Ui_MainWindow):
9+
def __init__(self, parent=None):
10+
super(Ui_MainWindow, self).__init__(parent) # call init of QMainWindow, or QWidget or whatever)
11+
self.setupUi(self) # call the function that actually does all the stuff you set up in QtDesigner
12+
13+
if __name__ == '__main__':
14+
app = QApplication(sys.argv)
15+
mainWindow = Ui_MainWindow()
16+
mainWindow.show()
17+
sys.exit(app.exec_())
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Display RGB Histogram
2+
from PyQt5.QtWidgets import *
3+
from PyQt5 import QtWidgets
4+
import sys
5+
6+
from design import Ui_MainWindow
7+
8+
class Ui_MainWindow(QtWidgets.QMainWindow,Ui_MainWindow):
9+
def __init__(self, parent=None):
10+
super(Ui_MainWindow, self).__init__(parent) # call init of QMainWindow, or QWidget or whatever)
11+
self.setupUi(self) # call the function that actually does all the stuff you set up in QtDesigner
12+
13+
if __name__ == '__main__':
14+
app = QApplication(sys.argv)
15+
mainWindow = Ui_MainWindow()
16+
mainWindow.show()
17+
sys.exit(app.exec_())
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Display RGB Histogram
2+
from PyQt5.QtWidgets import *
3+
from PyQt5 import QtWidgets
4+
import sys
5+
6+
from design2 import Ui_MainWindow
7+
8+
class Ui_MainWindow(QtWidgets.QMainWindow,Ui_MainWindow):
9+
def __init__(self, parent=None):
10+
super(Ui_MainWindow, self).__init__(parent) # call init of QMainWindow, or QWidget or whatever)
11+
self.setupUi(self) # call the function that actually does all the stuff you set up in QtDesigner
12+
13+
if __name__ == '__main__':
14+
app = QApplication(sys.argv)
15+
mainWindow = Ui_MainWindow()
16+
mainWindow.show()
17+
sys.exit(app.exec_())
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# Form implementation generated from reading ui file 'demo_result.ui'
4+
#
5+
# Created by: PyQt5 UI code generator 5.9.2
6+
#
7+
# WARNING! All changes made in this file will be lost!
8+
9+
from PyQt5 import QtCore, QtGui, QtWidgets
10+
11+
class Ui_MainWindow(object):
12+
def setupUi(self, MainWindow):
13+
MainWindow.setObjectName("MainWindow")
14+
MainWindow.resize(1579, 691)
15+
self.centralwidget = QtWidgets.QWidget(MainWindow)
16+
self.centralwidget.setObjectName("centralwidget")
17+
self.input_img = QtWidgets.QLabel(self.centralwidget)
18+
self.input_img.setGeometry(QtCore.QRect(30, 60, 281, 281))
19+
self.input_img.setText("")
20+
self.input_img.setPixmap(QtGui.QPixmap("../my_cat(low_contrast).png"))
21+
self.input_img.setScaledContents(True)
22+
self.input_img.setObjectName("input_img")
23+
self.input_hist = QtWidgets.QLabel(self.centralwidget)
24+
self.input_hist.setGeometry(QtCore.QRect(320, 50, 441, 311))
25+
self.input_hist.setText("")
26+
self.input_hist.setPixmap(QtGui.QPixmap("result_pic/HE_to_Gray/input_hist.png"))
27+
self.input_hist.setScaledContents(True)
28+
self.input_hist.setObjectName("input_hist")
29+
self.output_img = QtWidgets.QLabel(self.centralwidget)
30+
self.output_img.setGeometry(QtCore.QRect(30, 380, 281, 281))
31+
self.output_img.setText("")
32+
self.output_img.setPixmap(QtGui.QPixmap("result_pic/HE_to_Gray/HE(Gray)_result.png"))
33+
self.output_img.setScaledContents(True)
34+
self.output_img.setObjectName("output_img")
35+
self.output_hist = QtWidgets.QLabel(self.centralwidget)
36+
self.output_hist.setGeometry(QtCore.QRect(320, 380, 441, 291))
37+
self.output_hist.setText("")
38+
self.output_hist.setPixmap(QtGui.QPixmap("result_pic/HE_to_Gray/output_hist.png"))
39+
self.output_hist.setScaledContents(True)
40+
self.output_hist.setObjectName("output_hist")
41+
self.label_4 = QtWidgets.QLabel(self.centralwidget)
42+
self.label_4.setGeometry(QtCore.QRect(20, 20, 791, 31))
43+
font = QtGui.QFont()
44+
font.setFamily(".SF NS Mono")
45+
font.setPointSize(16)
46+
self.label_4.setFont(font)
47+
self.label_4.setFrameShape(QtWidgets.QFrame.NoFrame)
48+
self.label_4.setObjectName("label_4")
49+
self.input_hist_2 = QtWidgets.QLabel(self.centralwidget)
50+
self.input_hist_2.setGeometry(QtCore.QRect(1110, 50, 441, 311))
51+
self.input_hist_2.setText("")
52+
self.input_hist_2.setPixmap(QtGui.QPixmap("result_pic/HE_to_RGB/input_RGB_hist.png"))
53+
self.input_hist_2.setScaledContents(True)
54+
self.input_hist_2.setObjectName("input_hist_2")
55+
self.output_img_2 = QtWidgets.QLabel(self.centralwidget)
56+
self.output_img_2.setGeometry(QtCore.QRect(820, 380, 281, 281))
57+
self.output_img_2.setText("")
58+
self.output_img_2.setPixmap(QtGui.QPixmap("result_pic/HE_to_RGB/output_img.png"))
59+
self.output_img_2.setScaledContents(True)
60+
self.output_img_2.setObjectName("output_img_2")
61+
self.output_hist_2 = QtWidgets.QLabel(self.centralwidget)
62+
self.output_hist_2.setGeometry(QtCore.QRect(1110, 380, 441, 291))
63+
self.output_hist_2.setText("")
64+
self.output_hist_2.setPixmap(QtGui.QPixmap("result_pic/HE_to_RGB/output_RGB_hist.png"))
65+
self.output_hist_2.setScaledContents(True)
66+
self.output_hist_2.setObjectName("output_hist_2")
67+
self.input_img_2 = QtWidgets.QLabel(self.centralwidget)
68+
self.input_img_2.setGeometry(QtCore.QRect(820, 60, 281, 281))
69+
self.input_img_2.setText("")
70+
self.input_img_2.setPixmap(QtGui.QPixmap("../my_cat(RGB_low_contrast).png"))
71+
self.input_img_2.setScaledContents(True)
72+
self.input_img_2.setObjectName("input_img_2")
73+
self.label_6 = QtWidgets.QLabel(self.centralwidget)
74+
self.label_6.setGeometry(QtCore.QRect(810, 20, 791, 31))
75+
font = QtGui.QFont()
76+
font.setFamily(".SF NS Mono")
77+
font.setPointSize(16)
78+
self.label_6.setFont(font)
79+
self.label_6.setFrameShape(QtWidgets.QFrame.NoFrame)
80+
self.label_6.setObjectName("label_6")
81+
self.label = QtWidgets.QLabel(self.centralwidget)
82+
self.label.setGeometry(QtCore.QRect(760, 10, 60, 661))
83+
self.label.setFrameShape(QtWidgets.QFrame.VLine)
84+
self.label.setLineWidth(4)
85+
self.label.setText("")
86+
self.label.setObjectName("label")
87+
self.label_2 = QtWidgets.QLabel(self.centralwidget)
88+
self.label_2.setGeometry(QtCore.QRect(10, 10, 1561, 671))
89+
self.label_2.setFrameShape(QtWidgets.QFrame.Box)
90+
self.label_2.setLineWidth(4)
91+
self.label_2.setText("")
92+
self.label_2.setObjectName("label_2")
93+
self.label_2.raise_()
94+
self.input_img.raise_()
95+
self.input_hist.raise_()
96+
self.output_img.raise_()
97+
self.output_hist.raise_()
98+
self.label_4.raise_()
99+
self.input_hist_2.raise_()
100+
self.output_img_2.raise_()
101+
self.output_hist_2.raise_()
102+
self.input_img_2.raise_()
103+
self.label_6.raise_()
104+
self.label.raise_()
105+
MainWindow.setCentralWidget(self.centralwidget)
106+
107+
self.retranslateUi(MainWindow)
108+
QtCore.QMetaObject.connectSlotsByName(MainWindow)
109+
110+
def retranslateUi(self, MainWindow):
111+
_translate = QtCore.QCoreApplication.translate
112+
MainWindow.setWindowTitle(_translate("MainWindow", "Histogram Equalization Result"))
113+
self.label_4.setText(_translate("MainWindow", "(1) Histogram equalization to gray image"))
114+
self.label_6.setText(_translate("MainWindow", "(2) Histogram equalization to color image"))
115+

0 commit comments

Comments
 (0)