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

Linux 6.18.37 · Userspace API / Media / V4L

Camera control reference

V4L2 camera exposure·focus·white balance·scene·orientation·rotation·HDR control을 설명합니다.

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

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

1. 요약·해설

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

요약·해설

ext-ctrls-camera.rst:1-674

Camera class는 exposure·3A와 lens motion뿐 아니라 privacy, scene program, device-relative orientation과 post-capture rotation correction까지 다룹니다. Automatic mode 중 수동 control 변경은 대부분 undefined이므로 application이 mode와 lock 상태를 먼저 확인해야 합니다.

Orientation은 camera의 device-relative 위치이고 sensor rotation은 captured image에 적용할 CCW correction입니다. 두 read-only 값을 혼동하지 않아야 preview와 saved image를 올바르게 표시할 수 있습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _camera-controls:
4
5 ************************
6 Camera Control Reference
7 ************************
8
9 The Camera class includes controls for mechanical (or equivalent
10 digital) features of a device such as controllable lenses or sensors.
11
12
13 .. _camera-control-id:
14
15 Camera Control IDs
16 ==================
17
18 ``V4L2_CID_CAMERA_CLASS (class)``
19 The Camera class descriptor. Calling
20 :ref:`VIDIOC_QUERYCTRL` for this control will
21 return a description of this control class.
22
23 .. _v4l2-exposure-auto-type:
24
25 ``V4L2_CID_EXPOSURE_AUTO``
26 (enum)
27
28 enum v4l2_exposure_auto_type -
29 Enables automatic adjustments of the exposure time and/or iris
30 aperture. The effect of manual changes of the exposure time or iris
31 aperture while these features are enabled is undefined, drivers
32 should ignore such requests. Possible values are:
33
34
35 .. tabularcolumns:: |p{7.1cm}|p{10.4cm}|
36
37 .. flat-table::
38 :header-rows: 0
39 :stub-columns: 0
40
41 * - ``V4L2_EXPOSURE_AUTO``
42 - Automatic exposure time, automatic iris aperture.
43 * - ``V4L2_EXPOSURE_MANUAL``
44 - Manual exposure time, manual iris.
45 * - ``V4L2_EXPOSURE_SHUTTER_PRIORITY``
46 - Manual exposure time, auto iris.
47 * - ``V4L2_EXPOSURE_APERTURE_PRIORITY``
48 - Auto exposure time, manual iris.
49
50
51
52 ``V4L2_CID_EXPOSURE_ABSOLUTE (integer)``
53 Determines the exposure time of the camera sensor. The exposure time
54 is limited by the frame interval. Drivers should interpret the
55 values as 100 µs units, where the value 1 stands for 1/10000th of a
56 second, 10000 for 1 second and 100000 for 10 seconds.
57
58 ``V4L2_CID_EXPOSURE_AUTO_PRIORITY (boolean)``
59 When ``V4L2_CID_EXPOSURE_AUTO`` is set to ``AUTO`` or
60 ``APERTURE_PRIORITY``, this control determines if the device may
61 dynamically vary the frame rate. By default this feature is disabled
62 (0) and the frame rate must remain constant.
63
64 ``V4L2_CID_AUTO_EXPOSURE_BIAS (integer menu)``
65 Determines the automatic exposure compensation, it is effective only
66 when ``V4L2_CID_EXPOSURE_AUTO`` control is set to ``AUTO``,
67 ``SHUTTER_PRIORITY`` or ``APERTURE_PRIORITY``. It is expressed in
68 terms of EV, drivers should interpret the values as 0.001 EV units,
69 where the value 1000 stands for +1 EV.
70
71 Increasing the exposure compensation value is equivalent to
72 decreasing the exposure value (EV) and will increase the amount of
73 light at the image sensor. The camera performs the exposure
74 compensation by adjusting absolute exposure time and/or aperture.
75
76 .. _v4l2-exposure-metering:
77
78 ``V4L2_CID_EXPOSURE_METERING``
79 (enum)
80
81 enum v4l2_exposure_metering -
82 Determines how the camera measures the amount of light available for
83 the frame exposure. Possible values are:
84
85 .. tabularcolumns:: |p{8.7cm}|p{8.7cm}|
86
87 .. flat-table::
88 :header-rows: 0
89 :stub-columns: 0
90
91 * - ``V4L2_EXPOSURE_METERING_AVERAGE``
92 - Use the light information coming from the entire frame and average
93 giving no weighting to any particular portion of the metered area.
94 * - ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED``
95 - Average the light information coming from the entire frame giving
96 priority to the center of the metered area.
97 * - ``V4L2_EXPOSURE_METERING_SPOT``
98 - Measure only very small area at the center of the frame.
99 * - ``V4L2_EXPOSURE_METERING_MATRIX``
100 - A multi-zone metering. The light intensity is measured in several
101 points of the frame and the results are combined. The algorithm of
102 the zones selection and their significance in calculating the
103 final value is device dependent.
104
105
106
107 ``V4L2_CID_PAN_RELATIVE (integer)``
108 This control turns the camera horizontally by the specified amount.
109 The unit is undefined. A positive value moves the camera to the
110 right (clockwise when viewed from above), a negative value to the
111 left. A value of zero does not cause motion. This is a write-only
112 control.
113
114 ``V4L2_CID_TILT_RELATIVE (integer)``
115 This control turns the camera vertically by the specified amount.
116 The unit is undefined. A positive value moves the camera up, a
117 negative value down. A value of zero does not cause motion. This is
118 a write-only control.
119
120 ``V4L2_CID_PAN_RESET (button)``
121 When this control is set, the camera moves horizontally to the
122 default position.
123
124 ``V4L2_CID_TILT_RESET (button)``
125 When this control is set, the camera moves vertically to the default
126 position.
127
128 ``V4L2_CID_PAN_ABSOLUTE (integer)``
129 This control turns the camera horizontally to the specified
130 position. Positive values move the camera to the right (clockwise
131 when viewed from above), negative values to the left. Drivers should
132 interpret the values as arc seconds, with valid values between -180
133 * 3600 and +180 * 3600 inclusive.
134
135 ``V4L2_CID_TILT_ABSOLUTE (integer)``
136 This control turns the camera vertically to the specified position.
137 Positive values move the camera up, negative values down. Drivers
138 should interpret the values as arc seconds, with valid values
139 between -180 * 3600 and +180 * 3600 inclusive.
140
141 ``V4L2_CID_FOCUS_ABSOLUTE (integer)``
142 This control sets the focal point of the camera to the specified
143 position. The unit is undefined. Positive values set the focus
144 closer to the camera, negative values towards infinity.
145
146 ``V4L2_CID_FOCUS_RELATIVE (integer)``
147 This control moves the focal point of the camera by the specified
148 amount. The unit is undefined. Positive values move the focus closer
149 to the camera, negative values towards infinity. This is a
150 write-only control.
151
152 ``V4L2_CID_FOCUS_AUTO (boolean)``
153 Enables continuous automatic focus adjustments. The effect of manual
154 focus adjustments while this feature is enabled is undefined,
155 drivers should ignore such requests.
156
157 ``V4L2_CID_AUTO_FOCUS_START (button)``
158 Starts single auto focus process. The effect of setting this control
159 when ``V4L2_CID_FOCUS_AUTO`` is set to ``TRUE`` (1) is undefined,
160 drivers should ignore such requests.
161
162 ``V4L2_CID_AUTO_FOCUS_STOP (button)``
163 Aborts automatic focusing started with ``V4L2_CID_AUTO_FOCUS_START``
164 control. It is effective only when the continuous autofocus is
165 disabled, that is when ``V4L2_CID_FOCUS_AUTO`` control is set to
166 ``FALSE`` (0).
167
168 .. _v4l2-auto-focus-status:
169
170 ``V4L2_CID_AUTO_FOCUS_STATUS (bitmask)``
171 The automatic focus status. This is a read-only control.
172
173 Setting ``V4L2_LOCK_FOCUS`` lock bit of the ``V4L2_CID_3A_LOCK``
174 control may stop updates of the ``V4L2_CID_AUTO_FOCUS_STATUS``
175 control value.
176
177 .. tabularcolumns:: |p{6.8cm}|p{10.7cm}|
178
179 .. flat-table::
180 :header-rows: 0
181 :stub-columns: 0
182
183 * - ``V4L2_AUTO_FOCUS_STATUS_IDLE``
184 - Automatic focus is not active.
185 * - ``V4L2_AUTO_FOCUS_STATUS_BUSY``
186 - Automatic focusing is in progress.
187 * - ``V4L2_AUTO_FOCUS_STATUS_REACHED``
188 - Focus has been reached.
189 * - ``V4L2_AUTO_FOCUS_STATUS_FAILED``
190 - Automatic focus has failed, the driver will not transition from
191 this state until another action is performed by an application.
192
193
194
195 .. _v4l2-auto-focus-range:
196
197 ``V4L2_CID_AUTO_FOCUS_RANGE``
198 (enum)
199
200 enum v4l2_auto_focus_range -
201 Determines auto focus distance range for which lens may be adjusted.
202
203 .. tabularcolumns:: |p{6.9cm}|p{10.6cm}|
204
205 .. flat-table::
206 :header-rows: 0
207 :stub-columns: 0
208
209 * - ``V4L2_AUTO_FOCUS_RANGE_AUTO``
210 - The camera automatically selects the focus range.
211 * - ``V4L2_AUTO_FOCUS_RANGE_NORMAL``
212 - Normal distance range, limited for best automatic focus
213 performance.
214 * - ``V4L2_AUTO_FOCUS_RANGE_MACRO``
215 - Macro (close-up) auto focus. The camera will use its minimum
216 possible distance for auto focus.
217 * - ``V4L2_AUTO_FOCUS_RANGE_INFINITY``
218 - The lens is set to focus on an object at infinite distance.
219
220
221
222 ``V4L2_CID_ZOOM_ABSOLUTE (integer)``
223 Specify the objective lens focal length as an absolute value. The
224 zoom unit is driver-specific and its value should be a positive
225 integer.
226
227 ``V4L2_CID_ZOOM_RELATIVE (integer)``
228 Specify the objective lens focal length relatively to the current
229 value. Positive values move the zoom lens group towards the
230 telephoto direction, negative values towards the wide-angle
231 direction. The zoom unit is driver-specific. This is a write-only
232 control.
233
234 ``V4L2_CID_ZOOM_CONTINUOUS (integer)``
235 Move the objective lens group at the specified speed until it
236 reaches physical device limits or until an explicit request to stop
237 the movement. A positive value moves the zoom lens group towards the
238 telephoto direction. A value of zero stops the zoom lens group
239 movement. A negative value moves the zoom lens group towards the
240 wide-angle direction. The zoom speed unit is driver-specific.
241
242 ``V4L2_CID_IRIS_ABSOLUTE (integer)``
243 This control sets the camera's aperture to the specified value. The
244 unit is undefined. Larger values open the iris wider, smaller values
245 close it.
246
247 ``V4L2_CID_IRIS_RELATIVE (integer)``
248 This control modifies the camera's aperture by the specified amount.
249 The unit is undefined. Positive values open the iris one step
250 further, negative values close it one step further. This is a
251 write-only control.
252
253 ``V4L2_CID_PRIVACY (boolean)``
254 Prevent video from being acquired by the camera. When this control
255 is set to ``TRUE`` (1), no image can be captured by the camera.
256 Common means to enforce privacy are mechanical obturation of the
257 sensor and firmware image processing, but the device is not
258 restricted to these methods. Devices that implement the privacy
259 control must support read access and may support write access.
260
261 ``V4L2_CID_BAND_STOP_FILTER (integer)``
262 Switch the band-stop filter of a camera sensor on or off, or specify
263 its strength. Such band-stop filters can be used, for example, to
264 filter out the fluorescent light component.
265
266 .. _v4l2-auto-n-preset-white-balance:
267
268 ``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE``
269 (enum)
270
271 enum v4l2_auto_n_preset_white_balance -
272 Sets white balance to automatic, manual or a preset. The presets
273 determine color temperature of the light as a hint to the camera for
274 white balance adjustments resulting in most accurate color
275 representation. The following white balance presets are listed in
276 order of increasing color temperature.
277
278 .. tabularcolumns:: |p{7.4cm}|p{10.1cm}|
279
280 .. flat-table::
281 :header-rows: 0
282 :stub-columns: 0
283
284 * - ``V4L2_WHITE_BALANCE_MANUAL``
285 - Manual white balance.
286 * - ``V4L2_WHITE_BALANCE_AUTO``
287 - Automatic white balance adjustments.
288 * - ``V4L2_WHITE_BALANCE_INCANDESCENT``
289 - White balance setting for incandescent (tungsten) lighting. It
290 generally cools down the colors and corresponds approximately to
291 2500...3500 K color temperature range.
292 * - ``V4L2_WHITE_BALANCE_FLUORESCENT``
293 - White balance preset for fluorescent lighting. It corresponds
294 approximately to 4000...5000 K color temperature.
295 * - ``V4L2_WHITE_BALANCE_FLUORESCENT_H``
296 - With this setting the camera will compensate for fluorescent H
297 lighting.
298 * - ``V4L2_WHITE_BALANCE_HORIZON``
299 - White balance setting for horizon daylight. It corresponds
300 approximately to 5000 K color temperature.
301 * - ``V4L2_WHITE_BALANCE_DAYLIGHT``
302 - White balance preset for daylight (with clear sky). It corresponds
303 approximately to 5000...6500 K color temperature.
304 * - ``V4L2_WHITE_BALANCE_FLASH``
305 - With this setting the camera will compensate for the flash light.
306 It slightly warms up the colors and corresponds roughly to
307 5000...5500 K color temperature.
308 * - ``V4L2_WHITE_BALANCE_CLOUDY``
309 - White balance preset for moderately overcast sky. This option
310 corresponds approximately to 6500...8000 K color temperature
311 range.
312 * - ``V4L2_WHITE_BALANCE_SHADE``
313 - White balance preset for shade or heavily overcast sky. It
314 corresponds approximately to 9000...10000 K color temperature.
315
316
317
318 .. _v4l2-wide-dynamic-range:
319
320 ``V4L2_CID_WIDE_DYNAMIC_RANGE (boolean)``
321 Enables or disables the camera's wide dynamic range feature. This
322 feature allows to obtain clear images in situations where intensity
323 of the illumination varies significantly throughout the scene, i.e.
324 there are simultaneously very dark and very bright areas. It is most
325 commonly realized in cameras by combining two subsequent frames with
326 different exposure times. [#f1]_
327
328 .. _v4l2-image-stabilization:
329
330 ``V4L2_CID_IMAGE_STABILIZATION (boolean)``
331 Enables or disables image stabilization.
332
333 ``V4L2_CID_ISO_SENSITIVITY (integer menu)``
334 Determines ISO equivalent of an image sensor indicating the sensor's
335 sensitivity to light. The numbers are expressed in arithmetic scale,
336 as per :ref:`iso12232` standard, where doubling the sensor
337 sensitivity is represented by doubling the numerical ISO value.
338 Applications should interpret the values as standard ISO values
339 multiplied by 1000, e.g. control value 800 stands for ISO 0.8.
340 Drivers will usually support only a subset of standard ISO values.
341 The effect of setting this control while the
342 ``V4L2_CID_ISO_SENSITIVITY_AUTO`` control is set to a value other
343 than ``V4L2_CID_ISO_SENSITIVITY_MANUAL`` is undefined, drivers
344 should ignore such requests.
345
346 .. _v4l2-iso-sensitivity-auto-type:
347
348 ``V4L2_CID_ISO_SENSITIVITY_AUTO``
349 (enum)
350
351 enum v4l2_iso_sensitivity_type -
352 Enables or disables automatic ISO sensitivity adjustments.
353
354
355
356 .. flat-table::
357 :header-rows: 0
358 :stub-columns: 0
359
360 * - ``V4L2_CID_ISO_SENSITIVITY_MANUAL``
361 - Manual ISO sensitivity.
362 * - ``V4L2_CID_ISO_SENSITIVITY_AUTO``
363 - Automatic ISO sensitivity adjustments.
364
365
366
367 .. _v4l2-scene-mode:
368
369 ``V4L2_CID_SCENE_MODE``
370 (enum)
371
372 enum v4l2_scene_mode -
373 This control allows to select scene programs as the camera automatic
374 modes optimized for common shooting scenes. Within these modes the
375 camera determines best exposure, aperture, focusing, light metering,
376 white balance and equivalent sensitivity. The controls of those
377 parameters are influenced by the scene mode control. An exact
378 behavior in each mode is subject to the camera specification.
379
380 When the scene mode feature is not used, this control should be set
381 to ``V4L2_SCENE_MODE_NONE`` to make sure the other possibly related
382 controls are accessible. The following scene programs are defined:
383
384 .. raw:: latex
385
386 \small
387
388 .. tabularcolumns:: |p{5.9cm}|p{11.6cm}|
389
390 .. cssclass:: longtable
391
392 .. flat-table::
393 :header-rows: 0
394 :stub-columns: 0
395
396 * - ``V4L2_SCENE_MODE_NONE``
397 - The scene mode feature is disabled.
398 * - ``V4L2_SCENE_MODE_BACKLIGHT``
399 - Backlight. Compensates for dark shadows when light is coming from
400 behind a subject, also by automatically turning on the flash.
401 * - ``V4L2_SCENE_MODE_BEACH_SNOW``
402 - Beach and snow. This mode compensates for all-white or bright
403 scenes, which tend to look gray and low contrast, when camera's
404 automatic exposure is based on an average scene brightness. To
405 compensate, this mode automatically slightly overexposes the
406 frames. The white balance may also be adjusted to compensate for
407 the fact that reflected snow looks bluish rather than white.
408 * - ``V4L2_SCENE_MODE_CANDLELIGHT``
409 - Candle light. The camera generally raises the ISO sensitivity and
410 lowers the shutter speed. This mode compensates for relatively
411 close subject in the scene. The flash is disabled in order to
412 preserve the ambiance of the light.
413 * - ``V4L2_SCENE_MODE_DAWN_DUSK``
414 - Dawn and dusk. Preserves the colors seen in low natural light
415 before dusk and after down. The camera may turn off the flash, and
416 automatically focus at infinity. It will usually boost saturation
417 and lower the shutter speed.
418 * - ``V4L2_SCENE_MODE_FALL_COLORS``
419 - Fall colors. Increases saturation and adjusts white balance for
420 color enhancement. Pictures of autumn leaves get saturated reds
421 and yellows.
422 * - ``V4L2_SCENE_MODE_FIREWORKS``
423 - Fireworks. Long exposure times are used to capture the expanding
424 burst of light from a firework. The camera may invoke image
425 stabilization.
426 * - ``V4L2_SCENE_MODE_LANDSCAPE``
427 - Landscape. The camera may choose a small aperture to provide deep
428 depth of field and long exposure duration to help capture detail
429 in dim light conditions. The focus is fixed at infinity. Suitable
430 for distant and wide scenery.
431 * - ``V4L2_SCENE_MODE_NIGHT``
432 - Night, also known as Night Landscape. Designed for low light
433 conditions, it preserves detail in the dark areas without blowing
434 out bright objects. The camera generally sets itself to a
435 medium-to-high ISO sensitivity, with a relatively long exposure
436 time, and turns flash off. As such, there will be increased image
437 noise and the possibility of blurred image.
438 * - ``V4L2_SCENE_MODE_PARTY_INDOOR``
439 - Party and indoor. Designed to capture indoor scenes that are lit
440 by indoor background lighting as well as the flash. The camera
441 usually increases ISO sensitivity, and adjusts exposure for the
442 low light conditions.
443 * - ``V4L2_SCENE_MODE_PORTRAIT``
444 - Portrait. The camera adjusts the aperture so that the depth of
445 field is reduced, which helps to isolate the subject against a
446 smooth background. Most cameras recognize the presence of faces in
447 the scene and focus on them. The color hue is adjusted to enhance
448 skin tones. The intensity of the flash is often reduced.
449 * - ``V4L2_SCENE_MODE_SPORTS``
450 - Sports. Significantly increases ISO and uses a fast shutter speed
451 to freeze motion of rapidly-moving subjects. Increased image noise
452 may be seen in this mode.
453 * - ``V4L2_SCENE_MODE_SUNSET``
454 - Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps
455 up the saturation.
456 * - ``V4L2_SCENE_MODE_TEXT``
457 - Text. It applies extra contrast and sharpness, it is typically a
458 black-and-white mode optimized for readability. Automatic focus
459 may be switched to close-up mode and this setting may also involve
460 some lens-distortion correction.
461
462 .. raw:: latex
463
464 \normalsize
465
466
467 ``V4L2_CID_3A_LOCK (bitmask)``
468 This control locks or unlocks the automatic focus, exposure and
469 white balance. The automatic adjustments can be paused independently
470 by setting the corresponding lock bit to 1. The camera then retains
471 the settings until the lock bit is cleared. The following lock bits
472 are defined:
473
474 When a given algorithm is not enabled, drivers should ignore
475 requests to lock it and should return no error. An example might be
476 an application setting bit ``V4L2_LOCK_WHITE_BALANCE`` when the
477 ``V4L2_CID_AUTO_WHITE_BALANCE`` control is set to ``FALSE``. The
478 value of this control may be changed by exposure, white balance or
479 focus controls.
480
481
482
483 .. flat-table::
484 :header-rows: 0
485 :stub-columns: 0
486
487 * - ``V4L2_LOCK_EXPOSURE``
488 - Automatic exposure adjustments lock.
489 * - ``V4L2_LOCK_WHITE_BALANCE``
490 - Automatic white balance adjustments lock.
491 * - ``V4L2_LOCK_FOCUS``
492 - Automatic focus lock.
493
494
495
496 ``V4L2_CID_PAN_SPEED (integer)``
497 This control turns the camera horizontally at the specific speed.
498 The unit is undefined. A positive value moves the camera to the
499 right (clockwise when viewed from above), a negative value to the
500 left. A value of zero stops the motion if one is in progress and has
501 no effect otherwise.
502
503 ``V4L2_CID_TILT_SPEED (integer)``
504 This control turns the camera vertically at the specified speed. The
505 unit is undefined. A positive value moves the camera up, a negative
506 value down. A value of zero stops the motion if one is in progress
507 and has no effect otherwise.
508
509 .. _v4l2-camera-sensor-orientation:
510
511 ``V4L2_CID_CAMERA_ORIENTATION (menu)``
512 This read-only control describes the camera orientation by reporting its
513 mounting position on the device where the camera is installed. The control
514 value is constant and not modifiable by software. This control is
515 particularly meaningful for devices which have a well defined orientation,
516 such as phones, laptops and portable devices since the control is expressed
517 as a position relative to the device's intended usage orientation. For
518 example, a camera installed on the user-facing side of a phone, a tablet or
519 a laptop device is said to be have ``V4L2_CAMERA_ORIENTATION_FRONT``
520 orientation, while a camera installed on the opposite side of the front one
521 is said to be have ``V4L2_CAMERA_ORIENTATION_BACK`` orientation. Camera
522 sensors not directly attached to the device, or attached in a way that
523 allows them to move freely, such as webcams and digital cameras, are said to
524 have the ``V4L2_CAMERA_ORIENTATION_EXTERNAL`` orientation.
525
526
527 .. tabularcolumns:: |p{7.7cm}|p{9.8cm}|
528
529 .. flat-table::
530 :header-rows: 0
531 :stub-columns: 0
532
533 * - ``V4L2_CAMERA_ORIENTATION_FRONT``
534 - The camera is oriented towards the user facing side of the device.
535 * - ``V4L2_CAMERA_ORIENTATION_BACK``
536 - The camera is oriented towards the back facing side of the device.
537 * - ``V4L2_CAMERA_ORIENTATION_EXTERNAL``
538 - The camera is not directly attached to the device and is freely movable.
539
540
541 .. _v4l2-camera-sensor-rotation:
542
543 ``V4L2_CID_CAMERA_SENSOR_ROTATION (integer)``
544 This read-only control describes the rotation correction in degrees in the
545 counter-clockwise direction to be applied to the captured images once
546 captured to memory to compensate for the camera sensor mounting rotation.
547
548 For a precise definition of the sensor mounting rotation refer to the
549 extensive description of the 'rotation' properties in the device tree
550 bindings file 'video-interfaces.txt'.
551
552 A few examples are below reported, using a shark swimming from left to
553 right in front of the user as the example scene to capture. ::
554
555 0 X-axis
556 0 +------------------------------------->
557 !
558 !
559 !
560 ! |\____)\___
561 ! ) _____ __`<
562 ! |/ )/
563 !
564 !
565 !
566 V
567 Y-axis
568
569 Example one - Webcam
570
571 Assuming you can bring your laptop with you while swimming with sharks,
572 the camera module of the laptop is installed on the user facing part of a
573 laptop screen casing, and is typically used for video calls. The captured
574 images are meant to be displayed in landscape mode (width > height) on the
575 laptop screen.
576
577 The camera is typically mounted upside-down to compensate the lens optical
578 inversion effect. In this case the value of the
579 V4L2_CID_CAMERA_SENSOR_ROTATION control is 0, no rotation is required to
580 display images correctly to the user.
581
582 If the camera sensor is not mounted upside-down it is required to compensate
583 the lens optical inversion effect and the value of the
584 V4L2_CID_CAMERA_SENSOR_ROTATION control is 180 degrees, as images will
585 result rotated when captured to memory. ::
586
587 +--------------------------------------+
588 ! !
589 ! !
590 ! !
591 ! __/(_____/| !
592 ! >.___ ____ ( !
593 ! \( \| !
594 ! !
595 ! !
596 ! !
597 +--------------------------------------+
598
599 A software rotation correction of 180 degrees has to be applied to correctly
600 display the image on the user screen. ::
601
602 +--------------------------------------+
603 ! !
604 ! !
605 ! !
606 ! |\____)\___ !
607 ! ) _____ __`< !
608 ! |/ )/ !
609 ! !
610 ! !
611 ! !
612 +--------------------------------------+
613
614 Example two - Phone camera
615
616 It is more handy to go and swim with sharks with only your mobile phone
617 with you and take pictures with the camera that is installed on the back
618 side of the device, facing away from the user. The captured images are meant
619 to be displayed in portrait mode (height > width) to match the device screen
620 orientation and the device usage orientation used when taking the picture.
621
622 The camera sensor is typically mounted with its pixel array longer side
623 aligned to the device longer side, upside-down mounted to compensate for
624 the lens optical inversion effect.
625
626 The images once captured to memory will be rotated and the value of the
627 V4L2_CID_CAMERA_SENSOR_ROTATION will report a 90 degree rotation. ::
628
629
630 +-------------------------------------+
631 | _ _ |
632 | \ / |
633 | | | |
634 | | | |
635 | | > |
636 | < | |
637 | | | |
638 | . |
639 | V |
640 +-------------------------------------+
641
642 A correction of 90 degrees in counter-clockwise direction has to be
643 applied to correctly display the image in portrait mode on the device
644 screen. ::
645
646 +--------------------+
647 | |
648 | |
649 | |
650 | |
651 | |
652 | |
653 | |\____)\___ |
654 | ) _____ __`< |
655 | |/ )/ |
656 | |
657 | |
658 | |
659 | |
660 | |
661 +--------------------+
662
663
664 .. [#f1]
665 This control may be changed to a menu control in the future, if more
666 options are required.
667
668 ``V4L2_CID_HDR_SENSOR_MODE (menu)``
669 Change the sensor HDR mode. A HDR picture is obtained by merging two
670 captures of the same scene using two different exposure periods. HDR mode
671 describes the way these two captures are merged in the sensor.
672
673 As modes differ for each sensor, menu items are not standardized by this
674 control and are left to the programmer.
675

3. 한국어 전문 번역

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

Camera class와 control descriptor

1-24

Camera class는 제어 가능한 lens나 sensor처럼 장치의 mechanical feature 또는 그에 해당하는 digital feature를 위한 control을 포함합니다.

`V4L2_CID_CAMERA_CLASS`는 Camera class descriptor입니다. 이 control에 `VIDIOC_QUERYCTRL`을 호출하면 camera control class 설명을 반환합니다.

Camera class 진입점
Control / 값의미
V4L2_CID_CAMERA_CLASSCamera class descriptor
VIDIOC_QUERYCTRLControl class 설명 조회
대상 featureLens, sensor, mechanical 또는 equivalent digital 기능

Camera-specific control을 탐색하는 시작점입니다.

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

.. _camera-controls:

************************
Camera Control Reference
************************

The Camera class includes controls for mechanical (or equivalent
digital) features of a device such as controllable lenses or sensors.


.. _camera-control-id:

Camera Control IDs
==================

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

.. _v4l2-exposure-auto-type:

Exposure mode, time, bias와 metering

25-106

`V4L2_CID_EXPOSURE_AUTO`는 exposure time과 iris aperture의 자동 조정을 켭니다. 자동 기능이 활성화된 동안 수동 exposure 또는 iris 변경의 효과는 정의되지 않으며 driver는 그런 요청을 무시해야 합니다.

Exposure 자동 mode
Control / 값의미
V4L2_EXPOSURE_AUTOExposure time 자동, iris 자동
V4L2_EXPOSURE_MANUALExposure time 수동, iris 수동
V4L2_EXPOSURE_SHUTTER_PRIORITYExposure time 수동, iris 자동
V4L2_EXPOSURE_APERTURE_PRIORITYExposure time 자동, iris 수동

Exposure time과 iris를 자동·수동으로 조합합니다.

`V4L2_CID_EXPOSURE_ABSOLUTE`는 camera sensor exposure time을 정하며 frame interval의 제한을 받습니다. 단위는 100 µs로, 값 1은 1/10000초, 10000은 1초, 100000은 10초입니다.

Exposure mode가 AUTO 또는 APERTURE_PRIORITY일 때 `V4L2_CID_EXPOSURE_AUTO_PRIORITY`는 장치가 frame rate를 동적으로 바꿀 수 있는지 정합니다. Default 0에서는 이 기능이 꺼져 frame rate를 일정하게 유지해야 합니다.

`V4L2_CID_AUTO_EXPOSURE_BIAS`는 AUTO, SHUTTER_PRIORITY, APERTURE_PRIORITY mode에서만 유효한 exposure compensation입니다. 0.001 EV 단위이며 값 1000은 +1 EV입니다.

Exposure compensation 값을 높이면 exposure value(EV)를 낮추는 것과 같아 sensor에 도달하는 빛이 늘어납니다. Camera는 absolute exposure time과 aperture 중 하나 또는 둘을 조정해 보상합니다.

`V4L2_CID_EXPOSURE_METERING`은 frame exposure에 사용할 available light 측정 방식을 선택합니다.

Exposure metering
Control / 값의미
V4L2_EXPOSURE_METERING_AVERAGEFrame 전체 light를 특정 영역 가중치 없이 평균
V4L2_EXPOSURE_METERING_CENTER_WEIGHTEDFrame 전체를 평균하되 중앙 영역에 우선순위
V4L2_EXPOSURE_METERING_SPOTFrame 중앙의 매우 작은 영역만 측정
V4L2_EXPOSURE_METERING_MATRIX여러 zone의 light intensity를 측정·결합; zone 선택과 가중 알고리즘은 device-dependent

Frame에서 빛을 표본화하고 가중하는 방식입니다.

Automatic exposure 결정
Exposure metering 방식 선택Frame의 available light 측정AUTO 또는 priority mode 적용Exposure bias를 0.001 EV 단위로 반영Exposure time과 iris 조정Frame interval 제한 확인

Mode, metering과 bias가 최종 exposure에 함께 작용합니다.

``V4L2_CID_EXPOSURE_AUTO``
    (enum)

enum v4l2_exposure_auto_type -
    Enables automatic adjustments of the exposure time and/or iris
    aperture. The effect of manual changes of the exposure time or iris
    aperture while these features are enabled is undefined, drivers
    should ignore such requests. Possible values are:


.. tabularcolumns:: |p{7.1cm}|p{10.4cm}|

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

    * - ``V4L2_EXPOSURE_AUTO``
      - Automatic exposure time, automatic iris aperture.
    * - ``V4L2_EXPOSURE_MANUAL``
      - Manual exposure time, manual iris.
    * - ``V4L2_EXPOSURE_SHUTTER_PRIORITY``
      - Manual exposure time, auto iris.
    * - ``V4L2_EXPOSURE_APERTURE_PRIORITY``
      - Auto exposure time, manual iris.



``V4L2_CID_EXPOSURE_ABSOLUTE (integer)``
    Determines the exposure time of the camera sensor. The exposure time
    is limited by the frame interval. Drivers should interpret the
    values as 100 µs units, where the value 1 stands for 1/10000th of a
    second, 10000 for 1 second and 100000 for 10 seconds.

``V4L2_CID_EXPOSURE_AUTO_PRIORITY (boolean)``
    When ``V4L2_CID_EXPOSURE_AUTO`` is set to ``AUTO`` or
    ``APERTURE_PRIORITY``, this control determines if the device may
    dynamically vary the frame rate. By default this feature is disabled
    (0) and the frame rate must remain constant.

``V4L2_CID_AUTO_EXPOSURE_BIAS (integer menu)``
    Determines the automatic exposure compensation, it is effective only
    when ``V4L2_CID_EXPOSURE_AUTO`` control is set to ``AUTO``,
    ``SHUTTER_PRIORITY`` or ``APERTURE_PRIORITY``. It is expressed in
    terms of EV, drivers should interpret the values as 0.001 EV units,
    where the value 1000 stands for +1 EV.

    Increasing the exposure compensation value is equivalent to
    decreasing the exposure value (EV) and will increase the amount of
    light at the image sensor. The camera performs the exposure
    compensation by adjusting absolute exposure time and/or aperture.

.. _v4l2-exposure-metering:

``V4L2_CID_EXPOSURE_METERING``
    (enum)

enum v4l2_exposure_metering -
    Determines how the camera measures the amount of light available for
    the frame exposure. Possible values are:

.. tabularcolumns:: |p{8.7cm}|p{8.7cm}|

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

    * - ``V4L2_EXPOSURE_METERING_AVERAGE``
      - Use the light information coming from the entire frame and average
	giving no weighting to any particular portion of the metered area.
    * - ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED``
      - Average the light information coming from the entire frame giving
	priority to the center of the metered area.
    * - ``V4L2_EXPOSURE_METERING_SPOT``
      - Measure only very small area at the center of the frame.
    * - ``V4L2_EXPOSURE_METERING_MATRIX``
      - A multi-zone metering. The light intensity is measured in several
	points of the frame and the results are combined. The algorithm of
	the zones selection and their significance in calculating the
	final value is device dependent.


Pan, tilt와 focus command

107-167

`V4L2_CID_PAN_RELATIVE`는 camera를 지정량만큼 수평 회전합니다. 양수는 위에서 볼 때 시계방향인 오른쪽, 음수는 왼쪽이며 0은 움직이지 않습니다. 단위는 정의되지 않은 write-only control입니다.

`V4L2_CID_TILT_RELATIVE`는 수직 회전량을 지정합니다. 양수는 위, 음수는 아래, 0은 정지이며 단위가 정의되지 않은 write-only control입니다.

`V4L2_CID_PAN_RESET`과 `V4L2_CID_TILT_RESET` button은 각각 수평·수직 위치를 default로 되돌립니다.

`V4L2_CID_PAN_ABSOLUTE`와 `V4L2_CID_TILT_ABSOLUTE`는 absolute 위치를 arc-second 단위로 지정합니다. Pan 양수는 오른쪽, tilt 양수는 위쪽이며 유효 범위는 -180×3600부터 +180×3600까지입니다.

`V4L2_CID_FOCUS_ABSOLUTE`는 focal point 위치를 지정합니다. 양수는 camera에 더 가깝게, 음수는 infinity 방향으로 이동하며 단위는 정의되지 않습니다. `V4L2_CID_FOCUS_RELATIVE`는 현재 위치에서 지정량만큼 같은 방향 규칙으로 움직이는 write-only control입니다.

`V4L2_CID_FOCUS_AUTO`는 continuous autofocus를 켭니다. 활성화 중 수동 focus 조정의 효과는 정의되지 않으며 driver는 무시해야 합니다.

`V4L2_CID_AUTO_FOCUS_START`는 single autofocus를 시작합니다. Continuous autofocus가 TRUE일 때의 효과는 정의되지 않아 driver가 무시해야 합니다. `V4L2_CID_AUTO_FOCUS_STOP`은 START로 시작한 autofocus를 중단하며 continuous autofocus가 FALSE일 때만 유효합니다.

Motion과 focus control
Control / 값의미
PAN/TILT_RELATIVE현재 위치 기준 이동; write-only
PAN/TILT_RESETDefault 위치로 이동하는 button
PAN/TILT_ABSOLUTEArc-second 단위 absolute 위치
FOCUS_ABSOLUTE지정 focal point
FOCUS_RELATIVE현재 focus에서 상대 이동; write-only
FOCUS_AUTOContinuous autofocus
AUTO_FOCUS_START/STOPSingle autofocus 시작/중단

상대·절대 command, button과 auto mode를 구분합니다.

``V4L2_CID_PAN_RELATIVE (integer)``
    This control turns the camera horizontally by the specified amount.
    The unit is undefined. A positive value moves the camera to the
    right (clockwise when viewed from above), a negative value to the
    left. A value of zero does not cause motion. This is a write-only
    control.

``V4L2_CID_TILT_RELATIVE (integer)``
    This control turns the camera vertically by the specified amount.
    The unit is undefined. A positive value moves the camera up, a
    negative value down. A value of zero does not cause motion. This is
    a write-only control.

``V4L2_CID_PAN_RESET (button)``
    When this control is set, the camera moves horizontally to the
    default position.

``V4L2_CID_TILT_RESET (button)``
    When this control is set, the camera moves vertically to the default
    position.

``V4L2_CID_PAN_ABSOLUTE (integer)``
    This control turns the camera horizontally to the specified
    position. Positive values move the camera to the right (clockwise
    when viewed from above), negative values to the left. Drivers should
    interpret the values as arc seconds, with valid values between -180
    * 3600 and +180 * 3600 inclusive.

``V4L2_CID_TILT_ABSOLUTE (integer)``
    This control turns the camera vertically to the specified position.
    Positive values move the camera up, negative values down. Drivers
    should interpret the values as arc seconds, with valid values
    between -180 * 3600 and +180 * 3600 inclusive.

``V4L2_CID_FOCUS_ABSOLUTE (integer)``
    This control sets the focal point of the camera to the specified
    position. The unit is undefined. Positive values set the focus
    closer to the camera, negative values towards infinity.

``V4L2_CID_FOCUS_RELATIVE (integer)``
    This control moves the focal point of the camera by the specified
    amount. The unit is undefined. Positive values move the focus closer
    to the camera, negative values towards infinity. This is a
    write-only control.

``V4L2_CID_FOCUS_AUTO (boolean)``
    Enables continuous automatic focus adjustments. The effect of manual
    focus adjustments while this feature is enabled is undefined,
    drivers should ignore such requests.

``V4L2_CID_AUTO_FOCUS_START (button)``
    Starts single auto focus process. The effect of setting this control
    when ``V4L2_CID_FOCUS_AUTO`` is set to ``TRUE`` (1) is undefined,
    drivers should ignore such requests.

``V4L2_CID_AUTO_FOCUS_STOP (button)``
    Aborts automatic focusing started with ``V4L2_CID_AUTO_FOCUS_START``
    control. It is effective only when the continuous autofocus is
    disabled, that is when ``V4L2_CID_FOCUS_AUTO`` control is set to
    ``FALSE`` (0).

Autofocus status와 거리 범위

168-221

`V4L2_CID_AUTO_FOCUS_STATUS`는 read-only autofocus 상태 bitmask입니다. `V4L2_CID_3A_LOCK`의 `V4L2_LOCK_FOCUS` bit를 설정하면 status 값 갱신이 멈출 수 있습니다.

Autofocus status
Control / 값의미
V4L2_AUTO_FOCUS_STATUS_IDLEAutofocus 비활성
V4L2_AUTO_FOCUS_STATUS_BUSYAutofocus 진행 중
V4L2_AUTO_FOCUS_STATUS_REACHEDFocus 도달
V4L2_AUTO_FOCUS_STATUS_FAILEDAutofocus 실패; application의 다음 action 전까지 이 state 유지

Single 또는 continuous focusing의 현재 결과입니다.

`V4L2_CID_AUTO_FOCUS_RANGE`는 lens가 autofocus에 사용할 거리 범위를 정합니다.

Autofocus range
Control / 값의미
V4L2_AUTO_FOCUS_RANGE_AUTOCamera가 focus range 자동 선택
V4L2_AUTO_FOCUS_RANGE_NORMAL일반 거리; 최적 autofocus 성능을 위해 제한
V4L2_AUTO_FOCUS_RANGE_MACROClose-up용 최소 가능 거리
V4L2_AUTO_FOCUS_RANGE_INFINITY무한 거리 object에 focus 고정

촬영 거리와 성능에 맞춘 lens search 범위입니다.

Single autofocus state
AUTO_FOCUS_START buttonSTATUS_BUSYLens searchSTATUS_REACHED 또는 STATUS_FAILEDSTOP 또는 새 application action

START 후 status가 terminal state에 도달합니다.

.. _v4l2-auto-focus-status:

``V4L2_CID_AUTO_FOCUS_STATUS (bitmask)``
    The automatic focus status. This is a read-only control.

    Setting ``V4L2_LOCK_FOCUS`` lock bit of the ``V4L2_CID_3A_LOCK``
    control may stop updates of the ``V4L2_CID_AUTO_FOCUS_STATUS``
    control value.

.. tabularcolumns:: |p{6.8cm}|p{10.7cm}|

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

    * - ``V4L2_AUTO_FOCUS_STATUS_IDLE``
      - Automatic focus is not active.
    * - ``V4L2_AUTO_FOCUS_STATUS_BUSY``
      - Automatic focusing is in progress.
    * - ``V4L2_AUTO_FOCUS_STATUS_REACHED``
      - Focus has been reached.
    * - ``V4L2_AUTO_FOCUS_STATUS_FAILED``
      - Automatic focus has failed, the driver will not transition from
	this state until another action is performed by an application.



.. _v4l2-auto-focus-range:

``V4L2_CID_AUTO_FOCUS_RANGE``
    (enum)

enum v4l2_auto_focus_range -
    Determines auto focus distance range for which lens may be adjusted.

.. tabularcolumns:: |p{6.9cm}|p{10.6cm}|

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

    * - ``V4L2_AUTO_FOCUS_RANGE_AUTO``
      - The camera automatically selects the focus range.
    * - ``V4L2_AUTO_FOCUS_RANGE_NORMAL``
      - Normal distance range, limited for best automatic focus
	performance.
    * - ``V4L2_AUTO_FOCUS_RANGE_MACRO``
      - Macro (close-up) auto focus. The camera will use its minimum
	possible distance for auto focus.
    * - ``V4L2_AUTO_FOCUS_RANGE_INFINITY``
      - The lens is set to focus on an object at infinite distance.


Zoom, iris, privacy와 band-stop filter

222-265

`V4L2_CID_ZOOM_ABSOLUTE`는 objective lens focal length를 양의 integer absolute 값으로 지정하며 단위는 driver-specific입니다. `V4L2_CID_ZOOM_RELATIVE`는 현재 값에 상대적인 write-only control로, 양수는 telephoto, 음수는 wide-angle 방향입니다.

`V4L2_CID_ZOOM_CONTINUOUS`는 physical limit에 도달하거나 명시적인 stop 요청이 올 때까지 지정 속도로 lens group을 움직입니다. 양수는 telephoto, 0은 정지, 음수는 wide-angle이며 속도 단위는 driver-specific입니다.

`V4L2_CID_IRIS_ABSOLUTE`는 aperture를 지정 값으로 설정합니다. 큰 값은 iris를 더 열고 작은 값은 닫습니다. `V4L2_CID_IRIS_RELATIVE`는 양수면 한 단계 열고 음수면 한 단계 닫는 write-only control입니다.

`V4L2_CID_PRIVACY`가 TRUE이면 camera가 image를 capture할 수 없게 합니다. Sensor mechanical obturation이나 firmware image processing이 일반적인 구현이지만 방법은 제한되지 않습니다. Privacy control 장치는 read access를 반드시 지원하고 write access는 선택적으로 지원할 수 있습니다.

`V4L2_CID_BAND_STOP_FILTER`는 camera sensor band-stop filter를 on/off하거나 강도를 지정합니다. 예를 들어 fluorescent light component를 제거하는 데 사용할 수 있습니다.

Lens·privacy control 방향
Control / 값의미
ZOOM_RELATIVE + / -Telephoto / wide-angle; write-only
ZOOM_CONTINUOUS + / 0 / -Telephoto 이동 / 정지 / wide-angle 이동
IRIS_ABSOLUTE 큰 값Aperture를 더 넓게 개방
IRIS_RELATIVE + / -한 단계 open / close; write-only
PRIVACY TRUEImage capture 차단
BAND_STOP_FILTERFilter on/off 또는 strength

값 부호와 access semantics를 정리합니다.

``V4L2_CID_ZOOM_ABSOLUTE (integer)``
    Specify the objective lens focal length as an absolute value. The
    zoom unit is driver-specific and its value should be a positive
    integer.

``V4L2_CID_ZOOM_RELATIVE (integer)``
    Specify the objective lens focal length relatively to the current
    value. Positive values move the zoom lens group towards the
    telephoto direction, negative values towards the wide-angle
    direction. The zoom unit is driver-specific. This is a write-only
    control.

``V4L2_CID_ZOOM_CONTINUOUS (integer)``
    Move the objective lens group at the specified speed until it
    reaches physical device limits or until an explicit request to stop
    the movement. A positive value moves the zoom lens group towards the
    telephoto direction. A value of zero stops the zoom lens group
    movement. A negative value moves the zoom lens group towards the
    wide-angle direction. The zoom speed unit is driver-specific.

``V4L2_CID_IRIS_ABSOLUTE (integer)``
    This control sets the camera's aperture to the specified value. The
    unit is undefined. Larger values open the iris wider, smaller values
    close it.

``V4L2_CID_IRIS_RELATIVE (integer)``
    This control modifies the camera's aperture by the specified amount.
    The unit is undefined. Positive values open the iris one step
    further, negative values close it one step further. This is a
    write-only control.

``V4L2_CID_PRIVACY (boolean)``
    Prevent video from being acquired by the camera. When this control
    is set to ``TRUE`` (1), no image can be captured by the camera.
    Common means to enforce privacy are mechanical obturation of the
    sensor and firmware image processing, but the device is not
    restricted to these methods. Devices that implement the privacy
    control must support read access and may support write access.

``V4L2_CID_BAND_STOP_FILTER (integer)``
    Switch the band-stop filter of a camera sensor on or off, or specify
    its strength. Such band-stop filters can be used, for example, to
    filter out the fluorescent light component.

Automatic·preset white balance

266-317

`V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE`는 white balance를 automatic, manual 또는 preset으로 설정합니다. Preset의 color temperature는 camera가 가장 정확한 color representation을 만들도록 주는 힌트이며 아래 값은 color temperature 증가 순서입니다.

White-balance preset
Control / 값의미
V4L2_WHITE_BALANCE_MANUALManual white balance
V4L2_WHITE_BALANCE_AUTOAutomatic adjustment
V4L2_WHITE_BALANCE_INCANDESCENTTungsten lighting; 색을 차갑게 보정; 약 2500~3500 K
V4L2_WHITE_BALANCE_FLUORESCENTFluorescent lighting; 약 4000~5000 K
V4L2_WHITE_BALANCE_FLUORESCENT_HFluorescent H lighting 보정
V4L2_WHITE_BALANCE_HORIZONHorizon daylight; 약 5000 K
V4L2_WHITE_BALANCE_DAYLIGHTClear-sky daylight; 약 5000~6500 K
V4L2_WHITE_BALANCE_FLASHFlash 보정, 색을 약간 따뜻하게; 약 5000~5500 K
V4L2_WHITE_BALANCE_CLOUDYModerately overcast sky; 약 6500~8000 K
V4L2_WHITE_BALANCE_SHADEShade 또는 heavily overcast sky; 약 9000~10000 K

Lighting 조건과 대략적인 color-temperature 범위입니다.

Preset white balance
Lighting type 또는 automatic mode 선택Preset color-temperature hint 적용Red/blue channel gain 조정Neutral object의 color cast 제거정확한 color representation 출력

Scene light의 color temperature를 camera color correction에 반영합니다.

.. _v4l2-auto-n-preset-white-balance:

``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE``
    (enum)

enum v4l2_auto_n_preset_white_balance -
    Sets white balance to automatic, manual or a preset. The presets
    determine color temperature of the light as a hint to the camera for
    white balance adjustments resulting in most accurate color
    representation. The following white balance presets are listed in
    order of increasing color temperature.

.. tabularcolumns:: |p{7.4cm}|p{10.1cm}|

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

    * - ``V4L2_WHITE_BALANCE_MANUAL``
      - Manual white balance.
    * - ``V4L2_WHITE_BALANCE_AUTO``
      - Automatic white balance adjustments.
    * - ``V4L2_WHITE_BALANCE_INCANDESCENT``
      - White balance setting for incandescent (tungsten) lighting. It
	generally cools down the colors and corresponds approximately to
	2500...3500 K color temperature range.
    * - ``V4L2_WHITE_BALANCE_FLUORESCENT``
      - White balance preset for fluorescent lighting. It corresponds
	approximately to 4000...5000 K color temperature.
    * - ``V4L2_WHITE_BALANCE_FLUORESCENT_H``
      - With this setting the camera will compensate for fluorescent H
	lighting.
    * - ``V4L2_WHITE_BALANCE_HORIZON``
      - White balance setting for horizon daylight. It corresponds
	approximately to 5000 K color temperature.
    * - ``V4L2_WHITE_BALANCE_DAYLIGHT``
      - White balance preset for daylight (with clear sky). It corresponds
	approximately to 5000...6500 K color temperature.
    * - ``V4L2_WHITE_BALANCE_FLASH``
      - With this setting the camera will compensate for the flash light.
	It slightly warms up the colors and corresponds roughly to
	5000...5500 K color temperature.
    * - ``V4L2_WHITE_BALANCE_CLOUDY``
      - White balance preset for moderately overcast sky. This option
	corresponds approximately to 6500...8000 K color temperature
	range.
    * - ``V4L2_WHITE_BALANCE_SHADE``
      - White balance preset for shade or heavily overcast sky. It
	corresponds approximately to 9000...10000 K color temperature.


WDR, stabilization과 ISO sensitivity

318-366

`V4L2_CID_WIDE_DYNAMIC_RANGE`는 scene에 매우 어두운 영역과 매우 밝은 영역이 함께 있을 때 clear image를 얻는 WDR 기능을 on/off합니다. Camera에서는 exposure time이 다른 연속 frame 두 개를 결합하는 방식이 흔합니다.

`V4L2_CID_IMAGE_STABILIZATION`은 image stabilization을 on/off합니다.

`V4L2_CID_ISO_SENSITIVITY`는 ISO 12232 arithmetic scale에 따른 sensor의 light sensitivity를 지정합니다. Sensitivity가 두 배면 ISO 숫자도 두 배입니다. Control 값은 표준 ISO 값에 1000을 곱한 scale로 해석하며, 원문 예제의 값 800은 ISO 0.8을 뜻합니다. Driver는 보통 표준 ISO 일부만 지원합니다.

`V4L2_CID_ISO_SENSITIVITY_AUTO`가 MANUAL이 아닌데 ISO_SENSITIVITY를 설정한 효과는 정의되지 않으며 driver가 무시해야 합니다.

ISO sensitivity mode
Control / 값의미
V4L2_CID_ISO_SENSITIVITY_MANUALManual ISO sensitivity
V4L2_CID_ISO_SENSITIVITY_AUTOAutomatic ISO adjustment

Manual 값과 automatic adjustment를 선택합니다.

Low-light 기능
Control / 값의미
WIDE_DYNAMIC_RANGE서로 다른 exposure frame을 결합해 밝기 범위 확장
IMAGE_STABILIZATIONCamera shake 보정
ISO_SENSITIVITY빛 민감도; 높은 값은 보통 noise 증가

Dynamic range, motion blur와 noise trade-off에 관여합니다.

.. _v4l2-wide-dynamic-range:

``V4L2_CID_WIDE_DYNAMIC_RANGE (boolean)``
    Enables or disables the camera's wide dynamic range feature. This
    feature allows to obtain clear images in situations where intensity
    of the illumination varies significantly throughout the scene, i.e.
    there are simultaneously very dark and very bright areas. It is most
    commonly realized in cameras by combining two subsequent frames with
    different exposure times.  [#f1]_

.. _v4l2-image-stabilization:

``V4L2_CID_IMAGE_STABILIZATION (boolean)``
    Enables or disables image stabilization.

``V4L2_CID_ISO_SENSITIVITY (integer menu)``
    Determines ISO equivalent of an image sensor indicating the sensor's
    sensitivity to light. The numbers are expressed in arithmetic scale,
    as per :ref:`iso12232` standard, where doubling the sensor
    sensitivity is represented by doubling the numerical ISO value.
    Applications should interpret the values as standard ISO values
    multiplied by 1000, e.g. control value 800 stands for ISO 0.8.
    Drivers will usually support only a subset of standard ISO values.
    The effect of setting this control while the
    ``V4L2_CID_ISO_SENSITIVITY_AUTO`` control is set to a value other
    than ``V4L2_CID_ISO_SENSITIVITY_MANUAL`` is undefined, drivers
    should ignore such requests.

.. _v4l2-iso-sensitivity-auto-type:

``V4L2_CID_ISO_SENSITIVITY_AUTO``
    (enum)

enum v4l2_iso_sensitivity_type -
    Enables or disables automatic ISO sensitivity adjustments.



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

    * - ``V4L2_CID_ISO_SENSITIVITY_MANUAL``
      - Manual ISO sensitivity.
    * - ``V4L2_CID_ISO_SENSITIVITY_AUTO``
      - Automatic ISO sensitivity adjustments.


Scene program

367-466

`V4L2_CID_SCENE_MODE`는 일반적인 촬영 scene에 최적화된 camera automatic program을 선택합니다. Camera는 exposure, aperture, focus, light metering, white balance, equivalent sensitivity를 결정하며 관련 control은 scene mode의 영향을 받습니다. 각 mode의 정확한 동작은 camera specification에 따릅니다.

Scene mode를 사용하지 않으면 `V4L2_SCENE_MODE_NONE`으로 설정해야 다른 관련 control에 접근할 수 있습니다.

Scene mode
Control / 값의미
V4L2_SCENE_MODE_NONEScene mode 비활성
V4L2_SCENE_MODE_BACKLIGHT피사체 뒤의 빛으로 생긴 어두운 shadow를 보상하고 flash를 자동으로 켤 수 있음
V4L2_SCENE_MODE_BEACH_SNOW밝은 흰 scene을 약간 overexpose하고 snow의 bluish cast를 white balance로 보정
V4L2_SCENE_MODE_CANDLELIGHTISO를 높이고 shutter를 늦추며 분위기 보존을 위해 flash 비활성
V4L2_SCENE_MODE_DAWN_DUSKDusk 전후 low natural light color 보존; flash off, infinity focus, saturation 증가, 느린 shutter 가능
V4L2_SCENE_MODE_FALL_COLORSSaturation과 white balance를 조정해 autumn red/yellow 강화
V4L2_SCENE_MODE_FIREWORKSFirework burst를 긴 exposure로 capture하고 stabilization 사용 가능
V4L2_SCENE_MODE_LANDSCAPE작은 aperture로 깊은 depth of field, 긴 exposure, infinity focus
V4L2_SCENE_MODE_NIGHTDark detail을 보존하며 medium/high ISO, 긴 exposure, flash off; noise·blur 가능
V4L2_SCENE_MODE_PARTY_INDOORIndoor background light와 flash를 함께 고려해 ISO와 exposure 조정
V4L2_SCENE_MODE_PORTRAIT얕은 depth of field, face focus, skin-tone hue, 낮은 flash intensity
V4L2_SCENE_MODE_SPORTS높은 ISO와 빠른 shutter로 motion freeze; noise 증가 가능
V4L2_SCENE_MODE_SUNSETSunset/sunrise의 깊은 hue를 보존하고 saturation 증가
V4L2_SCENE_MODE_TEXTContrast·sharpness 강화, 보통 B/W, close-up focus와 lens-distortion correction 가능

각 program이 우선하는 촬영 조건과 조정입니다.

Scene program 영향
Scene mode 선택Light metering과 exposure 조정Aperture와 shutter 선택Focus range/point 선택White balance와 ISO 조정Scene-specific image 결과

하나의 scene 선택이 여러 3A parameter를 함께 조정합니다.

.. _v4l2-scene-mode:

``V4L2_CID_SCENE_MODE``
    (enum)

enum v4l2_scene_mode -
    This control allows to select scene programs as the camera automatic
    modes optimized for common shooting scenes. Within these modes the
    camera determines best exposure, aperture, focusing, light metering,
    white balance and equivalent sensitivity. The controls of those
    parameters are influenced by the scene mode control. An exact
    behavior in each mode is subject to the camera specification.

    When the scene mode feature is not used, this control should be set
    to ``V4L2_SCENE_MODE_NONE`` to make sure the other possibly related
    controls are accessible. The following scene programs are defined:

.. raw:: latex

    \small

.. tabularcolumns:: |p{5.9cm}|p{11.6cm}|

.. cssclass:: longtable

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

    * - ``V4L2_SCENE_MODE_NONE``
      - The scene mode feature is disabled.
    * - ``V4L2_SCENE_MODE_BACKLIGHT``
      - Backlight. Compensates for dark shadows when light is coming from
	behind a subject, also by automatically turning on the flash.
    * - ``V4L2_SCENE_MODE_BEACH_SNOW``
      - Beach and snow. This mode compensates for all-white or bright
	scenes, which tend to look gray and low contrast, when camera's
	automatic exposure is based on an average scene brightness. To
	compensate, this mode automatically slightly overexposes the
	frames. The white balance may also be adjusted to compensate for
	the fact that reflected snow looks bluish rather than white.
    * - ``V4L2_SCENE_MODE_CANDLELIGHT``
      - Candle light. The camera generally raises the ISO sensitivity and
	lowers the shutter speed. This mode compensates for relatively
	close subject in the scene. The flash is disabled in order to
	preserve the ambiance of the light.
    * - ``V4L2_SCENE_MODE_DAWN_DUSK``
      - Dawn and dusk. Preserves the colors seen in low natural light
	before dusk and after down. The camera may turn off the flash, and
	automatically focus at infinity. It will usually boost saturation
	and lower the shutter speed.
    * - ``V4L2_SCENE_MODE_FALL_COLORS``
      - Fall colors. Increases saturation and adjusts white balance for
	color enhancement. Pictures of autumn leaves get saturated reds
	and yellows.
    * - ``V4L2_SCENE_MODE_FIREWORKS``
      - Fireworks. Long exposure times are used to capture the expanding
	burst of light from a firework. The camera may invoke image
	stabilization.
    * - ``V4L2_SCENE_MODE_LANDSCAPE``
      - Landscape. The camera may choose a small aperture to provide deep
	depth of field and long exposure duration to help capture detail
	in dim light conditions. The focus is fixed at infinity. Suitable
	for distant and wide scenery.
    * - ``V4L2_SCENE_MODE_NIGHT``
      - Night, also known as Night Landscape. Designed for low light
	conditions, it preserves detail in the dark areas without blowing
	out bright objects. The camera generally sets itself to a
	medium-to-high ISO sensitivity, with a relatively long exposure
	time, and turns flash off. As such, there will be increased image
	noise and the possibility of blurred image.
    * - ``V4L2_SCENE_MODE_PARTY_INDOOR``
      - Party and indoor. Designed to capture indoor scenes that are lit
	by indoor background lighting as well as the flash. The camera
	usually increases ISO sensitivity, and adjusts exposure for the
	low light conditions.
    * - ``V4L2_SCENE_MODE_PORTRAIT``
      - Portrait. The camera adjusts the aperture so that the depth of
	field is reduced, which helps to isolate the subject against a
	smooth background. Most cameras recognize the presence of faces in
	the scene and focus on them. The color hue is adjusted to enhance
	skin tones. The intensity of the flash is often reduced.
    * - ``V4L2_SCENE_MODE_SPORTS``
      - Sports. Significantly increases ISO and uses a fast shutter speed
	to freeze motion of rapidly-moving subjects. Increased image noise
	may be seen in this mode.
    * - ``V4L2_SCENE_MODE_SUNSET``
      - Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps
	up the saturation.
    * - ``V4L2_SCENE_MODE_TEXT``
      - Text. It applies extra contrast and sharpness, it is typically a
	black-and-white mode optimized for readability. Automatic focus
	may be switched to close-up mode and this setting may also involve
	some lens-distortion correction.

.. raw:: latex

    \normalsize

3A lock과 pan/tilt speed

467-508

`V4L2_CID_3A_LOCK`은 automatic focus, exposure, white balance를 lock/unlock하는 bitmask입니다. 각 lock bit를 1로 설정하면 해당 automatic adjustment만 독립적으로 pause되고 bit를 지울 때까지 현재 설정을 유지합니다.

해당 algorithm이 활성화되지 않았으면 driver는 lock 요청을 오류 없이 무시해야 합니다. 예를 들어 `V4L2_CID_AUTO_WHITE_BALANCE`가 FALSE일 때 `V4L2_LOCK_WHITE_BALANCE`를 설정하는 경우입니다. Exposure, white balance 또는 focus control이 3A_LOCK 값을 바꿀 수도 있습니다.

3A lock bit
Control / 값의미
V4L2_LOCK_EXPOSUREAutomatic exposure adjustment lock
V4L2_LOCK_WHITE_BALANCEAutomatic white-balance adjustment lock
V4L2_LOCK_FOCUSAutomatic focus lock

자동 알고리즘별 독립 lock입니다.

`V4L2_CID_PAN_SPEED`는 수평 회전 속도를 지정합니다. 양수는 오른쪽, 음수는 왼쪽, 0은 진행 중 motion을 멈추며 motion이 없으면 효과가 없습니다. 단위는 정의되지 않습니다.

`V4L2_CID_TILT_SPEED`는 수직 회전 속도를 지정합니다. 양수는 위, 음수는 아래, 0은 진행 중 motion을 멈추며 motion이 없으면 효과가 없습니다.

Continuous camera motion
Control / 값의미
PAN_SPEED + / - / 0오른쪽 / 왼쪽 / 정지
TILT_SPEED + / - / 0위 / 아래 / 정지

속도 값 부호가 방향과 정지를 결정합니다.

``V4L2_CID_3A_LOCK (bitmask)``
    This control locks or unlocks the automatic focus, exposure and
    white balance. The automatic adjustments can be paused independently
    by setting the corresponding lock bit to 1. The camera then retains
    the settings until the lock bit is cleared. The following lock bits
    are defined:

    When a given algorithm is not enabled, drivers should ignore
    requests to lock it and should return no error. An example might be
    an application setting bit ``V4L2_LOCK_WHITE_BALANCE`` when the
    ``V4L2_CID_AUTO_WHITE_BALANCE`` control is set to ``FALSE``. The
    value of this control may be changed by exposure, white balance or
    focus controls.



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

    * - ``V4L2_LOCK_EXPOSURE``
      - Automatic exposure adjustments lock.
    * - ``V4L2_LOCK_WHITE_BALANCE``
      - Automatic white balance adjustments lock.
    * - ``V4L2_LOCK_FOCUS``
      - Automatic focus lock.



``V4L2_CID_PAN_SPEED (integer)``
    This control turns the camera horizontally at the specific speed.
    The unit is undefined. A positive value moves the camera to the
    right (clockwise when viewed from above), a negative value to the
    left. A value of zero stops the motion if one is in progress and has
    no effect otherwise.

``V4L2_CID_TILT_SPEED (integer)``
    This control turns the camera vertically at the specified speed. The
    unit is undefined. A positive value moves the camera up, a negative
    value down. A value of zero stops the motion if one is in progress
    and has no effect otherwise.

Device 기준 camera orientation

509-540

`V4L2_CID_CAMERA_ORIENTATION`은 camera가 설치된 device에서의 mounting position을 보고하는 read-only menu control입니다. 값은 constant이며 software가 바꿀 수 없습니다.

이 control은 phone, laptop, portable device처럼 intended usage orientation이 명확한 장치에서 특히 의미가 있습니다. 위치는 해당 device의 사용 방향을 기준으로 표현합니다.

Camera orientation
Control / 값의미
V4L2_CAMERA_ORIENTATION_FRONTPhone/tablet/laptop의 user-facing side
V4L2_CAMERA_ORIENTATION_BACKFront의 반대쪽인 back-facing side
V4L2_CAMERA_ORIENTATION_EXTERNAL직접 부착되지 않았거나 자유롭게 움직이는 webcam/digital camera

Sensor가 device에 부착된 위치와 이동 가능성을 나타냅니다.

Orientation 해석
Camera가 device에 직접 부착됐는지 확인User-facing side면 FRONT반대쪽이면 BACK자유 이동 가능하면 EXTERNAL

Device usage orientation을 기준으로 camera 위치를 분류합니다.

.. _v4l2-camera-sensor-orientation:

``V4L2_CID_CAMERA_ORIENTATION (menu)``
    This read-only control describes the camera orientation by reporting its
    mounting position on the device where the camera is installed. The control
    value is constant and not modifiable by software. This control is
    particularly meaningful for devices which have a well defined orientation,
    such as phones, laptops and portable devices since the control is expressed
    as a position relative to the device's intended usage orientation. For
    example, a camera installed on the user-facing side of a phone, a tablet or
    a laptop device is said to be have ``V4L2_CAMERA_ORIENTATION_FRONT``
    orientation, while a camera installed on the opposite side of the front one
    is said to be have ``V4L2_CAMERA_ORIENTATION_BACK`` orientation. Camera
    sensors not directly attached to the device, or attached in a way that
    allows them to move freely, such as webcams and digital cameras, are said to
    have the ``V4L2_CAMERA_ORIENTATION_EXTERNAL`` orientation.


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

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

    * - ``V4L2_CAMERA_ORIENTATION_FRONT``
      - The camera is oriented towards the user facing side of the device.
    * - ``V4L2_CAMERA_ORIENTATION_BACK``
      - The camera is oriented towards the back facing side of the device.
    * - ``V4L2_CAMERA_ORIENTATION_EXTERNAL``
      - The camera is not directly attached to the device and is freely movable.

Sensor mounting rotation과 image 보정

541-667

`V4L2_CID_CAMERA_SENSOR_ROTATION`은 sensor mounting rotation을 보상하기 위해 memory에 capture된 image에 적용해야 하는 counter-clockwise rotation correction을 degree로 보고하는 read-only control입니다.

정확한 sensor mounting rotation 정의는 device-tree binding `video-interfaces.txt`의 `rotation` property 설명을 참조합니다. 원문은 사용자의 앞에서 왼쪽에서 오른쪽으로 헤엄치는 상어 scene을 예로 듭니다.

원본 scene 좌표
Control / 값의미
OriginImage의 왼쪽 위 (0,0)
X-axis오른쪽으로 증가
Y-axis아래쪽으로 증가
Example subject상어가 화면에서 왼쪽→오른쪽으로 이동

원문의 ASCII 좌표와 상어 방향을 구조화했습니다.

Webcam 예에서 laptop camera module은 user-facing screen casing에 설치되고 landscape mode(width > height)로 표시합니다. Lens optical inversion을 보상하려 sensor를 upside-down으로 장착하는 일반적인 경우에는 rotation 값이 0이며 추가 보정이 필요 없습니다.

Webcam sensor가 upside-down으로 장착되지 않았다면 memory에 capture된 image가 180도 돌아가므로 `V4L2_CID_CAMERA_SENSOR_ROTATION`은 180을 보고합니다. User screen에 올바르게 표시하려 software가 180도 보정해야 합니다.

Webcam rotation 보정
User-facing laptop cameraSensor upside-down 장착이면 optical inversion 상쇄Rotation control = 0°그렇지 않으면 captured image가 180° 회전Rotation control = 180°Software가 180° correction 적용상어가 왼쪽→오른쪽인 정상 landscape image

Landscape output에서 mounting 방식에 따른 correction입니다.

Phone 예에서는 user 반대쪽 back camera를 portrait mode(height > width)로 표시합니다. Sensor pixel array의 긴 변을 device 긴 변에 맞추고 lens optical inversion 보상을 위해 upside-down으로 장착하는 것이 일반적입니다.

이 구성에서 memory에 capture된 image는 회전되어 있고 rotation control은 90도를 보고합니다. Device screen의 portrait mode에 올바르게 표시하려 counter-clockwise 90도 correction을 적용해야 합니다.

Phone back-camera rotation 보정
Back-facing phone cameraSensor 긴 변을 device 긴 변에 정렬Memory image가 90° 회전된 상태Rotation control = 90°Counter-clockwise 90° correction정상 portrait image 표시

Sensor landscape 배열을 portrait display에 맞춥니다.

Rotation 예제 요약
Control / 값의미
Webcam, upside-down mountedControl 0°; correction 없음
Webcam, not upside-downCaptured image 180°; software 180° correction
Phone back cameraCaptured image 90°; CCW 90° correction

원문의 모든 ASCII frame이 뜻하는 before/after 상태입니다.

WDR control은 미래에 더 많은 option이 필요하면 boolean에서 menu control로 바뀔 수 있습니다.

.. _v4l2-camera-sensor-rotation:

``V4L2_CID_CAMERA_SENSOR_ROTATION (integer)``
    This read-only control describes the rotation correction in degrees in the
    counter-clockwise direction to be applied to the captured images once
    captured to memory to compensate for the camera sensor mounting rotation.

    For a precise definition of the sensor mounting rotation refer to the
    extensive description of the 'rotation' properties in the device tree
    bindings file 'video-interfaces.txt'.

    A few examples are below reported, using a shark swimming from left to
    right in front of the user as the example scene to capture. ::

                 0               X-axis
               0 +------------------------------------->
                 !
                 !
                 !
                 !           |\____)\___
                 !           ) _____  __`<
                 !           |/     )/
                 !
                 !
                 !
                 V
               Y-axis

    Example one - Webcam

    Assuming you can bring your laptop with you while swimming with sharks,
    the camera module of the laptop is installed on the user facing part of a
    laptop screen casing, and is typically used for video calls. The captured
    images are meant to be displayed in landscape mode (width > height) on the
    laptop screen.

    The camera is typically mounted upside-down to compensate the lens optical
    inversion effect. In this case the value of the
    V4L2_CID_CAMERA_SENSOR_ROTATION control is 0, no rotation is required to
    display images correctly to the user.

    If the camera sensor is not mounted upside-down it is required to compensate
    the lens optical inversion effect and the value of the
    V4L2_CID_CAMERA_SENSOR_ROTATION control is 180 degrees, as images will
    result rotated when captured to memory. ::

                 +--------------------------------------+
                 !                                      !
                 !                                      !
                 !                                      !
                 !              __/(_____/|             !
                 !            >.___  ____ (             !
                 !                 \(    \|             !
                 !                                      !
                 !                                      !
                 !                                      !
                 +--------------------------------------+

    A software rotation correction of 180 degrees has to be applied to correctly
    display the image on the user screen. ::

                 +--------------------------------------+
                 !                                      !
                 !                                      !
                 !                                      !
                 !             |\____)\___              !
                 !             ) _____  __`<            !
                 !             |/     )/                !
                 !                                      !
                 !                                      !
                 !                                      !
                 +--------------------------------------+

    Example two - Phone camera

    It is more handy to go and swim with sharks with only your mobile phone
    with you and take pictures with the camera that is installed on the back
    side of the device, facing away from the user. The captured images are meant
    to be displayed in portrait mode (height > width) to match the device screen
    orientation and the device usage orientation used when taking the picture.

    The camera sensor is typically mounted with its pixel array longer side
    aligned to the device longer side, upside-down mounted to compensate for
    the lens optical inversion effect.

    The images once captured to memory will be rotated and the value of the
    V4L2_CID_CAMERA_SENSOR_ROTATION will report a 90 degree rotation. ::


                 +-------------------------------------+
                 |                 _ _                 |
                 |                \   /                |
                 |                 | |                 |
                 |                 | |                 |
                 |                 |  >                |
                 |                <  |                 |
                 |                 | |                 |
                 |                   .                 |
                 |                  V                  |
                 +-------------------------------------+

    A correction of 90 degrees in counter-clockwise direction has to be
    applied to correctly display the image in portrait mode on the device
    screen. ::

                          +--------------------+
                          |                    |
                          |                    |
                          |                    |
                          |                    |
                          |                    |
                          |                    |
                          |   |\____)\___      |
                          |   ) _____  __`<    |
                          |   |/     )/        |
                          |                    |
                          |                    |
                          |                    |
                          |                    |
                          |                    |
                          +--------------------+


.. [#f1]
   This control may be changed to a menu control in the future, if more
   options are required.

Sensor HDR mode

668-674

`V4L2_CID_HDR_SENSOR_MODE`는 sensor HDR mode를 변경하는 menu control입니다. HDR image는 같은 scene을 서로 다른 exposure period로 두 번 capture한 뒤 병합하여 만듭니다. HDR mode는 sensor 내부에서 두 capture를 병합하는 방식을 나타냅니다.

지원 mode가 sensor마다 다르므로 이 control의 menu item은 표준화되지 않으며 programmer가 정의합니다.

Sensor HDR capture
같은 scene의 짧은 exposure capture같은 scene의 긴 exposure captureV4L2_CID_HDR_SENSOR_MODE 방식 선택Sensor 내부 mergeHDR image 출력

서로 다른 exposure를 sensor-specific 방식으로 합칩니다.

``V4L2_CID_HDR_SENSOR_MODE (menu)``
    Change the sensor HDR mode. A HDR picture is obtained by merging two
    captures of the same scene using two different exposure periods. HDR mode
    describes the way these two captures are merged in the sensor.

    As modes differ for each sensor, menu items are not standardized by this
    control and are left to the programmer.