1.. Permission is granted to copy, distribute and/or modify this 2.. document under the terms of the GNU Free Documentation License, 3.. Version 1.1 or any later version published by the Free Software 4.. Foundation, with no Invariant Sections, no Front-Cover Texts 5.. and no Back-Cover Texts. A copy of the license is included at 6.. Documentation/userspace-api/media/fdl-appendix.rst. 7.. 8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections 9 10.. _detect-controls: 11 12************************ 13Detect Control Reference 14************************ 15 16The Detect class includes controls for common features of various motion 17or object detection capable devices. 18 19 20.. _detect-control-id: 21 22Detect Control IDs 23================== 24 25``V4L2_CID_DETECT_CLASS (class)`` 26 The Detect class descriptor. Calling 27 :ref:`VIDIOC_QUERYCTRL` for this control will 28 return a description of this control class. 29 30``V4L2_CID_DETECT_MD_MODE (menu)`` 31 Sets the motion detection mode. 32 33.. tabularcolumns:: |p{7.7cm}|p{9.8cm}| 34 35.. flat-table:: 36 :header-rows: 0 37 :stub-columns: 0 38 39 * - ``V4L2_DETECT_MD_MODE_DISABLED`` 40 - Disable motion detection. 41 * - ``V4L2_DETECT_MD_MODE_GLOBAL`` 42 - Use a single motion detection threshold. 43 * - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` 44 - The image is divided into a grid, each cell with its own motion 45 detection threshold. These thresholds are set through the 46 ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control. 47 * - ``V4L2_DETECT_MD_MODE_REGION_GRID`` 48 - The image is divided into a grid, each cell with its own region 49 value that specifies which per-region motion detection thresholds 50 should be used. Each region has its own thresholds. How these 51 per-region thresholds are set up is driver-specific. The region 52 values for the grid are set through the 53 ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control. 54 55 56 57``V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (integer)`` 58 Sets the global motion detection threshold to be used with the 59 ``V4L2_DETECT_MD_MODE_GLOBAL`` motion detection mode. 60 61``V4L2_CID_DETECT_MD_THRESHOLD_GRID (__u16 matrix)`` 62 Sets the motion detection thresholds for each cell in the grid. To 63 be used with the ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` motion 64 detection mode. Matrix element (0, 0) represents the cell at the 65 top-left of the grid. 66 67``V4L2_CID_DETECT_MD_REGION_GRID (__u8 matrix)`` 68 Sets the motion detection region value for each cell in the grid. To 69 be used with the ``V4L2_DETECT_MD_MODE_REGION_GRID`` motion 70 detection mode. Matrix element (0, 0) represents the cell at the 71 top-left of the grid. 72