DH-IPC-HFW5241E-Z12E autofocus issue

jbd70

n3wb
Joined
Dec 26, 2020
Messages
5
Reaction score
2
Location
DeLand, fl
Hi Andy,
Just received an DH-IPC-HFW5241E-Z12E which I purchased from you on Amazon. Autofocus won't work properly. After zooming or switching day/night profiles, the camera's autofocus searches for proper focus unsuccessfully. Searching stops with an out of focus image, especially at longer focal lengths. What should I do to fix this?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,960
Reaction score
48,676
Location
USA
Are you trying to use this as an LPR or as a regular camera?

Please post screenshots of your field of view and screenshots of your settings (brightness, shutter, etc.)

Some field of views are problematic if there are lots of angles and objects that it could try to focus on and it ends up resulting in a completely unfocused image. My one camera was getting whacked out with a fire hydrant in the view on the outskirts of the image, so I just slid the camera a little to get the hydrant out of the peripheral and it fixed it.

This camera has the manual focus option that will hold between profiles, so you might have a field of view where you need to manually focus it to the main area of interest.
 

jbd70

n3wb
Joined
Dec 26, 2020
Messages
5
Reaction score
2
Location
DeLand, fl
Are you trying to use this as an LPR or as a regular camera?

Please post screenshots of your field of view and screenshots of your settings (brightness, shutter, etc.)

Some field of views are problematic if there are lots of angles and objects that it could try to focus on and it ends up resulting in a completely unfocused image. My one camera was getting whacked out with a fire hydrant in the view on the outskirts of the image, so I just slid the camera a little to g, et the hydrant out of the peripheral and it fixed it.

This camera has the manual focus option that will hold between profiles, so you might have a field of view where you need to manually focus it to the main area of interest.
Thanks for the suggestions.

Unfortunately, nothing in the field of view is in focus The camera shouldn't be getting that badly confused by near and far objects. If autofocus is working, at least something should be in focus, and if not, it seems to me there is a problem with the hardware or firmware algorithm. Also, poor focus persists when subject matter changes. Typical sequence, regardless of subject, is a change in focal length, eg zooming in, followed by a worsening of focus, followed by some improvement, then the attempt stops. Good focus is not achieved automatically. Manually clicking on the "Near" minus sign in the web interface a couple of times is required to obtain a sharp image post zooming.

LPR was the original goal, but until the focus issue is resolved, I've abandoned any serious attempt to adjust for this purpose. Instead, I've experimented with various settings, including fully automatic exposure, all to no avail. Even with automatic exposure and focus in broad daylight, same result.

Any experiences with a firmware update to try to correct this?
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,431
Reaction score
48,604
Location
Floriduh
It’s a known problem, lots of discussion about it in the LPR forum

If you intend to use as an LPR cam, two easy solutions:

1- Leave it in B&W 24/7. I do this on one of my 5231 Z12’s the previous model. The focus issue seems to happen most when switching from color to B&W. As mentioned, without a clear target to focus on it can lose focus.

2- using the Schedule profile, have it switch from color to B&W 30-45 min Before sunset. Then in the AM, have it switch back to color 30-45 min After sunrise. In both cases the camera has enough light to get a good focus.

* use a fixed exposure at night, not a range.

Mine mostly did it when extreme zoomed, say 85%+
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,960
Reaction score
48,676
Location
USA
You are giving up too early and haven't done enough research on here on how to address the issue.

Many of us are using this camera for LPR and it is a simple work around. Yes we are probably pushing the limits of this camera with tight zooms and fast shutters, but you can make it work.

At the zoom and angle mine is at, every little nook and cranny of the asphalt causes it to be completely out of focus. That is not an issue with the camera, it is an issue with the field of view and the tight zoom. The tighter the zoom, the larger the Fstop gets and the depth of field gets tighter as well and become more difficult to achieve clear focus across the entire image at that zoom. That is not a camera issue, it is basic optic principles.

When you do this for LPR, you need to stop a vehicle in the field of view and manually set the focus. If the car is stopped you can even do the auto focus and it will probably be a clean focus. But if you are not doing that, then focus can be an issue with certain fields of view.

Someone here did a test once and put a reflective pole on either side of the street and the camera would focus on one and the other would be blurry. Auto focus again and they would swap which one was in focus. The tighter the zoom, the tigher the range of focus. It is not an infinity focus zoomed in tightly.

Here is a representative shot from mine at night at 175 feet away from the camera with a car going about 45MPH and the only way this was obtained was by stopping a car in the field of view to get the focus number to then set it and keep it off of auto focus:

1629926869860.png


In addition to what @bigredfish mentioned, there is another method if you are not running an NVR - you can use this utility that most of us running Blue Iris use to solve the problem.

 
Last edited:
Joined
Aug 8, 2018
Messages
7,423
Reaction score
26,020
Location
Spring, Texas
I have two of these doing LPR duty and use the Dahua Day/Night utility, but I do not use the focus option in it. I do not use auto focus. Set focus mode to manual for both day and night. Get it focused in the way you want it. Then leave it.

If you are worried about having changing depth of field such that plates are out of focus as they traverse the field of view, then you have set this cam up with too wide an FOV. Zoom in more.

This cam has a large focus distance. See below. Plates at 60 and 100 feet from the same cam.

LPR East 60 feet.jpgLPR East 100 feet.jpgLPR East 60 feet night.jpgLPR East 100 feet night.jpg
 
Last edited:

jbd70

n3wb
Joined
Dec 26, 2020
Messages
5
Reaction score
2
Location
DeLand, fl
Thanks for the replies. I appreciate the help, though I'm not happy to hear the truth about the "autofocus" feature of the camera/lens combination. Coming from the photography world where I've seen focusing technology continually improve over the last few decades, I'm well aware of what is possible with current tech. Larger apertures and longer focal lengths make depth of field smaller and autofocus more difficult, especially in low light, but not impossible even with moving subjects. My digital still camera (5+ year old Canon 7d) focuses a 500mm lens quickly enough to reliably lock focus on moving wildlife (birds flying, ground animals running) at dusk. My Dahua PTZs do a much better job of autofocusing stationary objects at all focal lengths, even in low light, than the DH-IPC-HFW5241E-Z12E.

From what I'm hearing, I guess I'm going to have to drastically lower my expectations and accept the reality that the DH-IPC-HFW5241E-Z12E "autofocus" has serious flaws (hardware or firmware limitations) and that in order to make use of the camera successfully for LPR and/or other purposes, some form of a manually focused, fixed focal length work around is usually necessary. Disappointing.

I've played around with different scenes and focal lengths some more. In my case as well, the longer the focal length, the worse the autofocusing. When I zoom in or out while in autofocus, the camera focuses such that the foreground is consistently better focused than the background, but nowhere in good focus. I have to manually move the point of focus farther away to get anything in focus. In the photography world, this would be called (severe) front focusing. My still camera has a feature that allows me to calibrate the camera for a particular camera/lens combination in order to eliminate front (and back) focusing. I suspect my copy of the DH-IPC-HFW5241E-Z12E could be made to perform better judging by others' comments that they have some success with autofocus which, unfortunately, hasn't been my experience. Has anyone ever heard of improving a security camera's autofocusing capability by way of being serviced by the manufacturer?

Thanks again for the help.
 

Flintstone61

Known around here
Joined
Feb 4, 2020
Messages
6,613
Reaction score
10,946
Location
Minnesota USA
Use small pieces of reflective tape hidden strategically where you need the camera to stop hunting. Another guy did that with a z12 eralier version, and it tricked the camera into focusing at the location of his reflective tape.
Screenshot 2021-07-10 003947.pngelh993.jpg
unkown.jpg
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,960
Reaction score
48,676
Location
USA
Unfortunately, most of us here know that the Dahua and Hikvisions of the world do not cater to the "consumer" market - their target audience is professional installers, so we are considered "prosumer" and we are fortunate to get our hands on these types of cameras and NVRs instead of consumer grade junk and not having to go thru professional installers to get quality gear. Now the downside is we get them at a discount and without manuals and Dahua support and thus are on our own to figure it out. And we are just fine with that because of a forum like this!

In all likelihood if you called them to ask about servicing your unit, they would tell you to pound salt or talk to the authorized dealer you purchased it from.

Comparing these types of cameras to a still camera isn't really a fair comparison. Sensor sizes are different and they serve two different audiences and purposes. And I am sure many professional photographers with high-end cameras will manual focus to capture exactly what they want. A still camera is designed for faster focus to catch fast moving objects like a bird in flight. These cameras will never capture as clean an image of that type of object. Maybe occasionally, but not at the same consistency as a still camera.

I am sure with a fast moving object, a still camera will beat the image of a comparable MP surveillance camera. Heck a gopro can probably produce a better video and picture in the right conditions. These cameras need IR, IR filters, and a bunch of other things that a still camera or gopro doesn't need because it has to be functional over a wider range of light, temperature, etc.

Also keep in mind that the Z12E is an older model, even if still being produced and sold, it is a several year old technology unit.

Many of us here have made this camera a very capable LPR camera. We have given you options to make it work, but it sounds like you are not interested in those solutions. Keep in mind this is a one time set it up and it is done - it isn't like you have to go in everyday and focus the camera.

Another option is to purchase a camera designed for LPR, but you will pay at least triple the cost of the Z12E.
 

jbd70

n3wb
Joined
Dec 26, 2020
Messages
5
Reaction score
2
Location
DeLand, fl
Thanks for the good suggestion, and I'll give it a try, but I suspect this won't work because nothing is in focus after the camera autofocuses at longer focal lengths. Focusing capability gets tested more due to the shorter depth of field (and probably larger aperture if not in aperture priority mode) so the scene it totally out of focus.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,960
Reaction score
48,676
Location
USA
What is your resistance to setting the zoom, having someone stop a car in the field of view, hit autofocus to get the zoom number (and maybe a manual tweak if needed), put the focus into manual in the settings, and then being done with it?

I have my Z12E at full zoom and all I see is pavement, no curb, no grass, just pavement. And this method works to get me clean focused plates. I haven't touched the settings on that camera in over a year.

This camera isn't designed to be constantly zooming in and out, that would be a PTZ. A varifocal is a set it and forget it type of camera.
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,960
Reaction score
48,676
Location
USA
Forget everything you think you know about cameras. keep tweaking shit until the motherfucker gets a plate.
Yep LOL.

We need to keep in mind that this is a camera dedicated to plates and not an overview camera also. It is as much an art as it is a science to get plates. We are accomplishing something the camera really wasn't designed for. For LPR we need to zoom in tight to make the plate as large as possible. For most of us, all you see is not much more than a vehicle in the entire frame. Now maybe in the right location during the day it might be able to see some other things, but not at night.

Who would have ever thought you would need to have a completely black image at night and get plates....

My neighbor thought I was nuts when I set his Z12E up for plates and he is like I can't see anything and I was like "Um do you wanna see the whole neighborhood or get a capture of the plate". Now unfortunately he gets into his system at night and sees the black image and zooms out and then the focus is messed up the rest of the night LOL.

Too many people make the image bright and then the plate is a blur.
 

jbd70

n3wb
Joined
Dec 26, 2020
Messages
5
Reaction score
2
Location
DeLand, fl
I certainly understand the value of using the work arounds that have been mentioned. I get the fact that the camera isn't a totally useless device and that the more work I put into employing the different work arounds that have been mentioned, the more I'll benefit. No dispute about that. Its just not what I was expecting. My copy of the camera doesn't autofocus at all when zoomed in and there is no way I would use the word "autofocus" to advertise its capabilities. I actually had an older ANPR (Dahua ITC237-PU1B-IR) which I replaced with the DH-IPC-HFW5241E-Z12E due to a failure. I was hoping to get roughly similar performance for less $$ but this may have been a mistake, at least from the point of view of focusing.

All the work that has been done to make this stuff function is certainly appreciated and many thanks for that as well as for the advice and tips. Hopefully, some day the experimenting and tweaking will become a thing of the past because technology advances will make reliable LPR fully automatic and more affordable. Then what will we experiment with?
 

Flintstone61

Known around here
Joined
Feb 4, 2020
Messages
6,613
Reaction score
10,946
Location
Minnesota USA
my camera is 6 feet off the ground. tucked in a garage door frame. I have it looking at the asphalt. and the focus seems to stop hunting when i zoom in enough on that patch of asphalt. Luckily, being on a flat angle, the camera gets a lot of frames. So invariably I will capture 99.99% at night. Daytime has it's own " Time of day" shadows and light issues. there are a few periods when somebody slips by without a clean plate, but I know all 80 of the cars that live onsite. ( it's an OCD sickness probably) I can see a Blue Mazda 5 and know the Name of the driver, thier Unit #, and whether or not they're an asshole.
 

EMPIRETECANDY

IPCT Vendor
Joined
Nov 8, 2016
Messages
8,299
Reaction score
23,870
Location
HONGKONG
Thanks for guys discussing

The ANPR ITC237-PU1B-IR) camera is a bit professional camera, they add AI algorithm esp the North America car license plate algorithm. This is totally different than the IPC-HFW5241E-Z12E.
Autofocus for a long range camera is hard when zoom max, the new firmware has a manual adjustment for the lens, this was found by @Wildcat_1 on our latest new fw.
Get a plug in and play ANPR, just use this one. But price is around 3 times than the Z12E.

 
Top