Quick Start
Qtec cameras are full linux computers with image sensors attached, which allows for doing both the image capture and real-time processing onboard.
Getting Started
What you will need:
- Camera with lens
- 24V Power Supply (min 3A)
- CFast or USB pen-drive containing qtecOS image
For viewing the web interface or connecting via SSH:
- Ethernet cable
- PC
There is also the option to work directly on the camera. The camera provides a USB-C DisplayMode compatible port, so you can connect any USB-C Monitor to it. USB-C to DisplayPort or USB-C to HDMI adapters will work as well. Furthermore you can connect a USB keyboard / mouse to any of the USB ports or even use a USB hub if you have multiple USB devices.
Flash a Distro Image
The camera development kit should include a pre-flashed CFast or USB pen-drive with the qtecOS image.
Refer to the qtecOS Image section (under Distro) if you don't have such a disk or if you wish to flash a new one yourself.
Installing new packages
Qtec cameras have their own package repository.
New packages can be installed or existing ones updated using apt
.
Refer to the qtecOS Update section (under Distro) for more details.
Connections
Insert the CFast or USB pen-drive containing the qtecOS image to the proper slot.
Connect the 24V power supply to the PWR connector using a 5-pole cable (brown: V+, blue: V-). The white and black wires are I/Os for light/camera trigger and are not going to be used in this guide. Check the I/O Connector section for more details on the I/O connector.
Optionally connect a screen and a keyboard.
Connect the ethernet cable to either port A or B depending on the local network topology, see below.
Network
The camera has two ethernet ports (ETH-A and ETH-B).
The default image will have pre-configured a DHCP client for the ETH-A port and a static IP 10.100.10.100
for the ETH-B port.
For this quick start, we assume you have connected the camera to your local network (using ETH-A) and it will get an IP assigned within your organization.
If you do not want the camera as part of your local network you can connect a computer directly to the camera on ETH-B.
Remember to configure your computer's IP to use the 10.100.10.XXX
network as well.
This can be done in Linux by using the following command as root: ifconfig <interface name> 10.100.10.200 netmask 255.255.255.0
.
Or in Windows: Control Panel -> Network and Internet -> Network Connections
, then select an interface, click Properties
.
Set IP address
to 10.100.10.200
and Subnet mask
to 255.255.255.0
.
USB-C port
The camera provides an USB-C DisplayMode compatible port, that can be used for connecting an external USB-C Monitor. USB-C to DisplayPort or USB-C to HDMI adapters will work as well.
First Boot
After connecting the previously flashed CFast card to the CFast card slot on the camera, network cable to ETH-A, as well as a USB-C to DisplayPort or HDMI adaptor to a screen or monitor and a keyboard to one of the USB ports, you can start with the camera first boot.
After bootloader (UEFI bios), the CFast will boot the Linux kernel and the Root File System (rootfs) with the camera operating system.
Once the camera is booted and the green LED on the I/O Connector side is blinking the web interface can be used to see a live preview from the camera as well as configure camera parameters.
Camera UI
If DHCP (ETH-A option) is used the IP of the camera can be retrieved with the ip
command,
using the monitor and keyboard:
ip a show eth0
Example: 192.168.2.200
Otherwise, if using ETH-B, the IP is static: 10.100.10.100
.
Now you can navigate in your host browser to the url
http://192.168.2.200
to access to the Camera UI
interface, which shows the live image stream and allows adjusting the different
camera controls/parameters.
Check the Camera Web UI section for more details on the different functionalities of the web interface.
Python programming
The easiest way to start programming in the camera is to use qtec's V4L2 Python bindings: qamlib. It gives full access to all the image sensor functionality like getting frames and settings controls.
You can run programs directly on the camera by connecting a screen and keyboard
or with a ssh
connection: ssh root@<CAM_IP>
.
The snippet bellow illustrates how to:
- initialize a camera object (by opening the respective video device).
- set and read back a single control: exposure time.
- start an image capture loop
Example
import qamlib
# Opens the default video device: /dev/qtec/video0
# if a different video device is desired add it as the argument
cam = qamlib.Camera()
# Try to set exposure time (us)
cam.set_control("Exposure Time, Absolute", 1000)
# read the actual exposure time back from the device
# as the exact requested value might not have been possible
# which causes the value to be adjusted to the nearest possible
exp = cam.get_control("Exposure Time, Absolute")
# Print the exposure time that we ended up with
print(f"Got exposure time {exp}us")
# Start and stop streaming with context manager
with cam:
meta, frame = cam.get_frame()
# Frame number since start of streaming
print(meta.sequence)
# TODO: process the frame as desired here
For more details refer to the qamlib
section.
Hailo Edge AI
Some models of qtec cameras have a Hailo-8 Edge AI chip, which enables AI models to be run efficiently on the camera.
It is possible to check if the camera has a Hailo module installed by running the
following command on the camera: lspci | grep Hailo
.
If the hailo module is present the output will be something like:
02:00.0 Co-processor: Hailo Technologies Ltd. Hailo-8 AI Processor (rev 01)
Refer to the AI Camera section for more details.