Hello! I recently acquired an OAK-D Pro for the purpose of people tracking in an installation. My goal is to use any of the applicable detection/tracking networks to detect & track people and draw simple contours around them instead of bounding boxes. I know that this could be a lot more resource-intensive if run on the OAK-D and I'd happily offload the task onto the host PC if I could find a way to make it work. I found this info on drawing contours [LINK] and would love any help on implementing it with the OAK-D.
Thanks for any & all help!
Need help drawing Simple Contours around detected objects
Hi @waffleicious
I see the contour detection on opencv uses Canny. We have a similar node on depthai that is able to emphasize the edges: https://docs.luxonis.com/projects/api/en/latest/samples/EdgeDetector/edge_detector/#edge-detector.
You can feed the image from edge detector directly to host side and perform contour detection.
Thanks,
Jaka
jakaskerl Hello and thanks for your reply! My only hang-up is that I want to focus on a specific depth range to run EdgeDetector on. Basically, I'm trying to outline only the people instead of the whole scene in order to get a result similar to the "Player Index" output on the Kinect v2. Using various filters on the depth map allowed me to look at the depth range where the people will be (Thankfully it's only ~3ft worth of depth where they can stand) but the depth results flicker like crazy and make it hard to create any suitable outline…
I'm going to mess around with semantic segmentation with depth next…
Thanks for the help!
waffleicious but the depth results flicker like crazy and make it hard to create any suitable outline…
Flicker due to noise? Any image you can share?
Thanks,
Jaka
- Edited
Here's a brief video that I uploaded to YouTube describing this issue to the TouchDesigner community. Not sure if you/others here are familiar with using the OAK-D in TouchDesigner but I get similar results in TouchDesigner and in running example files directly in Python (TD is also built on Python and implements some of the same components globally such as "numpy", etc…)
Video: [link]
TouchDesigner discussion: [link]
Thanks for your response! If you need clearer videos/screenshots, I'll happily provide them
Hi @waffleicious
Not really familiar with TouchDesigner, so I will approach this from depthai point. It looks like the depth matching is not confident in certain locations on the screen. I can't see from video; are you using dot projector? Setting the intensity to 800 should help with confidence. Also setting the preset to high density since the accuracy seems less important in your case.
Thanks,
Jaka