图像处理
gggi520
这个作者很懒,什么都没留下…
展开
-
YUV的原始数据文件转rgb使用cv2显示
读取yuv原创 2022-08-19 10:30:23 · 650 阅读 · 0 评论 -
解析gif
解析gif原创 2022-08-02 20:35:29 · 102 阅读 · 0 评论 -
合并俩个xml里面的label
import cv2 import numpy as np import os,randomimport xml.dom.minidom# from PIL import Imageimport os,shutilimport mathdef xml_write(picname,info,img_len,img_height): xml_file = open((picname[0:-4]+'.xml'),'w') xml_file.write('<annotatio原创 2021-05-25 11:08:18 · 240 阅读 · 0 评论 -
python cv2改变图片亮度
https://blog.csdn.net/xiaogao_47/article/details/90261010原创 2021-05-19 20:55:27 · 5080 阅读 · 1 评论 -
遮住不需要的图片内容并且删除其label
遮住不需要的图片内容并且删除其labelimport cv2 import numpy as np import os,randomimport xml.dom.minidom# from PIL import Imageimport os,shutilimport mathdef xml_write(picname,info,img_len,img_height): xml_file = open((picname[0:-4]+'.xml'),'w') xml_file原创 2021-05-19 20:39:37 · 123 阅读 · 0 评论 -
图片数据扩增局部裁剪,xml文件自动跟随裁剪图片重新删减
import cv2 import numpy as np import osimport xml.dom.minidomfrom PIL import Imageimport randomdef write_xml(info,width,height,xml_dir='new/'): info1=info[0][:-4]+'.jpg' #write in xml file xml_file = open((xml_dir + info1[:-4]+'.xml').原创 2021-05-09 15:40:41 · 659 阅读 · 0 评论 -
摄像头图片YUV420转化为RGB时常见的噪声模拟
摄像头图片转化时常见的噪声模拟,主要噪声:锯齿、高斯def pic_deal(img1,w=100,h=100,mean=0.23,var=0.001): # var1=0.01 # mean=0.01 img=img1.copy() img_shape=img.shape gray=cv2.cvtColor(img,cv2.COLOR_BGR2YUV) Y=cv2.resize(gray[...,0],(w,h)) Y=gasuss_noise(Y原创 2021-04-16 10:47:05 · 329 阅读 · 0 评论