NumberOfBands

Indicate number of color bands in data to be acquired

Description

The NumberOfBands property indicates the number of color bands in the data to be acquired. The toolbox defines band as the third dimension in a 3-D array, as shown in this figure.

The value of the NumberOfBands property indicates the number of color bands in the data returned by getsnapshot, getdata, and peekdata.

Characteristics

Access

Read only

Data type

double

Values

Any positive integer. The default value is defined at object creation time based on the video format.

Examples

Create an image acquisition object.

vid = videoinput('winvideo');

Retrieve the value of the NumberOfBands property.

vid.NumberOfBands

ans =

     3

If you retrieve the value of the VideoFormat property, you can see that the video data is in RGB format.

vid.VideoFormat

ans =

RGB24_320x240

See Also

Functions

getdata, getsnapshot, peekdata

Was this topic helpful?