• 大小: 11KB
    文件类型: .py
    金币: 1
    下载: 0 次
    发布日期: 2021-05-10
  • 语言: Python
  • 标签: qt  

资源简介

【没法取消收费变成,有需要的可以私信我,我直接发你们,】除了yolov3外还包含部分图像处理的基本程序,如模糊、膨胀、腐蚀,camshift追踪等; 设置了背景图和显示图标,相关文件替换为自己的路径即可; 仅供参考,如果想运行需要改部分代码,不会的话注销掉有问题的代码慢慢调试

资源截图

代码片段和文件信息

# -*- coding: utf-8 -*-
#2018年10月23日 星期二 10时21分21秒 

import sys
import os
from PyQt5.QtWidgets import QApplication QWidget QPushButton
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import pyqtSlot
import cv2 as cv
import numpy as np
import time
from matplotlib import pyplot as plt
import matplotlib.pyplot as plt1


    
class work(QWidget):
    def __init__(self):
        super().__init__()
        self.title = “图像处理课程作业“
        self.left = 300
        self.top = 300
        self.width = 820
        self.height = 500
        self.initUI()

    def initUI(self):
        #主窗口
        self.setWindowtitle(self.title)
        self.setGeometry(self.left self.top self.width self.height)
        
        #小图标皮一下
        self.setWindowIcon(QIcon(‘D:\\application\\visual studio\\GaussianFilter\\mean_filter\\x64\Debug\\BlueCup.jpg‘)) 
        
        #各按钮显示设计
        button_display = QPushButton(“显示图片“ self)
        button_display.resize(10050)
        button_display.move(50 40)
        
        button_2gray = QPushButton(“转成灰度图“ self)
        button_2gray.resize(10050)
        button_2gray.move(50 120)
        
        button_histogram = QPushButton(“绘制直方图“ self)
        button_histogram.resize(10050)
        button_histogram.move(50 200)
        
        button_equalizeHist = QPushButton(“直方图均衡“ self)
        button_equalizeHist.resize(10050)
        button_equalizeHist.move(50 280)
                
        button_gradient_sharpening = QPushButton(“梯度锐化“ self)
        button_gradient_sharpening.resize(10050)
        button_gradient_sharpening.move(210 40)
        
        button_laplace_sharpening = QPushButton(“Laplace锐化“ self)
        button_laplace_sharpening.resize(10050)
        button_laplace_sharpening.move(210 120)
        
        button_canny = QPushButton(“canny边缘检测“ self)
        button_canny.resize(10050)
        button_canny.move(210 200)
        
        button_filter = QPushButton(“图像滤波“ self)
        button_filter.resize(10050)
        button_filter.move(210 280)

        button_func = QPushButton(“func“ self)
        button_func.resize(10050)
        button_func.move(37040)
        
        
        
        button_detection = QPushButton(“目标检测“ self)
        button_detection.resize(12070)
        button_detection.move(600 350)
        
        “““按钮与鼠标点击事件相关联“““
        button_display.clicked.connect(self.display)
        button_2gray.clicked.connect(self.rgb2gray)
        button_histogram.clicked.connect(self.histogram)
        button_equalizeHist.clicked.connect(self.equalizeHist)
        button_gradient_sharpening.clicked.connect(self.gradient_sharpening)
        button_laplace_sharpening.clicked.connect(self.laplace_sharpening)
        button_canny.clicked.connect(self.canny)
        button_filter.clicked.connect(self.filter)

        button_func.clicked.connect(self.d_func)
        
        button_detectio

评论

共有 条评论