Hi! I want to know how can I measure the height of the plant in the given picture?

I have attached my picture and I have many pictures of the same plant captured over time.but the angle of all the pictures is same,its because camera is held onto a pole which looks over these plants. From this image,I want to know the height of the plant by calculating the distance between the camera and yellow spot minus the distance between camera and red spot(i.e. plant height=dist(camera,yellow spot)-dist(camera,red spot)). I have gone through the matlab documentation and many papers, but I could not figure out how can I get the distance between the camera and those red and yellow spots in the image. Please somebody explain me. I have been struggling over it for many days.

4 Comments

You don't have enough information to answer this question.
You either need some object in the image of a known size, or you need more information about the location of the camera with relation to the plant.
If I get to know the plot size and the distance between each row of plants in the plot, will that help? If so, how can I go then further with the estimation?
Anyone who told you that you could infer the height of the plant by subtracting those two distances is simply wrong. That expression makes no mathematical sense in this context.
Draw the two lines. Make a triangle. Can you infer the length of the third side of a triangle by subtracting the lengths of two of the sides? NO.
In fact, there are formulas you could use. With some creativity, you can use the pythagorean theorem (you need it twice) to compute the distance, IF you know no more than the distance of the camera above the ground, as well as the distance to each of those points in the picture. To do that, you need to start drawing some right triangles. WHAT DO YOU KNOW! What can you infer?
Thankyou so much everyone. Can anyone please suggest me any method of getting the height distribution of all the plants in the plot?

Sign in to comment.

 Accepted Answer

This is not possible in general. For example, what if the plants had grown so much that the entire image is green? Or even if a single row is just solid green, like you have? There is no way to know the height of the plants in a case like that. You can only do that if you have separated (non-overlapping) plants and a spatially calibrated camera system: https://www.mathworks.com/products/computer-vision/features.html#camera-calibration
Since you don't have that, I therefore suggest you use an alternate measurement that should correlate pretty well with plant height, and that is the area fraction of green. See my File Exchange for color segmentation demos or see the Color Thresholder App on the Apps tab of the tool ribbon.

2 Comments

Thankyou so much everyone especially ImageAnalyst for explaining so clearly. I am a novice in this area. Is there a way to separate the overlapping plants? or, Would you please suggest me any method of getting approximate height distribution of the whole plot instead of calculating the height of each plant?
No, you can't separate them once they've overlapped to a certain degree, as they certainly will given enough time. Your other option is to get out there with a ruler. Or else use a method like I suggested where you measure area fraction. you'll have to first build a calibration curve which can be done by measuring heights with a ruler and then plotting it against the area fraction. Now you have a calibration curve where each area fraction means the plants are at a certain height. This will work up to a point. There may be a point where the plants get taller but the area fraction does not change, like when the image is 100% totally green.

Sign in to comment.

More Answers (0)

Categories

Asked:

on 28 Oct 2016

Commented:

on 31 Oct 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!