PTZ Digital Zoom is not actually worthless

bp2008

Staff member
Joined
Mar 10, 2014
Messages
10,499
Reaction score
8,596
Location
USA
It is common knowledge that Digital Zoom is basically a scam, right? We've all seen products that advertise sky-high digital zoom numbers, and we all know that doesn't mean very much.

1599753552939.png

That is certainly what I thought. So whenever I found Digital Zoom in a PTZ camera's options, I turned it off, thinking it was useless. After all, any good camera viewing interface has excellent digital zooming capability, so why would I need the camera to do it?

Because...

The camera's digital zoom preserves fine details much better because it applies the zoom before video compression. (whereas your video player can only zoom in after video compression has wrecked the fine details).

I realized this last year when trying to get my dad's PTZ camera to read a distant tank gauge better.

How much of a difference does it make, you ask?

Here are some captures I did this morning to demonstrate the difference in quality between using a camera's digital zoom and using digital zoom in UI3 (Blue Iris).

For the UI3 Digital Zoom snapshots, I zoomed UI3 to 4x. The Camera Digital Zoom snapshots were also screen-grabbed from UI3, but with UI3 zoom at 1x and the camera's digital zoom fully zoomed-in. Three different Dahua 2MP PTZs were used for these samples.



UI3 Digital Zoom
0, UI3.jpg

Camera Digital Zoom
0, Cam.jpg


UI3 Digital Zoom
Outdoor 1, UI3 4x capture.jpg

Camera Digital Zoom
Outdoor 1, Camera Digital Zoom, UI3 1x capture.jpg


UI3 Digital Zoom
4, UI3.jpg

Camera Digital Zoom
4, Cam.jpg


UI3 Digital Zoom
5, UI3.jpg

Camera Digital Zoom
5, Cam.jpg


UI3 Digital Zoom
UI3 4x capture.jpg

Camera Digital Zoom
Camera Digital Zoom, UI3 1x capture.jpg

 

Old Timer

Getting comfortable
Joined
Jul 20, 2018
Messages
416
Reaction score
659
Location
ok
You surprised me, I never figured it would make a difference, thanks for the "zoom work".
 

tigerwillow1

Known around here
Joined
Jul 18, 2016
Messages
1,597
Reaction score
1,703
I've been amazed a few times when I've used ROI on Dahua and Hikvision cameras. The image in the ROI area was significantly higher quality than the same area even when the highest available bitrate was used without ROI. I never thought of it this way before, but using ROI then zooming into that area on the viewing end kinda-sorta sounds like the same thing you've described with the Sony camera. 990x? Not even close!
 

handinpalm

Getting comfortable
Joined
Sep 21, 2016
Messages
432
Reaction score
596
Location
Tampa Bay FL
I use digital zoom Every day when I review cam video. I like to see certain areas that my cams are staring at. And no, I do not want to optically zoom into those areas full time. I love digital zoom for reviewing.
 

ljw2k

Getting comfortable
Joined
Jun 9, 2014
Messages
521
Reaction score
543
I also use digital zoom and it got a vehicles registration for me when a Van damaged one of our cars.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
10,499
Reaction score
8,596
Location
USA
I've been amazed a few times when I've used ROI on Dahua and Hikvision cameras. The image in the ROI area was significantly higher quality than the same area even when the highest available bitrate was used without ROI. I never thought of it this way before, but using ROI then zooming into that area on the viewing end kinda-sorta sounds like the same thing you've described with the Sony camera. 990x? Not even close!
The "Sony" camera was just an example of misleading marketing that led to such distrust of digital zoom built-in to cameras. All my snapshots were from Dahua PTZ cameras.

You're right, the ROI feature in a camera is very similar to on-camera digital zoom in that reduces the detail loss from compression in a small area. The smaller the area, the better the quality can get.
 

samplenhold

Known around here
Joined
Aug 8, 2018
Messages
1,888
Reaction score
3,597
Location
Spring, Texas
The Camera Digital Zoom snapshots were also screen-grabbed from UI3, but with UI3 zoom at 1x and the camera's digital zoom fully zoomed-in.
How did you actually zoom in with the cam's digital zoom? Did you open up a web browser and log into the cam?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
10,499
Reaction score
8,596
Location
USA
I use digital zoom Every day when I review cam video. I like to see certain areas that my cams are staring at. And no, I do not want to optically zoom into those areas full time. I love digital zoom for reviewing.
I also use digital zoom and it got a vehicles registration for me when a Van damaged one of our cars.
Yes, that is by far the most common way anyone uses digital zoom -- after the video is compressed. Unfortunately it can't restore any details that were already lost to compression. On-camera digital zoom is all about zooming before the compression happens, and that is how it delivers better detail.

This is also why I run most important cams at the highest bit rate available. Just looking at the video casually, you might not see any difference to justify the high bit rate. But when you digitally zoom in, that is where super high bit rates really start to matter because you are literally magnifying the compression artifacts.

Most IP cameras today don't come even close to recording at a high enough bit rate in my opinion.

Take for example the IPC-HFW1831E in my backyard. Shadowed areas in particular lose a lot of detail because the camera thinks they aren't as important or something. When I use the ROI (region of interest) feature to hint at the camera where it should allocate most of the bit rate, the effect is similar to using on-camera digital zoom (which this camera doesn't actually have).

For these snapshots, I configured the camera to encode 15 FPS CBR @ max bit rate (6400 Kbps H.265), and I loaded 100% quality jpeg snapshots from Blue Iris and zoomed to 4x.

No ROI (scene is a nearby pine tree)

1599765103054.png

ROI around this region reveals some of the lost detail.

1599765117771.png



Also here, this is even more noticeable.

No ROI

1599765182314.png


ROI around the captured area.

1599765256820.png
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
10,499
Reaction score
8,596
Location
USA
How did you actually zoom in with the cam's digital zoom? Did you open up a web browser and log into the cam?
The way it works with Dahua PTZ, and presumably with Hikvision and others, is that it seamlessly extends the zoom range of your PTZ camera. So it uses exactly the same controls as physical pan/tilt and optical zoom, but once it runs out of optical zoom it seamlessly switches to digital zoom.

In the case of my Dahuas, it is 4x digital zoom, meaning at its maximum zoom point, each pixel from the camera's image sensor is expanded to cover a 4x4 square of pixels in the final video.
 

samplenhold

Known around here
Joined
Aug 8, 2018
Messages
1,888
Reaction score
3,597
Location
Spring, Texas
So it uses exactly the same controls as physical pan/tilt and optical zoom, but once it runs out of optical zoom it seamlessly switches to digital zoom.
I take that to mean you are using the Zoom control in BI.

So in BI how do you know when you get to the end of the optical zoom and are now zooming digitally? To me the real test of this would be to get the cam to the point of fully optically zoomed, then compare the UI3 screen digital zoom to the screen display of the cam digitally zoomed and UI3 not zoomed at all.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
10,499
Reaction score
8,596
Location
USA
I take that to mean you are using the Zoom control in BI.

So in BI how do you know when you get to the end of the optical zoom and are now zooming digitally? To me the real test of this would be to get the cam to the point of fully optically zoomed, then compare the UI3 screen digital zoom to the screen display of the cam digitally zoomed and UI3 not zoomed at all.
It can be hard to tell, but the zooming can become ever so slightly smoother as there is no longer any physical motion in the camera.

My tests were done basically as you said.

First I enabled digital zoom in the camera's web interface, then zoomed in all the way using UI3's PTZ controls, and had UI3's digital zoom level at 1x. Then I did a screen capture with Window's snip & sketch tool.

Then I'd turn off digital zoom in the camera, set UI3's digital zoom level to 4x, and screen capture again with Windows' snip & sketch tool.

To get UI3 to digitally zoom to exactly 4x, you need to enable Legacy zoom mode in UI Settings, otherwise the exact zoom increments are dependent on your OS, browser, pointing device drivers, etc.

1599766567926.png

Of course by the time you see my snapshots on ipcamtalk, the video has been compressed 3 times. First by the camera, again by Blue Iris sending an 8 Mbps CBR H.264 stream to UI3, and once by the snip & sketch tool saving as jpeg.
 

tech101

Getting comfortable
Joined
Mar 30, 2015
Messages
762
Reaction score
802
Location
SF BayArea
Thank you bp2008. I never realized the Digital Zoom was decent on these cameras. I just enabled it on one my Newer PTZ DH-SD8A840WA-HNF and gave it a shot after reading your post. I am glad it did its not that bad as I thought. So I have enabled it :D
 
Top