Skip to main content
gillesdebda
Inspiring
April 23, 2025
Question

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

  • April 23, 2025
  • 2 replies
  • 276 views

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

2 replies

gillesdebda
Inspiring
June 3, 2025
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
 
 
johnrellis
Genius
June 3, 2025

[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:

 

 

gillesdebda
Inspiring
June 5, 2025

Hello @johnrellis 

Thanks for your idea.

I will test it asap ...

Have a good day.

Gilles

johnrellis
Genius
April 27, 2025

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.