processing.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:opensat 作者: yarynam 项目源码 文件源码
def _color_correction(self, band, band_id, low, coverage):
        if self.bands == [4, 5]:
            return band
        else:
            print "Color correcting band " + band_id
            p_low, cloud_cut_low = self._percent_cut(band, low, 100 - (coverage * 3 / 4))
            temp = numpy.zeros(numpy.shape(band), dtype=numpy.uint16)
            cloud_divide = 65000 - coverage * 100
            mask = numpy.logical_and(band < cloud_cut_low, band > 0)
            temp[mask] = rescale_intensity(band[mask], in_range=(p_low, cloud_cut_low), out_range=(256, cloud_divide))
            temp[band >= cloud_cut_low] = rescale_intensity(band[band >= cloud_cut_low],
                                                            out_range=(cloud_divide, 65535))
            return temp
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号