![](https://img-blog.csdnimg.cn/5a777a6d17c947ea945262ca8973fd96.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
图像
有关图像的理论记录
吴天德少侠
这个作者很懒,什么都没留下…
展开
-
使用python将32位的bmp转成24位的
一个临时需求,要将32位的bmp图像转成24位的。原创 2023-07-12 16:19:42 · 944 阅读 · 1 评论 -
python-opencv检测圆
opencv原创 2022-07-12 17:29:59 · 1911 阅读 · 0 评论 -
利用PIL进行不失真的resize
resize,PIL原创 2022-06-22 17:22:17 · 1546 阅读 · 0 评论 -
使用python和opencv进行人脸检测
前言深度学习自然可以搞人脸检测了,但是如果我们只是单纯简单的使用,并不需要很高要求的时候,可以用python-opencv搞一搞测试图片代码import cv2if __name__ == '__main__': opencv_haar_path = 'C:/Users/hblee/AppData/Roaming/Python/Python38/site-packages/cv2/data/' # provide proper opencv installation path原创 2022-05-17 10:51:57 · 194 阅读 · 0 评论 -
基于python的orb关键点及其匹配
前言orb特征检测和二进制描述符算法采用了定向的FAST检测方法和旋转的BRIEF描述符。代码from skimage import transform as transformfrom skimage.feature import (match_descriptors,ORB,plot_matches)from skimage.color import rgb2grayfrom skimage.io import imreadimport matplotlib.pyplot as plt原创 2022-05-17 09:59:44 · 1161 阅读 · 0 评论 -
python信噪比signaltonoise, SNR
前言scipy.stats.signaltonoise()是 deprecated in scipy 0.16.0并在 1.0.0 中删除。如果需要在不降级scipy的情况下使用该函数,则需要自己写代码代码import numpy as npdef signaltonoise(a, axis=0, ddof=0): a = np.asanyarray(a) m = a.mean(axis) sd = a.std(axis=axis, ddof=ddof) retu原创 2022-05-09 11:13:45 · 2516 阅读 · 0 评论 -
使用skimage为图像添加高斯噪声
前言需要增加数据集,对图像进行增广代码from skimage.io import imreadfrom skimage import img_as_floatfrom skimage.util import random_noiseimport matplotlib.pylab as pltimport osif __name__ == '__main__': images_dir = "D:/pycodes/python_image_processing/978178934原创 2022-05-08 16:54:57 · 1154 阅读 · 0 评论 -
PIL.Image查看临近图片的区别
前言比如在视频中查看相邻帧之间的差异代码from PIL import Imageimport osimport matplotlib.pylab as pltfrom PIL.ImageChops import subtract,multiply,screen,difference,addif __name__ == '__main__': images_dir = "D:/pycodes/python_image_processing/9781789343731_Code/ima原创 2022-05-08 16:08:03 · 130 阅读 · 0 评论 -
使用python的PIL.Image进行图像融合
前言需要pip install pillow代码import osfrom PIL import Imagefrom PIL.ImageChops import multiply# 15. alpha混合# out = (1.0-alpha)*image_1 + alpha*image_2file_name1 = "parrot.png"file_name2 = "hill.png"file_path1 = os.path.join(images_dir,file_name1)fil原创 2022-05-08 15:56:00 · 1833 阅读 · 0 评论 -
使用python的PIL.Image在图片上写字
前言需要pip install pillow代码from PIL import Image,ImageDraw,ImageFontimport osif __name__ == '__main__': images_dir = "D:/pycodes/python_image_processing/9781789343731_Code/images" file_name = "parrot.png" file_path = os.path.join(images_dir,原创 2022-05-08 15:21:01 · 1412 阅读 · 0 评论 -
如何图像增强(理论)
原创 2021-05-13 07:34:16 · 132 阅读 · 0 评论