Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
Python Wrapper

Python Wrapper of Simd Library. More...

Data Structures

class  CpuDesc
 Describes type of description which can return function Simd.Lib.CpuDesc. More...
 
class  CpuInfo
 Describes type of information which can return function Simd.Lib.CpuInfo. More...
 
class  FrameFormat
 Describes frame format type. More...
 
class  ImageFile
 Describes formats of image file. More...
 
class  PixelFormat
 Describes pixel format type. More...
 
class  Position
 Describes the position of the child sub image relative to the parent image. More...
 
class  ResizeChannel
 Describes resized image channel types. More...
 
class  ResizeMethod
 Describes methods used in order to resize image. More...
 
class  TensorFormat
 4D-tensor format type. More...
 
class  TensorData
 Describes tensor data type. More...
 
class  WarpAffineFlags
 Describes Warp Affine flags. More...
 
class  YuvType
 Describes YUV format type. More...
 
class  Lib
 A wrapper around Simd Library API. More...
 
class  Image
 The Image class provides storage and manipulation of images. More...
 
class  ImageFrame
 The ImageFrame class provides storage and manipulation of frames (multiplanar images). More...
 

Functions

Image AbsGradientSaturatedSum (Image src, Image dst)
 Gets 8-bit gray image saturated sum of absolute gradient for every point of source 8-bit gray image. More...
 
def Resize (Image src, Image dst, method=Simd.ResizeMethod.Bilinear)
 The function performs image resizing. More...
 
Image Resized (Image src, int width, int height, method=Simd.ResizeMethod.Bilinear)
 The function gets resized image. More...
 
def SynetSetInput (Image src, array.array('f') lower, array.array('f') upper, ctypes.c_void_p dst, int channels, Simd.TensorFormat format)
 Sets image to the input of neural network of Synet Framework. More...
 
def WarpAffine (Image src, array.array('f') mat, Image dst, flags=(Simd.WarpAffineFlags.ChannelByte|Simd.WarpAffineFlags.InterpBilinear|Simd.WarpAffineFlags.BorderConstant), border=array.array('B', []))
 Performs warp affine for current image. More...
 

Detailed Description

Python Wrapper of Simd Library.

Function Documentation

◆ AbsGradientSaturatedSum()

Image AbsGradientSaturatedSum ( Image  src,
Image  dst 
)

Gets 8-bit gray image saturated sum of absolute gradient for every point of source 8-bit gray image.

Parameters
src- an input 8-bit gray image.
dst- an output 8-bit gray image with sum of absolute gradient. Can be empty.
Returns
- output 8-bit gray image with sum of absolute gradient.

◆ Resize()

def Resize ( Image  src,
Image  dst,
  method = Simd.ResizeMethod.Bilinear 
)

The function performs image resizing.

Parameters
src- an original input image.
dst- a resized output image.
method- a resizing method. By default it is equal to Simd.ResizeMethod.Bilinear.

◆ Resized()

Image Resized ( Image  src,
int  width,
int  height,
  method = Simd.ResizeMethod.Bilinear 
)

The function gets resized image.

Parameters
src- an original input image.
width- a width of output image.
height- a height of output image.
method- a resizing method. By default it is equal to Simd.ResizeMethod.Bilinear.
Returns
- resized output image.

◆ SynetSetInput()

def SynetSetInput ( Image  src,
array.array('f')  lower,
array.array('f')  upper,
ctypes.c_void_p  dst,
int  channels,
Simd.TensorFormat  format 
)

Sets image to the input of neural network of Synet Framework.

Parameters
src- an input image. There are following supported pixel format: aSimd.PixelFormat.Gray8, Simd.PixelFormat.Bgr24, Simd.PixelFormat.Bgra32, Simd.PixelFormat.Rgb24, Simd.PixelFormat.Rgba32.
lower- an array with lower bound of values of the output tensor. The size of the array have to correspond number of channels in the output image tensor.
upper- an array with upper bound of values of the output tensor. The size of the array have to correspond number of channels in the output image tensor.
dst- a pointer to the output 32-bit float image tensor.
channels- a number of channels in the output image tensor. It can be 1 or 3.
format- a format of output image tensor. There are supported following tensor formats: Simd.TensorFormat.Nchw, Simd.TensorFormat.Nhwc.

◆ WarpAffine()

def WarpAffine ( Image  src,
array.array('f')  mat,
Image  dst,
  flags = (Simd.WarpAffineFlags.ChannelByte | Simd.WarpAffineFlags.InterpBilinear | Simd.WarpAffineFlags.BorderConstant),
  border = array.array('B', []) 
)

Performs warp affine for current image.

Parameters
src- an input image to warp affine.
mat- a pointer to 2x3 matrix with coefficients of affine warp.
dst- a background input/output image.
flags- a flags of algorithm parameters. By default is equal to Simd.WarpAffineFlags.ChannelByte | Simd.WarpAffineFlags.InterpBilinear | Simd.WarpAffineFlags.BorderConstant.
border- an array with color of border. The size of the array must be equal to channels. It parameter is actual for Simd.WarpAffineFlags.BorderConstant flag.