pynq_composable.libs Module

The pynq_composable.libs module provides the drivers to control the vision IP that are available in the composable video pipeline.

class pynq_composable.libs.CornerHarris(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

Corner Detector, using Harris algorithm IP, python driver

bindto = ['xilinx.com:hls:cornerHarris_accel:1.0']
property k

Harris detector parameter

start()[source]

Populate the image resolution and start the IP

property threshold
class pynq_composable.libs.DuplicateIP(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

DuplicateIP driver

bindto = ['xilinx.com:hls:duplicate_accel:1.0']
class pynq_composable.libs.Fast(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

Corner Detect, using Fast algorithm IP, python driver

bindto = ['xilinx.com:hls:fast_accel:1.0']
start()[source]

Populate the image resolution and start the IP

property threshold
class pynq_composable.libs.Filter2d(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

Filter 2D Kernel

bindto = ['xilinx.com:hls:filter2d_accel:1.0']
property kernel_type
property sigma
start()[source]

Populate the image resolution and start the IP

class pynq_composable.libs.GaussianBlur(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

bindto = ['xilinx.com:hls:GaussianBlur_accel:1.0']
start()[source]

Populate the image resolution and start the IP

class pynq_composable.libs.Morphological(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

Erode and dilate

bindto = ['xilinx.com:hls:dilate_accel:1.0', 'xilinx.com:hls:erode_accel:1.0']
populateKernel()[source]
start()[source]

Populate the image resolution and start the IP

class pynq_composable.libs.MultiplyIP(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

Pixel-wise multiplication

bindto = ['xilinx.com:hls:multiply_accel:1.0']
property scale

Scale value

Each pixel is multiplied by this scale value

start()[source]

Populate the image resolution and start the IP

class pynq_composable.libs.PixelLut(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

Lut IP

bindto = ['xilinx.com:hls:LUT_accel:1.0']
property kernel_type
property lut
start()[source]

Populate the image resolution and start the IP

property threshold

Set an retrieve threshold ndarray

The first index indicates

0: lower threshold 1: upper threshold

The second index indicates the channel The third index indicates the value

class pynq_composable.libs.VitisVisionIP(description)[source]

Bases: pynq.overlay.DefaultIP

Generic Driver for Vitis Vision IP cores

bindto = ['xilinx.com:hls:dma2video_accel:1.0', 'xilinx.com:hls:video2dma_accel:1.0', 'xilinx.com:hls:rgb2gray_accel:1.0', 'xilinx.com:hls:medianBlur_accel:1.0', 'xilinx.com:hls:gray2rgb_accel:1.0', 'xilinx.com:hls:pyrUp_accel:1.0', 'xilinx.com:hls:subtract_accel:1.0', 'xilinx.com:hls:rgb2hsv_accel:1.0', 'xilinx.com:hls:rgb2xyz_accel:1.0', 'xilinx.com:hls:absdiff_accel:1.0', 'xilinx.com:hls:add_accel:1.0', 'xilinx.com:hls:bitwise_and_accel:1.0', 'xilinx.com:hls:bitwise_not_accel:1.0', 'xilinx.com:hls:bitwise_or_accel:1.0', 'xilinx.com:hls:bitwise_xor_accel:1.0']
property cols: int

Image width

property rows: int

Image height

start()[source]

Populate the image resolution and start the IP

status()[source]
stop()[source]

Stop the IP

class pynq_composable.libs.colorThreshold(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

Color Thresholding IP driver lower_thr and upper_thr are a numpy array, each row corresponds to a channel in the pixel. For RGB, row 0 is R, row 1 is G and row 2 is B For HSV, row 0 is H, row 1 is S and row 2 is V For XYZ, row 0 is X, row 1 is Y and row 2 is Z

bindto = ['xilinx.com:hls:colorthresholding_accel:1.0']
property lower_thr

Set and retrieve lower threshold configuration

start()[source]

Populate the image resolution and start the IP

property upper_thr

Set and retrieve lower threshold configuration

class pynq_composable.libs.inRange(description)[source]

Bases: pynq_composable.libs.VitisVisionIP

bindto = ['xilinx.com:hls:inRange_accel:1.0']
populateThreshold()[source]
start()[source]

Populate the image resolution and start the IP

class pynq_composable.libs.xvF2d(value)[source]

Bases: enum.Enum

Supported filter2D kernels

edge = 3
edge_x = 1
edge_y = 2
gaussian_blur = 11
identity = 0
median_blur = 12
prewitt_x = 9
prewitt_y = 10
scharr_x = 7
scharr_y = 8
sharpen = 4
sobel_x = 5
sobel_y = 6
class pynq_composable.libs.xvLut(value)[source]

Bases: enum.Enum

Supported LUT kernels

binary_threshold = 2
group_bin = 3
identity = 0
negative = 1
offset = 4
random = 6
threshold = 5