Add "focus distance" to the list of displayed metadata fields

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

URLs (aka web addresses) of any pages, if relevant: Any photo page, e.g. https://www.inaturalist.org/photos/683050979

Description of need:

Organism size is often quite helpful for identification. Given that the focal plane in macro photography is often incredibly thin, someone with technical know-how could make a very good estimate of specimen size (at least in the case of a sharp photo taken parallel to the organism) if they knew the optical magnification of the photo, which could be inferred from the focus distance (plus a few other variables which are already displayed in the public metadata)

Feature request details:

Add “focus distance” to the list of metadata parameters which are listed in the photo metadata.

I realize this is quite niche, and there may be cases in which the size estimate you get from this would be unreliable. But my hope is that displaying one more metadata field isn’t asking too much, and that anyone capable enough to calculate such a size estimate would also be aware of the limitations. It would just be one more piece of evidence one could choose to weigh in when making an ID.

Note some similar discussion has happened in this thread about an external tool for doing this, and people seemed keen on this, but this of course only works on one’s own photos. If my feature request was implemented this would allow people to make such calculations on others photos.

I think this would be very difficult to do, at least reliably. I know for macro photography, we use extension tubes, diopter filters/lenses, and fully manual lenses. This could make the metadata unreliable, if any is generated in the first place. Also, many macro photographers make use of focus-stacking, which artificially increases the focal plane by stacking many images together. Your best bet in my opinion is to just ask “about how big was the subject?”, or “what magnification was this shot at?”, however, this could become tedious… For scale I usually find it helpful to go look at other observations of the species (if there are any) and look for the less zoomed-in “phone camera” photos. They usually make it easier to estimate size.

My macro lens (pentax) doesn’t provide focal distance to the camera body.

As I understand this is the formula you would need to use:

real pixel size = (sensor width × subject distance) / (focal length × original image width in pixels)

Most of the time you won’t have Exif data for the sensor width or the subject distance, and the original image width may have been altered. My guess is that nine times out of ten you won’t have the necessary data.

and

mean the lens is no longer communicating with the body, so no focal distance information should be recorded, so no faulty information would be generated.

in my experience require focusing at infinity, so again the information should not be misleading

Yes, but the width of the stacked plane is still almost always going to be small enough to get a decent size estimate from the information

And yes, many people do use the above, but I imagine a very significant proportion of observations on here use none of those things, so it would at least be helpful for those

Even discounting tedium I think unless the observation was very recent, the odds of getting a response and that response being accurate and precise are going to be quite low.

Like I said

I am not claiming this would be lifechanging or anything. I just figure there is a decent change there is just a maintained list of metadata items which get imported, and it would require only a trivial amount of effort to add “focal distance” to that list. If it would actually require a serious amount of engineering to add this I of course don’t think that’s where resources should be direected.

The EXIF data contains a camera model, from which the sensor width can be recovered

This is why I am asking them to add focus distance, in macro contexts the focus plane is so thin that as long as the subject is remotely in focus this should be a fairly accurate proxy for subject distance.

Sure, but cropping wouldn’t change the math and I imagine manually scaling photos prior to uploading them is quite rare (and the automatic scaling iNat does on large photos is easy to detect and the original dimensions can still be recovered from looking at the public metadata).

Yes, people would have to be a little skeptical about taking this estimate as the ground truth, but it still could be helpful in some cases, so I don’t see the harm of adding it provided it would take minimal effort to do so.

I have extension tubes that allow the lens to communicate with the body: autofocus, aperture control, exif, etc.

Also not true, in my experience.

I sincerely hope that this doesn’t lead some people to assume they no longer need to try to include proper size indicators in their photos. Or even worse, that they record these guesstimates as “facts” without clearly indicating their provenance. There’s no doubting the occasional usefulness of guesstimates when making identifications, but it would be somewhat misleading to call the results of such calculations evidence.

As a photographer, I just don’t see how knowing the focus distance could ever provide a universally reliable indication of size of the organism in the photograph.

We have sensor sizes to deal with.

We have cropping to deal with, and cropping is all over the place. Many of the photos in iNat obs are not cropped at all, many are cropped down to just a small fraction of the original image, and many are cropped to some extent that lies between these two extremes.

There is no “normal” when it comes to cropping; no amount of crop that is used more than any other amount of crop.

And no, the vast majority of people have zero access to and/or zero idea about EXIF data that shows to what extent the image has been cropped, so that is useless as an answer to the “we don’t know how much it was cropped” problem.

So I just don’t see how this tool would ever be able to be considered reliable, or even slightly helpful.

Cropping shouldn’t matter if you are counting pixels. Resizing would.

I didn’t read the original thread that was referenced, but yeah, in theory the computation should be possible. In GIMP, there’s a measurement tool that can be configured to measure in pixels. No doubt other programs provide similar tools. So you can get the sensor size (in pixels), the size of the target (in pixels), the focal length and if you can get the focal distance, you should be able to compute an approximate size.

That said, I think this is such an edge case that it would be hard to justify the development effort. I’ve seen requests for features with much more potential utility get shot down. Even if all of this information were made available, I would never ever bother to download a photo from iNat, use GIMP to measure the organism, and then do the computation.

I understand what you are saying, but in the real world it usually doesn’t work the way you suggest, because almost all photographers set an arbitrary pixel count when exporting photos to be submitted with observations. Maybe causal photographers who use their cell phones or whatever don’t do this. But actual photographers are rather deliberate about just how many pixels they want their iNat photos to be exported at. Hence, the number of pixels in the images that we post bear no correlation at all to the number of pixels that were originally in the cropped portion of the image.

Speaking of the real world, I think you are vastly overestimating the number of “actual photographers” who post their photos to iNat.

Sure, I resize my photos as a matter of course, but in general, I don’t submit photos to iNat. Based on my own experiences identifying thousands of observations of butterflies here on iNat, I’m willing to believe that most observers do not resize their photos. Most of them don’t even know how to crop their photos. And most of these photos would be utterly useless for a calculation like this. They’re taken from such a distance that the error margin on the calculation would be larger than the size differences you’d be trying to discriminate.

The fact that the suggestion is largely impractical doesn’t mean that it isn’t theoretically possible. I thought of doing this kind of thing with my own photos, but in my case, my cameras don’t record focal distance in the EXIF.

I could see the requested feature working for a project where participants all have reasonable photography skills and agree to follow a specific protocol. But I don’t see iNat making changes for the sake of small projects (or if it’s mostly for the benefit of the people doing identification).

There are lots of folks building specialized tools and extensions for iNat. It might be better to find someone with the skills to build a web tool where you can upload your photo, drag a line across what you want to measure, and have the tool spit out a measurement which the observer can then type into their observation on iNat.

Yes! That is the point I was attempting to make - that most of the photos posted to observations would not yield the desired information, even if this feature was added. For various reasons.

I have no problem with this feature being implemented. I am not “against” it. I just don’t think it would be useful. But if somebody wants to add it anyway, then that isn’t going to hurt anything … unless someone thinks that the info it provides is accurate, when it won’t be. I guess that could be a problem.

I don’t see how this could ever happen? Doing such a calculation requires a good deal of technical know-how and it’s quite rare an identifier would look at the metadata. Do you really think observers are going to assume every identifier is going to do involved optical calculations using the photo’s metadata and omit a size estimate because of that?

The camera body model is listed in the metadata. It takes a few seconds to google something like “OM1 sensor width”

Because at least my hope is we’re talking about a difference of several orders of magnitude in development effort. Many metadata items are listed on iNaturalist photo data. Many are not. If all it would take would be one developer opening a file and adding “focus distance” to a list then I think this should be added. If for some reason it actually required a meaningful amount of development effort I agree it should not be implemented. I agree for 90% of observations this information would not be at all useful. But that’s already easily true for the majority of metadata fields that do get exported, and no one seems to take issue with those?

But it is most likely that 98% of all iNatters do not know how the sensor size factors in to determining the size of the organism photographed. You are suggesting a feature that would only be useful to those with rather specialized knowledge and understanding. And this is going to be less than 2% of all iNaturalist users. Maybe even less than 0.2%.

The top 2% of identifiers on iNaturalist make a substantial portion of all of the identifications. If this feature is trivial to add and helps a couple of them make more identifications of tricky obscure species that nobody else can identify then I think it would be worth it.

That is a valid point. In some situations, where all the stars line up just right, the focus distance could be used to arrive at an approximation of the subject size. Only a tiny percentage of all users would ever know how to make use of it, and then it would only work for a tiny percentage of observations, but every once in a while it could be the difference between a species level ID and a genus level ID. And for that rare, exceptional instance, it would be worth having.

“No observation left behind”!

Ha!

That’s not the scenario I was thinking of at all. I was imagining what might happen if someone developed a tool and promoted it as an “easy way to get the size of any object in your photos”.

There are already online versions of such things that come with lengthy warnings about the unreliability of such calculations (e.g. this one). But we all know that many people don’t bother reading the small print, and don’t really care how things actually work - they just want some “cool AI thing” that “does it all for them”. A lot of ugly little details can get hidden under the cloak of convenience.

Of course, there’s nothing that can be done to stop people using such third-party tools and adding notes to their observations that (claim to) give exact sizes. I’m just hoping that a tool like that never becomes popular amongst iNaturalist users. (I obviously have no concerns about people who use such tools responsibly and transparently).

(un)fortunately, at this point in iNat’s development as a product, I suspect that any time a developer opens the code, there’s a significant amount of overhead involved. Even if the actual code change is trivial, the developer probably has to do a fair amount of “paperwork” and testing. I suspect that even for complex features, the actual coding is likely the smallest work item.

This is me being charitable. If I’m wrong, then there is absolutely no excuse for so many seemingly minor feature requests being ignored.

Of course, I could be wrong. It does happen from time to time.

I’m actually surprised that this isn’t already displayed. I actually look at EXIF data frequently - mostly to verify that the observation date matches when the photo was actually taken. Occasionally, to check if the GPS coordinates were recorded by the camera. The EXIF data seems to look different for every observation. I always assumed that there was no filtering, and iNat just stored whatever EXIF data was recorded by the camera. Clearly, I’ve been mistaken. Learn something new every day.

I wouldn’t look at the date in the EXIF as an absolute certainty. I often buy a camera, and don’t bother to set the date and time for months. So I could have dates and times that say crazy things like 1984 or 2008 or whatever, even if the photos were taken in the 2020s. And I am sure I am not the only one. Many people I know would have no idea how to set the date on a digital device. Hence, many of these cameras just have whatever date they happenstanced into, and it is up to the observer to fill in the correct date and time manually when they are submitting the observation.

Yes, of course. This is the kind scenario I’m trying to verify. If the date in the observation looks suspicious (eg. photo shows flowers in bloom but the date is in January, organism reported far outside expected season, etc.), I’ll first check the EXIF for the photo to see if the suspicious date came from the EXIF or if it was entered manually.

There have been instances where it turned out that the date was correct, but the observer had entered the wrong location (the photo was taken far to the south of where the observation was reported).

In short, when I see an observation that somehow looks off, I check a bunch of things (EXIF, other observations from the same observer for the date in question, etc.) to try to see if something went wrong, and if so, what. Over the years, I’ve probably looked at the EXIF for hundreds if not thousands of photos on iNat.