Wazzup with my focus? Blurry center?

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
296
Reaction score
567
Location
North America
I've been struggling to get things 'perfect' with my pair of HFW5241E-Z12E being used for ALPR.

It is like I can never get the focus right.

Then I noticed that the images are in focus only at the edges, the center is blurry.

Take a look at this daytime shot, you can clearly see the center is blurry.

blur.jpg

What is the cause of this?

I had assumed OpenALPR was always capturing the image at the edge of the photo because that is where the plate was the largest. Now that I see the center is blurry, it is capturing the photos of plates near the edge as this is where they are in focus.

At night the problem seems to be amplified, even more difficult to read the plates unless at the edge of the frame.
 
Joined
Aug 8, 2018
Messages
7,415
Reaction score
26,000
Location
Spring, Texas
A few questions...
1. what is your shutter speed? Is it set to manual?
2. Have you tried wiping off the lens?
3. How far is the car from the camera?
4. What is the zoom setting?
5. What is the IRIS set at?

If the shutter is too slow, any out of plane motion could cause blur. If you are quite far and zoomed in a lot, a wide Iris can cause very narrow depth of field, such that some of the image will be in focus, but other parts will be out of focus.

Was this always like this? Or did this happen recently?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,885
Reaction score
48,547
Location
USA
Have someone drive to that location and with a phone tell them when to stop and then dial in the focus for that location. I suspect the auto focus is picking up on the fringes. Mine had trouble focusing on the grey center of the road with the curbs and grass on either side it would focus on that. I did that for daytime and nightime settings and then use the utility a member created here to force it to those numbers.

Also take a look at the NR and sharpness you are on. That photo is still very readable BTW.
 

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
296
Reaction score
567
Location
North America
That photo is still very readable BTW.
Yea, that photo is still readable, but it was my first clue what the problem was. In the day you can see it is out of focus.

At night with an all-black screen not possible to see the image was blurry in the center.

I have been tearing my hear out trying to figure out what I changed to cause this, as it was working previously. I tried resetting the camera and redoing things one step at a time.

Finally figured it out tonight. It is the iris setting. I want all the light I can get to the sensor, so I jacked up the iris setting to 100.

Turns out that is the setting that is causing the blurry center.

If I drop it down to 50, it is much better. If I drop it down to 35, it is excellent. I have not tried it lower than that, as I still need light to read the plates.
 

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
296
Reaction score
567
Location
North America
That is the depth of field I was talking about in post #2. Glad you solved it.
Yea, it had me confused for sure. Cameras that I have used in the past (like a DSLR) when you play with the depth of field the focus is in the center and it is blurry on the edges. These cameras seem to be the opposite.
 
Joined
Aug 8, 2018
Messages
7,415
Reaction score
26,000
Location
Spring, Texas
when you play with the depth of field the focus is in the center and it is blurry on the edges
DSLR cams have hot spots that are used to help with auto focus. Usually the majority of those are in the middle, and they focus while you begin to press the shutter release. But the 5241 Z12 does not constantly focus. Once it obtains focus, it stays there. So if the focus was done when no vehicle is present on the road, then the focus point is far behind the street, like maybe on a house or something else. Your Iris is wide open so the depth of field is narrow. Now a car comes down the street and the grill and front plate is much closer than the house that the original focus point was made from, and is just outside of the focused depth of field.

A way around that is to get someone to stop their car in the lane of traffic and manually focus the cam. Record the focus value so that you can reset it if you need to. That is what I have done, plus setting the focus to manual helped.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,885
Reaction score
48,547
Location
USA
And run the utility someone created here to set it everyday!

Or write your own routine!
 

MicahJames

Pulling my weight
Joined
Aug 26, 2019
Messages
186
Reaction score
212
Location
San Jose, ca
Yea, that photo is still readable, but it was my first clue what the problem was. In the day you can see it is out of focus.

At night with an all-black screen not possible to see the image was blurry in the center.

I have been tearing my hear out trying to figure out what I changed to cause this, as it was working previously. I tried resetting the camera and redoing things one step at a time.

Finally figured it out tonight. It is the iris setting. I want all the light I can get to the sensor, so I jacked up the iris setting to 100.

Turns out that is the setting that is causing the blurry center.

If I drop it down to 50, it is much better. If I drop it down to 35, it is excellent. I have not tried it lower than that, as I still need light to read the plates.
Wow. So weird but I’ve been having the EXACT same problem for the last week and a half. It was driving me so crazy that I emailed Andy to help trouble shoot. I swear I had a bad camera.

eventually I went a little crazy one night and messed with every single exposure setting one by one and made notes. After two hours I came up WITH THE EXACT SAME CONCLUSION.

Of course I wish I had this problem a week later so I would have read your post and made the same adjustment without losing a little more hair. But I too had my iris at 100 and found the same problem. I now have mine dialed to 40 as the sweet spot. Wow. Great to see and hopefully this post will save someone from pulling their hair out as well
 
Top