← Documents Documentation/userspace-api/media/v4l/ext-ctrls-detect.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

Detect Control Reference

Global 및 grid 기반 motion-detection threshold와 region 제어를 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/ext-ctrls-detect.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

ext-ctrls-detect.rst:1-64

Motion detection은 전체 threshold 하나 또는 cell별 threshold·region grid를 사용합니다. Matrix (0,0)은 image의 top-left이며 region별 threshold 구성은 driver-specific입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Detection 제어 클래스

1-22

Detect 제어 클래스는 motion detection 또는 object detection 기능을 가진 여러 장치가 공통으로 사용할 수 있는 제어를 제공합니다.

`V4L2_CID_DETECT_CLASS`는 Detect class descriptor이며 `VIDIOC_QUERYCTRL`을 호출하면 이 class의 설명을 반환합니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later

.. _detect-controls:

************************
Detect Control Reference
************************

The Detect class includes controls for common features of various motion
or object detection capable devices.


.. _detect-control-id:

Detect Control IDs
==================

``V4L2_CID_DETECT_CLASS (class)``
    The Detect class descriptor. Calling
    :ref:`VIDIOC_QUERYCTRL` for this control will
    return a description of this control class.

Motion detection mode와 grid

23-64

`V4L2_CID_DETECT_MD_MODE`는 motion detection 방식을 disabled, global threshold, cell별 threshold grid, region grid 중에서 선택합니다.

Motion detection mode
항목한국어 설명
`V4L2_DETECT_MD_MODE_DISABLED`Motion detection을 끕니다.
`V4L2_DETECT_MD_MODE_GLOBAL`Image 전체에 하나의 motion-detection threshold를 사용합니다.
`V4L2_DETECT_MD_MODE_THRESHOLD_GRID`Cell마다 독립 threshold를 사용하며 `V4L2_CID_DETECT_MD_THRESHOLD_GRID` 행렬로 값을 설정합니다.
`V4L2_DETECT_MD_MODE_REGION_GRID`Cell마다 region 번호를 지정하고 region별 threshold를 사용합니다. Region threshold 구성법은 driver-specific입니다.

Grid mode에서는 image를 cell로 나누고 matrix control의 좌표를 image 좌표와 일치시킵니다.

Detection 값 제어
항목한국어 설명
`V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD`GLOBAL mode에서 사용할 하나의 motion threshold입니다.
`V4L2_CID_DETECT_MD_THRESHOLD_GRID`THRESHOLD_GRID mode의 cell별 `__u16` threshold 행렬입니다.
`V4L2_CID_DETECT_MD_REGION_GRID`REGION_GRID mode의 cell별 `__u8` region 번호 행렬입니다.

Matrix element (0, 0)은 image의 top-left cell입니다.

Grid detection
Image를 detection grid로 분할Cell (0,0)을 top-left에 배치Threshold grid 또는 region grid 기록Driver가 cell별 motion score 계산설정 threshold를 넘은 cell·region 보고

왼쪽 위를 원점으로 각 cell의 threshold 또는 region을 적용합니다.

``V4L2_CID_DETECT_MD_MODE (menu)``
    Sets the motion detection mode.

.. tabularcolumns:: |p{7.7cm}|p{9.8cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_DETECT_MD_MODE_DISABLED``
      - Disable motion detection.
    * - ``V4L2_DETECT_MD_MODE_GLOBAL``
      - Use a single motion detection threshold.
    * - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID``
      - The image is divided into a grid, each cell with its own motion
	detection threshold. These thresholds are set through the
	``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control.
    * - ``V4L2_DETECT_MD_MODE_REGION_GRID``
      - The image is divided into a grid, each cell with its own region
	value that specifies which per-region motion detection thresholds
	should be used. Each region has its own thresholds. How these
	per-region thresholds are set up is driver-specific. The region
	values for the grid are set through the
	``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control.



``V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (integer)``
    Sets the global motion detection threshold to be used with the
    ``V4L2_DETECT_MD_MODE_GLOBAL`` motion detection mode.

``V4L2_CID_DETECT_MD_THRESHOLD_GRID (__u16 matrix)``
    Sets the motion detection thresholds for each cell in the grid. To
    be used with the ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` motion
    detection mode. Matrix element (0, 0) represents the cell at the
    top-left of the grid.

``V4L2_CID_DETECT_MD_REGION_GRID (__u8 matrix)``
    Sets the motion detection region value for each cell in the grid. To
    be used with the ``V4L2_DETECT_MD_MODE_REGION_GRID`` motion
    detection mode. Matrix element (0, 0) represents the cell at the
    top-left of the grid.