RtGVGetFrameNumberOfChannels

RtGVGetFrameNumberOfChannels gets the number of channels currently configured on a camera.

Syntax

BOOL RtGVGetFrameNumberOfChannels(
	HANDLE cameraHandle, 
	PUINT32 pNumChannels
);

Parameters

cameraHandle

The handle of the camera being queried.

pNumChannels

A pointer to an unsigned integer that receives the number of channels per pixel of the camera.  This is dependent on the currently configured pixel format on the camera (ie. mono means 1 channel, whereas RGB means 3 channels).

Return Values

Returns TRUE if the function succeeds, FALSE if the function fails. Call GetLastError for extended error information.

Remarks

This function will fail if it is called before RtGVInitialize and RtGVInitCameraControl.

To find the camera to query, call RtGVInitialize and then call RtGVEnumerateCameras to get an RTGV_CAMERA_INFO array describing each of the cameras found on the network, along with each of their handles.

Requirements

Minimum Supported Version RTX64 3.7 Vision SDK

Header

RtGVApi.h

Library

RtGigEVision.lib

See Also:

RtGVEnumerateCameras

RtGVGetFramePixelDepth

RtGVGetFramePixelFormat