当前位置: 首页>>代码示例>>Python>>正文


Python Image.min方法代码示例

本文整理汇总了Python中PythonMagick.Image.min方法的典型用法代码示例。如果您正苦于以下问题:Python Image.min方法的具体用法?Python Image.min怎么用?Python Image.min使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PythonMagick.Image的用法示例。


在下文中一共展示了Image.min方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1:

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import min [as 别名]
    avg_stack = avg_stack + img
if max_int_stack_file is not None:
    max_int_stack = np.zeros((h,w,c), dtype=img.dtype)
    max_int_stack = max_int_stack + img
    # Maximum intensities need to be 32-bit to prevent overflow
    max_pix_intensities = np.zeros((h,w), dtype='uint32')
    max_pix_intensities = max_pix_intensities + img.sum(axis=2)
if max_dev_stack_file is not None:
    max_dev_stack = np.zeros((h,w,c), dtype=img.dtype)
    max_dev_stack = max_dev_stack + img
    max_pix_deviations = np.zeros((h,w), dtype='uint16')
    max_pix_deviations = max_pix_deviations + img.std(axis=2)
if max_col_diff_stack_file is not None:
    max_col_diff_stack = np.zeros((h,w,c), dtype=img.dtype)
    max_col_diff_stack = max_col_diff_stack + img
    max_col_diffs = img.max(axis=2)-img.min(axis=2)
if median_stack_file is not None:
    # Import HDF5 library
    import h5py
    median_stack = np.zeros((h,w,c), dtype=img.dtype)
    # Create a HDF5 file for temporary storage space for median stack
    # calculations. The file is memorymapped, so access from the
    # program is easy, but amount of disk-I/O will be huge.
    median_hdf_file = median_stack_file[:-3]
    median_hdf_file = median_hdf_file + 'H5'
    median_hdf_fid = h5py.File(median_hdf_file,'w')
    # Datasets will be h-high, w-wide and n_files-deep with the same
    # bit-depth as the input images
    hdf_R = median_hdf_fid.create_dataset('R', (h,w,n_files), dtype=img.dtype)
    hdf_G = median_hdf_fid.create_dataset('G', (h,w,n_files), dtype=img.dtype)
    hdf_B = median_hdf_fid.create_dataset('B', (h,w,n_files), dtype=img.dtype)
开发者ID:giulioungaretti,项目名称:ArtScope,代码行数:33,代码来源:halostack.py


注:本文中的PythonMagick.Image.min方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。