Questions tagged «histogram»

3
使用Python进行直方图匹配以改善多个重叠栅格的镶嵌过程?
我正在尝试使用Python进行直方图匹配,以改善多个重叠栅格的镶嵌过程。我的代码基于以下代码: http://www.idlcoyote.com/ip_tips/histomatch.html 到目前为止,我已经设法裁剪了两个相邻栅格的重叠区域并展平了阵列。 所以我有两个相同长度的1维数组。 然后,我根据上述网站上的代码编写了以下代码。在所示的代码中,我为gd和bd图像替换了两个非常小的数据集。 import matplotlib.pyplot as plt from scipy.interpolate import interp1d bins = range(0,100, 10) gd_hist = [1,2,3,4,5,4,3,2,1] bd_hist = [2,4,6,8,10,8,6,4,2] nPixels = len(gd_hist) # here we are creating the cumulative distribution frequency for the bad image cdf_bd = [] for k in range(0, len(bins)-1): b = sum(bd_hist[:k]) …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.