1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2.. c:namespace:: V4L 3 4.. _detect-controls: 5 6************************ 7Detect Control Reference 8************************ 9 10The Detect class includes controls for common features of various motion 11or object detection capable devices. 12 13 14.. _detect-control-id: 15 16Detect Control IDs 17================== 18 19``V4L2_CID_DETECT_CLASS (class)`` 20 The Detect class descriptor. Calling 21 :ref:`VIDIOC_QUERYCTRL` for this control will 22 return a description of this control class. 23 24``V4L2_CID_DETECT_MD_MODE (menu)`` 25 Sets the motion detection mode. 26 27.. tabularcolumns:: |p{7.7cm}|p{9.8cm}| 28 29.. flat-table:: 30 :header-rows: 0 31 :stub-columns: 0 32 33 * - ``V4L2_DETECT_MD_MODE_DISABLED`` 34 - Disable motion detection. 35 * - ``V4L2_DETECT_MD_MODE_GLOBAL`` 36 - Use a single motion detection threshold. 37 * - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` 38 - The image is divided into a grid, each cell with its own motion 39 detection threshold. These thresholds are set through the 40 ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control. 41 * - ``V4L2_DETECT_MD_MODE_REGION_GRID`` 42 - The image is divided into a grid, each cell with its own region 43 value that specifies which per-region motion detection thresholds 44 should be used. Each region has its own thresholds. How these 45 per-region thresholds are set up is driver-specific. The region 46 values for the grid are set through the 47 ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control. 48 49 50 51``V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (integer)`` 52 Sets the global motion detection threshold to be used with the 53 ``V4L2_DETECT_MD_MODE_GLOBAL`` motion detection mode. 54 55``V4L2_CID_DETECT_MD_THRESHOLD_GRID (__u16 matrix)`` 56 Sets the motion detection thresholds for each cell in the grid. To 57 be used with the ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` motion 58 detection mode. Matrix element (0, 0) represents the cell at the 59 top-left of the grid. 60 61``V4L2_CID_DETECT_MD_REGION_GRID (__u8 matrix)`` 62 Sets the motion detection region value for each cell in the grid. To 63 be used with the ``V4L2_DETECT_MD_MODE_REGION_GRID`` motion 64 detection mode. Matrix element (0, 0) represents the cell at the 65 top-left of the grid. 66