Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version 8 Likes Search this Thread
04-05-2017, 05:59 AM - 1 Like   #1
New Member




Join Date: Jan 2017
Location: Saint-Nazaire
Posts: 10
Focus-Point Lightroom plugin for Pentax: we need your help!

Hello fellow Pentaxians,

This is a cross-post from Reddit, because I think this will get a much better response here.

I've been collaborating on the excellent Focus-Points plugin for Lightroom in order to add full support for Pentax cameras. So far, I have managed to add complete support for my Pentax K-50, including both phase and contrast focusing modes. I'm confident that we can make this the most complete focus-point plugin around, but we need your help to accomplish this! We need two things from you:


Task 1: Play with your AF system and send me the raw files:

Each Pentax camera has a mind of its own and there are often subtle differences in the metadata between models. In order to account for these differences, I'll need sample raw files from your camera, while flexing the AF system using the different focus modes. Take a look at these images for an example. I suggest following a similar procedure: put your camera on a tripod, then move a card or some other easy-to-see object around to as you activate each AF point.

Manual selection of each focus point is definitely the most important task, but you should also use your auto-select and center-focus modes. It's OK to mis-focus, because the plugin should also be able to handle that. Play around with your live-view focusing modes, including face-detect, tracking, select, and center-focus. If your AF system is like the K-50, it may prefer lighting up two focus points instead of one. Don't worry about this -- it's just another Pentax quirk.

Edit: Preferably, do not use "Enable AF2" back button focusing. This often leads to missing focus point information, and the file will be useless for our purposes.


Task 2: Map your camera focus points:

Unfortunately, Pentax cameras do not save the focus point locations within the metadata; this means that we have to manually map the positions for each camera. This shouldn't be much of a problem, as there are relatively few Pentax models and many of them share the same AF system. For example, this is what the AF points look like for the K-50/70. If you look through the viewfinder and see exactly that layout, then that means that you don't need to map your camera (but let me know in the comments).

If you do want to map your camera, allow me to suggest the following simple method. Take a sheet of paper and mark a very fine "x" on it. Tape it to the wall in a well-illuminated area. Mount your camera on a tripod, and then manually select a focus point. I suggest starting on the top-left, then go left to right and top to bottom through each row. Take a photo with the focus point on top of the mark, trying to match the center of the point to the mark as closely as you can. After doing this for every point, you should end up with as many images as you have focusing points, like this. Make sure you do not apply any distortion correction to your images!

It is then very easy to combine these in Photoshop using the "darken" layer blending. Since most of the points will share at least one coordinate with others, we just need to average out the value for each row and column. Adjusting the center point to be exactly at the center of the image will give us a pretty good a pretty good estimate for every focus point. Finally, the PS ruler tool gives us the exact pixel coordinates.

If you do not feel up to measuring your point positions, then send me the sequence of images in full-size jpegs and I'll be happy to do it for you.


Summary

For those of you who want to participate, you can PM me a Dropbox link, or use any file sharing method you prefer. If you are good with exiftool or Lua, or are interested in porting this to Windows, you can also donate a little bit of your time. You can find the GitHub repository here.

I know that this is a lot to ask of you; but with a little work, we can help make a great tool for all of us to enjoy! I know that I often complain that no one cares about Pentaxians when developing photography software. This is our chance to change that!


Last edited by roguephysicist; 04-11-2017 at 12:13 PM. Reason: Correcting information about back-button focusing.
04-07-2017, 04:33 AM   #2
Pentaxian




Join Date: Dec 2011
Posts: 3,112
QuoteOriginally posted by roguephysicist Quote
I'm confident that we can make this the most complete focus-point plugin around
Interesting.

Your hompage seems to suggest it currently is a solution for a few niche users only.

QuoteQuote:
Not currently working on Windows.
Has that been solved yet? Otherwise it would be wasted effort.
04-07-2017, 04:56 AM   #3
New Member




Join Date: Jan 2017
Location: Saint-Nazaire
Posts: 10
Original Poster
QuoteOriginally posted by beholder3 Quote
Interesting.

Your hompage seems to suggest it currently is a solution for a few niche users only.
The plugin is for anyone that wants to review what AF point/area was used in a given photo. This can be very useful for educational purposes, gauging AF performance, camera reviews, figuring out why some shots are mis-focused, etc.

QuoteOriginally posted by beholder3 Quote
Has that been solved yet? Otherwise it would be wasted effort.
It is not wasted effort. Supported cameras will carry over to Windows when the issue is resolved, and Mac users can start using it right now.

The plugin is open-source, so contributions to the code are always very welcome.
04-09-2017, 11:57 PM   #4
Pentaxian
Class A's Avatar

Join Date: Aug 2008
Location: Wellington, New Zealand
Posts: 11,251
QuoteOriginally posted by roguephysicist Quote
DO NOT USE BACK-BUTTON FOCUSING! The camera will not register the in-focus point, and the file will be useless for our purposes.
This means the plugin won't be useful to anyone using back-button AF activation, right?

Are you sure the information isn't stored somewhere else in this case?
Seems very odd of the engineers to make the storage of AF area selection dependent on the method that was used to activate AF.

04-10-2017, 01:23 AM   #5
New Member




Join Date: Jan 2017
Location: Saint-Nazaire
Posts: 10
Original Poster
QuoteOriginally posted by Class A Quote
This means the plugin won't be useful to anyone using back-button AF activation, right?

Are you sure the information isn't stored somewhere else in this case?
Seems very odd of the engineers to make the storage of AF area selection dependent on the method that was used to activate AF.
There's a thread on this here, and I also found equivalent behavior for Canon (read his note, and see EXIF key 161).

It's probably a firmware bug or a really bad engineering decision. It will store the information about the selected AF point, but not whether the point is in focus or not. Unfortunately, this does mean that the plugin isn't very useful for people who use back-button AF (myself included). However, I think that we are probably the minority, so the plugin would work fine for most people.
04-11-2017, 01:55 AM   #6
Pentaxian
Class A's Avatar

Join Date: Aug 2008
Location: Wellington, New Zealand
Posts: 11,251
QuoteOriginally posted by roguephysicist Quote
It's probably a firmware bug or a really bad engineering decision.
Thanks for the clarification.

QuoteOriginally posted by roguephysicist Quote
It will store the information about the selected AF point, but not whether the point is in focus or not.
Isn't the information about the selected AF area the most important?
Wouldn't the active AF area be what people are after when using such a plugin?

After all, the camera may or may not be right in thinking it achieved focus. To determine whether focus has actually been achieved it is much more helpful to show a focus mask (cf. Capture One), potentially restricted to the AF area chosen.

I'm not sure about the ratio between standard vs back-button AF users. I just know that I find the standard focusing method consistent with point-and-shoot camera usage. OK, that's a bit harsh, but true in spirit.
04-11-2017, 01:55 AM   #7
Pentaxian
Class A's Avatar

Join Date: Aug 2008
Location: Wellington, New Zealand
Posts: 11,251
QuoteOriginally posted by roguephysicist Quote
It's probably a firmware bug or a really bad engineering decision.
Thanks for the clarification.

QuoteOriginally posted by roguephysicist Quote
It will store the information about the selected AF point, but not whether the point is in focus or not.
Isn't the information about the selected AF area the most important?
Wouldn't the active AF area be what people are after when using such a plugin?

After all, the camera may or may not be right in thinking it achieved focus. To determine whether focus has actually been achieved it is much more helpful to show a focus mask based on the captured image data (cf. Capture One), potentially restricted to the AF area chosen.

I'm not sure about the ratio between standard vs back-button AF users. I just know that I find the standard focusing method consistent with point-and-shoot camera usage. OK, that's a bit harsh, but true in spirit.

04-11-2017, 02:26 AM - 1 Like   #8
New Member




Join Date: Jan 2017
Location: Saint-Nazaire
Posts: 10
Original Poster
QuoteOriginally posted by Class A Quote
Thanks for the clarification.
Isn't the information about the selected AF area the most important?
Wouldn't the active AF area be what people are after when using such a plugin?
Absolutely.

However, on the two Pentax models I have messed with (K-50 and K-1), the camera does NOT record the selected AF points when the auto-select mode is enabled. I think that other manufacturers do record this data, so this probably boils down to another poor engineering choice for Pentax. In other words, the camera will not record any useful focus point information If you have auto-select enabled and use back button focusing. Total suck.

This may vary per camera, which is why I need people with different models to send me their raw files so I can hash all this out.

I looked up the focus masks in Capture One that you mentioned. Very interesting, although I wonder if it detects local contrast and judges sharpness from that? Coupled with a focus-points plugin, that would indeed be a great way to find out what regions are in focused, and you could get the best of both worlds.
04-11-2017, 05:50 AM   #9
Veteran Member




Join Date: Jun 2009
Posts: 11,913
QuoteOriginally posted by Class A Quote
Isn't the information about the selected AF area the most important?
Wouldn't the active AF area be what people are after when using such a plugin?
IMHO, that would not be as useful for assessing AF performance as displaying the specific AF points that were actually used. AF area coverage (for example 33 points or 24 points) can be very broad on the K-1. Wouldn't help much in figuring out questions like: 'what exactly did the camera focus on?'.

A Lightroom plugin with an image overlay that shows the AF points that were actually used in an image is all that is required, and could be very useful indeed.

The K-1, K-3, K-S2, K-50 etc can already display the AF points used in an image, but the problem is that this is only shown in a tiny part of the display on the back of the camera screen under playback mode:



Playback > INFO> 'Detailed Information Display' (p-15 of the K-1 manual).

(The issue has previously been discussed here:
Focus point indicator on preview/playback - PentaxForums.com ).
04-11-2017, 06:13 AM   #10
New Member




Join Date: Jan 2017
Location: Saint-Nazaire
Posts: 10
Original Poster
QuoteOriginally posted by rawr Quote
A Lightroom plugin with an image overlay that shows the AF points that were actually used in an image is all that is required, and could be very useful indeed.
That is exactly what we are working on here. The plugin reads all the available information and displays it. Unfortunately, the Pentax metadata is not as complete as I would like it; but it displays what was selected and/or in-focus, if available.
04-11-2017, 09:51 AM   #11
Pentaxian
Class A's Avatar

Join Date: Aug 2008
Location: Wellington, New Zealand
Posts: 11,251
QuoteOriginally posted by rawr Quote
IMHO, that would not be as useful for assessing AF performance as displaying the specific AF points that were actually used.
You are reading a difference into my statements that does not exist.

I only wrote "AF areas" because there are no "AF points". However, I mean the same thing. The so-called "points" are actually pretty big areas. They are not all uniformly shaped either. Hence, AFAIC, it makes more sense to speak of "AF areas" but I do mean the very same thing as you when you say "AF point".

P.S.: I trust you know about the size of the so-called "points". If you haven't done it yet, try moving a "point" over a single point of focus in an otherwise homogeneous area and be amazed how far you need to veer away for the camera to actually lose focus. I believe many misfocused shots are the result of the photographer believing they have pin-pointed an area, while in actuality they inevitably give the camera a lot of leeway to pick focus from (even though single-"point" selection is used).
04-11-2017, 10:22 AM   #12
Pentaxian




Join Date: Dec 2011
Posts: 3,112
QuoteOriginally posted by roguephysicist Quote
It will store the information about the selected AF point, but not whether the point is in focus or not.
There are multiple things incorrect in your claims.

a) "using back button autofocus" is a completely different thing from setting the shutter button to not activate autofocus. While you might optionally do the latter, you can easily use back button focus without first deactivating it on the shutter button. All users of back button focus I know don't suppress AF on using the shutter button. There are just some who use AF deactivate.
And so both the selected AF point and the AF point in focus in single point select are stored correctly in a K-1 when using back button focusing.

b) even when changing the button usage to AF2 if something is actually in focus in AF.S select focus points mode then there is the correct value stored in AF points in focus on a K-1 with recent firmware.
04-11-2017, 11:04 AM   #13
Veteran Member




Join Date: Jun 2009
Posts: 11,913
QuoteOriginally posted by Class A Quote
I only wrote "AF areas" because there are no "AF points".
I know there are no AF pin-points per se in the hardware. Images of the PDAF sensor and lens assembly make that clear.

Unfortunately the Pentax manual and camera settings use terms like 'area' and 'point' rather loosely - eg "AF Mode Auto...Out of the 33 AF points, the camera automatically selects the optimum focussing area " ..."AF Mode - Expanded Area AF (S) - Sets the focussing area to the user selected point from 33 points ...8 peripheral points used as back-up points". 'Point' sometimes seems interchangable with 'area'.

I would simply like to see a display overlay highlighting which of the 33 points available (in the case of K-1) were used to make focus in an image.
04-11-2017, 12:09 PM - 1 Like   #14
New Member




Join Date: Jan 2017
Location: Saint-Nazaire
Posts: 10
Original Poster
QuoteOriginally posted by beholder3 Quote
There are multiple things incorrect in your claims.

a) "using back button autofocus" is a completely different thing from setting the shutter button to not activate autofocus. While you might optionally do the latter, you can easily use back button focus without first deactivating it on the shutter button. All users of back button focus I know don't suppress AF on using the shutter button. There are just some who use AF deactivate.
And so both the selected AF point and the AF point in focus in single point select are stored correctly in a K-1 when using back button focusing.
You are absolutely correct. I had not considered this scenario, and had only taken account the "Enable AF2" case. Thanks!

QuoteQuote:
b) even when changing the button usage to AF2 if something is actually in focus in AF.S select focus points mode then there is the correct value stored in AF points in focus on a K-1 with recent firmware.
It would seem that we are both slightly wrong in this case! I just took some shots to confirm this and discovered a pretty subtle detail. I'll call the rear button "AF2" for the purpose of this discussion. It turns out that if you press-and-hold AF2 while taking the picture, it works just like using the regular shutter-button activation and records both AFPointSelected (when available) and AFPointsInFocus will contain the correct information. However, this is not the case if you press AF2 to focus and then release it before pressing the shutter button to take the photo. Any subsequent photos taken without holding down the button will obviously also register "None" for AFPointsInFocus.

It is worth mentioning that the plugin will always work if the information is present in the metadata, regardless of what button is used.

In summary:
Using back button focusing can yield useful information depending on how you use it! Which is good news indeed. This is exactly why I want to review RAW files and consult with you guys -- to learn about the many quirks that these cameras have. I will amend my original post to reflect this new information.

---------- Post added 04-11-17 at 12:14 PM ----------

QuoteOriginally posted by rawr Quote
I would simply like to see a display overlay highlighting which of the 33 points available (in the case of K-1) were used to make focus in an image.
Send me a raw file and we can make it happen.
04-11-2017, 12:38 PM   #15
Site Supporter
Site Supporter
newmikey's Avatar

Join Date: May 2007
Photos: Gallery
Posts: 2,287
QuoteOriginally posted by roguephysicist Quote
Unfortunately, Pentax cameras do not save the focus point locations within the metadata; this means that we have to manually map the positions for each camera.
I'm not entirely sure that is correct. Exiftool has the following metadata fields which reference focuspoints - the formatting here is rather ugly but you can look up the Pentax makernotes on the exiftool website. Is that in any way helpful or am I merely misinterpreting what you are trying to do?

Code:
0x000e	AFPointSelected	int16u	(K-1) 
[Value 0]
0 = None
1 = Top-left
2 = Top Near-left
3 = Top
4 = Top Near-right
5 = Top-right
6 = Upper Far-left
7 = Upper-left
8 = Upper Near-left
9 = Upper-middle
10 = Upper Near-right
11 = Upper-right
12 = Upper Far-right
13 = Far Far Left
14 = Far Left
15 = Left
16 = Near-left
17 = Center
18 = Near-right
19 = Right
20 = Far Right
21 = Far Far Right
22 = Lower Far-left
23 = Lower-left
24 = Lower Near-left
25 = Lower-middle
26 = Lower Near-right
27 = Lower-right 28 = Lower Far-right
29 = Bottom-left
30 = Bottom Near-left
31 = Bottom
32 = Bottom Near-right
33 = Bottom-right
263 = Zone Select Upper-left
264 = Zone Select Upper Near-left
265 = Zone Select Upper Middle
266 = Zone Select Upper Near-right
267 = Zone Select Upper-right
270 = Zone Select Far Left
271 = Zone Select Left
272 = Zone Select Near-left
273 = Zone Select Center
274 = Zone Select Near-right
275 = Zone Select Right
276 = Zone Select Far Right
279 = Zone Select Lower-left
280 = Zone Select Lower Near-left
281 = Zone Select Lower-middle
282 = Zone Select Lower Near-right
283 = Zone Select Lower-right
65531 = AF Select
65532 = Face Detect AF
65533 = Automatic Tracking AF
65534 = Fixed Center
65535 = Auto
[Value 1]
0 = Single Point
1 = Expanded Area 9-point (S) 3 = Expanded Area 25-point (M)
5 = Expanded Area 33-point (L)
(K-3)
[Value 0]
0 = None
1 = Top-left
2 = Top Near-left
3 = Top
4 = Top Near-right
5 = Top-right
6 = Upper-left
7 = Upper Near-left
8 = Upper-middle
9 = Upper Near-right
10 = Upper-right
11 = Far Left
12 = Left
13 = Near-left
14 = Center
15 = Near-right
16 = Right
17 = Far Right
18 = Lower-left
19 = Lower Near-left
20 = Lower-middle
21 = Lower Near-right
22 = Lower-right
23 = Bottom-left
24 = Bottom Near-left
25 = Bottom
26 = Bottom Near-right
27 = Bottom-right
257 = Zone Select Top-left
258 = Zone Select Top Near-left 259 = Zone Select Top
260 = Zone Select Top Near-right
261 = Zone Select Top-right
262 = Zone Select Upper-left
263 = Zone Select Upper Near-left
264 = Zone Select Upper-middle
265 = Zone Select Upper Near-right
266 = Zone Select Upper-right
267 = Zone Select Far Left
268 = Zone Select Left
269 = Zone Select Near-left
270 = Zone Select Center
271 = Zone Select Near-right
272 = Zone Select Right
273 = Zone Select Far Right
274 = Zone Select Lower-left
275 = Zone Select Lower Near-left
276 = Zone Select Lower-middle
277 = Zone Select Lower Near-right
278 = Zone Select Lower-right
279 = Zone Select Bottom-left
280 = Zone Select Bottom Near-left
281 = Zone Select Bottom
282 = Zone Select Bottom Near-right
283 = Zone Select Bottom-right
65531 = AF Select
65532 = Face Detect AF
65533 = Automatic Tracking AF
65534 = Fixed Center
65535 = Auto
[Value 1]
0 = Single Point
1 = Expanded Area 9-point (S) 3 = Expanded Area 25-point (M)
5 = Expanded Area 27-point (L)
(other models)
[Value 0]
0 = None
1 = Upper-left
2 = Top
3 = Upper-right
4 = Left
5 = Mid-left
6 = Center
7 = Mid-right
8 = Right 9 = Lower-left
10 = Bottom
11 = Lower-right
65531 = AF Select
65532 = Face Detect AF
65533 = Automatic Tracking AF
65534 = Fixed Center
65535 = Auto
0x000f AFPointsInFocus
AFPointsInFocus int32u
int16u (K-3 only)
0x0 = (none)
Bit 0 = Top-left
Bit 1 = Top Near-left
Bit 2 = Top
Bit 3 = Top Near-right
Bit 4 = Top-right
Bit 5 = Upper-left
Bit 6 = Upper Near-left
Bit 7 = Upper-middle
Bit 8 = Upper Near-right
Bit 9 = Upper-right
Bit 10 = Far Left
Bit 11 = Left
Bit 12 = Near-left
Bit 13 = Center
Bit 14 = Near-right
Bit 15 = Right
Bit 16 = Far Right
Bit 17 = Lower-left
Bit 18 = Lower Near-left
Bit 19 = Lower-middle
Bit 20 = Lower Near-right
Bit 21 = Lower-right
Bit 22 = Bottom-left
Bit 23 = Bottom Near-left
Bit 24 = Bottom
Bit 25 = Bottom Near-right
Bit 26 = Bottom-right
(other models)
0x0 = Fixed Center or Multiple
0x1 = Top-left
0x2 = Top-center
0x3 = Top-right
0x4 = Left
0x5 = Center
0x6 = Right
0x7 = Bottom-left
0x8 = Bottom-center
0x9 = Bottom-right
0xffff = None
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
af, af2, autofocus, button, camera, center, development, focus, focus points, frame, images, information, k-1, lightroom, list, look, map, modes, pentax, pentax news, pentax rumors, photography, photoshop, plugin, post, shutter, software, system

Similar Threads
Thread Thread Starter Forum Replies Last Post
Someone made a Lightroom plugin that shows you where the camera's focus point was lithedreamer Digital Processing, Software, and Printing 6 05-28-2018 01:40 PM
NEW Tethering Plugin for LR and 645Z.. should we expect the same for the FF?? kooks Pentax Full Frame 2 12-11-2015 12:50 PM
New Lightroom plugin - Lightroom Analytics jrafael Digital Processing, Software, and Printing 2 02-20-2014 05:25 PM
Eleven years ago we were attacked so we get to do whatever we want forever! boriscleto General Talk 8 10-02-2012 07:07 AM



All times are GMT -7. The time now is 06:05 PM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top