Category Formulas, especially for EXIF?

Started by hanswkraus, July 17, 2018, 07:36:40 PM

Previous topic - Next topic

hanswkraus

Hi,
I would like to group my pics according to their focal length. After reading the docs I created a new category for testing purposes. With the Properties/Formula tab I entered "@Category[EXIF|Focal Length,between,10,12]" to match all pics where the "EXIF|Focal Length" field contained values between 10 and 12mm. This matched every single pic in my database.
When I tried "@Category[@All|EXIF|Focal Length,between,10,12]" this matched no pics.

What I'm doing wrong?

Any help appreciated,
Hans

Mario

#1
This syntax is not correct. You cannot access metadata that way in category formulas.
Category formulas cannot access arbitrary metadata. See https://www.photools.com/help/imatch/#cat_formulas.htm for full details about information.

To group files by metadata, use a data-driven category. See https://www.photools.com/help/imatch/#cat_data.htm for help.

IMatch by default creates several data-driven categories based on XMP EXIF data, e.g. by make, model and lens. You can find these categories in the Category View, under the IMatch Standard Categories top-level category.

Use these categories as examples for your own data-driven category. Basically you setup your data-driven category as the examples, but use the "focal length" standard tag instead.
In the Tag Selector dialog, just choose the standard tag as "Focal Length" or "Focal Length 35mm".

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

Maybe the statistics app will do all you need. It has statistics for focal length. Clicking on one of the bars will
select all images with this focal length range.

Mario

And there is also the Statistics Panel, which supports advanced options and supports all tags.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hanswkraus

Hi,

thanks for the answers. Maybe I should describe what I want to do.

I'm using Capture One as RAW converter. C1 has included corrections (especially distortion and vignetting) for most of my lenses but not for all. Currently I'm working with the pics of my wide angle Canon EF-S 10-18mm. This has pronounced distortion, at least at the wide end, which is plainly visible on architecture (interior of churches, ...). I would like to group those pics in intervals of Focus Length, say 10-12mm, 12-14mm, 14-16mm and 16-18mm. And select those files (with other selected categories) in the @Builder.

This should work not only for the pics which I have now but for all future pics too. Therefore a simple "AND" formula won't do the trick.

I know the Data Driven Categories - and use them already for some info like Lens and Camera from the EXIF data - but these give me only a selection possibility for the exact focus length but not for a range?

I tried the statistics panel - nice info which I didn't now it was there - but this gives me also groups of exact length but no range?

By the way: I'm probably dense but I read https://www.photools.com/help/imatch/#cat_formulas.htm again. And didn't find where it says that I cannot use data driven categories (which I have for EXIF|Focal Length) with the [...,between,...] syntax.

Kind regards,
Hans

Mario

#5
Ah, your EXIF.... was referring to some data-driven category you have created somewhere. Your first post was not were clear.

If you look at the help, you will find that you did not use the correct syntax. For example, if you want to filter by Metadata, you need to use the @MetadataTag formula.
Or is EXIF|FocalLength a data-driven category you have created? In that case you cannot use the between syntax - this is reserved for the @Metadata. You cannot mix parameters from different formulas (in this case @Categories and @Metadata). Each formula has its own syntax and parameters.

To create a category which uses the Focal Length metadata tag for input and shows only files with a value between 0 and 10, you would use

"@MetadataTag[Exif::Main\37386\FocalLength,between,0,10]"

This is an example from the help. I just swapped the tag.
Note that tag-based categories are slow. They are immensely powerful but can be a big drag when your database is huge. Set them to manual update and only refresh if needed.

Or, use the built-in range filter in data-driven categories, you may reach your goal as well, without fiddling with the @MetadataTag formula.
Search for Numeric Ranges on this help page: https://www.photools.com/help/imatch/#cat_data.htm

Of course you could also just use a Metadata Value filter in the Filter Panel for the Focal Length tag. The filter shows you all focal lengths in the current scope in a list, and you can just pick the values you are interested in. That's what I would do.



A value filter showing all focal length used in the current scope. Just pick the values you need to see all matching files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hanswkraus

Thanks a lot, it works now as I imagined.

Kind regards, Hans