Start of trail Vision BGR2Gray navigation bar

Table of Contents

Vision Adaptive Threshold

Beta

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

Segments a grayscale image.

Library

QUARC Targets Beta/Image Processing/Open Source Computer Vision

Description

Vision Adaptive Threshold

The Vision Adaptive Threshold block transforms a grayscale image into a binary image using adaptive thresholding methods.

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. If the input is a color image, this block converts it to a gray image and then employs adaptive thresholding techniques to generate an output binary image.

Output Ports

dst_image

Thresholded destination image in 8-bit binary format. Pixel values are either 0 or 255.

err

Negative signal value in case of memory allocation error.

Parameters and Dialog Box

Vision Adaptive Threshold

Adaptive method

Specifies the adaptive thresholding algorithm to be used. The available options are MEAN and GAUSSIAN types. Method MEAN refers to a mean of Block size × Block size pixel neighborhood, subtracted by a Bias value. On the other hand, Method GAUSSIAN refers to a weighted sum (gaussian) of Block size × Block size pixel neighborhood, subtracted by a Bias value.

Threshold type

Specifies the type of thresholding to be used. The options are BINARY and BINARY_INV. The options are described as follows:

                BINARY:
                dst_image(x,y) = 255, if src_image(x,y)>Adaptive Threshold
                                 0, otherwise

                BINARY_INV:
                dst_image(x,y) = 0, if src_image(x,y)>Adaptive Threshold
                                 255, otherwise
            

Block size

Specifies a size of a pixel neighborhood.

Bias value

Specifies a bias value to be used in the Adaptive method. It may be negative.

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