162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci.. _detect-controls: 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci************************ 662306a36Sopenharmony_ciDetect Control Reference 762306a36Sopenharmony_ci************************ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ciThe Detect class includes controls for common features of various motion 1062306a36Sopenharmony_cior object detection capable devices. 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci.. _detect-control-id: 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciDetect Control IDs 1662306a36Sopenharmony_ci================== 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci``V4L2_CID_DETECT_CLASS (class)`` 1962306a36Sopenharmony_ci The Detect class descriptor. Calling 2062306a36Sopenharmony_ci :ref:`VIDIOC_QUERYCTRL` for this control will 2162306a36Sopenharmony_ci return a description of this control class. 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci``V4L2_CID_DETECT_MD_MODE (menu)`` 2462306a36Sopenharmony_ci Sets the motion detection mode. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci.. tabularcolumns:: |p{7.7cm}|p{9.8cm}| 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci.. flat-table:: 2962306a36Sopenharmony_ci :header-rows: 0 3062306a36Sopenharmony_ci :stub-columns: 0 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci * - ``V4L2_DETECT_MD_MODE_DISABLED`` 3362306a36Sopenharmony_ci - Disable motion detection. 3462306a36Sopenharmony_ci * - ``V4L2_DETECT_MD_MODE_GLOBAL`` 3562306a36Sopenharmony_ci - Use a single motion detection threshold. 3662306a36Sopenharmony_ci * - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` 3762306a36Sopenharmony_ci - The image is divided into a grid, each cell with its own motion 3862306a36Sopenharmony_ci detection threshold. These thresholds are set through the 3962306a36Sopenharmony_ci ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control. 4062306a36Sopenharmony_ci * - ``V4L2_DETECT_MD_MODE_REGION_GRID`` 4162306a36Sopenharmony_ci - The image is divided into a grid, each cell with its own region 4262306a36Sopenharmony_ci value that specifies which per-region motion detection thresholds 4362306a36Sopenharmony_ci should be used. Each region has its own thresholds. How these 4462306a36Sopenharmony_ci per-region thresholds are set up is driver-specific. The region 4562306a36Sopenharmony_ci values for the grid are set through the 4662306a36Sopenharmony_ci ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control. 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci``V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (integer)`` 5162306a36Sopenharmony_ci Sets the global motion detection threshold to be used with the 5262306a36Sopenharmony_ci ``V4L2_DETECT_MD_MODE_GLOBAL`` motion detection mode. 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci``V4L2_CID_DETECT_MD_THRESHOLD_GRID (__u16 matrix)`` 5562306a36Sopenharmony_ci Sets the motion detection thresholds for each cell in the grid. To 5662306a36Sopenharmony_ci be used with the ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` motion 5762306a36Sopenharmony_ci detection mode. Matrix element (0, 0) represents the cell at the 5862306a36Sopenharmony_ci top-left of the grid. 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci``V4L2_CID_DETECT_MD_REGION_GRID (__u8 matrix)`` 6162306a36Sopenharmony_ci Sets the motion detection region value for each cell in the grid. To 6262306a36Sopenharmony_ci be used with the ``V4L2_DETECT_MD_MODE_REGION_GRID`` motion 6362306a36Sopenharmony_ci detection mode. Matrix element (0, 0) represents the cell at the 6462306a36Sopenharmony_ci top-left of the grid. 65