0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002
0003 .. _detect-controls:
0004
0005 ************************
0006 Detect Control Reference
0007 ************************
0008
0009 The Detect class includes controls for common features of various motion
0010 or object detection capable devices.
0011
0012
0013 .. _detect-control-id:
0014
0015 Detect Control IDs
0016 ==================
0017
0018 ``V4L2_CID_DETECT_CLASS (class)``
0019 The Detect class descriptor. Calling
0020 :ref:`VIDIOC_QUERYCTRL` for this control will
0021 return a description of this control class.
0022
0023 ``V4L2_CID_DETECT_MD_MODE (menu)``
0024 Sets the motion detection mode.
0025
0026 .. tabularcolumns:: |p{7.7cm}|p{9.8cm}|
0027
0028 .. flat-table::
0029 :header-rows: 0
0030 :stub-columns: 0
0031
0032 * - ``V4L2_DETECT_MD_MODE_DISABLED``
0033 - Disable motion detection.
0034 * - ``V4L2_DETECT_MD_MODE_GLOBAL``
0035 - Use a single motion detection threshold.
0036 * - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID``
0037 - The image is divided into a grid, each cell with its own motion
0038 detection threshold. These thresholds are set through the
0039 ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control.
0040 * - ``V4L2_DETECT_MD_MODE_REGION_GRID``
0041 - The image is divided into a grid, each cell with its own region
0042 value that specifies which per-region motion detection thresholds
0043 should be used. Each region has its own thresholds. How these
0044 per-region thresholds are set up is driver-specific. The region
0045 values for the grid are set through the
0046 ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control.
0047
0048
0049
0050 ``V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (integer)``
0051 Sets the global motion detection threshold to be used with the
0052 ``V4L2_DETECT_MD_MODE_GLOBAL`` motion detection mode.
0053
0054 ``V4L2_CID_DETECT_MD_THRESHOLD_GRID (__u16 matrix)``
0055 Sets the motion detection thresholds for each cell in the grid. To
0056 be used with the ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` motion
0057 detection mode. Matrix element (0, 0) represents the cell at the
0058 top-left of the grid.
0059
0060 ``V4L2_CID_DETECT_MD_REGION_GRID (__u8 matrix)``
0061 Sets the motion detection region value for each cell in the grid. To
0062 be used with the ``V4L2_DETECT_MD_MODE_REGION_GRID`` motion
0063 detection mode. Matrix element (0, 0) represents the cell at the
0064 top-left of the grid.