Recognize specific color area of an image (measure the width of a tree trunk from a photo)

Here are some ideas

Facial Recognition -- probably not a solution for your Project

how about taking a look into the extensions directory?
https://puravidaapps.com/extensions.php

Measure by Augmented Reality ( AR ) - might work

You might be able to use AR with App Inventor by using the ActivityStarter https://gadgetstouse.com/blog/2020/05/13/measure-anything-with-your-phone-camera-without-touching-it/ Not tested. GoogleMeasure It might work with your device.

Existing non App Inventor AR measuring apps : https://play.google.com/store/apps/details?id=com.grymala.photoruler&hl=en_US&gl=US

or this App Inventor article about using AR http://ai2.appinventor.mit.edu/reference/other/vr.html

Measure using HTML

https://web.archive.org/web/20131123073926/http://forestjohnson.blogspot.com/2010/01/how-to-measure-size-of-object-using.html

If all else fails
Use a ruler, measure the width of the tree trunk; write it down. Enter the value in your app database.