随笔分类 -  numpy

摘要:引言 直方图是一种对数据分布的描述,在图像处理中,直方图概念非常重要,应用广泛,如图像对比度增强(直方图均衡化),图像信息量度量(信息熵),图像配准(利用两张图像的互信息度量相似度)等。 1、numpy中histogram()函数用于统计一个数据的分布 numpy.histogram(a, bins 阅读全文
posted @ 2019-12-27 10:29 琴影 阅读(13278) 评论(0) 推荐(0) 编辑
摘要:引言 在进行科学计算的过程的中,很多时候我们需要将中间的计算结果保存下来以便后续查看,或者还需要后续再进行分析处理。 解决方案 1、一维/二维数组保存/载入 特别地,针对一维/二维数组保存,numpy自带savetxt函数有实现;针对保存在txt文件中的数组,numpy自带loadtxt函数。接下来 阅读全文
posted @ 2019-12-25 10:52 琴影 阅读(2385) 评论(0) 推荐(0) 编辑
摘要:Return indices that are non-zero in the flattened version of a. This is equivalent to a.ravel().nonzero()[0]. a : ndarray Input array. res : ndarray O 阅读全文
posted @ 2018-03-28 21:51 琴影 阅读(1890) 评论(0) 推荐(0) 编辑
摘要:numpy.clip(a, a_min, a_max, out=None) Clip (limit) the values in an array. Given an interval, values outside the interval are clipped to the interval 阅读全文
posted @ 2017-07-31 22:03 琴影 阅读(402) 评论(0) 推荐(0) 编辑
摘要:Split an array into multiple sub-arrays. Please refer to the split documentation. The only difference between these functions is that array_split allo 阅读全文
posted @ 2017-07-07 22:11 琴影 阅读(2329) 评论(0) 推荐(0) 编辑
摘要:Split an array into multiple sub-arrays. 将一个array分成多个子array ary : ndarray Array to be divided into sub-arrays. Array to be divided into sub-arrays. in 阅读全文
posted @ 2017-07-07 22:09 琴影 阅读(4875) 评论(0) 推荐(0) 编辑
摘要:Stack arrays in sequence horizontally (column wise). Take a sequence of arrays and stack them horizontally to make a single array. Rebuild arrays divi 阅读全文
posted @ 2017-07-07 22:00 琴影 阅读(3807) 评论(0) 推荐(0) 编辑