I've read several times on this (very informative by the way) forum using this technique.
I'm planning to do this too: New setup: 2 camera's and a NVR
But here's the question; how exactly do you do that?
Personally, I have the IPC-HDW5231R-ZE which goes from 2.7mm to 13.5mm.
For another setup, I want to use 2 IPC-HDW4231EM-ASE camera's to save some money.
(it would save him about €40 p/camera).
Now that camera is available in 3 versions; 2.8mm, 3.6mm and 6mm, all within the focal range of my camera.
But how do you know when you're in the webinterface zooming in and out at what focal length you're at?
The slider goes from 0 - 2390, 0 at 2.7mm and 2390 at 13.5mm.
If you would convert that 0-2390 number to a 2.8, 3.6 and 6mm focal length; that would equate to:
2.8mm = 22.13
3.6mm = 199.17
6mm = 720.27
Or, a much better way:
His maths results in this:
However, this all theoretical assuming (like @truglo said) the software and hardware are linear.
Has anybody used this method of using a vari-focal length camera to determine the focal length for a fixed-focus camera? And if yes, how?
I'm planning to do this too: New setup: 2 camera's and a NVR
But here's the question; how exactly do you do that?
Personally, I have the IPC-HDW5231R-ZE which goes from 2.7mm to 13.5mm.
For another setup, I want to use 2 IPC-HDW4231EM-ASE camera's to save some money.
(it would save him about €40 p/camera).
Now that camera is available in 3 versions; 2.8mm, 3.6mm and 6mm, all within the focal range of my camera.
But how do you know when you're in the webinterface zooming in and out at what focal length you're at?
The slider goes from 0 - 2390, 0 at 2.7mm and 2390 at 13.5mm.
If you would convert that 0-2390 number to a 2.8, 3.6 and 6mm focal length; that would equate to:
2.8mm = 22.13
3.6mm = 199.17
6mm = 720.27
Or, a much better way:
Good question... I'm not 100% sure what the answer is, but I will take a stab.
The Dahua api takes a range of 0.0-1.0, with 1 being max zoom, and we will assume the software and hardware are linear.
Let Fmin and Fmax be the max and min focal lengths, F be the actual focal length of the lens, and f be the API input zoom value. We can form the working equation:
f(F) = (F - Fmin) / (Fmax - Fmin)
Now we can easily solve for the API zoom values that give a 2.8, 3.6, and 6mm equivalent focal lengths on a 2.7-13.5mm zoom camera:
f(2.8mm) = 0.009259
f(3.6mm) = 0.08333
f(6mm) = 0.3056
Again, this is just an educated guess that assumes some things, but it might be right.
Kevin
His maths results in this:
hmm, the webui slider implementation may be using 2560, but the Dahua API takes a float in the range 0.0-1.0. You can interpolate the 0-2560 range to 0-1 and use the camera's web interface (I like this math approach, hehe... please share the working equation if you do that), or you can use the api by entering something like this in your browser (no plugins needed so chrome will work):
Code:http://user:password@ipaddress/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.071429&zoom=0.0833
Of course, replace the user, password, ipaddress, and zoom & focus values to match your setup. The API method is faster/simpler for me, but either way would work. It is a tad annoying the API doesn't have zoom broken out without having to set focus at the same time. If you need to get the current focus value from your camera, use this:
Code:http://user:password@ipaddress/cgi-bin/devVideoInput.cgi?action=getFocusStatus
I'll also note that these web API commands can be used alone, or while you're viewing video with the cam webui or VMS (stream).
However, this all theoretical assuming (like @truglo said) the software and hardware are linear.
Has anybody used this method of using a vari-focal length camera to determine the focal length for a fixed-focus camera? And if yes, how?