自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 python利用opencv画图

import cv2import matplotlib.pyplot as pltimport numpy# img = cv2.imread("bb.png")##########opencv打开图片img = numpy.zeros((500,500,3),dtype="uint8")###构建全零矩阵###画线,其中(0,0)为起始点坐标,(500,300)为终止点坐标,# (255,0,0...

2018-05-17 10:10:31 750

原创 python使用PIL模块获取图片像素点

from PIL import Image########获取图片指定像素点的像素def getPngPix(pngPath = "aa.png",pixelX = 1,pixelY = 1):    img_src = Image.open(pngPath)    img_src = img_src.convert('RGBA')    str_strlist = img_src.load() ...

2018-05-16 15:57:27 13409

原创 python 用matplotlib获取图片的大小

import timeimport matplotlib.image as mpingdef getPngSize(pngPath ="aa.png"):    print("获取图片尺寸大小:"+ str(pngPath))    try:        lena = mping.imread(pngPath)    except:        time.sleep(0.5)        p...

2018-05-16 15:53:49 4412

原创 pyqt5 label 设置字体类型,颜色 ##设置label边框,label贴图

import sysfrom PyQt5.QtGui import *from PyQt5.QtWidgets import *class MyWindow(QWidget):    #########此窗口已经不再使用    def __init__(self,parent = None):        super(QWidget,self).__init__()        self.se...

2018-05-16 14:32:22 26918 1

原创 python websocket模拟客户端

from websocket import create_connectionws = create_connection("ws://127.0.0.1:9002")ws.send("Hello, World")##发送消息result = ws.recv()##接收消息ws.close()

2018-05-15 17:14:37 9668

原创 python 字符串和字典互转,以及 python对象存入到文件,且读取

########dumps()和loads()   字典和字符串的相互转化import jsondict = {1:"a",2:"b",3:"c"}print(dict)str_dict = json.dumps(dict)print(str_dict)print(type(str_dict))dict = json.loads(str_dict)print(type(dict))print(di...

2018-05-15 16:58:29 2065 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除