You are here: User Guide > NukeX > Working with Lens Distortion > Analyzing Distortion Using Lines

Analyzing Distortion Using Lines

Line analysis estimates the distortion from lines drawn manually along features in the input that are known to be straight. This can be useful if you have a single image to undistort and no grid available, and can’t therefore use grid analysis or image analysis. Another case for using line analysis might be if you have a grid for your sequence but the grid analysis failed, for instance due to bad lighting. To analyze lens distortion using lines, do the following:

1.   Click the Line Analysis tab and check the Drawing Mode On box.
2.   Draw a line along a feature in the image that you know should be straight (if there were no distortion present) by left-clicking along the feature at intervals. At each click, points appear on the image. You can move a point by dragging it.
3.   Join the points into a line by right-clicking on the image. This does not create a point.
4.   Repeat steps 2 and 3 until you have at least three lines.
5.   Press Analyze Lines to estimate the lens distortion and undistort the image.

Line Analysis Parameters

These are the parameters on the Line Analysis tab:

Drawing Mode On – Check this box to begin drawing lines along features in the input that should be straight. Draw a line by left-clicking along the feature at intervals and finish a line by clicking the right mouse button. You need at least three left-clicks to make one line, and at least three lines to initiate the distortion.

Distortion Terms – Select the number of distortion terms to estimate. With only a few lines, sometimes better results can be achieved by estimating only the first radial distortion term.

Estimate Center – Choose whether you want to estimate the distortion center. If the lines are not evenly distributed around the image, the center estimate is unlikely to be very good and you may get better results to approximate it by using the image center instead (the default).

Analyze Lines – Click to estimate the lens distortion from the current lines. When the analysis is complete, this sets the parameters on the LensDistortion tab in order to undistort the sequence.

Delete Last Line – Delete the last line drawn. Repeat to delete the previous line, and so on.

Delete Last Point – Delete the last point drawn. Repeat to delete previous points that are not yet part of a completed line.

Hide Lines – Hide the line overlay.

Clear All – Delete all lines and points.