Draw Shape (Obsolete) - Draw rectangle around region of interest (ROI)

Library

vipobslib

Description

The Draw Shape block draws a rectangle around a user-defined ROI by overwriting pixel values. As a result, the rectangle is embedded on the output image.

PortInput/OutputSupported Data TypesComplex Values Supported

I

Vector or matrix of intensity values

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point

  • Boolean

No

ROI

Four-element vector of integers. The first two elements represent the zero-based row and column coordinates of the upper-left corner of the ROI. The second two elements represent the height and width of the ROI.

  • Double-precision floating point

  • Single-precision floating point

  • 8-, 16-, and 32-bit signed integer

  • 8-, 16-, and 32-bit unsigned integer

No

Output

Scalar, vector, or matrix of pixel values that contains the region of interest

Same as I port

No

The output signal is the same size and data type as the input to the I port.

Use the Display intensity parameter to determine the appearance of the ROI rectangle. If you select Black or White, the rectangle is black or white, respectively. If you select Black and white (2 lines), the rectangle is created by a black line on the outside and a white line on the inside. If you select User-specified intensity, the Intensity value (0 to 1) parameter appears in the dialog box. Enter a scalar intensity value from 0 to 1, where 0 corresponds to black and 1 corresponds to white.

Use the ROI source parameter to determine how to enter your ROI coordinates. If you select Specify via dialog, the ROI [row column height width] parameter appears on the dialog box. Enter a four-element vector of integers. The first two elements represent the zero-based row and column coordinates of the upper-left corner of the ROI. The second two elements represent the height and width of the ROI. If you select Input port, the ROI port appears on the dialog box. The input to this port must be a four-element of integers as previously defined.

Dialog Box

The Draw Shape dialog box appears as shown in the following figure.

Display intensity

Specify the appearance of the ROI rectangle. If you select Black or White, the rectangle is black or white. If you select Black and white (2 lines), the rectangle is created by a black line on the outside and a white line on the inside. If you select User-specified intensity, the Intensity value (0 to 1) parameter appears in the dialog box.

Intensity value

Enter a scalar intensity value from 0 to 1, where 0 corresponds to black and 1 corresponds to white. This parameter is visible if, for the Display intensity parameter, you select User-specified intensity. Tunable.

ROI source

Specify how to enter your ROI coordinates. If you select Specify via dialog, the ROI [row column height width] parameter appears on the dialog box. If you select Input port, the ROI port appears on the dialog box. The input to this port must be a four-element vector of integers. The first two elements represent the zero-based row and column coordinates of the upper-left corner of the ROI. The second two elements represent the height and width of the ROI.

ROI [row column height width]

Enter a four-element vector of integers. The first two elements represent the zero-based row and column coordinates of the upper-left corner of the ROI. The second two elements represent the height and width of the ROI. Tunable.

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS