AFInfo Tags for Pentax K3-iii

Started by ulrichk7, May 26, 2024, 07:22:54 AM

Previous topic - Next topic

capricorn

Quote from: Phil Harvey on April 08, 2025, 08:44:15 PMAlso, I'm thinking the tag should be called AFPointsSelected instead of AFPoints.
Looking at other Pentax models I'm not sure if AFPointsSelected would be the best choice. See attached screenshots of the test images I have.

The plug-in's current logic is to query AFPointSelected (w/o "s") and AFPointsInFocus and visualize the result. AFPointsSelected (w/ "s") has been used by exiftool only for K-1 and K-1 II but in this case it was redundant information.

If I look at the ExifToolGUI folder view for K-3 (8 images) and K-3 II (87 images), only AFPointSelected (w/o "s") and AFPointsInFocus have data. Somehow I get the feeling that it's strange that AFPointsInFocus is "none" for 6 out 8 images and there's not a K-3 II single image out of the 87 that has more than 1 AFPointsInFocus.

Anyway, I have posted introduction of the plugin in PentaxForums right now, and I expect there will be some feedback to better understand to what an extent the AF point tags match shooting practice. Plus, I want to collect response from real-world tests for K-3 III AF info.

As for the plugin, my aim for Pentax is same as for Nikon, i.e. getting rid of questionable combinations of selected/used/infocus and just put simple boxes, hopefully for not too many different tags for different models. With Warren's help I was able to figure out the one tag which is the relevant for all Nikon cameras (not considering the exceptions ;D )

In this context, it seems to me that AFPointsInFocus would be the better choice.

What do you think?


Pentax Various.jpg
Pentax K3.jpg
Pentax K3 II.jpg

Phil Harvey

This values of this tag may in fact indicate focus, but I can't tell.  All of the values are 2 for all of the samples.  All I can say for sure from the samples is that the AF point was selected.  A different value may indicate selected but not focused.  I include the "s" in this tag name not because I have seen multiple values, but because this is possible (unlike single-byte values for eg. AFPointSelected).

I don't know if the K-3II has its focus points decoded properly, but maybe we'll find out.  The K-3III seems very different in the way it stores this information.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

capricorn

OK, then let's proceed with whatever tag name you consider to be reasonable at this point.

On another topic that I forgot to mention in my prev post.

We have currently focused (nice pun, isn't it 😄) on the 41 user selectable focus points. The K-3 III has additional 60 not selectable points. If tag-wise these are handled like the non-selectable points on e.g. Nikon D850 (according to Warren, these never show up in the AF tags) then I would assume there is no real need to deal with that.

In case it's not - what would happen if exiftool encounters e.g. A1, A2 etc.?
(in this context, my contact should have probably better chosen 13x9 grid for the naming scheme, not 10x10).

K-3 III AF Layout.png

Phil Harvey

Interesting.  There are exactly 60 unknown bytes between AFPointsSelected and AFPointsUnknown.  The problem is that even if these represent the other 60 AF points it will be very difficult to figure out which bytes correspond to which points due to the irregular ordering of the AF points.

Right now, ExifTool decodes only the 41 points used in the samples.

I don't know why your user decided on E5 as the name of the central point.  I hope there was a good reason because I can't reconcile this with the AF-point diagram in your post.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

capricorn

Quote from: Phil Harvey on April 09, 2025, 12:40:22 PMI don't know why your user decided on E5 as the name of the central point.  I hope there was a good reason
I'm afraid there wasn't. And I didn't pay attention - sorry for that. I will check with him.

I will finish with some good news for today.

It seems I managed to find a quick and good mapping of the focus point names to pixel coordinates and was able to build the first prototype for K-3 III. The test images looked very good. Then I poured a glass of red wine and ran the plugin on the ~90 samples downloaded from dpreview. 8 were taken using Contrast Detect AF (with FaceDetect / ContrastDetect data still missing in EXIF) but the remaining ones looked really good!

Cheers to you and many thanks for your great support, Phil!

Cheers.jpg






capricorn

My contact confirmed that he didn't choose the names for a certain reason :(

I have prepared an Excel file with a proper scheme if you want to fix that in 13.28. See attachment.

First testing on 'real world' images looks really good!

Before giving this to the K-3 III users at Pentax Forums for extended testing I wanted to check with you, how complex you consider the task to decode information on contrast AF (ContrastDetectAfArea and FaceDetect information).

Would this need to be approached similarly to finding the focus points, i.e. capturing specific scenes (perhaps with specific settings), then trying to identify the respective tags?


K-3 III AF Points.jpg



Phil Harvey

#21
In the left side of your spreadsheet, do you mean to number the rows 2-10?  I think this should be 1-9 like the right side, correct?  I'll update 13.28 to use A1 though M9 with G5 as the center point.

Decoding contrast-detect and face-detect should be possible if I had a few sample images.  I probably don't need a full set for these because they tend to be stored a bit more logically than the phase-detect points.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

capricorn

Quote from: Phil Harvey on April 10, 2025, 12:43:25 PMIn the left side of your spreadsheet, do you mean to number the rows 2-10?  I think this should be 1-9 like the right side, correct?  I'll update 13.28 to use A1 though M9 with G5 as the center point.
Oh sh... yes, you're right. I have used a formula to fill the cell values starting from A1 and when I was done with the summary per row on the right side I inserted a row at the top to place the heading "Focus points:" :-[

I have 8 images captured with contrast AF, at least one of them clearly shows a face. Perhaps Christian has some more faces to add. I will put the images in my dropbox and mail you the link.

blue-j

I love this Lightroom plug-in!  So cool!  i would love to reproduce it on the web, and contribute toward the data wrangling.  Any guidance toward that end?  I see most of the plugin is in Lua, and the logic in not trivial, so porting to the web could end up taking years off my life.... ?  Is there a shared database of AF points?  Could ExifTool be made to create a composite tag, or do they vary too much?  - J

capricorn

Quote from: blue-j on April 10, 2025, 09:04:43 PMwould love to reproduce it on the web
The first thing that needs to be clarified before starting such a project is whether it is in accordance with the copyright holder's license terms. Which is not me, but the person who owns the Github repository and started this development:

https://github.com/musselwhizzle/Focus-Points#license

I suggest that you go to Github and create an issue for your request, as far as it concerns the plugin (not exiftool). I can use this as a reference to approach Joshua (the owner). We can also have all kinds of technical discussion there (Lua, AF point logic etc.). We should not hijack this thread which is about Pentax AF.

- Karsten

Phil Harvey

I've had a look at the contrast-detect samples and I can't see anything obvious.  I think more samples are necessary.  A few samples with exactly the same settings and the face and focus subject in different locations would be useful.   And some with multiple faces.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

blue-j

Karsten, i already knew the license before asking, thanks.  i was not hijacking the thread, nor was i off topic or inappropriate in posting this in the exiftool forum, if you read more slowly.  i was also asking whether a composite tag were possible, and whether a public database of AF points was already in the works.  Phil must have decoded these things a hundred times or more by this point!

- J

Phil Harvey

I don't know exactly what you are thinking of for the public database, but to be useful it would include coordinates for drawing the AF areas, which is somewhat beyond the scope of ExifTool.  However, if this information was available it could theoretically be used in a Composite tag of a custom config file, but likely isn't something I would build into the production ExifTool.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

capricorn

Quote from: blue-j on April 11, 2025, 01:24:51 PMi was not hijacking the thread
I'm sorry if you took my post as a blame - this was not my intention. It was just an offer to have detailed plugin related discussion in a place where this belongs.

blue-j

Understood!  Sorry I overreacted.  Makes sense.  : )

- J