The configuration file is used to identify the cameras to use for your system. You can have other cameras physically connected to the board, but the only cameras that the system can use are those identified in this file.
You can configure the settings for one or more cameras connected to your board. The configuration file also defines the cameras that you want to use. For testing purposes, you can simulate a camera by specifying a video file to play.
The configuration for cameras is specified in sections enclosed by begin camera_unit and end camera_unit, where camera_unit is an enumumerated value from camera_unit_t. For information about the camera_unit_t, see the Camera Framework Library in the Camera Developer's Guide. You don't need to start with CAMERA_UNIT_1, but that string can appear in the configuration only once. For example, you could use CAMERA_UNIT_3 to identify your first camera as long as it appears only once in your configuration file.
For example:
begin CAMERA_UNIT_3
type = usb
name = front
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = -1, -1, -1, -1
end CAMERA_UNIT_3
begin device
version = QNX Platform for ADAS 1.0
model = QNX Neutrino
end device
| Type | Format for address | |
|---|---|---|
| usb | bus, device, vendorID, deviceID | This format is necessary to identify the camera when you have more than one USB camera connected
your system. You can use a wildcard (-1) to accept any USB camera found on the
system. If you have only one USB camera, using a wildcard value of -1 for all
fields correctly works, however, if you have more than one USB camera, you must specify non-wildcard
values for at least the bus/device parameter pair or
vendorID/deviceID. For example, if you have more than one
cameras of the same make/model, you must specify the bus and
device because specifying vendorID/deviceID
parameter doesn't uniquely identify a camera.
|
| sensor | bus, device, vendorID, deviceID | This format is necessary to identify the sensor camera when you have
more than one camera connected to the sysytem. The format is used to identify the
sensor camera where:
|
| file | /path/to/file/video.mp4 | This format must be used to specify the path to an MP4 file. The file should be H.264-encoded. |
This sample configuration file is for a camera connected to a board via the parallel port.
begin CAMERA_UNIT_1
type = sensor
name = front
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = ov10635, 0
i2c_path = /dev/i2c1
end CAMERA_UNIT_1
begin device
version = QNX Platform for ADAS 1.0
model = QNX Neutrino
end device
This configuration file is for multiple cameras connected to a deserializer board using an FPD Link III interfaces.
When you connect more than one camera, each camera's configuration for the address should match the port. For FPD Link III interfaces, the address parameter should be set to ov10635_deser, [port number of sensor camera] and the i2c_path parameter should be set to the location of the path used to communicate with the camera, which is /dev/i2c1 as follows:
begin CAMERA_UNIT_1
type = sensor
name = front
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = ov10635_deser, 0
i2c_path = /dev/i2c1
end CAMERA_UNIT_1
begin CAMERA_UNIT_2
type = sensor
name = rear
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = ov10635_deser, 1
i2c_path = /dev/i2c1
end CAMERA_UNIT_2
begin CAMERA_UNIT_3
type = sensor
name = left
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = ov10635_deser, 2
i2c_path = /dev/i2c1
end CAMERA_UNIT_3
begin CAMERA_UNIT_4
type = sensor
name = right
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = ov10635_deser, 3
i2c_path = /dev/i2c1
end CAMERA_UNIT_4
begin device
version = QNX Platform for ADAS 1.0
model = QNX Neutrino
end device
The following configuration file is for one USB camera connected the board.
begin CAMERA_UNIT_1
type = usb
name = front
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = -1, -1, -1, -1
end CAMERA_UNIT_1
begin device
version = QNX Platform for ADAS 1.0
model = QNX Neutrino
end device
This is a configuration file for two USB cameras connected to the board.
begin CAMERA_UNIT_1
type = usb
usb_driver_path = /dev/io-usb/io-usb
name = front
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = 1, 1, -1, -1
end CAMERA_UNIT_1
begin CAMERA_UNIT_2
type = usb
usb_driver_path = /dev/io-usb/io-usb
name = front
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = 0, 1, -1, -1
end CAMERA_UNIT_2
This is a configuration file for file cameras. File cameras aren't real cameras, but a configuration that plays a video.
begin CAMERA_UNIT_1
type = file
name = front
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = /accounts/1000/shared/videos/frontviewvideo1.mp4
end CAMERA_UNIT_1
begin CAMERA_UNIT_2
type = file
name = rear
position = 0, 0, 0
direction = 0, 0, 1
orientation = 0
address = /accounts/1000/shared/videos/rearviewvideo2.mp4
end CAMERA_UNIT_2
begin device
version = QNX Platform for ADAS 1.0
model = QNX Neutrino
end device