Blog

Deblur a License Plate in an Image

Reading time: 4 min

deblur a license plate in an image

Hello folks and welcome back to our “Learn and solve it with Amped FIVE” series. You may remember the very first article of our series, in which we discussed motion blur in quite some detail. Well, this week we are going to talk about optical blur and how to deblur a hazy image to read text, such as a license plate.

Optical Blur

Optical blur (unlike motion blur) is caused by an incorrect focal length setting on the camera. This can cause objects and subjects to appear blurry, depending on how far they are from the lens. But what is the focal length? This is a variable distance between the camera sensor and the center of the lens cylinder. This distance can be increased or decreased manually (or even automatically). This is so that we can focus subjects or objects of interest in the scene. Their light projection will be channeled into the lens and will then touch the sensor at a specific point of contact, as shown below.

subject in focus walking on a street between two buildings

image of a camera pointing to a guy walkin

Conversely, objects or subjects that appear blurry or out of focus are so because the light channeled in the lens will hit the sensor in a circular area, as opposed to a point.

subject out of focus passing in front of the camera

image of a camera pointing to a guy walkin

In the example above, a reduction of the focal length will channel the light projected by the nearer subject into a specific sensor point. This will ensure the subject is in focus relative to his distance to the lens, as shown below.

image of a camera pointing to a guy walking

The Point Spread Function

Now that we have a better idea of what the point of contact is, we will talk about how to restore a hazy image caused by optical blur. We need to restore blurry images in order to have a clearer view of a target of interest, such as a license plate or a suspect’s face.

Image restoration involves reversing fundamental defects using a specific mathematical model. As we said before, in images affected by optical blur, a point in the scene is “spread out to a circle” in the image. We can effectively model this phenomenon mathematically by defining a Point Spread Function. It basically represents how a singular point in the real scene is rendered in the image. Below, you can see an example of a Point Spread Function for a moderately blurred image and a strongly blurred image.

point spread function

The Optical Deblurring Filter

Let’s get the theory turned into practice and apply the Optical Deblurring filter. In this example, the focal length is incorrectly set in relation to the distance of the vehicle from the camera. The license plate is therefore blurred and we cannot read the VRN (vehicle registration number) in its original representation.

blurred image of a license plate

If you have a high-resolution image, we strongly recommend you crop the image to the area of interest before applying the Optical Deblurring filter. This is because the latter is computationally demanding. In this instance, we will deblur the whole image as it is a relatively small image.

Navigate to the Deblurring group of filters in Amped FIVE. Click on the Optical Deblurring filter to apply it to your chain.

image showing the filters in amped five

Adjusting the Filter Settings

Adjust the Size slider by clicking the up and down arrows. This will facilitate the fine adjustments of this parameter, which you will need to make in order to deblur the license plate. Remember that you can also hold down the ALT key and use the scroll wheel on your mouse for fine adjustment. And you even have the CTRL key available for decimal steps, if you need that level of precision.

enhanced image pf a license plate in amped five

Note how your point is spreading in the lower part of the Optical Deblurring filter setting. This gives you a graphical representation of the Point Spread Function you are trying to compensate for in your image. You also have a Noise slider which will adjust the noise threshold. This can give you better detail but also more noise. So, as always, find the best compromise needed to read the VRN.

When finished, feel free to adjust your levels to get a better contrast of detail. If necessary, use the Correct Perspective filter to correct plates or signs at an angle.

image showing the original blurred license plate and the enhanced license plate

Watch the video below to learn how to deblur a license plate in Amped FIVE.

Conclusions

Thank you for reading and we hope you have learned something new today. Next week we will discuss how to unroll a 360-degree fisheye camera. Until then, as always, stay safe and take care.

Table of Contents

Share on

Subscribe to our Blog

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Subscribe to our Blog

Related posts

Enhanced Reflections

Insights from the Amped User Days 2024 Survey

Reading time: 7 min Let’s discover our users’ opinions on AI, accreditations and certifications, deepfakes, digital media authentication, and DEMS. Some of the results are pretty unexpected!

Read More »