Measure size of object

Hello, I have project about detecting pothole at the road. Currently I’m using Yolo for the detection part. After that I need to measure the size of the pothole. Does anyone knows or have idea on how to measure the size of the pothole?

Thank you

With a single image? Taken with a camera of known intrinsics? Multiple images taken from different perspectives, but with the same camera (and same intrinsics)? Multiple images taken from multiple cameras (different intrinsics)?

Size? 2D planar size of where the pothole “starts”, or also depth / shape of the pothole?

Do you control the camera position, or do you just get images? Do you know anything about the camera position / orientation when the image is taken?

As you can see there are many factors that affect how you might approach this problem, including how accurate you need to be. If you are just trying to classify potholes into minor/moderate/someone_might_die categories, a simple approach might work, but if you need to be able to measure them to, say, 1cm accuracy, you probably need a more sophisticated approach.

I remember coming across a book (or maybe it was a dissertation) on the subject of measuring the size of things from a single image. It has been a long time, but my memory is that the author did an excellent job of describing what you are able to achieve with a wide range of constraints / limited knowledge about the camera, etc. It’s possible it was this:

I thought it was just single images, but this is all I could find in my brief search. You can buy a printed copy on amazon, but it’s $85:

If this project is for a paid job, the cost is easily worth it…if it’s for a class project, maybe you can get access to that book from the library or ILL.

Good luck.