Removing Lens Geometric Distortion through Advanced Image Processing
What is it all about?
Lens distortion in machine vision means image information is misplaced geometrically from the ideal shapes. There are two primary types of lens distortions: radial and tangential. And radial distortions usually refer to barrel, pincushion and moustache distortions.
Barrel distortion is commonly associated with wide angle lens (focal length < 50 mm; aperture front structure) while pincushion distortion is common with telephoto lens (focal length> 50 mm, aperture back structure). Mustache distortion is a mixture of both types and less common.
Lens distortion correction is necessary for machine vision applications where accurate and reliable results are crucial. Distorted images may lead to errors in measurements and gauging, affect the performance of machine learning algorithms, and impact the overall reliability of the system.
What was the problem?
Lens distortion can be limited or removed through hardware or software approaches. Rectilinear lenses are designed to minimize geometric distortions and the advantage of this hardware approach is simplicity. Applying correction directly at the time of image capture means no additional post-processing. However, if your application requires more flexibility in lens choices and fine-tuning different types of distortions, the software option is more suitable.
The key challenges in using the software approach to remove geometric distortions are: first, the task is computationally intensive because it is typically performed on pixel level; second, developing algorithms from scratch is very time-consuming, especially if you are not familiar with the intricacies of lens distortion.
In this use case, you will learn Basler’s solution to compensate barrel distortion for wide FOV application as an example. The solution can be fine-tuned depending on different project requirements.
As depicted in the system diagram below, the frame grabber plays a crucial role in collecting raw image data, processing it into different versions, and simultaneously transmitting it to the PC DMA. This comprehensive process prepares the system for the ultimate analysis, interpretation, or application of the refined image data.
Algorithms are often combined in various ways to create comprehensive image processing pipelines tailored to the specific application requirements. For instance, besides correcting distortions, we concurrently apply histogram stretching and blob analysis algorithms. This ensures that the resulting image is well-refined, highlighting specific features for easy interpretation by the computer.
Real-time processing and low latency: the frame grabber excels at concurrently managing image transfer and complex image processing.
Flexibility and customization: tailor the solution to your application swiftly and seamlessly.
Faster time-to-market: streamline your project implementation process and bypass unforeseen technical hurdles.
Products for this solution
Looking to implement a comparable solution? These products will help you.