Infrared focus shift - explanation

Jeroen1000

Young grasshopper
Joined
Sep 26, 2016
Messages
42
Reaction score
13
So part 1 left us focussing at night time with IR ON.
Now I took a new set of pictures during daytime:

- Scenario: Camera was focussed at night time with IR-ON.
1) 1ste one has been made during daytime before refocussing the camera
2) the 2nd has been made during daytime after refocussing the camera
Daytime before refocus.jpg
Daytime after refocus.jpg
As you can see, the difference for day time is totally unacceptable. I will be contacting Dahua again to complain.
 
Last edited:

imog

n3wb
Joined
Dec 5, 2016
Messages
21
Reaction score
8
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

Night plates:



Day plates:

 

cam235

Pulling my weight
Joined
Oct 5, 2016
Messages
323
Reaction score
164
For what it's worth, the visible/IR focus-shift effect is minimal with wide-angle lenses, due to large depth of field those lenses have. That's why the typical wide-angle camera doesn't show the effect much. However, the IR shift is much more of a problem with a long telephoto or zoom lens such as PTZ used for license plates etc. so the varifocal models are a better choice in that application, than fixed-focus. It is puzzling why Dahua doesn't make the IR focus shift automatic instead of making you do some script automation and dawn and dusk. I have one box camera with a fixed 100mm lens and have to use an external script to move the sensor forward or back at dusk and dawn for best focus.
 

adamg

Pulling my weight
Joined
Sep 19, 2017
Messages
250
Reaction score
129
For what it's worth, the visible/IR focus-shift effect is minimal with wide-angle lenses, due to large depth of field those lenses have. That's why the typical wide-angle camera doesn't show the effect much. However, the IR shift is much more of a problem with a long telephoto or zoom lens such as PTZ used for license plates etc. so the varifocal models are a better choice in that application, than fixed-focus. It is puzzling why Dahua doesn't make the IR focus shift automatic instead of making you do some script automation and dawn and dusk. I have one box camera with a fixed 100mm lens and have to use an external script to move the sensor forward or back at dusk and dawn for best focus.
I would argue that variofocal models are a better choice in _all_ applications.
 

ipcflow

n3wb
Joined
Sep 26, 2022
Messages
16
Reaction score
8
Location
Germany
Hi,

i have a similar problem.

i think there may be a filter-lens that jump in and make the picture blur and unsharp with false focus.

you can see in b/w-mode the focus is on "near", bottom right you see its getting very sharp, but all other blur.


anyone has a solution found? is this on all cams from dahua?
 
Last edited:
Top