TVideoGrabber.SetFrameCaptureBounds

Prev

Next

TVideoGrabber

Methods

 




































































































Specifies a frame capture rectangle


Declaration
procedure SetFrameCaptureBounds (LeftPosition: LongInt; TopPosition: LongInt; RightPosition: LongInt; BottomPosition: LongInt);


void __fastcall SetFrameCaptureBounds(int LeftPosition, int TopPosition, int RightPosition, int BottomPosition


Sub SetFrameCaptureBounds (LeftPosition as Long, TopPosition as Long, RightPosition as Long, BottomPosition as Long)

Description

Used to capture a sub-rectangle of the video frame

Used to specify a rectangle for the frame capture, allowing to capture only parts of the video frame.

E.g.:

Button1 action:
VideoGrabber.StartPreview()

Button2 action:
VideoGrabber.SetFrameCaptureBounds (50, 50, 150, 150)
VideoGrabber.CaptureFrameTo (fc_JPEGFile, "mysquarecapture.jpg")

When starting the preview with Button1, then capturing a frame with Button2, the captured frame will be a square 100x100 image captured at the "x=50 y=50" location on the video frame.

Note: rhe normal full frame capture can then be restored by invoking SetFrameCaptureBounds (0, 0, 0, 0)

Top-down or left-right capture

Additionally it is possible top-down or left-right the captured frame by just inverting the Left/Right or Top/Bottom values.

E.g.:
VideoGrabber.SetFrameCaptureBounds (50, 150, 150, 50) will capture a top-down frame.

Remark: to retrieve the current size of the video frame use VideoWidth and VideoHeight


See Also
TAutoFileName TFrameCaptureDest TOnFrameCaptureCompleted BurstCount BurstInterval BurstMode BurstType CaptureFrameSyncTo CaptureFrameTo FrameCaptureHeight FrameCaptureWidth FrameCaptureWithoutOverlay FrameCaptureZoomSize GetFrameInfoString GetLastFrameAsHBITMAP GetLastFrameAsTBitmap GetLastFrameBitmapBits GetLastFrameBitmapBits2 GetLastFrameWaitTimeoutMs JPEGPerformance JPEGProgressiveDisplay JPEGQuality Last_BurstFrameCapture_FileName Last_CaptureFrameTo_FileName OnDiskFull OnFrameBitmap StoragePath WebcamStillCaptureButton