Hello, I’m using the Raspberry Pi AI Kit, all demo scripts are working well with rpicam, but I want to ask:
how can I use an external camera? Like a USB webcam, in order to interact with Hailo scripts normally.
Thanks for any help.
Take a look at the examples where they tell you how to use USB cam instead of rpicam.
# Hailo RPi5 Basic Pipelines
This repository contains examples of basic pipelines using Hailo's H8 and H8L accelerators. The examples demonstrate object detection, human pose estimation, and instance segmentation, providing a solid foundation for your own projects.
This repo is using our [Hailo Apps Infra](https://github.com/hailo-ai/hailo-apps-infra) repo as a dependency.
See our Development Guide for more information on how to use the pipelines to create your own custom pipelines.
## Installation
See the [Installation Guide](../README.md#installation) in the main README for detailed instructions on setting up your environment.
# Overview
This guide provides an overview of how to develop custom applications using the basic pipelines provided in this repository. The examples demonstrate object detection, human pose estimation, and instance segmentation using Hailo's H8 and H8L accelerators.
## Understanding the Callback Method
Each example in this repository uses a callback method to process the data from the GStreamer pipeline. The callback method is defined as a function that is called whenever data is available from the pipeline. This function processes the data, extracts relevant information, and performs any necessary actions, such as drawing on a frame or printing information to the terminal.
### User App Callback Class
The `user_app_callback_class` is a custom class that inherits from the `app_callback_class` provided by the `hailo_apps_infra` package. This class is used to manage user-specific data and state across multiple frames. It typically includes methods to increment frame counts, manage frame data, and handle any additional user-specific logic.
This file has been truncated. show original
Example For Using USB camera input:
Detect the available camera using this script:
python basic_pipelines/get_usb_camera.py
Run example using USB camera - Use the device found by the previous script:
python basic_pipelines/detection.py --input /dev/video