I intend to use 4 USB cameras connected to RPI 5 with Hailo, to have a wider view of the area to cover and do some Yolo inference on the stitched image. What would be the proper approach? Use opencv to stitch the video stream, resize the total image and then pass it to Hailo for inferencing?
Do you need the stitched image for something afterward? If not you could just run the object detection on the 4 camera streams independently.
I need to stitch (2x2) them first to have a broader field of view, then run some obj detection on the stitched stream. The frame rate should drop quite substantially if doing stitching, so I wonder if Hailo can help with that first, then do the obj detection.
Unless you need the stitched image for display purposes, consider running object detection directly on the original streams to save compute resources.
Have a look at our tilling example. It does the opposite of what you are trying. It tiles an image to infer the individual parts of the image trough an object detection network.
You can view the individual cameras as tiles of your image and infer them directly.
I would need to stitch them first as they have quite some overlap and if I do object detection on single streams I will count more than what is in the field of view.
Basically I have 4 cameras placed on the ceiling (which is less than 3m high) pointing down, in order to have a wider view of the scene and avoid blind spots. So if I can stitch all 4 streams first, taking into account the overlap, then I can use the combined image to see all the objects there.