Bug 511622

Summary: Display focus rectangle for Nikon Z 5 ii pictures
Product: [Applications] digikam Reporter: KaiB <kaizubg>
Component: Metadata-FocusAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.9.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 8.9.0
Sentry Crash Report:
Attachments: attachment-451503-0.html
Z5-MFP
attachment-686980-0.html
attachment-991411-0.html
attachment-1300462-0.html

Description KaiB 2025-11-04 13:37:45 UTC
I suggest the development of  the display of the focus rectangle stored in the Nikon Z 5 ii files as it is shown on the camera image preview. 

Orginal sample images can be downloaded from: https://drive.google.com/drive/folders/1yh_0Ke7qY9x0CWGVliPNoEMFQ721jFf7?usp=drive_link

SUMMARY


STEPS TO REPRODUCE
1. Open image in the preview window 
2. 
3. 

OBSERVED RESULT
-

EXPECTED RESULT
The focus rectangle is displayed in the preview window in the correct location.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Fedora 43 / Gnome 49
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: Qt6?

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2025-11-04 13:47:24 UTC
I haven't looked at the download link yet. I already added support for the Nikon checkerboard coordinates for my Z5. The Nikon Z5 II will probably be different. What I need is an image where as many focus points as possible are active, or several images, so that the outermost focus points at the edge are visible. A photo of the camera display showing the focus points is also needed.

Maik
Comment 2 KaiB 2025-11-04 13:52:40 UTC
Created attachment 186488 [details]
attachment-451503-0.html

Hi,

In my examples I have only one focus rectangle (eye). I can provide you other later if you
need them. 
Pictures from the camera display are provided.

Kai


ti, 2025-11-04 kello 13:47 +0000, Maik Qualmann kirjoitti:
> https://bugs.kde.org/show_bug.cgi?id=511622
> 
> --- Comment #1 from Maik Qualmann <metzpinguin@gmail.com> ---
> I haven't looked at the download link yet. I already added support for the
> Nikon checkerboard coordinates for my Z5. The Nikon Z5 II will probably be
> different. What I need is an image where as many focus points as possible are
> active, or several images, so that the outermost focus points at the edge are
> visible. A photo of the camera display showing the focus points is also needed.
> 
> Maik
>
Comment 3 Maik Qualmann 2025-11-05 07:13:22 UTC
Created attachment 186511 [details]
Z5-MFP

Thank you for the sample images. Images with a single focus point are already supported by digiKam for all Nikon Z cameras.
You just need to select "Show Focus Points" in the context menu in the preview. This option, like the Show Faces option, is not saved across sessions.

So your sample images are already perfectly supported.

What I mean is the multi-focus point mode (usually automatic), which is currently only supported for the Z5, see attached image.

Maik
Comment 4 KaiB 2025-11-05 11:23:49 UTC
Created attachment 186518 [details]
attachment-686980-0.html

Hi,

I have uploaded files taken with camera option 'AF/MF subject detection' off into my gdrive
folder. This results with a number of focus points across the picture. 

However I can't confirm that the functionality works with a v.8.9.0 appimage from Yesterday.

Kai


ke, 2025-11-05 kello 07:13 +0000, Maik Qualmann kirjoitti:
> '://bugs.kde.org/show_bug.cgi?id=511622 [1]
> 
> --- Comment #3 from Maik Qualmann <metzpinguin@gmail.com> ---
> Created attachment 186511 [details]
>   --> https://bugs.kde.org/attachment.cgi?id=186511&action=edit
> Z5-MFP
> 
> Thank you for the sample images. Images with a single focus point are already
> supported by digiKam for all Nikon Z cameras.
> You just need to select "Show Focus Points" in the context menu in the preview.
> This option, like the Show Faces option, is not saved across sessions.
> 
> So your sample images are already perfectly supported.
> 
> What I mean is the multi-focus point mode (usually automatic), which is
> currently only supported for the Z5, see attached image.
> 
> Maik
> 


[1] '://bugs.kde.org/show_bug.cgi?id=511622 https://bugs.kde.org/show_bug.cgi?id=511622
Comment 5 Maik Qualmann 2025-11-05 20:56:03 UTC
Git commit 2ad463719415a558b65237da7901c27a309be2f8 by Maik Qualmann.
Committed on 05/11/2025 at 20:55.
Pushed by mqualmann into branch 'master'.

add support of Nikon Z5 II focus points
FIXED-IN: 8.9.0

M  +1    -1    NEWS
M  +22   -9    core/libs/metadataengine/focuspoint/focuspoints_extractor_nikon.cpp

https://invent.kde.org/graphics/digikam/-/commit/2ad463719415a558b65237da7901c27a309be2f8
Comment 6 Maik Qualmann 2025-11-05 21:04:48 UTC
The multi-focus points might still need some fine-tuning. Images showing the multi-focus points at the extreme edges would be helpful. To properly view the focus points, I might need to install NX Studio, as the screenshot from the camera display make it difficult to see exactly where the points are located.

Maik
Comment 7 KaiB 2025-11-06 14:10:17 UTC
Created attachment 186543 [details]
attachment-991411-0.html

OK, tested with the newest appimage: digiKam-8.9.0-20251106T110057-Qt6-x86-64.appimage with
the following results:

Taken with AF/MF subject detection opitions AUTO
DSC_1948.jpg & DSC_1949.jpg -- Focus points NOT VISIBLE
DSC_1948.nef & DSC_1949.nef -- Focus points NOT VISIBLE

Taken with AF/MF subject detection opitions OFF
DSC_2024.jpg -- Focus points VISIBLE
DSC_2024.nef -- Focus points NOT VISIBLE

Kai
Comment 8 Maik Qualmann 2025-11-06 20:32:36 UTC
Git commit ec2c35b491d0c873f11402df418f6f052b44c825 by Maik Qualmann.
Committed on 06/11/2025 at 20:31.
Pushed by mqualmann into branch 'master'.

fix display single focus point with Nikon Z5 II images

M  +1    -1    core/libs/metadataengine/focuspoint/focuspoints_extractor_nikon.cpp

https://invent.kde.org/graphics/digikam/-/commit/ec2c35b491d0c873f11402df418f6f052b44c825
Comment 9 Maik Qualmann 2025-11-06 20:38:37 UTC
The problem with the NEF images is more difficult. ExifTool reports a correct image height, but an image width of 0 pixels.
Your images were taken in 10 MP format. Does ExifTool display the correct image width for images with the full 24 MP resolution? Please test this. Otherwise, we will have to report the problem to ExifTool.

Maik
Comment 10 Maik Qualmann 2025-11-06 20:49:17 UTC
Okay, it's not an ExifTool problem; the correct value is displayed on the command line. In digiKam, the value isn't always zero either, but it's not correct, so the problem must be with digiKam...To be continued...

Maik
Comment 11 Maik Qualmann 2025-11-06 21:35:00 UTC
Git commit 03033b322d1b572482db9396121650790a0fbc9b by Maik Qualmann.
Committed on 06/11/2025 at 21:34.
Pushed by mqualmann into branch 'master'.

fix display focus points with Nikon Z5 II NEF images

M  +2    -0    core/libs/metadataengine/focuspoint/focuspoints_extractor.cpp
M  +2    -0    core/libs/metadataengine/focuspoint/focuspoints_extractor_nikon.cpp

https://invent.kde.org/graphics/digikam/-/commit/03033b322d1b572482db9396121650790a0fbc9b
Comment 12 KaiB 2025-11-07 11:36:56 UTC
Created attachment 186578 [details]
attachment-1300462-0.html

Hi,

Confirm that focuspoints (boxes) are visible in digiKam taken with Nikon Z5ii.

Test cases:
- subject detection on / off
- jpeg and nef files

Great! Thank you Maik!

Kai


to, 2025-11-06 kello 21:35 +0000, Maik Qualmann kirjoitti:
> https://bugs.kde.org/show_bug.cgi?id=511622
> 
> --- Comment #11 from Maik Qualmann <metzpinguin@gmail.com> ---
> Git commit 03033b322d1b572482db9396121650790a0fbc9b by Maik Qualmann.
> Committed on 06/11/2025 at 21:34.
> Pushed by mqualmann into branch 'master'.
> 
> fix display focus points with Nikon Z5 II NEF images
> 
> M  +2    -0    core/libs/metadataengine/focuspoint/focuspoints_extractor.cpp
> M  +2    -0   
> core/libs/metadataengine/focuspoint/focuspoints_extractor_nikon.cpp
> 
> https://invent.kde.org/graphics/digikam/-/commit/03033b322d1b572482db9396121650790a0fbc9b
>