Lens Distortion Correction — Fix Barrel & Pincushion

Wide-angle lenses are amazing for capturing sweeping landscapes and tight architectural spaces, but they come with a problem: distortion. Those perfectly straight building lines bow outward. Rooms look bigger but walls curve unnaturally. GoPro footage has that fisheye bulge we all recognize. This isn't a flaw in your camera - it's optical physics. Wide lenses necessarily bend light to fit the scene onto the sensor. This tool reverses that bending using the same radial distortion model that created the problem. By remapping each pixel based on its distance from center, we straighten those curves and restore natural-looking geometry.

What is the Lens Distortion Fix - Fisheye?

The Lens Distortion tool fixes geometric optical distortion using radial remapping. It applies a correction factor based on the distance from image center, counteracting the lens's natural distortion. The algorithm supports both barrel correction (negative to positive) and works in reverse for pincushion. The scale control zooms to fill any transparent areas created by the remapping.

Key features

  • Distortion slider: -100% to +100% for barrel/pincushion
  • Scale slider: 80-120% to fill corrected edges
  • Radial distortion formula for accurate correction
  • Bilinear interpolation preserves image quality
  • Live preview with before/after comparison
  • Optimized for wide-angle and fisheye lenses
  • Works on images up to 50MB
  • Browser processing for privacy

How it works

The algorithm calculates each pixel's distance from center (r), then applies: corrected_r = r × (1 + k × r²). For barrel distortion (bulging), k is positive. For pincushion (pinching), k is negative. The pixel at corrected_r is sampled from original position r using bilinear interpolation. After distortion, scale zooms to fill transparent edge areas created by the remapping.

Why use this tool

Distortion correction is standard in professional workflows - Lightroom, Photoshop, and Capture One all have these tools. But they require importing and sometimes subscription fees. This browser tool gives you instant correction with live preview. No import, no subscription, no learning curve. Perfect for quick fixes before sharing or client delivery.

Common use cases

  • Architectural photography with curved building lines
  • Real estate photos with bowed walls and ceilings
  • GoPro and action camera footage
  • Drone photography with wide-angle distortion
  • Group portraits at wide angles
  • Interior photography with wide lenses
  • Panorama stitching prep (correct distortion first)
  • Lens testing and calibration

How to use this tool

  1. Upload Wide-Angle Photo — Upload photos from wide-angle, fisheye, or GoPro lenses showing barrel or pincushion distortion.
  2. Adjust Distortion — Move slider left for pincushion correction, right for barrel correction. Start with ±20-30%.
  3. Scale Image — After distortion correction, edges may show transparency. Increase scale to 105-115% to fill frame.
  4. Preview Changes — Straight lines should appear straight. Architecture should look natural without bulging or pinching.
  5. Download — Save your corrected photo with natural perspective.

Who should use this

Real estate photographers, architectural photographers, GoPro/action camera users, drone operators, interior designers photographing spaces, anyone shooting with wide-angle lenses, and everyone who's taken a photo where straight lines curve when they shouldn't.

How to get started

Upload a wide-angle photo showing curved straight lines. For barrel (bulging center), try +30 distortion. For pincushion (pinched center), try -30. Increase scale to 110% to fill edges. Lines should now look straight.

Best practices

  • Start with moderate values (±20-40%)
  • Always adjust scale after distortion correction
  • Check corner sharpness - crop if needed
  • Architecture: Aim for perfectly vertical building edges
  • Keep some distortion for artistic effect if desired
  • Extreme corrections (>60%) may soften edges
  • Consider perspective correction after distortion fix

Pro tips

  • Barrel distortion (bulging center): Use positive values (+20 to +60).
  • Pincushion distortion (pinched center): Use negative values (-20 to -60).
  • Always increase scale after correcting - try 110% first.
  • Architecture benefits most - straighten those building lines.
  • GoPro footage typically needs +30 to +50 correction.
  • Zoom lenses often show distortion at wide end.
  • Keep crop in mind - extreme correction loses edge pixels.

Expert insights

⚡ GoPro Settings

Typical GoPro correction: Distortion +45, Scale 112%. This corrects the fisheye barrel distortion while maintaining most of the frame.

🎯 Math Insight

The r² term means correction increases with distance from center. Center pixels barely move, corners move most. That's why straight lines curve more at edges.

✓ Architecture

For perfect architecture: 1) Distortion correction, 2) Perspective correction (keystone), 3) Straighten rotation. All three are often needed for building exteriors.

⭐ Save Original

Always keep the uncorrected original. You may need different correction for different uses (print vs web vs client preference).

Limitations to be aware of

  • Mild corrections only - extreme distortion may leave artifacts
  • Edge pixels are lost during correction (mitigated by scale)
  • Cannot selectively correct parts of image
  • Single radial model - doesn't handle complex distortion
  • Very strong distortion may require crop afterward
  • Not for chromatic aberration (color fringing)

Frequently asked questions

What is lens distortion?
Lens distortion is optical aberration where straight lines appear curved. Barrel distortion bulges outward like a barrel, common in wide-angle lenses. Pincushion distortion pinches inward, common in telephoto lenses.
How does the correction work?
The tool uses radial remapping with formula r' = r × (1 + k × r²). Pixels are repositioned based on their distance from center. Positive k corrects barrel, negative k corrects pincushion. Scale fills resulting canvas.
Will I lose image quality?
Minor corrections (±30%) have minimal quality loss. Extreme corrections may soften edges slightly due to pixel remapping. The tool uses bilinear interpolation to minimize artifacts.
Can I fix fisheye distortion?
Yes! Fisheye lenses create strong barrel distortion. Use higher values (+40 to +70) depending on lens. Note that extreme fisheye may not fully correct to rectilinear without significant cropping.
Why do I need to scale after correction?
Distortion correction pulls pixels from center outward (or vice versa), creating transparent areas at corners. Scaling zooms in to fill these areas. You lose some edge pixels but gain straight lines.
What photos need distortion correction?
Architecture photography with curved building edges, real estate photos with bowed walls, drone footage with wide-angle distortion, GoPro/action camera footage, large group photos at wide angles, any photo where straight lines should be straight.
Can this fix chromatic aberration?
No - chromatic aberration is color fringing at edges (purple/green). Use the Chromatic Aberration tool for that. This tool fixes geometric distortion only.
Will this work on portraits?
Yes, but distortion is less noticeable on faces. However, group portraits with wide lenses can show curved edges that benefit from correction. Be aware that correction slightly changes perspective and proportions.

Browse all PikDraw image tools →