Severe Focus Issue with IPC-HFW5231E-Z12

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,019
Reaction score
47,484
Location
Floriduh
Wow! Thank you so much @bickford ! Very kind of you to do that. I think even I can understand ;)

I will try it in a few days when I return.

Again thank you
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,019
Reaction score
47,484
Location
Floriduh
Hi BICK @bickford

I was able to test and witness the magic of the focus command on my 5231Z-12.
Tonight it will be nice to finally see the Dahua retain its focus after dark :)

Many, many thanks to you sir. I am forever grateful.

blur.jpg HOA Entr_EntrTag_main_20180922143033_@3.jpg
 

bickford

Getting comfortable
Joined
Mar 12, 2016
Messages
468
Reaction score
432
Nice to see its running perfect :)
you are welcome :)

BICK
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,019
Reaction score
47,484
Location
Floriduh
Rut Ro... that worked great until nighttime, then it lost focus again.

Problem is, there is a different focus point at night when it switches to IR/B&W. I grabbed the values like BICK showed me, and the "Focus" value changes when I focus the image to be clear after it switches from Day to Night via the Schedule...

See values below

Day
status.Focus=0.613889
status.FocusMotorSteps=1800
status.LenAdjustStatus=1
status.Status=Normal
status.Zoom=0.931780
status.ZoomMotorSteps=1202

Night
status.Focus=0.630000
status.FocusMotorSteps=1800
status.LenAdjustStatus=1
status.Status=Normal
status.Zoom=0.931780
status.ZoomMotorSteps=1202


SO I'm testing a theory. I set the script value to the Night focus at exactly 8pm (when it switches to B&W/IR per the Schedule), and told it to send the command 1x per day - at 8pm tomorrow.

I'm hoping that when it switches to Color/Day in the morning, Auto-focus will kick in and it will focus for day, and change at 8pm tomorrow evening when the script runs.....

Thats my plan o_O
 

bickford

Getting comfortable
Joined
Mar 12, 2016
Messages
468
Reaction score
432
Found this on the forum if it can help you :

" I nailed this down for myself, addressing the focus shift issue on the sd49225t-hn which doesn't support the adjustfocus api setting to set an absolute focus value.

To switch modes I'm doing it externally thru a script from my Vera home automation, but any method you want to use to send the API calls would work fine. My home automation is already figuring out when day/night is every day, so its easy to use that as a trigger when I need to switch modes.

First, I turn on night mode/IR on (VideoInMode[0].Config[0]=1), set focus to automatic (VideoInFocus[0][1].Mode=2), and shutter to 1/1 (&VideoInExposure[0][1].Value1=1000&VideoInExposure[0][1].Value2=1000) so that the scene is very well lit/clearly visible - this gets the camera in night mode, with IR on, and autofocus works great since the scene is well lit with long shutter.

http://username:password@192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1&VideoInFocus[0][1].Mode=2&VideoInExposure[0][1].Value1=1000&VideoInExposure[0][1].Value2=1000

So that gets my focus reset to account for the IR focus shift going from daylight to night, however my shutter is way too long to capture plates now. So I have the script sleep for a few seconds ensuring it has time to apply the prior settings and focus, then I just need to set focus to manual (VideoInFocus[0][1].Mode=4) so it doesn't try to auto-adjust again once the scene goes black, and I set shutter to 1/1000 (&VideoInExposure[0][1].Value1=1&VideoInExposure[0][1].Value2=1)which is perfect for clear, crisp plates:

http://username:password@192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1&VideoInFocus[0][1].Mode=4&VideoInExposure[0][1].Value1=1&VideoInExposure[0][1].Value2=1

My daytime switch just turns on day mode and sets focus and shutter to automatic:

http://username:password@192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=0&VideoInFocus[0][0].Mode=2&VideoInExposure[0][0].Mode=0

So to recap, I'm using these settings with the SD49225T-HN to capture plates at 150' day and night at something like a 40 degree angle. During the day, everything is set to default except zoom near max. During the night:
picture is set default
exposure is set manual, shutter 1/1000, 2D/3D NR set to 26
Backlight HLC set to 71
WB auto
Day/Night - ICR black and white
Zoom focus set to manual
IRLight far set 100 "

BICK
 

mjessup44

n3wb
Joined
Oct 2, 2018
Messages
14
Reaction score
1
Location
Indiana
Thanks BICK

Making progress!
bigredfish did you get everything fixed? I'm thinking of getting this cam due to its higher ir range (z5 is up to 50 meters while the z12 is up to 200 meters)
Am I wasting my time? I'm thinking due to this issue u have I should stick with the z5 but I really want that extra ir range.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,019
Reaction score
47,484
Location
Floriduh
Yes so far so good, though I'm still using the reflective tape method for focus as I havent found the time to mess with the scripts mentioned above. Focus isnt perfect every time using this low-tech method but still does the job. See examples below

As far as distance, I think you're going to find you max out the realistic capabilities of the Z12 for tag reading at about 150-180ft, and then only straight on... Mine is at 120ft and zoomed in about 80-%.

As far as IR, I always cut IR ratings in 1/2 to determine realistic usable IR. No way you're going to read plates at anything close to 200 meters with this camera
 

Attachments

Last edited:

mjessup44

n3wb
Joined
Oct 2, 2018
Messages
14
Reaction score
1
Location
Indiana
Yes so far so good, though I'm still using the reflective tape method for focus as I havent found the time to mess with the scripts mentioned above. Focus isnt perfect every time using this low-tech method but still does the job. See examples below

As far as distance, I think you're going to find you max out the realistic capabilities of the Z12 for tag reading at about 150-180ft, and then only straight on... Mine is at 120ft and zoomed in about 85-90%.

As far as IR, I always cut IR ratings in 1/2 to determine realistic usable IR. No way you're going to read plates at anything close to 200 meters with this camera
ok thanks, I just ordered 3 of them from andy
 

pinko

Known around here
Joined
May 26, 2017
Messages
385
Reaction score
623
Location
Australia
I just got one that has focus issues, too. Autofocus doesn't actually focus properly when zoomed in more than 80%
My Z-12 has done this since New. When zoom is around 80% the camera attempts to focus, but fails.

 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,019
Reaction score
47,484
Location
Floriduh
Have you tried setting it where you want with the slider and then hitting Auto Focus button?

Interesting I see different values on your slider than mine, I'm about 80-85% I think and on that top slider I get a value of 1140 when i hover over it...hmmm
 

pinko

Known around here
Joined
May 26, 2017
Messages
385
Reaction score
623
Location
Australia
Have you tried setting it where you want with the slider and then hitting Auto Focus button?
If zoom is over 80%, the autofocus button does not fix the focus issue.
Its no deal breaker since the camera is set at 75% zoom.
 

bickford

Getting comfortable
Joined
Mar 12, 2016
Messages
468
Reaction score
432
if the problem persist you can try a factory default reset

BICK
 

fstop

Young grasshopper
Joined
Feb 6, 2019
Messages
35
Reaction score
10
Location
US
I to also have this 80%+ focus problem with a brand new IPC-HFW5231E-Z12. It had the Jan 2019 firmware on it, focus problem, so I downgraded to the Dec 2018 firmware, but still same problem exists.. Has anyone been able to fix this 80%+ focus problem?
 

fstop

Young grasshopper
Joined
Feb 6, 2019
Messages
35
Reaction score
10
Location
US
The focus point shifts when going to B&W (night) mode and autofocus tries to fix itself but fails. Same occurs when going back to Color (day) mode as others have already pointed out. As there doesn't appear to be any way to turn autofocus off (not that it would be fixed as night would still need adjusting), this camera is just unusable past 80% zoom.

Given the time this was first discovered, I'm amazed Dahua isn't aware of or hasn't bothered to fix this issue. I'm sure it's fixable via firmware. Given I bought this camera specifically for full zoom and I have low hopes of a speedy firmware fix, I think I'll have to return this. Potential buyers of this camera should be aware of this issue.

Bought through Andy and he's been great to deal with. Super fast shipping also.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,019
Reaction score
47,484
Location
Floriduh
I to also have this 80%+ focus problem with a brand new IPC-HFW5231E-Z12. It had the Jan 2019 firmware on it, focus problem, so I downgraded to the Dec 2018 firmware, but still same problem exists.. Has anyone been able to fix this 80%+ focus problem?
4 fixes I'm aware of, with varying degrees of success:

1- The Sunset/Sunrise Utility (3rd party script you run on another device. (By a member here, use the Search function to locate it)
2- What I do on one Z12, using the Schedule function, switch to B&W/Night/IR 45min-1hr prior to sunset and switch to Color 1 hour After sunrise
3- Keep the camera in B&W 24/7 which I do on the other Z12
3- Some have had success with using reflective tape or reflectors in sight of the camera giving it something to focus on
 

fstop

Young grasshopper
Joined
Feb 6, 2019
Messages
35
Reaction score
10
Location
US
4 fixes I'm aware of, with varying degrees of success:

1- The Sunset/Sunrise Utility (3rd party script you run on another device. (By a member here, use the Search function to locate it)
2- What I do on one Z12, using the Schedule function, switch to B&W/Night/IR 45min-1hr prior to sunset and switch to Color 1 hour After sunrise
3- Keep the camera in B&W 24/7 which I do on the other Z12
3- Some have had success with using reflective tape or reflectors in sight of the camera giving it something to focus on
1) I use a Mac to manage cameras, and I think the script is Windows only, though I'm not sure.
2) How do you avoid the autofocus problem? Changing day/night mode induces an unavoidable autofocus (at least for me).
3) That is an option I hadn't thought about, though I do need color during the day as this camera is being used for ID as well. I suppose I could run it full-time color but I'm giving up all night usage.
4) I've tried autofocusing on different scenes at different distances and it didn't seem to make much difference (with daylight). I'll find some high contrast markers and re-test when it's dark.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,019
Reaction score
47,484
Location
Floriduh
2) How do you avoid the autofocus problem? Changing day/night mode induces autofocus.

Not if you allow the focus change to occur while it can "see" clearly. By allowing the camera to change while there is plenty of light, and in theory giving it something good to focus on, it seems to hold focus. The downside is because of the vast difference in LPR settings for night vs day, I get limited capability out of the camera for the 45 minutes or so on each switch.
 

fstop

Young grasshopper
Joined
Feb 6, 2019
Messages
35
Reaction score
10
Location
US
What I say autofocus fails, I mean that it conducts the focus sweep, and settles on a focus that is continually off (the focus point is always short of scene). I've tried this on multiple scenes with full sunlight, varying complexity, varying distance, varying contrast objects, with the same off focus. It seems like an offset. I'll try again at night but I suspect it will be no better.

Is your camera able to autofocus properly with full sunlight?
 
Top