Skip to main content
gillesdebda
Inspiring
Apr 23, 2025 8:02 AM UTC
Question

Analyse de l'utilisation des focales sur un ensemble de photos

Bonjour,

 

J'utilise LRC 14.2 sur Mac.

 

Je souhaite analyser l'ensemble des focales utilisées sur un groupe de photos.

Pour cela, j'effectue la manip suivante:

 

1- Module "Bibliothèque"

2- Sélection du groupe de photos dans la barre de gauche

3- Filtre de bibliothèque: Onglet "Métadonnées"

4- Colonne "Mot-clé", sélection "Tout"

5- Colonne "Appareil photo", sélection de ceux qui m'intéressent

6- Colonne "Objectif", sélection "Tout"

7- Colonne "Libellé", sélection "Tout"

8- Ajout colonne "Distance focale" à droite de la colonne "Libellé"

9- Colonne "Distance focale", sélection "Tout"

 

Maintenant j'aimerais exporter le résultat de la colonne "Distance focale" dans un tableur pour créer un graphique.

Comment faire ?

Existe t'il au autre moyen via un plugin LR par exemple ?

 

Gilles

5 replies

gillesdebda
Inspiring
Jun 3, 2025 7:04 AM UTC
Hello,

I found a solution to answer to my question.
First I tried the plugin List-View but there are some bugs on macos.
Then I installed a SQL DB tool : DB Browser for SQLite.
Open a .lrcat file from a backup and analysed all tables.
I understood a part of the functionalities from each table and I wrote two SQL requests.

The 1st provides the list of used focal length and the number of occurrences for each one. After export to a .csv file, it is easy to open it in a spreadsheet to build a chart.
The 2nd provides the list of used focal length per camera and lens. After export to a .csv file, it is easy to open it in a spreadsheet to build a pivot table.

Both requests have been made for Nikon camera.
It is easy to change that or to improve requests to take into account some other cameras.

SQL request #1
SELECT m.focalLength, count(m.focalLength) as numberOcc
FROM "main"."AgHarvestedExifMetadata" m
JOIN "main"."AgInternedExifCameraModel" c
ON m.cameraModelRef = c.id_local
JOIN "main"."AgInternedExifLens" l
ON m.lensRef = l.id_local
WHERE (c.value LIKE '%NIKON Z 6_2%' ESCAPE '\' OR c.value LIKE '%NIKON Z 7_2%' ESCAPE '\' OR c.value LIKE '%NIKON Z6_3%' ESCAPE '\' OR c.value LIKE '%NIKON D700%' ESCAPE '\')
GROUP BY m.focalLength
ORDER BY m.focalLength ASC;

SQL request #2
SELECT m.focalLength, l.value as lens, c.value as camera
FROM "main"."AgHarvestedExifMetadata" m
JOIN "main"."AgInternedExifCameraModel" c
ON m.cameraModelRef = c.id_local
JOIN "main"."AgInternedExifLens" l
ON m.lensRef = l.id_local
WHERE (c.value LIKE '%NIKON%' ESCAPE '\')
ORDER BY m.focalLength ASC;

Gilles
 
 
Translate
johnrellis
Legend
Jun 3, 2025 11:00 PM UTC

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

Another way of doing this that doesn't require SQL queries to the catalog database: Use the Any Filter plugin's sort command to export these fields to a CSV file:

 

 

Open the CSV in Excel or Google Sheets and create a pivot table:

 

 

Translate
gillesdebda
Inspiring
Jun 5, 2025 4:28 PM UTC

Hello @johnrellis 

Thanks for your idea.

I will test it asap ...

Have a good day.

Gilles

Translate
johnrellis
Legend
Apr 27, 2025 1:32 AM UTC

Several plugins will export one or more metadata fields of the selected photos to a CSV file: Any Filter's Sort command, Data Explorer, Listview.

Translate