Vision Sobel Edge Vision Update Map navigation bar

Table of Contents

Vision Threshold

Beta

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

Thresholds a color or grayscale image.

Library

QUARC Targets Beta/Image Processing/Open Source Computer Vision

Description

Vision Threshold

The Vision Threshold block applies fixed-level thresholding to an image. In case of gray threshoding, threshold values are specified in grayscale. For a color image, threshold values are specified in BGR (Blue-Green-Red) intensity levels. The output image shows binary blobs having gray or color values within specified threshold limits.

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

The number of inputs dynamically changes depending on the specified thresholding operation. The block has two input ports, namely, src_image and gray_th, in case of graylevel thresholding and four input ports, namely, src_image, blue_th, green_th, and red_th, in case of color thresholding.

src_image

A handle to a source image that uses OpenCV (Open Source Computer Vision) IplImage structure. The input may be a color or grayscale image.

gray_th

Threshold limits in grayscale.

blue_th

Threshold limits in blue intensity level.

green_th

Threshold limits in green intensity level.

red_th

Threshold limits in red intensity level.

Output Ports

dst_image

Thresholded destination image in 8-bit binary format.

err

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

Parameters and Dialog Box

Vision Threshold

Threshold type

Specifies the type of thresholding, which is either Gray or Color. The options are described as follows:

                Gray:
                dst_image(x,y) = 255, if lower_gray_limit<src_image(x,y)<upper_gray_limit
                                 0, otherwise

                Color:
                dst_image(x,y) = 255, if lower_blue_limit<blue_plane(x,y)<upper_blue_limit and
                                         lower_green_limit<green_plane(x,y)<upper_green_limit and
                                         lower_red_limit<red_plant(x,y)<upper_red_limit
                                 0, otherwise
            

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.

See Also

 

navigation bar