Herror ::grab_region (
    Hobject *Region,
    const HTuple &FGHandle
)
HRegion HRegion::GrabRegion (
    const HTuple &FGHandle
)
HRegionArray HRegionArray::GrabRegion (
    const HTuple &FGHandle
)

Grab and segment an image from the specified frame grabber.

The operator ::grab_region grabs an image via the frame grabber specified by FGHandle and segments it. The desired operational mode of the frame grabber as well as a suitable image area can be adjusted via the operator ::open_framegrabber. Additional (frame grabber specific) settings might be possible via ::set_framegrabber_param.


Parameters

Region (output_object)
region(-array) -> Hobject * : HRegion(Array)
Grabbed and segmented image: Region(s).

FGHandle (input_control)
framegrabber -> HTuple.long
Handle of the frame grabber to be used.


Example
/* Select a suitable frame grabber FgName */
info_framegrabber(FgName,"ports",&Information,&Val) ;
/* Choose the port P and the input line L your camera is connected to */
open_framegrabber(FgName,1,1,0,0,0,0,"default",-1,"default",-1.0,
                  "default","default","default",P,L,&FgHandle) ;
/* grab and segment image */
grab_region(&Region,FgHandle) ;
/*  Process Region ...    */
close_framegrabber(FgHandle) ;

Result

If the frame grabber is open the operator ::grab_region returns the value H_MSG_TRUE. Otherwise an exception handling is raised.


Possible Predecessors

::open_framegrabber, ::grab_image_start


Possible Successors

::grab_region, ::grab_region_async, ::grab_image_start, ::grab_image, ::grab_image_async, ::close_framegrabber


See also

::open_framegrabber, ::info_framegrabber, ::set_framegrabber_param


Module

Image / region / XLD management



Copyright © 1996-2002 MVTec Software GmbH