18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci.. _detect-controls:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci************************
68c2ecf20Sopenharmony_ciDetect Control Reference
78c2ecf20Sopenharmony_ci************************
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciThe Detect class includes controls for common features of various motion
108c2ecf20Sopenharmony_cior object detection capable devices.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci.. _detect-control-id:
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciDetect Control IDs
168c2ecf20Sopenharmony_ci==================
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci``V4L2_CID_DETECT_CLASS (class)``
198c2ecf20Sopenharmony_ci    The Detect class descriptor. Calling
208c2ecf20Sopenharmony_ci    :ref:`VIDIOC_QUERYCTRL` for this control will
218c2ecf20Sopenharmony_ci    return a description of this control class.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci``V4L2_CID_DETECT_MD_MODE (menu)``
248c2ecf20Sopenharmony_ci    Sets the motion detection mode.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{7.7cm}|p{9.8cm}|
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci.. flat-table::
298c2ecf20Sopenharmony_ci    :header-rows:  0
308c2ecf20Sopenharmony_ci    :stub-columns: 0
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci    * - ``V4L2_DETECT_MD_MODE_DISABLED``
338c2ecf20Sopenharmony_ci      - Disable motion detection.
348c2ecf20Sopenharmony_ci    * - ``V4L2_DETECT_MD_MODE_GLOBAL``
358c2ecf20Sopenharmony_ci      - Use a single motion detection threshold.
368c2ecf20Sopenharmony_ci    * - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID``
378c2ecf20Sopenharmony_ci      - The image is divided into a grid, each cell with its own motion
388c2ecf20Sopenharmony_ci	detection threshold. These thresholds are set through the
398c2ecf20Sopenharmony_ci	``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control.
408c2ecf20Sopenharmony_ci    * - ``V4L2_DETECT_MD_MODE_REGION_GRID``
418c2ecf20Sopenharmony_ci      - The image is divided into a grid, each cell with its own region
428c2ecf20Sopenharmony_ci	value that specifies which per-region motion detection thresholds
438c2ecf20Sopenharmony_ci	should be used. Each region has its own thresholds. How these
448c2ecf20Sopenharmony_ci	per-region thresholds are set up is driver-specific. The region
458c2ecf20Sopenharmony_ci	values for the grid are set through the
468c2ecf20Sopenharmony_ci	``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci``V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (integer)``
518c2ecf20Sopenharmony_ci    Sets the global motion detection threshold to be used with the
528c2ecf20Sopenharmony_ci    ``V4L2_DETECT_MD_MODE_GLOBAL`` motion detection mode.
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci``V4L2_CID_DETECT_MD_THRESHOLD_GRID (__u16 matrix)``
558c2ecf20Sopenharmony_ci    Sets the motion detection thresholds for each cell in the grid. To
568c2ecf20Sopenharmony_ci    be used with the ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` motion
578c2ecf20Sopenharmony_ci    detection mode. Matrix element (0, 0) represents the cell at the
588c2ecf20Sopenharmony_ci    top-left of the grid.
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci``V4L2_CID_DETECT_MD_REGION_GRID (__u8 matrix)``
618c2ecf20Sopenharmony_ci    Sets the motion detection region value for each cell in the grid. To
628c2ecf20Sopenharmony_ci    be used with the ``V4L2_DETECT_MD_MODE_REGION_GRID`` motion
638c2ecf20Sopenharmony_ci    detection mode. Matrix element (0, 0) represents the cell at the
648c2ecf20Sopenharmony_ci    top-left of the grid.
65