1.增加人脸识别模块
2.人脸识别整定优化,分离串口配置 3.改为使用原有uart_group_config.py文件实现配置连接,保持原有断线重连
This commit is contained in:
123
QT5_Project/Shared_UI/FaceRecognition.ui
Normal file
123
QT5_Project/Shared_UI/FaceRecognition.ui
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogInform</class>
|
||||
<widget class="QDialog" name="DialogInform">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>587</width>
|
||||
<height>290</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:none;
|
||||
background-color: rgba(0, 0, 0, 0);</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>160</y>
|
||||
<width>381</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::NoButton</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>75</x>
|
||||
<y>97</y>
|
||||
<width>411</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Microsoft YaHei UI</family>
|
||||
<pointsize>16</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(85, 170, 127,0);
|
||||
color: rgb(255, 170, 0);
|
||||
font: 16pt "Microsoft YaHei UI";</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="BG">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>731</width>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>img/infrom.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
<zorder>BG</zorder>
|
||||
<zorder>buttonBox</zorder>
|
||||
<zorder>label</zorder>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>DialogInform</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>DialogInform</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
144
QT5_Project/Shared_UI/enroll.ui
Normal file
144
QT5_Project/Shared_UI/enroll.ui
Normal file
@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>EnrollDialog</class>
|
||||
<widget class="QDialog" name="EnrollDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>480</width>
|
||||
<height>254</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ENROLL_ITG_SINGLE</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_admin">
|
||||
<property name="text">
|
||||
<string>是否管理员:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cb_admin">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 - 普通用户</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1 - 管理员</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_name">
|
||||
<property name="text">
|
||||
<string>用户名:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="le_name"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_dir">
|
||||
<property name="text">
|
||||
<string>人脸方向:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QGroupBox" name="group_dir">
|
||||
<property name="title">
|
||||
<string>人脸方向</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chk_mid">
|
||||
<property name="text">
|
||||
<string>MID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="chk_right">
|
||||
<property name="text">
|
||||
<string>RIGHT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QCheckBox" name="chk_left">
|
||||
<property name="text">
|
||||
<string>LEFT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chk_down">
|
||||
<property name="text">
|
||||
<string>DOWN</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="chk_up">
|
||||
<property name="text">
|
||||
<string>UP</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_timeout">
|
||||
<property name="text">
|
||||
<string>超时时间(秒):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="sb_timeout">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>300</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbl_itg">
|
||||
<property name="text">
|
||||
<string>ITG 参数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="le_itg">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="btn_ok">
|
||||
<property name="text">
|
||||
<string>发送</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
104
QT5_Project/Shared_UI/main.ui
Normal file
104
QT5_Project/Shared_UI/main.ui
Normal file
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="windowTitle">
|
||||
<string>人脸识别测试软件 (PyQt5)</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_root">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
|
||||
<!-- 顶部:串口配置 -->
|
||||
<item>
|
||||
<widget class="QGroupBox" name="group_serial">
|
||||
<property name="title">
|
||||
<string>串口设置</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="layout_serial">
|
||||
<item><widget class="QLabel" name="lbl_port"><property name="text"><string>Port:</string></property></widget></item>
|
||||
<item><widget class="QComboBox" name="cb_port"/></item>
|
||||
<item><widget class="QLabel" name="lbl_baud"><property name="text"><string>Baud:</string></property></widget></item>
|
||||
<item><widget class="QComboBox" name="cb_baud"/></item>
|
||||
<item><widget class="QPushButton" name="btn_refresh"><property name="text"><string>刷新端口</string></property></widget></item>
|
||||
<item><widget class="QPushButton" name="btn_conn"><property name="text"><string>连接</string></property></widget></item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
<!-- 中间:命令区 + 视频区 -->
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter_main">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
||||
<!-- 左侧命令区 -->
|
||||
<widget class="QGroupBox" name="group_cmd">
|
||||
<property name="title"><string>命令</string></property>
|
||||
<layout class="QVBoxLayout" name="layout_cmd">
|
||||
<property name="spacing"><number>6</number></property>
|
||||
<item><widget class="QPushButton" name="btn_reset"><property name="text"><string>复位</string></property></widget></item>
|
||||
<item><widget class="QPushButton" name="btn_video_mode"><property name="text"><string>视频模式</string></property></widget></item>
|
||||
<item><widget class="QCheckBox" name="chk_face_box"><property name="text"><string>显示人脸框</string></property></widget></item>
|
||||
<item><widget class="QPushButton" name="btn_verify"><property name="text"><string>识别</string></property></widget></item>
|
||||
<item><widget class="QPushButton" name="btn_enroll"><property name="text"><string>ITG注册</string></property></widget></item>
|
||||
<item><widget class="QPushButton" name="btn_users"><property name="text"><string>用户管理</string></property></widget></item>
|
||||
<item>
|
||||
<spacer name="spacer_cmd">
|
||||
<property name="orientation"><enum>Qt::Vertical</enum></property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size><width>20</width><height>40</height></size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
<!-- 右侧视频区 -->
|
||||
<widget class="QGroupBox" name="group_video">
|
||||
<property name="title"><string>USB 视频流</string></property>
|
||||
<layout class="QVBoxLayout" name="layout_video">
|
||||
<property name="spacing"><number>6</number></property>
|
||||
<item>
|
||||
<widget class="QLabel" name="video_label">
|
||||
<property name="text"><string>未打开</string></property>
|
||||
<property name="alignment"><set>Qt::AlignCenter</set></property>
|
||||
<property name="minimumSize"><size><width>360</width><height>480</height></size></property>
|
||||
<property name="frameShape"><enum>QFrame::Box</enum></property>
|
||||
<property name="frameShadow"><enum>QFrame::Sunken</enum></property>
|
||||
</widget>
|
||||
</item>
|
||||
<item><widget class="QPushButton" name="btn_video"><property name="text"><string>打开视频</string></property></widget></item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
<!-- 底部日志 -->
|
||||
<item>
|
||||
<widget class="QGroupBox" name="group_log">
|
||||
<property name="title"><string>日志</string></property>
|
||||
<layout class="QVBoxLayout" name="layout_log">
|
||||
<property name="spacing"><number>6</number></property>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="txt_log">
|
||||
<property name="readOnly"><bool>true</bool></property>
|
||||
<property name="font">
|
||||
<font><family>Consolas</family><pointsize>10</pointsize></font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item><widget class="QPushButton" name="btn_save"><property name="text"><string>保存日志</string></property></widget></item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
1
QT5_Project/Shared_UI/users.csv
Normal file
1
QT5_Project/Shared_UI/users.csv
Normal file
@ -0,0 +1 @@
|
||||
1,冯佳,2025-09-02 09:05:45
|
||||
|
31
QT5_Project/Shared_UI/users.ui
Normal file
31
QT5_Project/Shared_UI/users.ui
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>UserManageDialog</class>
|
||||
<widget class="QDialog" name="UserManageDialog">
|
||||
<property name="windowTitle"><string>用户管理</string></property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="table">
|
||||
<column>
|
||||
<property name="text"><string>用户ID</string></property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text"><string>用户名</string></property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text"><string>注册时间</string></property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_btns">
|
||||
<item><widget class="QPushButton" name="btn_delete"><property name="text"><string>删除选中用户</string></property></widget></item>
|
||||
<item><widget class="QPushButton" name="btn_refresh"><property name="text"><string>刷新</string></property></widget></item>
|
||||
<item><widget class="QPushButton" name="btn_get"><property name="text"><string>获取设备用户列表</string></property></widget></item>
|
||||
<item><widget class="QPushButton" name="btn_del_all"><property name="text"><string>删除所有用户</string></property></widget></item>
|
||||
<item><spacer name="spacer"><property name="orientation"><enum>Qt::Horizontal</enum></property></spacer></item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</ui>
|
||||
69
QT5_Project/Shared_UI/verify.ui
Normal file
69
QT5_Project/Shared_UI/verify.ui
Normal file
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>VerifyDialog</class>
|
||||
<widget class="QDialog" name="VerifyDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>480</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>VERIFY</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_rightaway">
|
||||
<property name="text">
|
||||
<string>是否立即比对:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cb_rightaway">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 - 等待检测人脸</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1 - 立即比对</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_timeout">
|
||||
<property name="text">
|
||||
<string>超时时间(秒):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="sb_timeout">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>300</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="btn_ok">
|
||||
<property name="text">
|
||||
<string>发送</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user