Adjusting Grid Detection Parameters
The default settings on the LensDistortion node's Grid Detection tab are suitable for a wide range of input images, but in some cases, you'll need to make some adjustments in order to achieve the required coverage of Features and viable Links. You'll need to click Detect again after making changes to the Grid Detection controls to update the results.
Tip: For particularly hard solves, you can split the Features and Links detection into two steps, rather than using Grids, which performs both steps automatically.
Feature Detection
The Features in a solve form the building blocks for accurate Links, so it's important to get the maximum coverage possible, while still maintaining quality.
Increasing the maximum Number of Features can improve coverage relatively easily. You can use the Detection Threshold control to reject bad features automatically. If you enter a low detection threshold value, features are detected evenly on all parts of the image, even if they would otherwise have been rejected.
|
|
Low Number of Features |
High Number of Features |
The Patch Size control determines how much bias is placed on detecting features on saddle points. High values force features towards saddle points, which might not be desirable.
|
|
Low Patch Size |
High Patch Size |
The Feature Separation control sets the distribution of features in relation to each other. High values spread features at even distances over the image. It is important that the features do not cluster together, if this is the case, try increasing this value.
Increasing the separation too far can reduce the number of features detected dramatically, so use caution.
|
|
Low Feature Separation |
High Feature Separation |
Link Detection
The Links in a solve depend on solid Features detection, so it's important to make sure your features coverage is good before linking. Links provide the curvature data from the lens so that the solve can be as accurate as possible.
The Angle Threshold control sets how much offset tolerance is allowed between potential features before they can be linked. Try increasing the Angle Threshold if there are missing links between features, but higher values can introduce links between features that may be incorrect.
The image on the right shows some potentially poor links on the left-hand side.
|
|
Low Angle Threshold |
High Angle Threshold |
The Distance Threshold control determines how far apart Links can be before they are merged into a single, averaged link. Try increasing the Distance Threshold if features are removed incorrectly after Links Detection.
|
|
Low Distance Threshold |
High Distance Threshold |
The Peak Threshold control determines how much directional tolerance is allowed between potential features before they can be linked. Reducing the Peak Threshold can increase viable links with low contrast lens reference grids.
|
|
Low Peak Threshold |
High Peak Threshold |
Proceed to Removing Lens Distortion from an Image when you're satisfied with your grid.