Main Content

componentInfo

R2026b

View video source component information

Since R2026a

    Description

    compInfo = componentInfo(vidSrc) returns a 4-column table of the video input components, with a row for each component. The table columns indicate the selected and available pixel formats for each component, and whether each component is enabled. You use vidSrc.ComponentSelector and vidSrc.ComponentEnable to configure individual fields of component information.

    Note

    This function supports only GenICam™ GenTL compliant hardware.

    example

    Examples

    collapse all

    Configure a GenICam GenTL camera component data, then confirm by viewing the settings.

    Create a videoinput object and extract its video source.

    vid = videoinput("gentl",1);
    vidSrc = getselectedsource(vid);

    View video source component information

    compInfo = componentInfo(vidSrc)
    compInfo =
    
      3×4 table
    
         Components     Enabled    SelectedPixelFormat                  AvailablePixelFormat               
        ____________    _______    ___________________    _________________________________________________
    
        "Range"         "False"     "Coord3D_ABC32f"      {["Coord3D_ABC32f"    "Mono16"    "Coord3D_C16"]}
        "Intensity"     "True"      "Mono16"              {["Mono16"                                     ]}
        "Confidence"    "True"      "Confidence16"        {["Confidence16"    "Mono16"                   ]}

    Configure the camera to stream only Range data with pixel format Coord3D_ABC32f. Then verify that the camera video components are configured correctly.

    vidSrc.ComponentSelector = "Intensity";
    vidSrc.ComponentEnable = "False";
    vidSrc.ComponentSelector = "Confidence";
    vidSrc.ComponentEnable = "False";
    vidSrc.ComponentSelector = "Range";
    vidSrc.ComponentEnable = "True";
    vidSrc.PixelFormat = "Coord3D_ABC32f";
    
    compInfo = componentInfo(vidSrc)
    compInfo =
    
      3×4 table
    
         Components     Enabled    SelectedPixelFormat                  AvailablePixelFormat               
        ____________    _______    ___________________    _________________________________________________
    
        "Range"         "True"     "Coord3D_ABC32f"      {["Coord3D_ABC32f"    "Mono16"    "Coord3D_C16"]}
        "Intensity"     "False"    "Mono16"              {["Mono16"                                     ]}
        "Confidence"    "False"    "Confidence16"        {["Confidence16"    "Mono16"                   ]}

    Input Arguments

    collapse all

    Video source, specified as a videosource object. You create this object with the getselectedsource function.

    Data Types: object

    Output Arguments

    collapse all

    Video component information, returned as a 4-column table. The table rows correspond to components provided by the camera, with columns indicating the selected and available pixel formats for each, and whether each component is enabled.

    Version History

    Introduced in R2026a