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

You want to measure the width of a tree trunk by taking a photo with the Android camera. Maybe.

This example in the gallery might give you some alternative ideas MIT App Inventor Gallery As published it needs work to provide usable code for part of your Project.

Here is a tree trunk. Photograph your tree with a ruler in front of the trunk so there is a scale reference.

The picture you take goes to a sprite displaying in the Canvas. Use the cross hairs to 'measure' and create some math to estimate the width of the trunk based on the length of the ruler that you will include in the photo..

I think this is hopeless. The scale of the image you get of the tree trunk in the sprite depends on the distance the photo is taken from the trunk. So you have to 'scale the photo', use the cross hairs to measure etc. Fool-y automated perhaps. Wish you luck. If possible, this is seriously complicated. :cry:

A simple method would be to use large calipers (possibly made of wood) that will display the width measured trunk in the photograph. The scale could be color coded and depending on the color coded width, you could use the facility to check a pixel color to determine width measured in the image and use it to capture the measurement (maybe).