Friday, 26 December 2014

Digital Video Processing with HD CCTV: Noise reduction

Digital Video Processing with HD CCTV: Noise reduction

In this post I examine some of the sophisticated technology used in digital high definition CCTV cameras, including a the powerful underlying SOC electronics, and the similarities with audio noise reduction in audio, as used in amateur radio.

Noise reduction in HD CCTV

I read very widely and like to see or create connections between apparently disparate ideas and technologies. From an earlier post on working with a Pentax lens I have, I read about the image processing abilities of some Pentax lenses.
Pentax/Richo have an award-winning image processing system, PENTAX Atmospheric Interference Reduction (PAIR). The results are amazing:
From a first reading, the processing seems to be done in the lens itself, something that had me mystified as to how such spectacular results are possible with just optics. However, on closer reading, the output of the camera is fed into the lens and the main output is from the lens. As such, the lens has on-board processing of the captured images, making such image processing more plausible, compared to doing it with optics as I first thought. The connection are shown:
The lenses are expensive, for CCTV lenses, at about $10,000. Having realised the PAIR system uses the raw images from the camera, then it is easier to see how it might work; it is very difficult to find technical information on the PAIR system, secrecy can be better than patents for protecting intellectual property, something I have experienced myself during my career with technology transfer.
On the other hand, Texas Instruments, who make a very sophisticated system on a chip (SOC), video processing system (VSP), has an interest in telling the world of its possibilities, in order to sell more chips; even a Wiki:
The TI Da Vinci SOC is essentially a video camera on a chip plus powerful VSP. The block diagram of a "reference design" networked camera:
With this SOC, it is possible to produce very powerful CCTV cameras at low cost. I purchased such a camera, with a 2K UHD sensor, but no lens, for about $170 from It was purchased to investigate DATV over networks and UHD DATV, subjects of earlier posts. However, with the DSP, there are other possibilities. Taking the lid off the camera revealed a very simple construction. The main SOC is obscured by a heatsink, while the other chips were memory or auxiliary.  
Low-light noise is a bug-bear of CCTV security systems. Using the TI SOC, noise reduction is possible: (Nov 2012, so close to state of the art)
Looks familiar to Pentax PAIR technology? TI's solution is to put the DSP in the camera and use conventional lenses, whereas Pentax's solution is to put the DSP in the lens. TI go on to discuss the algorithms.
Amateurs are fairly familiar with noise, with much of it being random, likewise with video. TI identify two techniques to remove noise: spatial and temporal filtering (see pdf for details). The essential approach is to compare a number of frames (typically collecting 25 or 30 frames per second), with little motion. What is in one frame, but not another is usually noise and can be removed. This is very similar to noise-cancelling with audio and radio where two different sources (two antenna, two microphones) are used and the differences discarded as noise.
Temporal filtering is more complex as it is used with moving images and needs to differentiate noise between frames as well as motion between frames; a two level system with different time regimes.


Saturday, 6 December 2014

BlackMagic Design ATEM TV Studio problems with 1080p; a hardware limitation?

BlackMagic Design ATEM TV Studio problems with 1080p; a hardware limitation?

In this post, I think I have discovered the problem of the ATEM TV Studio not accepting 1080p input, a hardware limitation. Alternatives are then considered.

BlackMagic Design ATEM TV Studio

As noted in earlier posts, I use BlackMagic Design ATEM TV Studio as the main component of my DATV studio to connect multiple cameras and other video sources. Overall it performs brilliantly well allowing for most features needed in a professional TV switcher, and with nothing else even remotely in the price range; $1000.

No 1080p input, despite being common format for cameras

However, it has one very annoying problem, it will only accept 1080i input, not 1080p, which to a point is reasonable as 1080i is the highest resolution for broadcast TV. The big problem is that almost all cameras output 1080p in live mode, including BlackMagic's own pocket cine camera and DSLRs like my Canon 70D (although at different frame rates!!....).
As such, the "cheap" solution is to use 1080p to 720p converters for each camera at under $100 each, and to run the switcher at lower resolution 720p. Converters from 1080p to 1080i are expensive, >$600, and uncommon. Annoying to have full HD cameras running at HD because of limitations of the ATEM TS Studio switcher.
I had wondered if the problem was firmware or hardware based. Not wishing to disassemble the device, there seems to be an important clue in examining its related product, the BlackMagic Intensity Pro PCIe HDMI capture card. Being a card that fits inside a computer, all its chips are visible.

Hardware limited to 1080i?

The Intensity Pro uses a member of the TDA9975 chip family, in production since about 2003. It has two HDMI inputs as well as for analogue inputs. However, the main problem is that the chip only works to 1080i. This is not surprising given the age of the chip design; 1080i was a dream when it was first adopted in the 1990s, but technology has overtaken it. It is possible that there are two of these chips in the ATEM TV Studio to give its four HDMI inputs; why reinvent the wheel, having done it for the Intensity Pro and to keep costs down?
As such the 1080p limitation seems to be hardware, with nothing possible to get it to accept 1080p unfortunately. It did seem very odd for a video switcher not to directly accept the company's own cameras, but this seems to be the answer. Similarly, it explains the difficulties I had trying to capture live HDMI video for my 70D DSLR with the Intensity Pro, to use with the HiDes UT-100C DVB-T dongle, before I found out that the 70D was outputting 1080p.
For hardware junkies, like me, the block diagram of the chip shows the HDMI inputs at the bottom left, the analogue inputs at the top right and the video and audio streams to the PC at the top right.


Depending on intended use, the BlackMagic ATEM Production Studio 4K switchers (at $1600 plus)seems to be the answer as they will accept 1080p and higher resolutions to 4K. However, unlike the TV Studio, they do not have the H-264 encoder, not a cheap device if purchased alone. I plan to get a now have a Production Studio 4K and sell sold the ATEM TV Studio; not much more money; sunk cost... (PS4K not without problems!!; elaborate in another post)
An advantage of the Production Studio 4K is that I can experiment with UHD, 2K to start then 4K. DVB-T 4K modulators are not currently available, but may be in 2015.

1080i not supported by all DVB-T modulators?

For my purposes, the Production Studio 4K as a frontend for a DATV system is not a problem, as the DVB-T modulators include a H-264 encoder. The HiDes HV-202EN that I have been using does accept 1080p on HDMI and SDI and has an encoder, but cannot modulate at 1080i, only 1080p. That may be a firmware issue, as it is mainly intended for HD-CCTV where 1080p is the norm. However, I do have an unused, Digicast modulator that claims to be able to output both 1080i and 1080p. I have yet to try it. (this stuff is not simple!!)