YueyueDang há 1 ano atrás
pai
commit
4690602520

+ 27 - 5
README.md

@@ -1,20 +1,42 @@
 ##  第01天实训日志
 **1.任务**
->
->
+> - 安装Python运行环境
+> - 写一个程序,并运行,观察输出结果
 **2.内容**
->
->
+> - 下载安装Python
+> - 下载安装pip配置国内镜像源
+> - 下载安装VSCode
 **3.要求**
->
+> - 
 >
 **4.提交**
 >
 >
 ----
 ##  第02天实训日志
+
+
 ----
 ##  第03天实训日志
+**1.任务**
+> - 任务1:
+>      - 完成UI设计
+>      - 翻译成py文件
+> - 任务2:
+>      - 拍一张照片
+>      - 利用我们今天讲的Sobel算子,输出一个浮雕效果的图像照片   
+**2.内容**
+> - 图像处理
+> - 卷积特征
+> - Qt的应用编程模式
+> - Qt的UI设计与翻译
+**3.要求**
+> - 理解卷积特征
+> - 写Qt程序
+**4.提交**
+> - ui文件 
+> - 翻译文件
+> - 拍的照片 + 程序 + 输出文件
 ----
 ##  第04天实训日志
 ----

BIN
day03/.ipynb_checkpoints/2-checkpoint.jpg


BIN
day03/.ipynb_checkpoints/gpu-checkpoint.bmp


+ 6 - 0
day03/.ipynb_checkpoints/note_day03-checkpoint.ipynb

@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}

+ 6 - 0
day03/.ipynb_checkpoints/卷积特征_day03-checkpoint.ipynb

@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}

BIN
day03/2.jpg


+ 26 - 0
day03/codes/ex_qt01.py

@@ -0,0 +1,26 @@
+# 引入模块
+from PyQt5.QtWidgets import QApplication
+from PyQt5.QtWidgets import QDialog
+from PyQt5.QtWidgets import QMainWindow
+from PyQt5.QtWidgets import QPushButton
+
+# 创建Qt应用
+app = QApplication([])  # 参数:命令行参数
+"""
+    Qt的应用必须在App之间
+"""
+# dlg = QDialog()
+dlg = QMainWindow()
+# 改变对话框的大小
+dlg.resize(1000,1000)  # 设置窗体大小
+dlg.move(100,100)  # 设置窗体的位置
+dlg.setWindowTitle("我的窗体")
+
+# 创建一个按钮
+btn = QPushButton("登录",dlg)
+btn.resize(100,36)
+btn.move(200,200)
+
+dlg.show()
+
+app.exec()  # 让应用程序进入消息循环

+ 26 - 0
day03/codes/note.txt

@@ -0,0 +1,26 @@
+1.条件
+    安装条件:PyQt5,PyQt5-tools
+    where python 确定Python安装路径
+    安装的模块在
+        ${PYTHON_HOME}/Lib/site-package/PyQt5
+        ${PYTHON_HOME}/Lib/site-package/PyQt5-tools
+        ${PYTHON_HOME}/Lib/site-package/PyQt5-applications
+        ${PYTHON_HOME}/Lib/site-package/PyQt5-applications/Qt/bin
+            |- designer.exe GUI(Graphic User Interface)
+            |- uic.exe 把我们设计的GUI转换为Python代码
+            |- Scripts\pyuic5.exe - 
+
+2.开发一个窗体
+    2.1.创建QApplication
+    2.2.创建对话框
+        窗体:主窗体(菜单),对话框(无菜单),闪屏(没有标题栏)
+
+3.在窗体添加按钮,文本框,标签,多选案例,单旋按钮
+
+4.程序开发的结构
+    main.py  # 程序入口
+    根目录monitor
+        |- ui      # 界面设计
+        |- form    # 窗体
+        |- biz     # 业务实现(人工智能推理接口)
+        |- dev     # 摄像头的处理

BIN
day03/gpu.bmp


Diff do ficheiro suprimidas por serem muito extensas
+ 56 - 0
day03/note_day03.ipynb


Diff do ficheiro suprimidas por serem muito extensas
+ 44 - 0
day03/卷积特征_day03.ipynb


+ 0 - 0
day04/monitor/main.py


+ 65 - 0
day04/monitor/ui/monitor.ui

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>智能交通监控系统</string>
+  </property>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>70</y>
+     <width>221</width>
+     <height>121</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">border-width:3px;
+border-style:solid;
+border-radius:10px;
+border-top-color:red;
+border-bottom-color:green;
+border-left-color:yellow;
+border-right-color:pink;
+</string>
+   </property>
+   <property name="text">
+    <string>视频显示区</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="pushButton">
+   <property name="geometry">
+    <rect>
+     <x>210</x>
+     <y>220</y>
+     <width>93</width>
+     <height>28</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">border-width:2px;
+border-style:solid;
+border-randius:10px;
+border-top-color:#ffffff;
+border-left-color:#ffffff;
+border-bottom-color:#888888;
+border-right-color:#888888;
+</string>
+   </property>
+   <property name="text">
+    <string>处理视频</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 48 - 0
day04/monitor/ui/monitor_ui.py

@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'monitor.ui'
+#
+# Created by: PyQt5 UI code generator 5.15.9
+#
+# WARNING: Any manual changes made to this file will be lost when pyuic5 is
+# run again.  Do not edit this file unless you know what you are doing.
+
+
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+
+class Ui_Dialog(object):
+    def setupUi(self, Dialog):
+        Dialog.setObjectName("Dialog")
+        Dialog.resize(400, 300)
+        self.label = QtWidgets.QLabel(Dialog)
+        self.label.setGeometry(QtCore.QRect(40, 70, 221, 121))
+        self.label.setStyleSheet("border-width:3px;\n"
+"border-style:solid;\n"
+"border-radius:10px;\n"
+"border-top-color:red;\n"
+"border-bottom-color:green;\n"
+"border-left-color:yellow;\n"
+"border-right-color:pink;\n"
+"")
+        self.label.setObjectName("label")
+        self.pushButton = QtWidgets.QPushButton(Dialog)
+        self.pushButton.setGeometry(QtCore.QRect(210, 220, 93, 28))
+        self.pushButton.setStyleSheet("border-width:2px;\n"
+"border-style:solid;\n"
+"border-randius:10px;\n"
+"border-top-color:#ffffff;\n"
+"border-left-color:#ffffff;\n"
+"border-bottom-color:#888888;\n"
+"border-right-color:#888888;\n"
+"")
+        self.pushButton.setObjectName("pushButton")
+
+        self.retranslateUi(Dialog)
+        QtCore.QMetaObject.connectSlotsByName(Dialog)
+
+    def retranslateUi(self, Dialog):
+        _translate = QtCore.QCoreApplication.translate
+        Dialog.setWindowTitle(_translate("Dialog", "智能交通监控系统"))
+        self.label.setText(_translate("Dialog", "视频显示区"))
+        self.pushButton.setText(_translate("Dialog", "处理视频"))

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff