# SoftBank Robotics documentation What's new in NAOqi 2.8?

# 2D Cameras

See also

V18 | V18A

## 2D Cameras

Two identical video cameras are located in the forehead. They provide a resolution up to 2560*1920 at 1 frames per second (fps) or 640*480 at 30 fps.

### Location

See the URDF files.

Name
CameraTop
CameraBottom

### Specifications

Camera | Model | OV5640
Type | System-on-a-chip (SoC) CMOS image sensor
Imaging Array | Resolution | 5Mp
Optical format | 1/4 inch
Active Pixels (HxV) | 2592x1944
Sensitivity | Pixel size | 1.4µm*1.4µm
Dynamic range | `68db@8x gain`
Signal/Noise ratio (max) | 36dB (maximum)
Responsivity | 600 mV/Lux-sec
Output | Camera output | `640*480@30fps or 2560*1920@1fps`
Data Format | YUV and RGB
Shutter type | Rolling shutter
View | Field of view | 67.4°DFOV (56.3°HFOV,43.7°VFOV)
Focus type | Auto focus

### Parameters

The camera has a list of parameters which can be modified.

#### Model

Camera Model has the following value:

Parameter ID Name | ID Value | Description
--- | --- | ---
AL::kOV5640 | 3 | HD Camera

#### Supported parameters

##### Software parameters

Parameter | Min value | Max value | Default value | Camera ID name | ID value
--- | --- | --- | --- | --- | ---
Keep Alive | 0 | 1 | 0 | kCameraKeepAliveID | 35

##### Hardware parameters

Camera ID name | ID Value | Parameter | Min Value | Max Value | Default Value | Remarks
--- | --- | --- | --- | --- | --- | ---
kCameraBrightnessID | 0 | Brightness | -255 | 255 | 0 |
kCameraContrastID | 1 | Contrast | 0 | 255 | 32 |
kCameraSaturationID | 2 | Saturation | 0 | 255 | 64 |
kCameraHueID | 3 | Hue | -180 | 180 | 0 |
kCameraGainID | 6 | Gain | 0 | 1023 | 16 | Read only if auto exposure enabled
kCameraHFlipID | 7 | Horizontal Flip | 0 | 1 | 0 |
kCameraVFlipID | 8 | Vertical Flip | 0 | 1 | 0 |
kCameraAutoExpositionID | 11 | Auto Exposition | 0 | 1 | 1 | 0: disabled 1: enabled
kCameraAutoWhiteBalanceID | 12 | Auto White Balance | 0 | 1 | 1 | 0: disabled 1: enabled
kCameraExposureID | 17 | Exposure | 0 | 65535 | 32 | Read only if auto exposure enabled
kCameraSharpnessID | 24 | Sharpness | 0 | 9 | 4 |
kCameraAverageLuminanceID | 39 | Average Luminance | 0 | 255 | NA | Read only
kCameraAutoFocusID | 40 | Auto Focus | 0 | 1 | 0 | 0: disabled 1: enabled
kCameraFocusID | 43 | Manual Focus | 0 | 250 | 0 | This parameter is available only when Auto Focus is disabled Parameter’s step is 25 Use range [0-225] to control the focus Setting the value 250 will trigger a one-shot auto focus

#### Supported colorspaces

A color space is a model describing the way to represent color as an ordered list of numbers. For example you can represent the color of each pixel of your screen as a list of three elements R, G and B. Which are respectively the value of Red, Green, and Blue usually stored in an byte (range from 0 to 255).

Setting the color space allows you to set the image buffer encoding in `AL::ALImage`.

Color space parameter for 2D camera can have the following values:

Parameter ID Name | ID Value | Number of layers | Number of channels | Description
--- | --- | --- | --- | ---
AL::kYuvColorSpace | 0 | 1 | 1 | Buffer only contains the Y (luma component) equivalent to one unsigned char
AL::kyUvColorSpace | 1 | 1 | 1 | Buffer only contains the U (Chrominance component) equivalent to one unsigned char
AL::kyuVColorSpace | 2 | 1 | 1 | Buffer only contains the V (Chrominance component) equivalent to one unsigned char
AL::kRgbColorSpace | 3 | 1 | 1 | Buffer only contains the R (Red component) equivalent to one unsigned char
AL::krGbColorSpace | 4 | 1 | 1 | Buffer only contains the G (Green component) equivalent to one unsigned char
AL::krgBColorSpace | 5 | 1 | 1 | Buffer only contains the B (Blue component) equivalent to one unsigned char
AL::kHsyColorSpace | 6 | 1 | 1 | Buffer only contains the H (Hue component) equivalent to one unsigned char
AL::khSyColorSpace | 7 | 1 | 1 | Buffer only contains the S (Saturation component) equivalent to one unsigned char
AL::khsYColorSpace | 8 | 1 | 1 | Buffer only contains the Y (Brightness component) equivalent to one unsigned char
AL::kYUV422ColorSpace | 9 | 2 | 2 | Native format, 0xY’Y’VVYYUU equivalent to four unsigned char for two pixels. With Y luma for pixel n, Y’ luma for pixel n+1, and U and V are the average chrominance value of both pixels.
AL::kYUVColorSpace | 10 | 3 | 3 | Buffer contains triplet on the format 0xVVUUYY, equivalent to three unsigned char
AL::kRGBColorSpace | 11 | 3 | 3 | Buffer contains triplet on the format 0xBBGGRR, equivalent to three unsigned char
AL::kHSYColorSpace | 12 | 3 | 3 | Buffer contains triplet on the format 0xYYSSHH, equivalent to three unsigned char
AL::kBGRColorSpace | 13 | 3 | 3 | Buffer contains triplet on the format 0xRRGGBB, equivalent to three unsigned char
AL::kYYCbCrColorSpace | 14 | 2 | 2 | TIFF format, four unsigned characters for two pixels.
AL::kH2RGBColorSpace | 15 | 3 | 3 | H from “HSY to RGB” in fake colors.
AL::kHSMixedColorSpace | 16 | 3 | 3 | HS and (H+S)/2.

#### Supported Format

Format parameter can have the following values:

Resolution ID Name | Resolution ID Value | FrameRate Value | Description | Available on Camera ...
--- | --- | --- | --- | ---
AL::k16VGA | 4 | 1 to 15 | Image of 2560x1920px | Top only
AL::k4VGA | 3 | 1 to 30 | Image of 1280x960px
AL::kVGA | 2 | 1 to 30 | Image of 640x480px | Top & Bottom
AL::kQVGA | 1 | 1 to 30 | Image of 320x240px
AL::kQQVGA | 0 | 1 to 30 | Image of 160x120px
AL::kQQQVGA | 7 | 1 to 30 | Image of 80x60px
AL::kQQQQVGA | 8 | 1 to 30 | Image of 40x30px

Note

The camera OV5640 can only run internally from 2560x1920 to 320x240, otherwise scale down is performed (without binning or linear interpolation).

Note

The camera OV5640 can only run internally at 15 or 30fps (except in 2560x1920, 15fps only).

Glossary Site map Index Support Contact Legal Notices