WebCamera_GrabImage
Captures a frame from a camera using Direct Show interface.
Applications:Not recommended for industrial operation.
Syntax
C++
Python
def WebCamera_GrabImage( state: WebCamera_GrabImageState, outFrame: Image, /, *, inCameraIndex: int | None = None, inCameraID: str | None = None, inFrameSize: Size | None = None, inPixelType: WebCameraInputFormat = WebCameraInputFormat.Any, inExposure: int | None = None, inExposureAuto: bool = False, inFocus: int | None = None, inFocusAuto: bool = False, inGain: int | None = None, inBrightness: int | None = None, inContrast: int | None = None, inSaturation: int | None = None, inWhiteBalance: int | None = None, inWhiteBalanceAuto: bool = False ) -> outResult: bool
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
ioState | WebCamera_GrabImageState | |||
![]() |
inCameraIndex | int | None | 0 - +![]() |
None | Index number of the camera device to connect with |
![]() |
inCameraID | str | None | None | Unique ID of the camera device to connect with | |
![]() |
inFrameSize | Size | None | None | Requested size of source frame in pixels selected from camera output formats | |
![]() |
inPixelType | WebCameraInputFormat | WebCameraInputFormat.Any | Requested specific pixel type from camera (may change image quality) | |
![]() |
inExposure | int | None | None | Manual (fixed) exposure time in log base 2 seconds | |
![]() |
inExposureAuto | bool | False | Activates the automatic exposure time control by the camera | |
![]() |
inFocus | int | None | None | Manual (fixed) focus point of the camera | |
![]() |
inFocusAuto | bool | False | Activates the automatic focus control by the camera | |
![]() |
inGain | int | None | None | Camera gain value | |
![]() |
inBrightness | int | None | None | Image brightness setting (black level value) | |
![]() |
inContrast | int | None | None | Image contrast setting | |
![]() |
inSaturation | int | None | None | Image saturation setting | |
![]() |
inWhiteBalance | int | None | None | Manual (fixed) white balance setting | |
![]() |
inWhiteBalanceAuto | bool | False | Activates the automatic white balance control by the camera | |
![]() |
outFrame | Image | Captured frame |




