基于python Qt5的简单的图像显示界面

这是一个使用Python的Qt5库创建的图像显示界面,允许用户读取图像,评分并进行统计。用户界面包括四个图像视图,用于显示图像,以及评分选项,用户可以通过勾选框为每张图片打上'好'、'中'、'差'的标签。程序还包括加载、重置和前进按钮,以及一个用于记录评分统计的文本浏览器。
摘要由CSDN通过智能技术生成

可以读取文件里所有的图像,显示,评分并进行统计

源码如下:

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'Test.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QGraphicsScene, QGraphicsPixmapItem,QGraphicsView
from PyQt5.QtGui import QPixmap, QImage
import os
import cv2
import sys

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1677, 1013)
        self.ImgView_1 = QtWidgets.QGraphicsView(Form)
        self.ImgView_1.setGeometry(QtCore.QRect(10, 10, 400, 600))
        self.ImgView_1.setMinimumSize(QtCore.QSize(400, 600))
        self.ImgView_1.setMaximumSize(QtCore.QSize(400, 600))
        self.ImgView_1.setObjectName("ImgView_1")
        self.ImgView_2 = QtWidgets.QGraphicsView(Form)
        self.ImgView_2.setGeometry(QtCore.QRect(420, 10, 400, 600))
        self.ImgView_2.setMinimumSize(QtCore.QSize(400, 600))
        self.ImgView_2.setMaximumSize(QtCore.QSize(400, 600))
        self.ImgView_2.setObjectName("ImgView_2")
        self.ImgView_3 = QtWidgets.QGraphicsView(Form)
        self.ImgView_3.setGeometry(QtCore.QRect(830, 10, 400, 600))
        self.ImgView_3.setMinimumSize(QtCore.QSize(400, 600))
        self.ImgView_3.setMaximumSize(QtCore.QSize(400, 600))
        self.ImgView_3.setObjectName("ImgView_3")
        self.lineEdit_1 = QtWidgets.QLineEdit(Form)
        self.lineEdit_1.setGeometry(QtCore.QRect(1240, 10, 370, 20))
        self.lineEdit_1.setMinimumSize(QtCore.QSize(370, 20))
        self.lineEdit_1.setMaximumSize(QtCore.QSize(370, 20))
        self.lineEdit_1.setObjectName("lineEdit_1")
        self.lineEdit_2 = QtWidgets.QLineEdit(Form)
        self.lineEdit_2.setGeometry(QtCore.QRect(1240, 40, 370, 20))
        self.lineEdit_2.setMinimumSize(QtCore.QSize(370, 20))
        self.lineEdit_2.setMaximumSize(QtCore.QSize(370, 20))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.lineEdit_3 = QtWidgets.QLineEdit(Form)
        self.lineEdit_3.setGeometry(QtCore.QRect(1240, 70, 370, 20))
        self.lineEdit_3.setMinimumSize(QtCore.QSize(370, 20))
        self.lineEdit_3.setMaximumSize(QtCore.QSize(370, 20))
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.lineEdit_4 = QtWidgets.QLineEdit(Form)
        self.lineEdit_4.setGeometry(QtCore.QRect(1240, 100, 370, 20))
        self.lineEdit_4.setMinimumSize(QtCore.QSize(370, 20))
        self.lineEdit_4.setMaximumSize(QtCore.QSize(370, 20))
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.labelPath_1 = QtWidgets.QLabel(Form)
        self.labelPath_1.setGeometry(QtCore.QRect(1620, 10, 50, 20))
        self.labelPath_1.setMinimumSize(QtCore.QSize(50, 20))
        self.labelPath_1.setMaximumSize(QtCore.QSize(50, 20))
        font = QtGui.QFont()
        font.setFamily("Times New Roman")
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.labelPath_1.setFont(font)
        self.labelPath_1.setObjectName("labelPath_1")
        self.labelPath_2 = QtWidgets.QLabel(Form)
        self.labelPath_2.setGeometry(QtCore.QRect(1620, 40, 50, 20))
        self.labelPath_2.setMinimumSize(QtCore.QSize(50, 20))
        self.labelPath_2.setMaximumSize(QtCore.QSize(50, 20))
        font = QtGui.QFont()
        font.setFamily("Times New Roman")
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.labelPath_2.setFont(font)
        self.labelPath_2.setObjectName("labelPath_2")
        self.labelPath_3 = QtWidgets.QLabel(Form)
        self.labelPath_3.setGeometry(QtCore.QRect(1620, 70, 50, 20))
        self.labelPath_3.setMinimumSize(QtCore.QSize(50, 20))
        self.labelPath_3.setMaximumSize(QtCore.QSize(50, 20))
        font = QtGui.QFont()
        font.setFamily("Times New Roman")
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.labelPath_3.setFont(font)
        self.labelPath_3.setObjectName("labelPath_3")
        self.labelPath_4 = QtWidgets.QLabel(Form)
        self.labelPath_4.setGeometry(QtCore.QRect(1620, 100, 50, 20))
        self.labelPath_4.setMinimumSize(QtCore.QSize(50, 20))
        self.labelPath_4.setMaximumSize(QtCore.QSize(50, 20))
        font = QtGui.QFont()
        font.setFamily("Times New Roman")
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.labelPath_4.setFont(font)
        self.labelPath_4.setObjectName("labelPath_4")
        self.View_4 = QtWidgets.QGraphicsView(Form)
        self.View_4.setGeometry(QtCore.QRect(1240, 130, 420, 480))
        self.View_4.setMinimumSize(QtCore.QSize(420, 480))
        self.View_4.setMaximumSize(QtCore.QSize(420, 480))
        self.View_4.setObjectName("View_4")
        self.LoadButton = QtWidgets.QPushButton(Form)
        self.LoadButton.setGeometry(QtCore.QRect(1270, 630, 75, 30))
        self.LoadButton.setMinimumSize(QtCore.QSize(75, 30))
        self.LoadButton.setMaximumSize(QtCore.QSize(75, 30))
        font = QtGui.QFont()
        font.setFamily("Times New Roman")
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.LoadButton.setFont(font)
        self.LoadButton.setObjectName("LoadButton")
        self.ResetButton = QtWidgets.QPushButton(Form)
        self.ResetButton.setGeometry(QtCore.QRect(1380, 6

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值