Vision Load Image Vision Save Image navigation bar

Table of Contents

Vision Morphological Operation

Beta

This block is currently a beta version. If you are using this block, we would appreciate any feedback at tech@quanser.com.

Performs morphological transformations on the input image.

Library

QUARC Targets Beta/Image Processing/Open Source Computer Vision

Description

Vision Morphological Operation

The Vision Morphological Operation block performs morphological transformations on the input image using the specified structuring element.

In order to use this block, be sure to follow the instructions described on the Vision Capture Image page, and take careful note of the limitations.

Input Ports

src_image

A handle to a source image that uses OpenCV (Open Source Computer Vision) IplImage structure.

Output Ports

dst_image

A handle to a destination image that shows results of morphological operations on input image. The number of color planes in destination image is the same as that in input image.

err

An error signal which is negative in case of invalid memory allocation or usage of invalid parameter values.

Parameters and Dialog Box

Vision Morphological Operation

Properties of the structuring element

Specify the properties of the structuring element, namely, the number of columns (ncols), the number of rows (nrows), and the center of structuring element (anchorX, anchorY).

Shape of the structuring element

Specifies the shape of structuring elementl. The available shape options are Rectangular, Cross-shaped, and Elliptic.

Type of morphological operation

Specifies the type of morphological operation to be applied on the input image. The available options for morphological transformation are Erode, Dilate, Open, Close, Gradient, Tophat, and Blackhat. The options are described as follows:

Erode:

dst_image=erode(src_image, element): dst_image(x,y)=min((x',y') in element))src_image(x+x',y+y')

Dilate:

dst_image=dilate(src_image, element): dst_image(x,y)=max((x',y') in element))src_image(x+x',y+y')

Open:

dst_image=open(src_image,element)=dilate(erode(src_image,element),element)

Close:

dst_image=close(src_image,element)=erode(dilate(src_image,element),element)

Gradient:

dst_image=morph_grad(src_image,element)=dilate(src_image,element)-erode(src_image,element)

Top hat:

dst_image=tophat(src_image,element)=src_image-open(src_image,element)

black hat

dst_image=blackhat(src_image,element)=close(src_image,element)-src_image

Number of iterations

Specifies how many times the specified morphological operation will be applied on input image.

Sample time

The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time. A sample time of -1 indicates that the block inherits its sample time.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

No

No

Not supported.

QUARC Win64 Target

No

No

Not supported.

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

No

No

Not supported.

Rapid Simulation (RSIM) Target

No

No

Not supported.

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

* Compatible means that the block can be compiled for the target.

 

navigation bar