Okay, I understand what you are trying to do. However, it is not very easy to do so:
In the camera are already loaded some template with a typical object which are in the garden like trees, flowers, outdoor lamps. All those items are obstacle for the rover.
The code should look for the template inside the picture and once found should calculate the distance from rover to obstacle assuming that obstacle is vertical and starts from grass (floor).
Template matching require more or less fixed scenes. How do you plan to do this with the API we have available?
Can you go into some more detail on how you’d like to find obstacles in the scene? It’s not hard to work out a distance per say… but, first you need to be able to detect objects. Yes, I understand you are looking for help on this part. So…
If you plan to avoid obstacles outside, color tracking is our best feature for that… color will have to be trained for the outside scene… but, this is the most obvious way to get something working quickly to avoid things that are not the color of the ground. Like trees, flowers, outdoor lamps. The OpenMV Cam is not able to do general purpose object recognition using algorithms like yolo so it is unable to easily classify all the objects you mentioned previously. So, we need a… shortcut, some way to identify the object and avoid it without having to know what that object is. That’s why I mentioned color.