Operator Reference

pow_imagepow_imagePowImagePowImagepow_image (Operator)

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_imagePowImagePowImagepow_image raises the gray values of the input image ImageImageImageimageimage to the power ExponentExponentExponentexponentexponent and stores the result in the image PowImagePowImagePowImagepowImagepow_image. If ImageImageImageimageimage contains gray values that would overflow the range of PowImagePowImagePowImagepowImagepow_image, e.g., > 7131.55017 for ExponentExponentExponentexponentexponent = 10, the corresponding gray values in PowImagePowImagePowImagepowImagepow_image are set to the largest value representable in PowImagePowImagePowImagepowImagepow_image (i.e., ). If ImageImageImageimageimage contains gray values that cannot be raised to the power ExponentExponentExponentexponentexponent, i.e., if the gray values are negative and ExponentExponentExponentexponentexponent is not an integer, the corresponding gray values in PowImagePowImagePowImagepowImagepow_image are set to 0.

Attention

pow_imagepow_imagePowImagePowImagepow_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

  • Supports OpenCL compute devices.
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Automatically parallelized on tuple level.
  • Automatically parallelized on channel level.
  • Automatically parallelized on domain level.

Parameters

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

Input image.

PowImagePowImagePowImagepowImagepow_image (output_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject * (real)

Output image.

ExponentExponentExponentexponentexponent (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: 2

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

Alternatives

gamma_imagegamma_imageGammaImageGammaImagegamma_image

See also

sqrt_imagesqrt_imageSqrtImageSqrtImagesqrt_image, exp_imageexp_imageExpImageExpImageexp_image, log_imagelog_imageLogImageLogImagelog_image

Module

Foundation