Find a height of object using OpenCV

2020-06-23 06:07发布

问题:

I have an image. I have to find the height of a particular object in it.

If we directly take the pixel length it will not give the exact height.How to approach this problem?

回答1:

After you calibrated your camera, you will have a transformation from image plane to world coordinates. Using this information you can predict the height of the object you are looking for, of course in this step you somehow need to identify the object that you are interested in.

Generally speaking, this question is too broad and covers many fundamental concepts of computer vision, so please consult your favorite textbook before attacking the problem.



回答2:

An alternative approach: place the object on top of a A4 paper sheet and take a picture from above. Since you know the size of paper, you can calculate the size of the object based on that.

To detect a paper sheet, check this post or this.