用法:
skimage.exposure.adjust_gamma(image, gamma=1, gain=1)
对输入图像执行 Gamma 校正。
也称为幂律变换。在将每个像素缩放到 0 到 1 的范围后,此函数根据等式
O = I**gamma
对输入图像进行逐像素变换。- image:ndarray
输入图像。
- gamma:浮点数,可选
非负实数。默认值为 1。
- gain:浮点数,可选
常数乘数。默认值为 1。
- out:ndarray
伽玛校正的输出图像。
参数:
返回:
注意:
对于大于 1 的 gamma,直方图将向左移动,输出图像将比输入图像更暗。
对于小于 1 的 gamma,直方图将向右移动,输出图像将比输入图像更亮。
参考:
例子:
>>> from skimage import data, exposure, img_as_float >>> image = img_as_float(data.moon()) >>> gamma_corrected = exposure.adjust_gamma(image, 2) >>> # Output is darker for gamma > 1 >>> image.mean() > gamma_corrected.mean() True
相关用法
- Python skimage.exposure.histogram用法及代码示例
- Python skimage.exposure.rescale_intensity用法及代码示例
- Python skimage.exposure.is_low_contrast用法及代码示例
- Python skimage.exposure.cumulative_distribution用法及代码示例
- Python skimage.feature.graycomatrix用法及代码示例
- Python skimage.color.lab2lch用法及代码示例
- Python skimage.draw.random_shapes用法及代码示例
- Python skimage.feature.blob_doh用法及代码示例
- Python skimage.feature.blob_dog用法及代码示例
- Python skimage.filters.unsharp_mask用法及代码示例
- Python skimage.registration.optical_flow_tvl1用法及代码示例
- Python skimage.filters.rank.noise_filter用法及代码示例
- Python skimage.filters.gaussian用法及代码示例
- Python skimage.feature.graycoprops用法及代码示例
- Python skimage.segmentation.active_contour用法及代码示例
- Python skimage.feature.corner_orientations用法及代码示例
- Python skimage.morphology.h_minima用法及代码示例
- Python skimage.filters.threshold_otsu用法及代码示例
- Python skimage.feature.structure_tensor用法及代码示例
- Python skimage.transform.hough_circle_peaks用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.exposure.adjust_gamma。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。