Skip to content

log_imageLogImageLogImagelog_imagelog_image🔗

Short description🔗

log_imageLogImageLogImagelog_imagelog_image — Calculate the logarithm of an image.

Signature🔗

log_image( image Image, out image LogImage, number Base )void LogImage( const HObject& Image, HObject* LogImage, const HTuple& Base )static void HOperatorSet.LogImage( HObject image, out HObject logImage, HTuple baseVal )def log_image( image: HObject, base: Union[int, float, str] ) -> HObject

Herror log_image( const Hobject Image, Hobject* LogImage, const char* Base )

Herror T_log_image( const Hobject Image, Hobject* LogImage, const Htuple Base )

HImage HImage::LogImage( const HTuple& Base ) const

HImage HImage::LogImage( const HString& Base ) const

HImage HImage::LogImage( const char* Base ) const

HImage HImage::LogImage( const wchar_t* Base ) const (Windows only)

HImage HImage.LogImage( HTuple baseVal )

HImage HImage.LogImage( string baseVal )

Description🔗

log_imageLogImage calculates the logarithm to the base BasebaseValbase of an input image Imageimageimage and stores the result in the image LogImagelogImagelog_image. If Imageimageimage contains gray values outside the valid domain of the logarithm function, i.e., \(\le 0\), the corresponding gray values in LogImagelogImagelog_image are set to 0.

Attention🔗

log_imageLogImage 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.

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

Output image.

BasebaseValbase (input_control) number → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)Union[int, float, str]Htuple (char* / Hlong / double)

Base of the logarithm.

Default: 'e'"e"
Suggested values: 'e', 2, 10"e", 2, 10

Combinations with other operators🔗

Combinations

See also

pow_imagePowImage, exp_imageExpImage

Module🔗

Foundation