About video compressions, JPG blocky artefacts, matrices and jagged edges

Similar documents
Colour Reproduction Performance of JPEG and JPEG2000 Codecs

TEST PATTERN GENERATOR

10 Digital TV Introduction Subsampling

Contents. xv xxi xxiii xxiv. 1 Introduction 1 References 4

The Development of a Synthetic Colour Test Image for Subjective and Objective Quality Assessment of Digital Codecs

Communication Theory and Engineering

Understanding Multimedia - Basics

ViDi Labs. SD/HD CCTV Test Chart. v.4.x. Instructions for setup and usage. Designed and Produced by. ViDi Labs Pty.Ltd ABN

Audio and Video II. Video signal +Color systems Motion estimation Video compression standards +H.261 +MPEG-1, MPEG-2, MPEG-4, MPEG- 7, and MPEG-21

XC-77 (EIA), XC-77CE (CCIR)

About Final Cut Pro Includes installation instructions and information on new features

A. All equipment and materials used shall be standard components that are regularly manufactured and used in the manufacturer s system.

«Stream Labs» Closed Joint -Stock Company. TPG-8 test image oscillator. Operation Manual

NAPIER. University School of Engineering. Advanced Communication Systems Module: SE Television Broadcast Signal.

RX-W42 Surveillance LCD Display

Designing Custom DVD Menus: Part I By Craig Elliott Hanna Manager, The Authoring House at Disc Makers

Video 1 Video October 16, 2001

Analogue HD Monitoring Set: 8-Channel Video Recorder + 4 Outdoor Cameras

Motion Video Compression

Technical Bulletin 625 Line PAL Spec v Digital Page 1 of 5

epos & Security Essentials Trade ONLY ONLY Trade Catalogue Call us Now on Visit Our Website

CFIS1425 CFMW1325, CFMS2025

2.4.1 Graphics. Graphics Principles: Example Screen Format IMAGE REPRESNTATION

Understanding Compression Technologies for HD and Megapixel Surveillance

The Mitsubishi DX-TL5000 DVR

Objectives: Topics covered: Basic terminology Important Definitions Display Processor Raster and Vector Graphics Coordinate Systems Graphics Standards

JS007WQK HEAVY DUTY WIRELESS REVERSING KIT 7 LCD DIGITAL QUAD RECORDING MONITOR with WATERPROOF CCD CAMERA

MULTIMEDIA TECHNOLOGIES

RiniLink R1000_SG. Covert Wireless Digital Surveillance COFDM System

If your sight is worse than perfect then you well need to be even closer than the distances below.

Datasheet EC-750 Ex DOME Camera

RX-W32 Surveillance LCD Display

SECURITY RECORDING 101

Understanding IP Video for

Multimedia. Course Code (Fall 2017) Fundamental Concepts in Video

LMD-1530W. 15-inch entry-level LCD monitor. Overview

Pro Type Series. Eco Type Series

Implementation of an MPEG Codec on the Tilera TM 64 Processor

OPTIMIZING VIDEO CLIPS IN EDUCATIONAL MATERIALS

12.1 Inch CGA EGA VGA SVGA LCD Panel - ID #492

ADN-8126 JJTRON Display System

Techniques for Creating Media to Support an ILS

HITACHI. Instruction Manual VL-21A

Simple all-in-one design style with front stereo speakers and natural ventilation system

ESI VLS-2000 Video Line Scaler

Chapter 3 Fundamental Concepts in Video. 3.1 Types of Video Signals 3.2 Analog Video 3.3 Digital Video

Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment

26 Inch CGA/EGA/VGA/DVI to WXGA/1080p LCD - ID#703

decodes it along with the normal intensity signal, to determine how to modulate the three colour beams.

PMCL300 Series TFT LCD Monitor 17-INCH, 19-INCH, OR 19-INCH WIDE, WITH MULTIMODE FUNCTIONALITY

INSTALLATION MANUAL. ST-CVTMD420-WPIR-W Covert Motion Detection Color Camera. v1.3 8/11/11 1

1/29/2008. Announcements. Announcements. Announcements. Announcements. Announcements. Announcements. Project Turn-In Process. Quiz 2.

Announcements. Project Turn-In Process. Project 1A: Project 1B. and URL for project on a Word doc Upload to Catalyst Collect It

15 Inch CGA EGA VGA to XGA LCD Wide Viewing Angle Panel ID# 833

New forms of video compression

INSTALLATION MANUAL. ST-CVTSD520-WSD-W Smoke Detector Covert Camera. v1.2 8/11/11 1

Getting Images of the World

YSC -HD-AK1 HDMI / HD-SDI

ANTENNAS, WAVE PROPAGATION &TV ENGG. Lecture : TV working

3CCD Color Video Camera BRC-300 BRC-300P. USA Security Systems

Video Compression Basics. Nimrod Peleg Update: Dec. 2003

Announcements. Project Turn-In Process. and URL for project on a Word doc Upload to Catalyst Collect It

AN2 Series. 900tvl. CMOS Technology High Resolution Sensor. elinetechnology.com P/N 01.BSM V1.0

Video Information Glossary of Terms

Unique Design and Usability. Large Zoom Range

True Home Cinema Experience

P.C.B Module For Video Doorphone

USER MANUAL. HN-IA60E200FS 1080P AHD/CVI/TVI/1200TVL Varifocal Outdoor Camera

Video Scaler Pro with RS-232

CCTV BASICS YOUR GUIDE TO CCTV SECURITY SURVEILLANCE

of t of and Re:connect M300 / M301 Video switch Dominating Entertainment. Revox of Switzerland.

The essential Full High Definition experience

contents Editorial - Eddy has his say... 1 Ask Eddy - The latest tips from the man himself... 2 Software - The Complete and Easy Guide to the Internet

Set-Top Box Video Quality Test Solution

CCTV GLOSSARY OF TERMS

A video signal consists of a time sequence of images. Typical frame rates are 24, 25, 30, 50 and 60 images per seconds.

Part 1: Introduction to Computer Graphics

HONEYWELL VIDEO SYSTEMS HIGH-RESOLUTION COLOR DOME CAMERA

UniVision Engineering Limited Modpark Parking System Technical Description. Automatic Vehicle Access Control by Video Identification/

Advanced security made easy PRO-555. Day/Night CCD Security Camera. Operating Instructions SW331-PR5 SR331-PR

PPM63H3Q PPM50H3Q. PPM42H3 42" HD 1024 x 768 Resolution PPM42S3Q 42" SD 852 x 480 Resolution

Epson EH-TW3000 Home Theatre Projector

MODE MENU /F1 /F2 F3 F4 PLCMHD80

To discuss. Types of video signals Analog Video Digital Video. Multimedia Computing (CSIT 410) 2

Ch. 1: Audio/Image/Video Fundamentals Multimedia Systems. School of Electrical Engineering and Computer Science Oregon State University

Date of Test: 20th 24th October 2015

Signal Ingest in Uncompromising Linear Video Archiving: Pitfalls, Loopholes and Solutions.

INSTRUCTIONAL MANUAL FOR LCD ZOOM MICROSCOPE

6.4 Chassis Monitor Model Number: LCM0642xx. SPEC No.: SAS Version: 0.0 Issue Date: April 16, Introduction:

PT-LB382 S P E C F I L E. LCD Projectors. As of July Specifications and appearance are subject to change without notice. 1/9.

KS200. Camera controller for 1 chip remote CCD cameras

17" 0.51 x 0.51mm Max. resolution. 500TVL / (SVGA) Contrast ratio. 500:1 (TYP) Brightness 500:1(TYP.) 420cd/m 2 (TYP.)

Video Series. HCS-4311M Professional Mixed Matrix for Conference 8.2. HCS-3313C High Quality Speed Dome Camera (ceiling) 8.5

Displays Open Frame Monitor Model Number: AND-TFT-150Bxx

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR 15.0 OPEN FRAME MONITOR

Thank you for your interest in BARCO s dedicated Home Theater products and more particular in our top-model, the CINE9.

Multi-function Portable. HD LCD Monitor. User Manual

CM-S38901SV TVL IR Long Range camera

PT-LW330 S P E C F I L E. LCD Projectors. As of April Specifications and appearance are subject to change without notice. 1/9.

Lecture 1: Introduction & Image and Video Coding Techniques (I)

Transcription:

About video compressions, JPG blocky artefacts, matrices and jagged edges Written and Illustrated by Vlado Damjanovski, B.E.(electronics) CCTV has it all: JPG, MJPG, Wavelet, H.263, MPEG-1, MPEG-2, JPEG-2000, MPEG-4, etc. So many different image compression techniques How do you know which one is the best for you? It is, without any doubt, very difficult. One has to understand the concept of digitised images, and the limitation of the TV standard as we know it today. And this is where CCTV focus magazine comes into play. So let s start from the beginning. The majority of CCTV cameras are still analogue devices. This means the video signal coming out of the BNC connector at the back of your camera gives you an analogue, 1Vpp video signal. Out of these 1Vpp, when there is sufficient light, 0.7 V would be reserved for the video signal, and the 0.3 goes to the sync pulses. Clearly, as the source of your video signal, the camera should have the best quality signal you can get. You can t produce a detail in a digitally recorded picture if such a detail wasn t seen by the camera in the first place. A very basic and trivial statement, but very often I have seen security managers want to recognise a number plate in their digitally recorded image, which was not seen by the camera in the first place. So a simple rule of thumb would be - Digitally recorded and replayed image can not be better than the original signal coming out of a camera. This means it is worthwhile investing in a good quality camera and lens. A good quality camera is the one with high resolution, good signal/noise ratio, low light performance, and a good lens. I have stressed it so many times, and I want to do it again, when using CCTV cameras for digital recording, of extreme importance for the digitised image quality is the signal/noise ratio. Certainly, the resolution is important, but the low noise performance is probably even more important for the simple fact that when there is a too high noise content in the image the compression engine works around the noise speckles as if they are a useful content of the captured image. So, if your camera has a low S/N ratio, i.e. high noise content, after the compression the image will look worse than it appears while viewing it live. In simple words - the higher this ratio is (50dB+) the better quality the digitised signal will be. CCTV focus 32 November/December 2001

Such an analogue signal could then be taken to a digital recorder. In any digital recorder the first stage would be Analogue to Digital Conversion, or, for short, A/D Conversion. This is the next (after the source - i.e. the camera) and also important stage for (preserving of) the high picture quality. The two important factors in the A/D conversion are: - the quantisation levels and - the picture sampling resolution. Quantisation is a procedure of slicing the video signal on many fine, but discrete levels, horizontally, from 0 Volts of the black level, up to 0.7 Volts of the peak white level. The number of possible combinations of 256 levels of red, green and blue phosphor colours is 256^3, which equals 16,777,216 colours. This is why it is said that a digitising card has 16 million colours, or 24-bit (24 because of the three primary colours each being 8-bits). This is a bit simplified for the purposes of explaining, because the CCIR-601 standard works with YUV colour space (Y=luminance, U=B-Y, V=R-Y), and not RGB. But there are still three different values to be digitised and hence in CCTV we use 24-bit colour space. So, the above is the first important factor of digitised picture quality, i.e. the colour resolution, or colour depth. The second important factor is the actual resolution in picture elements, i.e. pixels, which is defined by the sampling frequency of the card. A typical PAL frame grabber card would have 720 X 576 picture elements, as recommended by the so-called CCIR-601 standard. The equivalent In television, it has been proven that there is no need to have more than 256 levels per colour (Red, Green and Blue) each. Why 256, and not, say, 300? Simply because 256 is a binary number, i.e. it can be represented as 2^8 (2 to the power of 8). That means with 8-bit numbers we can represent any of the 256 levels of colour tones, starting from the brightest to the darkest. And, another reason for such a number is that a monitor phosphor coating can not show you more than 256 distinguishably different levels. The same is valid for printing images on white paper. The number of each colour shade that can be reproduced on such white paper is not more than 256. TV resolution of 720 pixels would be 540 TVL ((720/4)X3=540) and most readers will notice that this is better than the best CCTV cameras, which offer not more than 480 TVL. A note should be made here that some DVRs use NTSC frame grabbers, and their specifications are slightly different from PAL, and this is usually 640 X 480 pixels. Although the horizontal sampling resolution is sufficient for PAL CCTV applications (640 horizontal pixels are equivalent to 480TVL), the vertical is slightly reduced, i.e. 480 pixels instead of the 576 which are what the PAL cameras will produce during one TV frame. The next stage in most digital recorders is the compression. It has already been discussed in our previous issues, and it is not the intention of this article to go into why compression is needed. But, take my November/December 2001 33

...compression is needed, and there is no other way... The real question that should be asked is what is the best compromise between a good picture quality and a small data size? word for it, compression is needed, and there is no other way but to compress when putting so much data onto a hard disk. The real question that should be asked is what is the best compromise between a good picture quality and a small data size? Well, there are no easy answers. If your customer is happy to just see if there is a person there or not, without going into details of who that might be, a resolution even smaller than the above described 720X576 is sufficient. In actual fact, a quarter number of pixels, 352X288, is the so-called CIF resolution, which many users are happy with. Clearly the compressed file size of such CIF image, would be at least ¼ of the actual compressed file size when a full frame resolution, 720X576, is used. The advantage of having such a full frame resolution is that your DVR will have the best you can get from the camera. So, up until this point you would still have all the details the camera gives you. At the compression stage (if you are using a full frame compression device) it is up to the type and the level of compression that decides the picture quality. The compression stage is, in a way, a resolution bottleneck. An important note should be made here not to confuse the number of pixels with the compression loss of resolution. When using a full frame image capture and compression, the number of frame pixels will still stay the same, say 720X576, but the artefacts produced with the compression will change the picture resolution appearance. This is why we say - The compression stage is a resolution bottleneck. It is understandable that we want the best possible picture quality. But no matter what steps we take, 34 November/December 2001

A 720X576 full TV frame image, JPG compressed to 50kB. There are almost no visible artefacts the compressed image can not be better quality than the original. The pixel count of a digitally recorded image of any CCTV camera, even if it is a full frame size, is only close to 430,000 picture elements, in the best case. One can certainly appreciate the difference between 430,000 and say a still image of a digital photo-camera with, for example, 2,300,000 pixels. The CCDs that have produced both images are different in their resolution, hence the image resolution difference. A 720X576 full TV frame image compressed with JPG to 25kB So when you get a user that asks why they see pixelisation after they zoom into a digitised image exported from their DVR, the answer is simple: that s the number of pixels the digital recorder has produced. CCTV cameras produce images that are far inferior to images produced by a photographic camera, be that a film camera or a digital one. But that is the standard in the current CCTV technology, and that s what we have to use. Let s just mention that the Dots Per Inch resolution used when printing images in a magazine like this one is 300dpi, while when viewing images on a A 720X576 full TV frame image compressed with JPG to 10kB. The "blocky" JPG artefacts are very visible November/December 2001 35

PC monitor the DPI is between 72 and 96 dpi. In other words, the printing industry requires 300 dots resolution to produce 1 inch, i.e. 25mm. If we substitute the dots with CCD pixels we will see that a CCTV camera has a very low resolution indeed. And furthermore, we have to compress it. It should not be forgotten though that with the CCTV cameras we produce 25 images every second with 430,000 pixels. One of the most common transformations used in some popular compressions is the Discrete Cosine Transformation (DCT). Without going into the complex mathematics behind the DCT, we should mention that DCT is common to a few popular compression techniques, such as JPG, M-JPEG, MPEG-1 and 2, as well as the H series (mostly known as video conferencing compressions ). Some typical, and unwanted, artefacts when using DCT are the blocky appearance of the highly compressed images. This is due to the DCT function being applied to each 8X8 blocks of pixels. Readers will remember (and we will devote some space in the future) that Wavelet compression is different compared to JPG in the fact that Wavelet compression looks at the whole image, not blocks of 8X8, and hence Wavelet artefacts don t have such blocky, but rather foggy appearance. Dots Per Inch resolution used when printing images in a magazine like this one is 300dpi, while when viewing images on a PC monitor the DPI is between 72 and 96 dpi So can we do anything at all to improve the digital picture quality, after the JPG compression has been applied? Theoretically - no, once created - artefacts are there for good. The type and intensity of the blocky artefacts will depend on the type and scale of compression. Understandably, any manipulation that we want to apply will void the originality of the exported image. But, we are really referring to the manipulation of a copy for the purposes of better recognition of people or other important image details. In other words the original recording is, hopefully, still in the DVR, or on the back-up CD-ROM or drive. We are only working with a copy of it in order to be able to recognise the object(s). Most of the image manipulation discussed here should be done with a decent photo editing program, such as Adobe Photoshop, Corel Photo Paint, Jasc Paint Shop Pro, etc. The latter one for example, has already got a filter called JPG artefacts removal. So you The "original" 10kB JPG image with visible artefacts The 10kB JPG image with JPG artefacts removal in Paint Shop The 10kB JPG image with JPG blur filter in Photo Paint The 10kB JPG image with custom matrix filter in Photo Shop 36 November/December 2001

Jasc Paint Shop Pro has already got a JPG artefacts removal filter The Custom matrix in Photo Shop can produce various effects, one of which is reduce the JPG artefacts by blurring the image don t have to do anything but apply it and see what you can get. There are certain parameters that you can fine-tune and you might be happy with the end result. It is worth trying it out, as it may produce what you want. There have been some scientific works in the imaging industry for removal of the blockiness of the DCT used in the JPG compression. For the more adventurous ones I suggest to search the Internet for DCT artefacts removal. There is a lot of theory to read and there are certainly some successful solutions. To the best of my knowledge, there is no free plug-in for PhotoShop or anything alike, which will help you do the block removal, but I have tried some various filtering methods and the results are shown in this article. I invite all of you that have some better knowledge or experience to share it with our readers. Similar custom defined matrix can be found in other photo editing programs, such as Photo Paint or Paint Shop Pro The key function when removing the artefacts is to know the custom matrix that needs to be applied to the image when filtering. Under Adobe PhotoShop, this filter can be set under the Filter - Custom menu. In Corel Photo Paint this would be under Effects - Custom - User Defined menu. In Jasc Paint Shop Pro under Effect - User Defined - Edit. There are certainly almost unlimited possibilities, as the custom matrix is usually 5X5 cells, or in the case of Paint Shop Pro even 7X7. I have found that applying different matrices in the Custom Filter will produce different results. By entering various values in the cells of the Custom matrix, the photo editing program is calculating the matrix products of the blocks of 5X5 or 7X7 matrices, tiling the whole image. There is a bit of mathematical theory behind it, and again, this is a bit beyond the scope of this article. So the easiest thing to do is the famous trial and error method. Some of the custom matrices will produce a result with artefacts blurred out, and some will completely remove it making the JPG artefacts almost undetectable. One of the matrices I experimented with is shown here, and I suggest you try on your exported JPG images and see if you can get any better results. Another, I think exciting discovery I made, is the reduction of the jagged edges in a typical CCTV camera image. These are the pixel edges of objects, especially the ones that come at an angle, such as the one shown on the photo here. The first step is to resample the image, i.e. increase it by say 400%, both horizontally and vertically. With this re-sampling, the number of pixels from 720X576 becomes 2880X2304. The intelligence behind the re-sampling software (which will depend on which photo editing program you use) will improve the jagged edges a bit, but not eliminate them. If you now apply the matrix as shown on the screen capture on the November/December 2001 37

right, the jagged edges almost disappear. A miracle Well, almost. These examples only show that there is much more to these custom matrices. And I am leaving it up to you to experiment more and tell us if you discover something interesting. I assure you, learning your photo editing software more thoroughly will bring you even more excitement and better understanding. With today s development of CCTV there is no escape from understanding pixels A full TV frame image with 720X576 pixels with noticeable jagged edges. These edges can be seen around lines under an angle. The blow-up on the right demonstrates such adges on the keyboard and the papers on the table By applying my custom matrix, as shown on the right, I managed to reduce the jagged adges considerably. Certainly, after this, other filters, such as sharpening, can be applied. The large images on the opposite page are 10X enlargemet of the small section where jagged edges are most noticeable. 38 November/December 2001

November/December 2001 39