DigitUI.py 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # -*- coding: utf-8 -*-
  2. # Form implementation generated from reading ui file 'Digit.ui'
  3. #
  4. # Created by: PyQt5 UI code generator 5.14.1
  5. #
  6. # WARNING! All changes made in this file will be lost!
  7. from PyQt5 import QtCore, QtGui, QtWidgets
  8. class Ui_Digit(object):
  9. def setupUi(self, Digit):
  10. Digit.setObjectName("Digit")
  11. Digit.resize(921, 259)
  12. Digit.setStyleSheet("QPushButton{\n"
  13. " border-style:solid;\n"
  14. " border-width:1px;\n"
  15. " border-radius:8px;\n"
  16. " border-top-color:#FFFFFF;\n"
  17. " border-bottom-color:#888888;\n"
  18. " border-left-color:#FFFFFF;\n"
  19. " border-right-color:#888888;\n"
  20. "}\n"
  21. "QLabel#lbl_top1,#lbl_top2{\n"
  22. " color:red;\n"
  23. " font-size:24px;\n"
  24. "}\n"
  25. "QLabel#lbl_prob1,#lbl_prob2{\n"
  26. " color:blue;\n"
  27. "}")
  28. self.lbl_video = QtWidgets.QLabel(Digit)
  29. self.lbl_video.setGeometry(QtCore.QRect(10, 10, 320, 240))
  30. self.lbl_video.setFrameShape(QtWidgets.QFrame.Box)
  31. self.lbl_video.setFrameShadow(QtWidgets.QFrame.Raised)
  32. self.lbl_video.setAlignment(QtCore.Qt.AlignCenter)
  33. self.lbl_video.setObjectName("lbl_video")
  34. self.btn_capture = QtWidgets.QPushButton(Digit)
  35. self.btn_capture.setGeometry(QtCore.QRect(340, 120, 93, 28))
  36. self.btn_capture.setObjectName("btn_capture")
  37. self.lbl_image = QtWidgets.QLabel(Digit)
  38. self.lbl_image.setGeometry(QtCore.QRect(450, 77, 160, 120))
  39. self.lbl_image.setFrameShape(QtWidgets.QFrame.Box)
  40. self.lbl_image.setAlignment(QtCore.Qt.AlignCenter)
  41. self.lbl_image.setObjectName("lbl_image")
  42. self.btn_recognize = QtWidgets.QPushButton(Digit)
  43. self.btn_recognize.setGeometry(QtCore.QRect(630, 120, 92, 28))
  44. self.btn_recognize.setObjectName("btn_recognize")
  45. self.lbl_top1 = QtWidgets.QLabel(Digit)
  46. self.lbl_top1.setGeometry(QtCore.QRect(740, 60, 60, 60))
  47. self.lbl_top1.setAlignment(QtCore.Qt.AlignCenter)
  48. self.lbl_top1.setObjectName("lbl_top1")
  49. self.lbl_top2 = QtWidgets.QLabel(Digit)
  50. self.lbl_top2.setGeometry(QtCore.QRect(740, 150, 60, 60))
  51. self.lbl_top2.setAlignment(QtCore.Qt.AlignCenter)
  52. self.lbl_top2.setObjectName("lbl_top2")
  53. self.lbl_prob1 = QtWidgets.QLabel(Digit)
  54. self.lbl_prob1.setGeometry(QtCore.QRect(830, 74, 80, 28))
  55. self.lbl_prob1.setAlignment(QtCore.Qt.AlignCenter)
  56. self.lbl_prob1.setObjectName("lbl_prob1")
  57. self.lbl_prob2 = QtWidgets.QLabel(Digit)
  58. self.lbl_prob2.setGeometry(QtCore.QRect(830, 165, 80, 26))
  59. self.lbl_prob2.setAlignment(QtCore.Qt.AlignCenter)
  60. self.lbl_prob2.setObjectName("lbl_prob2")
  61. self.retranslateUi(Digit)
  62. self.btn_capture.clicked.connect(Digit.capture_image)
  63. self.btn_recognize.clicked.connect(Digit.digit_recognize)
  64. QtCore.QMetaObject.connectSlotsByName(Digit)
  65. def retranslateUi(self, Digit):
  66. _translate = QtCore.QCoreApplication.translate
  67. Digit.setWindowTitle(_translate("Digit", "手写数字识别程序"))
  68. self.lbl_video.setText(_translate("Digit", "<font size=20 color=blue><b>视频显示区域</b></font>"))
  69. self.btn_capture.setText(_translate("Digit", "抓取图像"))
  70. self.lbl_image.setText(_translate("Digit", "抓取的图像"))
  71. self.btn_recognize.setText(_translate("Digit", "数组识别"))
  72. self.lbl_top1.setText(_translate("Digit", "top1"))
  73. self.lbl_top2.setText(_translate("Digit", "top2"))
  74. self.lbl_prob1.setText(_translate("Digit", "prob1"))
  75. self.lbl_prob2.setText(_translate("Digit", "prob2"))