illumination_correction.py 文件源码

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

项目:DeepProfiler 作者: jccaicedo 项目源码 文件源码
def channel_function(self, mean_channel, disk_size):
        #TODO: get np.type from other source or parameterize or compute :/
        # We currently assume 16 bit images
        operator = skimage.morphology.disk(disk_size)
        filtered_channel = skimage.filters.median(mean_channel.astype(np.uint16), operator)
        filtered_channel = skimage.transform.resize(filtered_channel, self.target_dim, preserve_range=True)
        robust_minimum = scipy.stats.scoreatpercentile(filtered_channel, 2)
        filtered_channel = np.maximum(filtered_channel, robust_minimum)
        illum_corr_func = filtered_channel / robust_minimum
        return illum_corr_func
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号