How do i measure distance using a Nicla Vision on the Arduino IDE?

I've recently bought Arduino Nicla Vision for a project. I've managed to understand and pretty much use many of its sensors, but I can't find a way to make it measure distance from an obstacle. Can somebody help me?

I don't think they can. How can a single camera measure distance?

If you had two cameras or two frames from taken when a single camera is moved laterally (not rotated) between two positions you can work out the distance from the parallax of the same object in the field. That is the best way I know of measuring distance from visual images.

I suppose you could try measuring the change in size of the object in two successive frames as the object is approached, but you would need to know the exact speed you are going at and do some hefty calculations to find the same object the the two frames and then measure their size.

That's roughly what our brain does when looking at the object by just one eye. :wink:

I never used Nicla Vision, but without steroscopic view it's pretty hard to do what the OP asks. Without knowing the exact requirements, IMHO the only viable solution is by using a laser sensor.

Yes, so all we need is a processor that is as good as the human brain and the task is a synch. :face_with_raised_eyebrow: