Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Undistort

IP Command Grooper.IP

Removes radial and tangential distortion from images captured with a camera or mobile device.

Remarks

The Undistort command corrects geometric distortions introduced by camera lenses, especially those found in mobile devices and document scanners. These distortions can cause straight lines to appear curved (radial distortion) or introduce subtle warping due to lens misalignment (tangential distortion), both of which can negatively impact OCR accuracy and measurement tasks.

What Does It Do?

  • Corrects radial distortion (barrel or pincushion) using the K1 and K2 parameters.
  • Corrects tangential distortion (tilt or decentering) using the P1 and P2 parameters.
  • Adjusts the effective focal length for the correction model using FXDivisor.

When to Use

Use Undistort when working with images captured by cameras or mobile devices, where lens distortion can cause lines and document edges to appear curved or warped. This is especially important for:

  • Preprocessing images for OCR, where straight text lines are critical.
  • Measurement or form extraction tasks that require geometric accuracy.

How to Configure

  • FXDivisor: Controls the effective focal length. Lower values increase correction strength; higher values reduce it. Typical value is 2 for most images.
  • K1, K2: Set K1 to a small positive value (e.g., 0.01) to correct barrel distortion, or a negative value for pincushion distortion. K2 is usually much smaller and often left at zero.
  • P1, P2: Use small values (positive or negative) to correct tangential distortion. P1 affects vertical tilt; P2 affects horizontal tilt.

Best Practices

  • Start with all parameters at zero, then incrementally adjust K1 and K2 to correct radial distortion.
  • Adjust P1 and P2 only if you observe tilt or decentering.
  • Always review the output visually to avoid over-correction, which can introduce new distortions.
  • If all parameters are zero, no correction is applied.

Example

To correct mild barrel distortion, set K1 to 0.01 and leave other parameters at zero. For more complex distortion, adjust K2, P1, and P2 as needed.

Properties

NameTypeDescription
General
Command Info

Used By

Notification