裁剪图像中感兴趣区域python
2016-08-26 21:11
337 查看
题外话:比较全面的缩略图及相应源码 http://matplotlib.org/gallery.html
http://www.cnblogs.com/wei-li/archive/2012/05/23/2506940.html
题外外话:
http://stackoverflow.com/questions/8213522/matplotlib-clearing-a-plot-when-to-use-cla-clf-or-close
mark:
http://matplotlib.org/users/path_tutorial.html
http://stackoverflow.com/questions/21566610/crop-out-partial-image-using-numpy-or-scipy
http://stackoverflow.com/questions/25688573/matplotlib-set-clip-path-requires-patch-to-be-plotted
http://matplotlib.org/examples/images_contours_and_fields/image_demo_clip_path.html
http://blog.csdn.net/aguisy/article/details/5787221
http://matplotlib.org/users/path_tutorial.html
http://matplotlib.org/examples/shapes_and_collections/path_patch_demo.html
然而最有用的链接是介个:
http://www.scipy-lectures.org/advanced/image_processing/
目的是接上篇生成的高斯分布,3*delta范围内包含99+%的信息,那么3*delta外的区域置零,只保留半径为3*delta的区域。
http://www.cnblogs.com/wei-li/archive/2012/05/23/2506940.html
题外外话:
http://stackoverflow.com/questions/8213522/matplotlib-clearing-a-plot-when-to-use-cla-clf-or-close
mark:
http://matplotlib.org/users/path_tutorial.html
http://stackoverflow.com/questions/21566610/crop-out-partial-image-using-numpy-or-scipy
http://stackoverflow.com/questions/25688573/matplotlib-set-clip-path-requires-patch-to-be-plotted
http://matplotlib.org/examples/images_contours_and_fields/image_demo_clip_path.html
http://blog.csdn.net/aguisy/article/details/5787221
http://matplotlib.org/users/path_tutorial.html
http://matplotlib.org/examples/shapes_and_collections/path_patch_demo.html
然而最有用的链接是介个:
http://www.scipy-lectures.org/advanced/image_processing/
目的是接上篇生成的高斯分布,3*delta范围内包含99+%的信息,那么3*delta外的区域置零,只保留半径为3*delta的区域。
import numpy as np import matplotlib.pyplot as plt #import cv2 from scipy import misc #imgpath = './image.jpg' #img = cv2.imread(imgpath) img = misc.face(gray=True) lx, ly = img.shape#[0:2] X, Y = np.mgrid[0:lx, 0:ly] # Mask mask = (X-lx/2)**2 + (Y-ly/2)**2 > lx*ly/4 img[mask] = 0 # Display plt.figure(figsize=(3, 3)) plt.axes([0, 0, 1, 1]) plt.imshow(img) # cmap=plt.cm.gray plt.axis('off') plt.show()
相关文章推荐
- 基于给定的矩形设置图像的ROI(感兴趣区域,region of interesting)
- 设置图像的感兴趣区域(ROI)
- opencv2感兴趣区域以及图像尺寸求解
- 学习openCV之读取图像和感兴趣区域融合
- OPENCV图像处理基础(二)感兴趣区域ROI
- 设置图像的感兴趣区域(ROI)
- ENVI5.2裁剪遥感图像指定区域
- openCv--裁剪图像不规则区域
- [图像]获取图片中感兴趣区域的信息(Matlab实现)
- 图像感兴趣区域ROI获取的正确方式
- 获取图像感兴趣地矩形区域实现
- 设置图像的感兴趣区域(opencv1.0)
- opencv读写视频,对感兴趣区域进行裁剪
- roi取一感兴趣的区域,显示另一幅图像
- 统计函数耗费时间,简单的图像运算,定义感兴趣区域 第二章
- python(pil)图像处理(等比例压缩、裁剪压缩) 缩略(水印)图
- opencv读写视频,对感兴趣区域进行裁剪
- opencv2鼠标选择感兴趣区域后对两幅图像进行均值漂移算法
- python数字图像处理(3):图像像素的访问与裁剪
- java版利用opencv根据RotateRect裁剪图像区域算法