Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_roi_get_as_image(3) — Solaris 2.4 x86 SDK

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_get_roi(3)

xil_set_roi(3)

xil_roi_add_image(3)

xil_roi_add_rect(3)

xil_roi_add_region(3)

xil_roi_create(3)

xil_roi_create_copy(3)

xil_roi_destroy(3)

xil_roi_get_as_region(3)

xil_roi_intersect(3)

xil_roi_subtract_rect(3)

xil_roi_translate(3)

xil_roi_unite(3)

xil_roi_get_as_image(3)

NAME

xil_roi_get_as_image − get an image version of an ROI

SYNOPSIS

#include <xil/xil.h>

XilImage xil_roi_get_as_image ( XilRoi roi);

DESCRIPTION

This function returns a handle to a new binary (XIL_BIT) image that is an image representation of the supplied ROI.  The image returned will be just large enough to contain all of the regions of interest; in other words, a bounding box image is generated.  The beginning x and y values for the upper-leftmost ROI are encoded as -(x) and -(y) in the returned image’s origin. For example, if the upper-left ROI pixel in the source image is at location (50,50), it is encoded to (-50, -50) in the returned image’s origin.  If a pixel in the image is contained within the ROI, it is set to 1; otherwise, it is set to 0. 

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

Get the ROI associated with an image. Then create an image mask that corresponds to the ROI returned:

XilSystemState State;
XilImage image, image_mask;
XilRoi roi;
roi = xil_get_roi (image);
if (roi == NULL) {
    /∗ The image had no ROI associated with it,
       create one that encompasses the whole image ∗/
    roi = xil_roi_create (State);
    xil_roi_add_rect (roi, 0, 0, xil_get_width(image), xil_get_height(image));
}
image_mask = xil_roi_get_as_image (roi);

SEE ALSO

xil_get_roi(3), xil_set_roi(3), xil_roi_add_image(3), xil_roi_add_rect(3), xil_roi_add_region(3), xil_roi_create(3), xil_roi_create_copy(3), xil_roi_destroy(3), xil_roi_get_as_region(3), xil_roi_intersect(3), xil_roi_subtract_rect(3), xil_roi_translate(3), xil_roi_unite(3). 

SunOS   —  Last change: 04 March 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026