Part 2. Device Module Interface (DMI)
Control Classes
On this page...
CaptureMode
- Frame captures
-
The CaptureMode represents a sequence of captures of frames.
For each frame that is captured, a frame setting is transferred over the DMI interface. The control class is a structure of register settings that signal to the sensor the requirements of the CaptureMode for the specific frame.
For example, if a CaptureMode requires a high-resolution frame followed by 4 video frames, there will be two control classes sent to the sensor.
- The first control class will be sent before the still image is captured and will indicate that a full resolution frame should be captured with a specific exposure setting, with a specific focus setting, etc.
- The second control class will be sent indicating that a video sequence should be captured, the number of frames in the sequence, digital zoom setting, etc. The control registers structure is mapped onto a 16-bit memory.
There are two types of operations supported by the control register configuration:
- Intelligent Sensor Mode: Sensor has the ability to perform autofocus and autoexposure independently of the host processor.
- Simple Sensor Mode: Sensor has no image signal processor and relies on the host for controlling exposure and focus settings.
The Sensor module has a set of registers that enable the host to identify the capabilities of the sensor. These include whether the sensor is capable of auto focus and exposure.
Control Registers Transferred to Sensor
SensorMode
The SensorMode is determined by which registers are used to control the sensor. For example if the sensor has indicated that it can operate in auto exposure mode, the registers are used to configure the auto exposure setting. For sensors that cannot compute the auto-exposure, the shutter speed register should be used.
- Address 0x0001 unsigned short resolution:
- resolution = 0 resolution set using proprietary sensor settings
- resolution = 1 highest possible still
- resolution = 2 highest possible video
- resolution = 3 highest possible spatial resolution at highest frame rate
- resolution = 4 highest possible spatial resolution for depth device
- Address 0x0002 unsigned short frame_rate:
- Integer value indicating frames per second, minimum value of 1 fps.
- Address 0x0003 unsigned short buffer:
- buffer = 0 indicates continuous video mode
- buffer = value, where value indicates the number of frames to be captured.
- Note: If the value is greaterthan the maximum value then, the buffer is filled to the maximum and no further frames are captured.
- Address 0x0004 unsigned short focus:
- focus = 0 indicates autofocus
- focus = 1 indicates near < 1m
- focus = 2 indicates medium 1 – 2m
- focus = 3 indicates far > 2m.
- Note: If the sensor has no control over focus this field is ignored.
- Address 0x0005 short exposure:
- Exposure value relative to auto exposure reading. -1, 0 or 1 indicates same as autoexposure, + value is the multiplication factor applied to increase exposure time, - value is the division factor to reduce exposure time.
- For example, 2 means that exposure is doubled, -2 indicates exposure is halved.
- Address 0x0006 unsigned short zoom:
- Zoom factor applied to crop the image.
- 0 or 1 indicates no zoom.
- 2 indicates every second pixel is skipped (i.e. ¼ resolution),
- 3 indicates one in three pixels is read out (1/9 resolution) etc.
- Address 0x0007 short pan_x:
- number of pixels of center for which the zoom is applied. For example when zoom = 2 if panX = 0 the zoom window is in the center of the sensor.
- If panX = – 8 the center point is moved 8 pixels to the left of center of the sensor.
- Address 0x0008 short pan_y:
- Same as pan_x except for vertical axis.
- Address 0x0009 unsigned sensor_type:
- sensor_type = 0 Bayer RGB sensor
- sensor_type = 1 IR sensor
- sensor_type = 2 RGB IR sensor
- sensor_type = 3 Stereo RGB sensor
- sensor_type = 4 Stereo IR sensor
- sensor_type = 5 Stereo RGBIR sensor
- sensor_type = 6 Depth
The following addresses are used by the host processor where the host processor is controlling focus or exposure.
- Address 0x0009 unsigned exposure_time:
- Time in microseconds for exposure time.
- Address 0x000A unsigned aperture_setting:
- 10x the aperture setting. For example, a value of 56 means an aperture of 7.6.
- This option may not be available if the lens has a fixed aperture.
- Address 0x000B int lens_actuator_movement;
- Movement of actuator proportional to value.
Control Registers Received by Host
Registering sensor capabilities: The following registers indicate the maximum still image capability.
- Address 0x0001 unsigned short still_vertical_resolution:
- Number of pixels high.
- Address 0x0002 unsigned short still_horizontal_resolution:
- Number of pixels wide.
- Address 0x0003 unsigned still_sensor_type:
- sensor_type = 0 Bayer RGB sensor
- sensor_type = 1 IR sensor
- sensor_type = 2 RGB IR sensor
- sensor_type = 3 Stereo RGB sensor
- sensor_type = 4 Stereo IR sensor
- sensor_type = 5 Stereo RGBIR sensor
- sensor_type = 6 Depth
- Address 0x0004 int still_image_frame_rate:
- Number of frames per second the sensor can capture at full resolution.
- Address 0x0005 int still_image_buffer_size:
- Number of frames that can be stored in a buffer on the sensor.
The following registers describe the capability of the device when operated in a video mode.
- Address 0x0006 unsigned short video_vertical_resolution:
- Number of pixels high.
- Address 0x0007 unsigned short video_horizontal_resolution:
- Number of pixels wide.
- Address 0x0008 unsigned video_sensor_type:
- sensor_type = 0 Bayer RGB sensor
- sensor_type = 1 IR sensor
- sensor_type = 2 RGB IR sensor
- sensor_type = 3 Stereo RGB sensor
- sensor_type = 4 Stereo IR sensor
- sensor_type = 5 Stereo RGBIR sensor
- sensor_type = 6 Depth
- Address 0x0009 int video_frame_rate:
- Number of frames per second the sensor can capture in video mode.
The following registers describe the capability of the device when operated in high speed mode.
- Address 0x000A unsigned short high_speed_vertical_resolution:
- Number of pixels high.
- Address 0x000B unsigned short high_speed_horizontal_resolution:
- Number of pixels wide.
- Address 0x000C unsigned high_speed_sensor_type:
- sensor_type = 0 Bayer RGB sensor
- sensor_type = 1 IR sensor
- sensor_type = 2 RGB IR sensor
- sensor_type = 3 Stereo RGB sensor
- sensor_type = 4 Stereo IR sensor
- sensor_type = 5 Stereo RGBIR sensor
- sensor_type = 6 Depth
- Address 0x000D int high_speed_frame_rate:
- Number of frames per second the sensor can capture in video mode.
- Address 0x000E unsigned short focus:
- focus = 0 indicates autofocus
- focus = 1 indicates near < 1m
- focus = 2 indicates medium 1 – 2m
- focus = 3 indicates far > 2m
- If the sensor has no control over focus this field is ignored.
- Address 0x000F short exposure_modes:
- Bit 0 – autoexposure
- Bit 1 – settable exposure time
- Bit 2 – settable aperture
- Address 0x0010 unsigned short zoom:
- Bit 0 – 2x zoom
- Bit 1 – 3x zoom
- Bit 2 – 4x zoom
- 2 indicates every second pixel is skipped (i.e., ¼ resolution); 3 indicates one in three pixels is read out (1/9 resolution), etc.
- Address 0x0011 short pan_x:
-
Maximum number of pixels off center for which the zoom is applied.
- For example, when zoom = 2 if panX = 0, the zoom window is in the center of the sensor.
- If panX = – 8, the center point is moved 8 pixels to the left of center of the sensor.
- Address 0x0012 short pan_y:
- Same as pan_x except for the vertical axis.
Sensor Profile from the sensor module – ideally a contribution from either Sony or Nikon.
- There are already device profiles defined within the DNG specification.
- These characterize the sensors behavior with specific illuminants, lens shading, black level, etc.
- Using this information, the host can configure an image signal processor to reconstruct the image based on the measured device profile.
-
DNG defines several formats for carrying this data. These include:
- Using TIFF-EP or EXIF metadata tags
- Using the IPTC metadata tag (33723)
- Using the XMP metadata tag (700)
- It would be useful to get feedback as to which are most suitable for this application. [[TBD]]
Time Stamp Registers
-
The following registers provide a time stamp for the module.
- The module shall keep an internal clock running while it is powered on.
- This clock shall increment automatically.
- When the following registers are written to the time stamp within the module and set to the values of the register, it then continues to increment based on the internal clock of the sensor.
-
- Address 0x0013 long Year
- Address 0x0017 int Month
- Address 0x0018 int Day
- Address 0x00A0 short Hour
- Address 0x00A1 short Minute
- Address 0x00A2 short Second
- Address 0x00A3 int milliseconds
- Address 0x00A5 int microseconds