Lightroom: Make smart collections smarter

  • 6
  • Idea
  • Updated 2 years ago
  • (Edited)
Today, smart collections in Lightrooms aren't as smart as they could be. Some examples that you cannot do with smart collections include:

  • Overexposed / Underexposed images. Requires API access to the histogram.
  • A bokeh/ultrasharp collection that includes all images with a depth of field below / above a certain value. Requires calculation by camera, lens, focal distance and aperture.
  • Images in or around a certain area. Requires extension of the geodata API.
  • images where the dominant color is similar to . Requires some API similar to Adobe Color that determines the dominant colors.
  • Images where keyword is not in .
  • All images that show a certain person
Although I know that you can do some these things, kind of, they are not available in smart collections. Here is my proposed solution:
  • Provide an API that allows you accessing just everything Lightroom knows about an image, including raw pixels, rendered pixels, EXIF data, histogram.
  • Provide “advanced smart collections”. An advanced smart collection is a collection where you provide a filter function that takes the photo as an argument and returns a boolean whether the photo is in or not.
  • I'd love to see it not only in Lua, but also in JavaScript. Embedding a JavaScript engine isn’t a big thing, is it?
  • Oh and of course: I want these smart collections to be synchronizable to Lightroom mobile
Photo of Hendrik M Halkow

Hendrik M Halkow

  • 6 Posts
  • 2 Reply Likes

Posted 2 years ago

  • 6
Photo of Pidu Peyer

Pidu Peyer

  • 4 Posts
  • 2 Reply Likes
I couldn't say it in better words - thank you!
Photo of Michael Zoradi

Michael Zoradi

  • 4 Posts
  • 0 Reply Likes
A thousand times yet!  Simply doing this would improvment my workflow so much:

  • Images where keyword is not in <LIST OF KEYWORDS HERE>.
I remember using iPhoto years ago and it had the ability to do this (my guess is that Apple Photos still does).  How is it possible there but not Lightroom? :(
Photo of Hendrik M Halkow

Hendrik M Halkow

  • 6 Posts
  • 2 Reply Likes
Thanks. Which smart collections can you imagine being built with this feature? What would you like to see?
Photo of Michael Zoradi

Michael Zoradi

  • 4 Posts
  • 0 Reply Likes
Once I've gone through a set of images I tag them all as "Reviewed".  This tells me no need to go back and keyword and/or rate them anymore.  

If I could add a rule in a Smart Collection to say "only show images NOT tagged "Reviewed" it would make culling through images so much easier.  Right now I can make a Smart Collection for unrated images but this still pulls in images that I have "reviewed" previously not chose not to rate.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3587 Posts
  • 927 Reply Likes
"only show images NOT tagged Reviewed"

Smart collections let you do that easily:



"Images where keyword is not in <LIST OF KEYWORDS HERE>"

You can do this:



Though this example calls out a different, fundamental flaw with smart collections: There is no exact match of multi-word keywords (keywords containing spaces).  So "Keywords contains words John" will match the keyword "John Ellis".
Photo of Michael Zoradi

Michael Zoradi

  • 4 Posts
  • 0 Reply Likes
Thanks John!  Your first example is exactly what I was describing (now if only I didn't feel a little dumb for not realizing that it was already in Lightroom).  Appreciate your response!
Photo of John R. Ellis

John R. Ellis, Champion

  • 3587 Posts
  • 927 Reply Likes
"Provide an API that allows you accessing just everything Lightroom knows about an image, including raw pixels, rendered pixels, EXIF data, histogram."

To have more influence on Adobe, I think it would help to be more specific about what's missing and what you want.  The LR SDK does provide access to the most commonly used metadata fields, including EXIF, as well as lots of other information about images stored in the catalog. See my Any Filter plugin for an example of how that is used -- it has 341 different searchable fields. While there is some information in the catalog not accessible to plugins, most is accessible.

Plugins can also get access to rendered pixels by exporting as a TIFF or PNG and reading the exported file (I have a couple of plugins that do that).   Accessing "raw pixels" needs to be defined more carefully -- if you want to access the raw sensor data (e.g. the Bayer mosaic), then that only makes sense to read it in conjunction with all the other information in the raw file.  If you want the pixels as you see them when you first import a raw into the catalog, a plugin can get them by exporting the image without any develop settings.

"All images that show a certain person"

If you mean images that were tagged by LR's face tagging, that information is accessible via the SDK.  The face tags appear as keywords in the keyword hierarchy, and the SDK can access the keywords.

"Images in or around a certain area. Requires extension of the geodata API."

The GPS coordinates are available via the SDK.  The Any Filter plugin and the Geo-encoding Support plugin use this to let you search for images near a given location.

"Provide advanced smart collections. An advanced smart collection is a collection where you provide a filter function that takes the photo as an argument and returns a boolean whether the photo is in or not."

A number of plugins accomplish this by setting custom metadata fields that are searchable within smart collections and the filter bar.  It's not as simple as just defining a Lua function taking the photo as an argument, but it's quite doable, as evidenced by the plugins.
Photo of Hendrik M Halkow

Hendrik M Halkow

  • 6 Posts
  • 2 Reply Likes
Hi John,
thanks for sharing your plugin here as this is what I was thinking of, except that is lacks integration of smart collections. The filter examples you provide couldn't be better. I will definitely give your plugin a try.

You are right that some examples I provided are already in the SDK although the API could be arguably a bit nicer (e. g. geodata).

But the key point of my idea are the 'advanced' smart collections you cited where you provide a filter function. Because that feature doesn't exist, you had to create your plugin the way you did, right? If that feature was available, your plugin would be a set of filter functions for smart collections. To use it, you would create a new smart collection and select a filter function from a function library that is built from plug-ins and creations by the user. Wouldn't that be much nicer?
Photo of John R. Ellis

John R. Ellis, Champion

  • 3587 Posts
  • 927 Reply Likes
"If that feature was available, your plugin would be a set of filter functions for smart collections. To use it, you would create a new smart collection and select a filter function from a function library that is built from plug-ins and creations by the user. Wouldn't that be much nicer?"

That would be simpler way of providing much of the functionality of Any Filter, agreed.  But there is other functionality of Any Filter that this wouldn't accommodate: additional comparison operators (especially exact match), more powerful treatment of multi-valued fields like keywords, providng the search as a LR filter rather than a smart collection (which allows the searches to be intersected with the current folder or collection, something that's hard to do with smart collections).

Other plugins expose their "filters" as custom metadata fields that are searchable by both smart collections and the library filter bar.  In some ways that's not as elegant as your proposal, but it accomplishes the same end with a simple mechanism.