ext-ctrls-detect.rst 2.2 KB

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