MyImage_class.py 文件源码

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

项目:DenoiseAverage 作者: Pella86 项目源码 文件源码
def inspect(self, output = True):
        ''' short function that returns the image values: mean,
        standard deviation, max, min and size of image
        if output is True, it prints to the console the string containing the 
        formatted value
        ''' 
        m = np.mean(self.data)
        s = np.std(self.data)
        u = np.max(self.data)
        l = np.min(self.data)
        d = self.data.shape

        if output:
            s  = "Mean: {0:.2f} | Std: {1:.2f} | Max: {2:.2f}|Min: {3:.2f} | \
                  Dim: {4[0]}x{4[1]}".format(m, s, u, l, d)
            print(s)
            return s

        return (m, s, u, l, d)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号