pow_imagepow_imagePowImagePowImagepow_image (Operator)

Name

pow_imagepow_imagePowImagePowImagepow_image — Raise an image to a power.

Signature

pow_image(Image : PowImage : Exponent : )

Herror pow_image(const Hobject Image, Hobject* PowImage, double Exponent)

Herror T_pow_image(const Hobject Image, Hobject* PowImage, const Htuple Exponent)

void PowImage(const HObject& Image, HObject* PowImage, const HTuple& Exponent)

HImage HImage::PowImage(const HTuple& Exponent) const

HImage HImage::PowImage(double Exponent) const

static void HOperatorSet.PowImage(HObject image, out HObject powImage, HTuple exponent)

HImage HImage.PowImage(HTuple exponent)

HImage HImage.PowImage(double exponent)

def pow_image(image: HObject, exponent: Union[int, float]) -> HObject

Description

pow_imagepow_imagePowImagePowImagePowImagepow_image raises the gray values of the input image ImageImageImageImageimageimage to the power ExponentExponentExponentExponentexponentexponent and stores the result in the image PowImagePowImagePowImagePowImagepowImagepow_image. If ImageImageImageImageimageimage contains gray values that would overflow the range of PowImagePowImagePowImagePowImagepowImagepow_image, e.g., > 7131.55017 for ExponentExponentExponentExponentexponentexponent = 10, the corresponding gray values in PowImagePowImagePowImagePowImagepowImagepow_image are set to the largest value representable in PowImagePowImagePowImagePowImagepowImagepow_image (i.e., ). If ImageImageImageImageimageimage contains gray values that cannot be raised to the power ExponentExponentExponentExponentexponentexponent, i.e., if the gray values are negative and ExponentExponentExponentExponentexponentexponent is not an integer, the corresponding gray values in PowImagePowImagePowImagePowImagepowImagepow_image are set to 0.

Attention

pow_imagepow_imagePowImagePowImagePowImagepow_image can be executed on an OpenCL device for byte, int1, int2, uint2, int4, and real images. Note that the results of the OpenCL code may vary from the results produced by the CPU.

Execution Information

Parameters

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte* / int1* / uint2* / int2* / int4* / int8 / real*) *allowed for compute devices

Input image.

PowImagePowImagePowImagePowImagepowImagepow_image (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (real)

Output image.

ExponentExponentExponentExponentexponentexponent (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Power to which the gray values are raised.

Default value: 2

Suggested values: 0.25, 0.5, 2, 3, 4

Alternatives

gamma_imagegamma_imageGammaImageGammaImageGammaImagegamma_image

See also

sqrt_imagesqrt_imageSqrtImageSqrtImageSqrtImagesqrt_image, exp_imageexp_imageExpImageExpImageExpImageexp_image, log_imagelog_imageLogImageLogImageLogImagelog_image

Module

Foundation