| Video and Image Processing Blockset™ | ![]() |
vipobslib

Note The Draw Shape block is obsolete. It may be removed in a future version of the Video and Image Processing Blockset blocks. Use the replacement block Draw Shapes. |
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.
| Port | Input/Output | Supported Data Types | Complex Values Supported |
|---|---|---|---|
I | Vector or matrix of intensity values |
| 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. |
| 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.
The Draw Shape dialog box appears as shown in the following figure.

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.
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.
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.
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.
![]() | Draw Markers | Draw Shapes | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |