I am presently using a OpenMV M7 and OpenMV H7 board. I have an object detection trained model running on both the hardware. I want to measure the distance of the object from the camera. An accurate distance is not required. An approximate distance will also do.
I initially thought of using the size (area) of blob as a parameter for measurement. The larger the area of the blob, the closer the object is to the image, and with this, I can keep some threshold range of different ranges such as “nearby”, “faroff” etc. However this didn’t work (I couldn’t see any change in blob size )
Can someone help me with some ideas? PS. I did go through some of the posts in the forum, but they weren’t much of my help.
Yeah, that’s like a 1/N type thing. So, the blob only gets big when it’s really close. When it’s far away, the size looks the same.
Cameras generally can’t measure distance. So, can you use another sensor? Otherwise, the only way for this to work is to use some type of image structure that gives you extra information. E.g., AprilTags which have a known size to start from.
No, I don’t plan to use any other sensor with this. I am unsure if with Object Detection (Using a model from Edge Impulse), I can use AprilTag. I haven’t tried doing this ever and not sure about the impact on the execution time.
What would you suggest? Also, any example that you can suggest for using AprilTags for this requirement?