propertyInfo
Description
returns the metadata information related to only the webcam properties specified in
info = propertyInfo(cam,propertyNames)propertyNames. You can specify a single property or multiple
properties in propertyNames.
Examples
Retrieve Metadata for All Properties
Find the name of your camera using the webcamlist function to ensure
that MATLAB can discover your camera(s).
webcamlist
ans = 2×1 cell array
{'Logitech Webcam C925e' }
{'Microsoft® LifeCam Cinema(TM)'}
Create a webcam object for your camera.
cam = webcam(1)
cam =
webcam with properties:
Name: 'Logitech Webcam C925e'
Resolution: '1920x1080'
AvailableResolutions: {'1920x1080'}
Use the propertyInfo function to retrieve the metadata for all
properties supported by the webcam object.
info = propertyInfo(cam)
info =
1×3 PropertyInfo array with properties:
PropertyInfo with properties:
Name: "Name"
Type: "string"
Default: []
ReadOnly: 1
AllowedValues: []
PropertyInfo with properties:
Name: "Resolution"
Type: "string"
Default: []
ReadOnly: 0
AllowedValues: "1920x1080"
PropertyInfo with properties:
Name: "AvailableResolutions"
Type: "cell"
Default: []
ReadOnly: 1
AllowedValues: []The propertyInfo does not return a default value for the
Name, AvailableResolutions, and
Resolution properties as the webcam object does not
support default values for these properties.
Return Metadata for Multiple Properties
To retrieve the metadata for a single or multiple properties of
webcam.
Find the name of your camera using the webcamlist function to ensure
that MATLAB can discover your camera(s).
webcamlist
ans =
2×1 cell array
{'Logitech Webcam C925e'}
{'Webcam Test Device' }
Create a webcam object for your camera.
cam = webcam(1)
cam =
webcam with properties:
Name: 'Logitech Webcam C925e'
Resolution: '640x480'
AvailableResolutions: {1×19 cell}
BacklightCompensation: 0
Brightness: 128
Contrast: 128
Exposure: -5
ExposureMode: 'auto'
Focus: 0
FocusMode: 'auto'
Gain: 0
Pan: 0
Saturation: 128
Sharpness: 128
Tilt: 0
WhiteBalance: 4000
WhiteBalanceMode: 'auto'
Zoom: 100
Use the propertyInfo function to retrieve the metadata for the
Brightness property of the webcam object.
info = propertyInfo(cam,"Brightness")info =
PropertyInfo with properties:
Name: "Brightness"
Type: "double"
Default: 128
ReadOnly: 0
AllowedValues: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 … ] (1×256 double) Use the propertyInfo function to retrieve the metadata for the
Name and Sharpness properties of the
webcam object.
info = propertyInfo(cam,["Name","Sharpness"])
infos =
1×2 PropertyInfo array with properties:
PropertyInfo with properties:
Name: "Name"
Type: "string"
Default: []
ReadOnly: 1
AllowedValues: []
PropertyInfo with properties:
Name: "Sharpness"
Type: "double"
Default: 128
ReadOnly: 0
AllowedValues: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 … ] (1×256 double)
Input Arguments
Output Arguments
Version History
Introduced in R2024a