DigitUI.py 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # -*- coding: utf-8 -*-
  2. # Form implementation generated from reading ui file 'Digit.ui'
  3. #
  4. # Created by: PyQt5 UI code generator 5.15.9
  5. #
  6. # WARNING: Any manual changes made to this file will be lost when pyuic5 is
  7. # run again. Do not edit this file unless you know what you are doing.
  8. from PyQt5 import QtCore, QtGui, QtWidgets
  9. class Ui_Digit(object):
  10. def setupUi(self, Digit):
  11. Digit.setObjectName("Digit")
  12. Digit.resize(921, 543)
  13. Digit.setStyleSheet("QPushButton{\n"
  14. " border-style:solid;\n"
  15. " border-width:1px;\n"
  16. " border-radius:8px;\n"
  17. " border-top-color:#FFFFFF;\n"
  18. " border-bottom-color:#888888;\n"
  19. " border-left-color:#FFFFFF;\n"
  20. " border-right-color:#888888;\n"
  21. "}\n"
  22. "QLabel#lbl_top1,#lbl_top2{\n"
  23. " color:red;\n"
  24. " font-size:24px;\n"
  25. "}\n"
  26. "QLabel#lbl_prob1,#lbl_prob2{\n"
  27. " color:blue;\n"
  28. "}")
  29. self.lbl_video = QtWidgets.QLabel(Digit)
  30. self.lbl_video.setGeometry(QtCore.QRect(30, 20, 271, 191))
  31. self.lbl_video.setFrameShape(QtWidgets.QFrame.Box)
  32. self.lbl_video.setFrameShadow(QtWidgets.QFrame.Raised)
  33. self.lbl_video.setAlignment(QtCore.Qt.AlignCenter)
  34. self.lbl_video.setObjectName("lbl_video")
  35. self.btn_capture = QtWidgets.QPushButton(Digit)
  36. self.btn_capture.setGeometry(QtCore.QRect(100, 230, 93, 28))
  37. self.btn_capture.setObjectName("btn_capture")
  38. self.lbl_image = QtWidgets.QLabel(Digit)
  39. self.lbl_image.setGeometry(QtCore.QRect(520, 20, 271, 191))
  40. self.lbl_image.setFrameShape(QtWidgets.QFrame.Box)
  41. self.lbl_image.setAlignment(QtCore.Qt.AlignCenter)
  42. self.lbl_image.setObjectName("lbl_image")
  43. self.btn_recognize = QtWidgets.QPushButton(Digit)
  44. self.btn_recognize.setGeometry(QtCore.QRect(610, 220, 92, 28))
  45. self.btn_recognize.setObjectName("btn_recognize")
  46. self.lbl_prob1 = QtWidgets.QLabel(Digit)
  47. self.lbl_prob1.setGeometry(QtCore.QRect(120, 500, 80, 28))
  48. self.lbl_prob1.setAlignment(QtCore.Qt.AlignCenter)
  49. self.lbl_prob1.setObjectName("lbl_prob1")
  50. self.lbl_prob2 = QtWidgets.QLabel(Digit)
  51. self.lbl_prob2.setGeometry(QtCore.QRect(610, 500, 80, 26))
  52. self.lbl_prob2.setAlignment(QtCore.Qt.AlignCenter)
  53. self.lbl_prob2.setObjectName("lbl_prob2")
  54. self.lbl_top1 = QtWidgets.QLabel(Digit)
  55. self.lbl_top1.setGeometry(QtCore.QRect(40, 290, 221, 181))
  56. self.lbl_top1.setFrameShape(QtWidgets.QFrame.Box)
  57. self.lbl_top1.setAlignment(QtCore.Qt.AlignCenter)
  58. self.lbl_top1.setObjectName("lbl_top1")
  59. self.lbl_top2 = QtWidgets.QLabel(Digit)
  60. self.lbl_top2.setGeometry(QtCore.QRect(540, 290, 221, 181))
  61. self.lbl_top2.setFrameShape(QtWidgets.QFrame.Box)
  62. self.lbl_top2.setAlignment(QtCore.Qt.AlignCenter)
  63. self.lbl_top2.setObjectName("lbl_top2")
  64. self.lbl_result = QtWidgets.QLabel(Digit)
  65. self.lbl_result.setGeometry(QtCore.QRect(350, 350, 91, 61))
  66. self.lbl_result.setAlignment(QtCore.Qt.AlignCenter)
  67. self.lbl_result.setObjectName("lbl_result")
  68. self.retranslateUi(Digit)
  69. self.btn_capture.clicked.connect(Digit.capture_image) # type: ignore
  70. self.btn_recognize.clicked.connect(Digit.digit_recognize) # type: ignore
  71. QtCore.QMetaObject.connectSlotsByName(Digit)
  72. def retranslateUi(self, Digit):
  73. _translate = QtCore.QCoreApplication.translate
  74. Digit.setWindowTitle(_translate("Digit", "猜拳识别程序"))
  75. self.lbl_video.setText(_translate("Digit", "<font size=20 color=blue><b>视频显示区域</b></font>"))
  76. self.btn_capture.setText(_translate("Digit", "抓取图像"))
  77. self.lbl_image.setText(_translate("Digit", "抓取的图像"))
  78. self.btn_recognize.setText(_translate("Digit", "图形识别"))
  79. self.lbl_prob1.setText(_translate("Digit", "prob1"))
  80. self.lbl_prob2.setText(_translate("Digit", "prob2"))
  81. self.lbl_top1.setText(_translate("Digit", "抓取的图像"))
  82. self.lbl_top2.setText(_translate("Digit", "抓取的图像"))
  83. self.lbl_result.setText(_translate("Digit", "result"))