Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
13 Likes  #1
Achieving Better Manual Focus with the Green Hexagon
Posted By: c.a.m, 01-26-2020, 07:27 PM



Summary

This article describes an approach to achieve consistently-sharp focus with manual focus lenses while relying on the Green Hexagon focus indication seen in the optical viewfinder of Pentax cameras. The technique involves two main elements:
  • Calibrating a lens with the Auto Focus Fine Adjustment function, referenced to the focus point where the Green Hexagon just turns ON.
  • In the field, rotating the focus ring from one end of the focus range until the Green Hexagon lights.
By exploiting a camera’s built-in focus detection system, this technique overcomes the uncertainty that is typically associated with the wide Green Hexagon zone. The paper describes and illustrates a quantitative calibration procedure and discusses simpler qualitative calibration approaches.


Introduction

Many online articles, guides, and forum comments attest to the difficulty of achieving high accuracy and precision with modern autofocus (AF) implementations. While digital cameras have demonstrated improved AF performance over the years, users still observe mis-focused shots, lack of focus consistency, or focus quality that varies with subject distance, aperture, or lens zoom setting.

Focusing manually with either manual focus (MF) lenses or AF lenses in manual mode introduces unique challenges. Instead of relying on the camera’s AF system to control a lens’s focus action, the photographer adjusts the focus on the lens by hand, using one or another focus detection aid that signals the ‘correct’ setting. Such aids include plain eyesight, enhanced focus screens, magnifying eyepieces, or the camera’s focus detection system itself. Furthermore, modern digital cameras provide an effective ‘focus peaking’ function that may be used while in Live View mode or while looking at the electronic viewfinder in the case of mirrorless cameras. None of these aids is without disadvantages or weaknesses.

This article addresses the specific case of focusing manually on Pentax digital cameras while using the optical viewfinder (OVF) and the camera’s focus indicator, commonly called the ‘Green Hexagon’. The paper describes a technique that employs the Auto Focus Fine Adjustment (AFFA) function and a positive, unambiguous Green Hexagon signal to achieve consistently accurate and precise focus.


Phase Detection Autofocus

Phase detection autofocus (PDAF) is a primary focus mode in Pentax cameras, and its focus sensor is active whether the camera is in AF or MF mode. Apart from the focus issues that may arise from a subject’s lighting, contrast, or physical features, autofocus performance also is degraded by systematic errors in the PDAF sensor and its optical path, necessary play in the lens focus-actuation mechanisms, and tolerances in the focus control system such as deadbands. Operating in MF mode largely eliminates the mechanical issues, but accuracy or precision can still be degraded by the focus sensor and control logic.

When focusing manually, Pentax photographers often rely on the focus indicator or Green Hexagon seen in the viewfinder. Basically, the hexagon lights when the camera ‘thinks’ a good focus has been achieved and the shot may be taken. However, the hexagon suffers from two main problems:
  • The PDAF sensor and its lens-to-detection sensor optical path may be misaligned, which results in mis-identification of accurate focus, e.g., ‘front focus’ or ‘back focus’ situations.
  • The hexagon is usually illuminated over a range of focus distances, so it is difficult to decide on the correct focus position.
The issues associated with ‘trusting the Green Hexagon’ are well-known within the Pentax community and have been discussed extensively. Interestingly, Pentax is not alone in this regard – other camera brands also exhibit similar issues. For a glimpse of the problem, see for example the insight from Pentax Forums veteran member @Stevebrot, and other related comments in these threads:
These problems may be mitigated by careful in-body lens calibration, known as Auto Focus Fine Adjustment in the Pentax context, and the focusing technique presented below.


Optimal Focusing with Manual Focus Lenses

When focusing manually, the state of the focus indicator may be effected in four ways, depending on the direction of focus:
  • From infinity to the point where the Green Hexagon first illuminates
  • From infinity, focusing ‘through’ the green hex just until it turns OFF
  • From the minimum focusing distance (MFD) to the first illumination of the green hex
  • From MFD through the green hex to OFF.
Figure 1 illustrates the discrepancies between the true distance to the subject and the focus setting on the lens. The green band represents the range of focus settings in which the focus indicator will illuminate – this is the ‘indicated in-focus zone’.





Consider the following situations. If focussing from infinity, the photographer might be tempted to assume that correct focus has been achieved when the Green Hexagon first lights. However, as denoted by D+, the lens likely would have been back-focused (BF). Similarly, focusing from the minimum focusing distance might result in a front-focus (FF) situation at D-. Certainly, focusing could also be stopped somewhere between these two extremes, with the photographer guessing at the correct position, Do. It is this third approach that is often suggested: Rack the focus between the two illumination points and settle somewhere in the middle. Unfortunately, the ‘middle’ may not reflect an accurate focus setting, owing to the focus detection errors mentioned in the previous section.

The extent of the Green Hexagon band is set by the camera’s AF algorithms and their parameters. These details for Pentax cameras are not published, but it is possible that the band may be invariable for non-communicating manual-focus lenses, perhaps based on a nominal aperture, say f/5.6, and moderate focal length, say 50 mm. If the band exceeds the depth of field (DOF) for a particular case, for example when shooting at a long focal length and wide aperture, then a mis-focused image is probable. Conversely, stopping down considerably may place the indicated in-focus zone well within the DOF and the resulting images may be acceptably sharp even if not perfectly focused.

The objective of the technique presented here is to arrive at a positive indication of the correct focus point, rather than guessing at some arbitrary position. In this context, positive means the point where the Green Hexagon turns ON. As shown in Figure 2, an AFFA calibration moves the incorrect focus point at D+ to the correct one at Do.





Auto Focus Fine Adjustment – AFFA

To overcome possible PDAF detection errors, it is feasible to adjust or calibrate the focus detection path uniquely for each lens. Essentially, an AFFA procedure reduces the back- or front-focus errors that have been induced by the focus detection system.

There are several basic techniques for calibrating lenses:
  • Visually inspecting a series of images
  • Inspecting images of slanted rulers or scales to determine BF or FF
  • Visualizing Moiré effects on a computer monitor
  • Comparing focused lens settings, alternating between Live-view and PDAF
  • Quantitatively analyzing image sharpness.
Depending on the technique employed, do-it-yourself focus targets may include arbitrary subjects of opportunity (e.g., distant utility structures, backyard objects, cereal boxes); flat targets affixed to a wall or panel (e.g., newspapers, banknotes); and custom-printed target images. Commercial products are also available, which provide a pre-made target fixture and slanted scale.

Many useful online sources provide good guidance on how to recognize AF errors and to calibrate your lenses. Ricoh Imaging also gives guidance for optimizing focusing accuracy with large-aperture lenses (How to optimize focusing accuracy with large-aperture lenses / explore | RICOH IMAGING).

Quantitative analysis requires a rigorous approach and rewards strict attention to details with repeatable numerical data that can be used to determine various aspects of focus accuracy and precision. Commercial calibration products, such as the Reikan FoCal application, offer useful integrated software and detailed instructions for setting up and performing such a calibration procedure.


AFFA Methodology used in this Study

As an essential component of my AF and MF lens-calibration efforts over the years, I developed a quantitative methodology independently of commercial products, which has been progressively refined. The approach employs several key features:
  1. Flat, high-quality printed targets
  2. Rigorous test set-up and execution
  3. Multiple test runs for each calibration procedure
  4. Primary analysis using the ImageJ open-source scientific image analysis package (via its Fiji distribution, which bundles many useful plug-in modules)
  5. Spreadsheet-based data organization, calculations, and plots
  6. Logbook and notes
It should be noted that it is also possible to calibrate MF lenses using simpler techniques as listed in the previous section. Further insight into this possibility is provided near the end of this paper.

Focus target and camera set-up. The focus target consists of crisp black shapes to provide a high-contrast, unambiguous AF target and several other graphical elements to facilitate visual image inspection and comparison. The targets are printed at high resolution on matte or lustre photo paper at 8.5x11 inches, and mounted on a flat foamboard of 12x18 inches. Figure 3 shows the latest target version that is currently in use.




The target board is mounted on a tripod using a custom-built fixture that keeps the target planar and enables accurate parallel and centred alignment between the target plane and camera sensor. The camera is mounted on a Sirui N2204 tripod and an FLM CB-38F ballhead. The camera sensor plane and target are separated by a measured distance, typically at D = 30-50 x focal length.

Lighting. The normal lighting source consists of compact fluorescent lamps (CFLs) rated at 23 W (equivalent to 100-W incandescent), colour temperature 6500 K, fitted in workshop reflectors. The target is illuminated by either one or two lamps at a distance of approximately 100 cm, positioned to avoid glare from the target to the camera, while providing uniform illumination. The CFL bulb type has a low ‘flicker’ amplitude.

Exposure. The lens aperture is normally set wide open or nearly so and spot exposure metering is used. Shutter speeds are slower than 1/40 s to ensure that the exposure duration is longer than the residual cyclical illumination variation of the CFLs (i.e., 60 Hz in Canada). The shutter is released using an infra-red remote. Experience and specific tests have shown that using the ‘mirror up’ function is not required in this procedure.

Focusing procedure. The single centre focus point is used. For manual focus lenses, several AFFA runs are made from each of the infinity and MFD positions. Each run steps the camera’s AFFA setting from -10 to +10 in increments of 2 units ( 10, -8, -6, etc), resulting in a series of 11 JPEG images. I have found that stepping by 2 units is sufficient for AFFA calibration; single-unit steps are not essential with the method used here. The focus ring is rotated slowly until the Green Hexagon just illuminates; then the camera rests for several seconds before the shutter is released.

Image focus analysis. Primary image analysis uses the ImageJ CalculateQuality plug-in. As described by its author, this plug-in is “used for assessing the relative quality of a stack of images. The output is a listing of the ‘quality’ factor for each image in the stack. The factor is computed by taking the sum of the differences of adjacent horizontal and vertical pixels. This is done at three different scales (original size, half size, and quarter size). Images that contain a lot of contrast and sharp edges should have a higher quality factor using this method.” (Plugins for Astronomical Image Processing with ImageJ | Observational Astronomy).

The plug-in outputs a set of data to determine the best focus in a series of imported images, exploiting the phenomenon that unfocused images are more blurry than focused ones. Effectively using image blur as a proxy for focus quality, this approach determines relative focus quality, not absolute resolution or sharpness that is available from other techniques such as MTF mapping.

The imported images are cropped to a central section of the target, typically giving image ‘chips’ of roughly 800x800 pixels, depending on the focal length of the particular test run. The data is copied into a separate spreadsheet for each lens. The focus quality numbers are normalized to the sharpest image and scaled to a maximum value of 10, i.e., the sharpest image is ‘rated’ at 10 and the others less than 10. The data is plotted using the spreadsheet's charting function, in which the 'relative focus quality (RFQ)' is shown at each AFFA setting.

ImageJ provides a convenient function that allows one to scroll through a series or ‘stack’ of co-registered images sequentially in a single window, making an easy job of visually comparing images or identifying the best focused image. Other useful functions include zooming, brightness and contrast adjustment, colour balance, and histogram display, amongst many others. Similarly, the package includes an impressive array of complex image analysis functions.


Example AFFA Cases

Three example calibration cases are illustrated here – SMC Pentax-M 50mm f/1.4, SMC Pentax 28mm f/3.5 and SMC Pentax-M 100mm f/2.8, which were calibrated on a Pentax K-3 II APS-C format camera.


SMC Pentax-M 50mm f/1.4. Salient settings were ISO 100, f/2.8, 1/25 s, and target distance 240 cm. In the sample results shown in Figure 4, we see that the sharpest image is realized at AFFA +4 when focused from infinity or AFFA -8 or -10 from MFD. The spread of 12 AFFA units represents the ‘width’ of the Green Hexagon in-focus zone described above.



Each pair of plots shows similar results, and the relative focus quality (‘RFQ’) data is reasonably tight. Such precision is possible when an MF lens is focused slowly and carefully.

The dashed line at RFQ = 8.5 represents the threshold above which there is no subjective, significant difference in focus quality when images are viewed at 100% scale on a high-definition computer monitor at a normal viewing distance. This value has been determined empirically by examining hundreds of images in the course of calibrating my various lenses. In this example, any of the AFFA settings between +1 or +2 and +6 would result in acceptable sharpness when the image is displayed at full scale.

To demonstrate the key theme of this paper – achieving sharp focus consistently with MF lenses using the Green Hexagon – Figure 5 shows three short sets of data at an AFFA setting of +4:
  • Red points: focused from infinity
  • Blue points: focused from infinity ‘through’ the green hex to the point it turns OFF
  • Green points: focused from infinity, images taken at several points through the green hex to OFF.




The first three points show that it is possible to consistently achieve a sharp focus. The set of five green points suggests that stopping a focus rotation somewhere within the illuminated Green Hexagon is likely to result in an out-of-focus image, which has been mentioned anecdotally by other Pentax shooters. However, the data also confirms that a slight ‘over rotation’ of the focus ring beyond the onset of hexagon illumination would still produce a sharply focused image – for this lens example anyways. It is not necessary to be absolutely ‘spot on’ when focusing with this technique.

Crops of several images from the series of Figure 5 are shown in Figures 6, 7, and 8.







Depth of Field and the Green Zone. The first and last points of the five-image series of Figure 5 indicate the extent or width of the indicated in-focus zone. To determine the respective real-distance range of these two points, a simple make-shift level focusing track was set up, on which the camera was supported by a small, stable, wheeled toy cart. At a target distance of 243.5 cm from the camera’s sensor plane, the lens was focused from infinity to the point where the lit Green Hexagon extinguished, similarly corresponding to the last point in the image series. Using magnified Live View and Focus Peaking, the camera cart was rolled along the track towards the target to establish the position of best focus.
  • Initial camera sensor plane position D1 = 243.5 cm
  • Final camera position D2 = 208 cm
  • Variation in focus distance = 35.5 cm.
The focus peaking indication was somewhat broad, indicating a best focus within a variation of approximately 4 cm. The value stated here was roughly in the middle of the range.

For this configuration (D = 240 cm, FL 50mm, f/2.8), the conventional depth of field (DOF) is approximately 26 cm. Clearly, the Green Hexagon ‘in-focus’ zone extends well outside of the DOF.


SMC Pentax 28mm f/3.5. This second example shows results that are similar to the Pentax-M 50/1.4, although the curves are shifted towards the positive AFFA settings as seen in Figure 9. The selected calibration setting in this case is AFFA -4, focusing from the MFD end. The two focus peaks cover an AFFA range of 12 steps, identical to the previous case.





Figure 9 also shows a slightly flatter peak above the DOF Threshold of 8.5 than seen with the M 50/1.4, which would be expected for the shorter focal length and wider aperture of the 28/3.5. Essentially, a wide-angle lens does not require the same degree of attention in focusing when relying on the Green Hexagon; focusing can extend slightly beyond the point where the hexagon first illuminates.

Finally, the plot in Figure 10 further demonstrates the consistency in accuracy and precision that can be achieved with this technique. All ten RFQ values are well above the DOF threshold of 8.5, and all images in this series are sharply focused. While focusing was also done with care in this run, not all shots ‘teased out' the precise point where the hexagon just illuminated.





AFFA Step Values

The similarity of the focus peaks for the 50mm and 28mm lenses might suggest that the indicated in-focus zone is encoded in the camera focus detection algorithm at an equivalent allowance of approximately 12 AFFA steps, or roughly half of the total range of AF fine adjustment. This author has not been able to find any official indication of the relationship between an AFFA step and a correction offset measurement. However, several sources (not validated) refer to or suggest that an AFFA step equates to an equivalent correction of 10 micrometers. For instance:
The AFFA correction probably effects a PDAF offset that corresponds to an equivalent virtual change in the image distance for the lens (roughly, the depth of focus). It would be possible to relate the image distance to the focus distance observed above for the 50mm lens. However, such an analysis would require a thick-lens model, which is outside the scope of this study.


SMC Pentax-M 100mm f/2.8. The final example considers the SMC Pentax-M 100mm f/2.8 lens. Figure 11 is presented simply to show the focus consistency between the two image sets and the similarity of the data curves to the other lenses. The optimal AFFA setting is +1.





Advantages and Disadvantages of this Technique

The approach described here overcomes the problem of a too-wide Green Hexagon focus indication when faced with a relatively narrow depth of field. Sharp focus with MF lenses may be achieved consistently, accurately, and precisely while using the optical viewfinder.

Compared to other techniques for focusing with MF lenses, such as using special focusing screens or magnified Live View mode, relying on the Green Hexagon in the viewfinder requires extra care to achieve a spot-on focus. Focusing quickly is tricky, because the focus ring must be rotated slowly enough to just illuminate the Green Hexagon without overshooting too much. However, it is not essential to hit the illumination point precisely, and there is a margin depending on the depth of field for a particular shot. For those photographers who strive for the best possible focus, it’s possible to focus quickly to the Green Hexagon and then rack the focus around the illumination point to narrow in on the right spot.

Of course, it is necessary to calibrate a manual focus lens to determine its best AFFA setting, which is generally more tedious than calibrating AF lenses. Some photographers may not be inclined to such activity, especially the quantitative methodology presented here.

It should also be noted that this study explored only several lenses of varying focal lengths and maximum wide-open apertures: 100mm f/2.8, 50mm f/1.4, and 28 mm f/3.5. Sharp focusing appeared to be successful even with a wide-open ‘focus detection’ aperture of f/1.4. (In the Pentax stop-down metering implementation, the PDAF system uses the wide-open aperture regardless of the ‘exposure aperture’ that is set on the lens.) Lenses with smaller maximum apertures were not investigated here.


Using Simpler AFFA Approaches

The main element of this technique is the calibration of a lens to determine the best AFFA setting corresponding to the onset of the Green Hexagon illumination. Such calibration may be achieved using any of the other approaches listed in the AFFA section above, providing that the initial illumination of the Green Hexagon is used as the reference point and sufficient rigor is observed in setting up and executing the calibration.

For example, several sets of images may be taken of a convenient flat target while stepping through the AFFA settings and focusing from either the infinity or MFD positions in each set. The resulting images may be inspected visually to identify the sharpest image. Then, for field use, the AFFA setting is entered in the camera menu, and the focus is adjusted until the Green Hexagon turns on.


Conclusion

This study demonstrates an approach to setting up a practical means to use the Green Hexagon to achieve sharp focus consistently. The examples shown here illustrate that focus accuracy and precision are indeed possible. Although the technique requires time and care to conduct an Auto Focus Fine Adjustment procedure for each manual focus lens, the results enable the photographer to use the optical viewfinder and the Green Hexagon successfully without having to rely on special focusing aids or the Live View mode.

Last edited by c.a.m; 01-30-2020 at 12:37 PM.
Views: 1,379
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 fine adjust, affa, back focus, calibration, camera, focus, front focus, green hexagon, hexagon, image, images, lens, lenses, pdaf, pentax, target
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Achieving the most Uniform Lighting with just a few Light Bulbs AstroDave Flashes, Lighting, and Studio 5 07-17-2018 04:26 AM
Pentax K30 will not focus - focus hexagon green light keeps flashing agaurav Troubleshooting and Beginner Help 7 03-26-2018 08:15 PM
M42 Lenses - 'Green Hexagon' vs. Focus Peaking/Magnification cahudson42 Pentax SLR Lens Discussion 22 01-27-2014 07:21 PM
Red focus indicator VS Green Hexagon on M lens bakamera Troubleshooting and Beginner Help 3 05-01-2011 10:50 PM
No Confirmation Hexagon Or Beep When Manual Focussing on K-5 RedSnapper Pentax K-5 5 04-13-2011 06:31 AM



All times are GMT -7. The time now is 05:16 AM. | 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