API

Python interface to VisionCpp.

class visioncpp.AbsSub(*args)[source]

Uses the sycl::fabs to return the difference.

class visioncpp.Add(*args)[source]

This functor adds two pixels.

class visioncpp.AniDiff(*args)[source]

This functor applies anisotropic diffusion for 3 channels.

class visioncpp.AniDiff_Grey(*args)[source]

This functor applies anisotropic diffusion for one channel.

class visioncpp.BGRToRGB(parent)[source]

This functor reorders channels BGR to RGB.

class visioncpp.Broadcast(*args)[source]

This functor sets the pixel to the value passed in.

class visioncpp.Div(*args)[source]

This functor divides two matrices element-wise.

class visioncpp.DownsampleAverage(parent)[source]

Downsampling filter using average technique Other filters could be added for different numbers of channels.

class visioncpp.DownsampleClosest(parent)[source]

Downsampling filter using closest technique.

class visioncpp.F32C3ToU8C3(parent)[source]

This functor performs conversion from [0.0f, 1.0f] to [0, 255].

class visioncpp.Filter2D(parent, arg)[source]

Applying the general convolution for 3 channel Image.

class visioncpp.Filter2D_One(parent, arg)[source]

Applying the general convolution for 1 channel Image.

class visioncpp.FloatToF32C3(*args)[source]

It replicates one channel to 3 channels.

class visioncpp.FloatToU8C1(*args)[source]

It converts float to uchar converting [0.0f, 1.0f] to [0, 255].

class visioncpp.FloatToUChar(*args)[source]

It converts float to uchar.

class visioncpp.GaussianBlur3x3(parent)[source]

Applying the Gaussian blur 3x3.

class visioncpp.HSVToRGB(parent)[source]

Functor converts HSV to color RGB.

class visioncpp.HSVToU8C3(parent)[source]

Functor allows displaying HSV.

class visioncpp.Image(path)[source]

An image node.

class visioncpp.Median(*args)[source]

This functor implements a median filter.

class visioncpp.Merge2Chns(*args)[source]

This functor merges 2 matrices into one matrix of 2 channels.

class visioncpp.Mul(*args)[source]

This functor implements an element-wise matrix multiplication.

class visioncpp.NeighbourOpWithArg(parent, arg)[source]

VisionCpp neighbour operation type.

class visioncpp.NeighbourOperation(parent)[source]

VisionCpp neighbour operation type.

class visioncpp.OpWithArgs(*args)[source]

VisionCpp pointwise operation type.

class visioncpp.Operation[source]

VisionCpp base expression type.

class visioncpp.PointOperation(parent)[source]

VisionCpp pointwise operation type.

class visioncpp.PowerOf2(*args)[source]

This functor implements the power of 2 of one matrix.

class visioncpp.RGBToBGR(parent)[source]

This functor reorders channels BGR to RGB.

class visioncpp.RGBToGREY(parent)[source]

This functor performs RGB to GREY convertion.

Uses the following rule: GREY <- 0.299f * R + 0,587f * G + 0.114 * B.

class visioncpp.RGBToHSV(parent)[source]

Functor converts RGB to HSV color space.

class visioncpp.Scale(*args)[source]

Scales the pixel value of an image by a factor.

class visioncpp.ScaleChannelOne(*args)[source]

This functor applies anisotropic diffusion for 3 channels.

class visioncpp.ScaleChannelTwo(*args)[source]

This custom functor changes 2 channel by factor passed via float f.

class visioncpp.ScaleChannelZero(*args)[source]

This functor applies anisotropic diffusion for 3 channels.

class visioncpp.SepFilterCol(parent, arg)[source]

Separable filter for cols.

class visioncpp.SepFilterRow(parent, arg)[source]

Separable filter for rows.

class visioncpp.SepGaussCol3(parent)[source]

Applying the general convolution for 3 channel Image.

class visioncpp.SepGaussRow3(parent)[source]

Applying the general convolution for 3 channel Image.

class visioncpp.Sub(*args)[source]

This functor subtracts 2 images.

class visioncpp.TerminalOperation[source]

VisionCpp terminal operation type.

parent = None
class visioncpp.Thresh(*args)[source]

Implements a binary threshold.

class visioncpp.U8C1ToFloat(*args)[source]

It converts uchar to float converting range [0, 255] to [0.0f, 1.0f].

class visioncpp.U8C3ToF32C3(parent)[source]

This functor performs conversion from [0, 255] to [0.0f, 1.0f].

exception visioncpp.VisionCppException[source]

VisionCpp module exception.

class visioncpp.Webcam(device_id=0)[source]

A webcam input feed.

visioncpp.init(path=None)[source]

Initialize VisionCpp module.

Arguments:
path (str, optional): Path to ComputeCpp directory.
Returns:
str: Path to ComputeCpp directory.
visioncpp.run(expression, devtype='cpu')[source]

Execute a VisionCpp expression tree.

Arguments:
expression (Operation): The final node of the expression tree. devtype (string, optional): Execution device.
Returns:
object: Expression output.
class visioncpp.show(parent)[source]

Node to display an image.

Additional submodules: