Identify modal feature: measure length ratios in images

Platform(s), such as mobile, website, API, other: All platforms

URLs (aka web addresses) of any pages, if relevant: The ID module, https://www.inaturalist.org/observations/identify, but also observation pages, https://www.inaturalist.org/observations/*xxxx*

Description of need:
Identification keys often ask for length ratios, for example, “pronotum lenght divided by pronotum width more than 1.4”, or “rostrum slightly longer than pronotum (species A) vs. rostrum at most as long as pronotum (species B)”.
To do such measurements, I’d use ImageJ, but it would take me too long to donwload an Image to process it that way. Rather, I’d do an estimate, which may be inaccurate.
If the ID module itself has such a feature, it would also encourage the community to include ratio measurements into the identification process. I think many avoid to take measurements just as it is cumbersome.

Feature request details:
The ID module already has a tool to adjust the brightness of an Image. It could feature another button, symbolized for example with a ruler icon.
When clicking the ruler, the user would be able to draw a line, which will be marked with a letter A.
Another symbol would appear, which can be clicked to remove all lines (to start again in case a line was misplaced)
By clicking the ruler again, a second line will appear, marked with the letter B.
Somewhere on the screen, the ratio of the length A divided by length B will appear.

To make the feature really useful, it needs to be available also in “normal” observation pages, to take measurements in observations which are already identified, as a reference. Often I know that “one species is more elongate than another”, but I do not know exact values. To be able to compare/measure a few observations would add confidence to what would be an estimate instead.

Known Issues:
Images are often not taken in a way which allows exact measurements. However, I expect that for example leafs are photographed by many users from a straight angle, as they expect the shape to be relevant.

No sure how feasible this is, but I approved it. It would be a cool tool.

2 Likes

To relate an anecdote: a few of us few laughing recently about about trying to look at length/width ratios. One woman said that she was trying to look at an antennae segment on someone’s observation, so she zoomed in as far as she could, and used a physical ruler to measure on her screen. I won’t confirm or deny if I’ve ever done that. So, yeah, I could see this being useful.

6 Likes

Would be quite helpful. I have found my self using a physical ruler against my screen and calculating that way, and also exporting the photos into photoshop and measuring them there. It would save a lot of time and effort to have this tool! It would also help visualize if a specimen is taller than long in outline.

However, the use-cases are fairly specific, and there is a point where you learn how to estimate instead of needing exact measurements. I still support the idea though.

4 Likes

I use https://eleif.net/photomeasure.

3 Likes

I could see how this could be applied for measuring in terms of ratios, but in terms of actual length, it would be significantly harder since every camera (phone/actual camera) shoots in different dimensions in general, which also changes based on format (RAW/JPG) as well as JPG size and compressed/uncompressed. Changing any one of these settings (which are different in each camera to begin with) will change the scale of measurements, not even taking into account what magnification they are at. Phone cameras and a lot of macro lenses don’t record magnification level/don’t communicate their settings w the camera body.

Therefore, if you’re interested in iNat somehow measuring the actual distance and not the ratio of something, I do not see how this is feasible.

2 Likes

I believe the feature request is talking about calculating ratios: I agree measuring lengths in a photo is near impossible. I think something similar to that was proposed and rejected in the past.

3 Likes

This might be useful in some situations, but remember that to get an accurate ratio, both objects measured must be (1) parallel to the focal plane of the lens (i.e. flat relative to the image plane), (2) must be the same distance from the lens, and (3) (depending on the degree of distortion of the lens) must be in the center of the original image (hard to determine if the image is cropped). These conditions are hard to achieve in field photography.

8 Likes

Yes, I came here to say the same thing. Measuring ratios from photographs has a very high potential for wildly incorrect results. People’s intuition on how much to trust it in a given case is probably not too bad, but it’s definitely worth caveating.

On the other hand, I imagine a dedicated machine learning program could potentially get very good at it. If it can learn to identify a bird in various positions, it seems plausible that it could develop an understanding of the three-dimensional shape of what it’s looking at, and when enough information is available, produce decent estimates of proportions.

2 Likes

I doubt it. It compares patterns. It recognizes birds in different positions because it has lots of images of them in every possible position. At the same time, it may give radically different suggestions depending on something as simple as whether an image has been cropped or not. I don’t think it has any understanding of what it is actually seeing or that the images correspond to three-dimensional entities.

1 Like

I don’t think I was trying to say that the current computer vision model has a three-dimensional understanding, per se. I was thinking that if humans can look at a picture of a bird and have a pretty good idea of how it’s shaped in three dimensions, and computer model specifically trained to do that might be able to too. I don’t know enough about the current model to comment on whether it’s as simplistic as you describe it, but many other machine learning models in the world surely are much more sophisticated than that.

But maybe you’re right. I’m not an expert, and this was me being somewhat speculative.

1 Like

For the use case discussed by the OP I just use a physical ruler, like lj_l,
but it doesn’t happen often, and as explained by several users, it’s tricky and prone to errors.

On your own pictures you could estimate actual measurements, provided you are shooting at the minimal focus distance, and the subject is parallel to the focal plane. The longer the focal length, the better, although good photo edition software can correct distortion for many lenses/cameras… In this case it’s easy to know the total length and width of the image, and compare these values with the subject.
Of course that’s still NOT an exact measurement.

Btw, my camera displays focus distance only in manual focus mode (not sure the distance is even saved in the EXIF data with the pictures), but if you can shoot in manual focus, you could probably just place a ruler near the subject before taking the pictures…

1 Like

I personally measure ratios for bivalves. For many species, it can be helpful for ID (i.e. Lampsilis teres vs L. sietmani, or Musculium vs. Sphaerium transversum)

It could also help in very zoomed out photos with many organisms, and determining positions in the photo. For example, someone could leave comments with something similar to the following:

There appears to be many organisms in this image. Could you duplicate this observation for whichever ones you want to? There appears to be:
Euglesa compressa, 63% from the left, and 22% from the top. It’s the white valve showing its interior
Sphaerium, at the very left and 79% from the top
Corbicula, throughout the image, but the clearest example is central, and 43% from the top. It’s the yellow valve with clear striations
Pleurocera, with the two gastropod valves being right next to each other 73% from the top and 43% from the left.

This is a very, very niche use case though.

1 Like