Skip to content

pow_imagePowImagePowImagepow_imagepow_image🔗

Short description🔗

pow_imagePowImagePowImagepow_imagepow_image — Raise an image to a power.

Signature🔗

pow_image( image Image, out image PowImage, number Exponent )void PowImage( const HObject& Image, HObject* PowImage, const HTuple& Exponent )static void HOperatorSet.PowImage( HObject image, out HObject powImage, HTuple exponent )def pow_image( image: HObject, exponent: Union[int, float] ) -> HObject

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

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

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

HImage HImage::PowImage( double Exponent ) const

HImage HImage.PowImage( HTuple exponent )

HImage HImage.PowImage( double exponent )

Description🔗

pow_imagePowImage raises the gray values of the input image Imageimageimage to the power Exponentexponentexponent and stores the result in the image PowImagepowImagepow_image. If Imageimageimage contains gray values that would overflow the range of PowImagepowImagepow_image, e.g., \(> 7131.55017\) for \(\textrm{Exponent} = \textit{10}\), the corresponding gray values in PowImagepowImagepow_image are set to the largest value representable in PowImagepowImagepow_image (i.e., \(3.4028235 \times 10^{38}\)). If Imageimageimage contains gray values that cannot be raised to the power Exponentexponentexponent, i.e., if the gray values are negative and Exponentexponentexponent is not an integer, the corresponding gray values in PowImagepowImagepow_image are set to 0.

Attention🔗

pow_imagePowImage 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🔗

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🔗

Imageimageimage (input_object) (multichannel-)image(-array) → object (byte* / int1* / uint2* / int2* / int4* / int8 / real*)HObject (byte* / int1* / uint2* / int2* / int4* / int8 / real*)HImage (byte* / int1* / uint2* / int2* / int4* / int8 / real*)HObject (byte* / int1* / uint2* / int2* / int4* / int8 / real*)Hobject (byte* / int1* / uint2* / int2* / int4* / int8 / real*) *allowed for compute devices

Input image.

PowImagepowImagepow_image (output_object) (multichannel-)image(-array) → object (real)HObject (real)HImage (real)HObject (real)Hobject * (real)

Output image.

Exponentexponentexponent (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Power to which the gray values are raised.

Default: 22
Suggested values: 0.25, 0.5, 2, 3, 40.25, 0.5, 2, 3, 4

Combinations with other operators🔗

Combinations

Alternatives

gamma_imageGammaImage

See also

sqrt_imageSqrtImage, exp_imageExpImage, log_imageLogImage

Module🔗

Foundation