android and ios programming · 2020. 5. 10. · iec 62676-4, which defines 250 pix/m to be...

25
ViDiLabs Calc application v.1.5 www.vidilabs.com ViDi Labs Pty.Ltd. © 2018 All rights reserved Concept and formulas Vlado Damjanovski (ViDi Labs) [email protected] Android and iOS programming Software Development and Consulting Company www.successit.io Cvetan Stoimenov (Success IT) [email protected] | [email protected] English proof-reading Alison Giles - Damjanovska (Click Cloud) [email protected] Disclaimer: The ViDiLabs Calc application has been designed with the best intentions to offer assistance in determining all the parameters that are calculated within. Although we have developed, tested and verified all the formulas, their results and their appearance in the application - we do not take any responsibility for damage or loss resulting from the use of this App. We welcome all feedback and suggestions for improvement. Yours sincerely, Vlado Damjanovski, B.E.(electronics and television) [email protected] ViDi Labs Pty.Ltd. © 2018 www.vidilabs.com iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 25

Upload: others

Post on 25-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

ViDiLabs Calc application v.1.5

www.vidilabs.comViDi Labs Pty.Ltd. © 2018All rights reserved

Concept and formulasVlado Damjanovski (ViDi Labs) [email protected]

Android and iOS programming

Software Development and Consulting Companywww.successit.ioCvetan Stoimenov (Success IT)[email protected] | [email protected]

English proof-readingAlison Giles - Damjanovska (Click Cloud)[email protected]

Disclaimer:

The ViDiLabs Calc application has been designed with the best intentions to offer assistance in determining all the parameters that are calculated within. Although we have developed, tested and verified all the formulas, their results and their appearance in the application - we do not take any responsibility for damage or loss resulting from the use of this App.

We welcome all feedback and suggestions for improvement.

Yours sincerely,

Vlado Damjanovski, B.E.(electronics and television)[email protected] Labs Pty.Ltd. © 2018www.vidilabs.com

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �25

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 25
Page 2: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

HELP

ViDiLabs Calc has two modes: Visual and Digital

Visual calculation mode Digital calculation mode

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �1

Page 3: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Brief instructions

The following are the brief instructions for using the ViDiLabs Calc. Please see next page for more detailed instructions for using ViDiLabs Calc.

Visual mode

1. Select your camera Image Sensor in the blue window at the bottom left, by scrolling the available sensor sizes.

2. Select the resolution of your video or image in the Pixel count blue window, by scrolling.

3. You can change any of the variables in the yellow scrolling windows.

4. To lock a scrolling window touch and hold the window for more than a second, which will turn window colour from yellow to red.

5. To find sensor blur due to moving object, double-tap on the motion velocity grey window and set the desired motion velocity of the moving object, in km/hr or mph.

6. To see what electronic Exposure is needed to reduce the blurry pixels under the sensor blur due to moving object, scroll the Exposure to shorter exposure times from the default 1/25 or 1/30s.

7. To save or export the results, tap on the Save/Export button.

Digital mode

To go to the Digital mode tap on the Menu and select Digital.

1. Select the Number of cameras you have in your recorder.

2. If you are using video compression select the Video compression bit-stream in Mb/s.

3. If you are using image compression, double-tap on the Image compression grey window and select the Average frame size in kB and Frames per second.

4. If you are recording in continuous mode, leave the Estimated percentage of motion to 100%. If you are recording using Video Motion Detection (VMD) as a trigger, put the estimated percentage of motion. For example, 33% equates to 8hrs activity during a 24hr day.

5. Select the hours or days of required recording length under the Required Days of recording.

6. The resultant Storage capacity required will be displayed on the yellow scrolling window, bottom right.

7. If you are using a recorder with a number of drives, and you know the capacity of the individual drives, select the Drive capacity in the scrolling window at bottom left. This will give you the number or required drives for standard JBOD or any of the three RAID configurations.

8. To see the approximate visual quality of the selected video or image compression, double-tap on the ViDi Labs test chart on the right, and pinch-magnify to see details.

9. To save or export the results, tap on the Save/Export button.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �2

Page 4: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

The ViDiLabs Calc applicationThe ViDiLabs Calc application for iOS and Android is designed by Vlado Damjanovski, the author of many well-known books, to assist all professionals working with digital and IP cameras. The calculator is designed to help determine the best lenses for their desired coverage and calculate the required storage.

Although the ViDiLabs Calc has been designed specifically for the IP CCTV Industry, it may also be used by any professional using a digital camera of any size, including, but not limited to, photography, television, cinematography, medical, education, robotics and manufacturing.

The ViDiLabs Calc has a database of all commercially available image sensors, from the smallest 1/8” (1.6mmx1.2mm), through 1/3” (4.8mmx3.6mm), to Full frame FX (36mm x24mm), and up to Medium L size 53.6mmx40.2mm CMOS sensors. This database is used for precise calculations of various parameters and it’s regularly updated.

The application is designed to have landscape view due to the method used for entering and changing variables with scrolling windows, without the need for keyboard pop-ups.

The Visual module

The first module of the ViDiLabs Calc is the Visual module which is designed to calculate a range of variables when determining angles of view (horizontal and vertical), distances to objects to achieve certain quality (expressed in pix/m), as well as calculate the width and height of the viewed scene with a given sensor and lens. The visual part of the ViDiLabs Calc may also help in calculating the projected motion blur of an object moving in front of a camera.

The Digital module

The second module of the ViDiLabs Calc is the Digital module. This is designed to calculate the required storage space for various Video and Image compressions to achieve certain days and quality of recording. This also allows for determining the number of drives needed when using JBOD arrangement of drives, or RAID-1, RAID-5 and RAID-6 redundant configurations.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �3

Page 5: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

In addition, a simulated compression of the ViDi Labs SD/HD test chart is shown to indicate the approximate visual appearance of the selected compression.

Formulas compliant with the standards

The ViDiLabs Calc complies with many world standard definitions of Face Recognition, Face Identification and Inspection requirements, as defined by IEC/ISO, AS, BS standards and others.

ViDi Labs has developed all formulas, and designed the application with the best intentions to offer an objective and accurate calculation of observed target details.

The simulated compression appearance of the ViDi Labs SD/HD test chart is a simulation only. This was made based on our experience and results obtained in many practical tests in our labs. They are as accurate to real practical results with a test chart as we can make them.

The Video Compression simulations are based on H.264 compression, while the Image Compression simulations are based on JPEG compression. In real life situations various encoders may produce slightly better or worse results, depending on their profile used, GOP settings and internal filtering. The examples shown in the Digital module of the ViDiLabs Calc, do not simulate lens distortion or loss of resolution, so we recommend it only be used as an approximate guide.

All the ViDiLabs Calc results can be saved as presets, or exported, making them ideal for compiling laborious projects with various lenses, distances and/or storage requirements.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �4

Page 6: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

About Pixel Densities and what they mean

An IP surveillance system may be used to observe and protect people, objects and people’s activity inside and outside the objects, traffic and vehicles, money handling in banks, or games in casino environment. All of these objects of interest may have different clarity when displayed on a workstation screen. The image clarity depends primarily on the camera used, the imaging sensor, its lens and the distance from the object.

There is one parameter in IP CCTV that expresses the image clarity in a simple way with just one parameter - Pixel Density. The Pixel Density is usually expressed in pixels per metre (Pix/m), at the object plane, although it can be expressed in pixels per foot. Pixel Density in IP CCTV sense should not be confused with the Display Pixel Density quoted by various LCD display manufacturers which defines the screen density, in Pixels Per Inch (PPI).The advantage of expressing object clarity with its Pixel Density is that it combines the sensor size, pixel count, focal length and distance to the object in just one parameter.

This is one of the main functionalities of the ViDi Labs Calc application.

When using Pixel Density metrics all variables are included and makes it universally understandable what details you will get on an operator’s workstation screen.

When designing a system, or a tender for a system, one can request Pixel D e n s i t y f o r a particular image quality. So, instead of asking for a 6 mm lens for your c a m e r a i n a particular location, for example (which m e a n s n o t h i n g without knowing the camera sensor it is used on), it would be much more useful if a particular Pixel Density is defined for the view. This will then be used to calculate the required lens for the particular camera used and the distance from the object. This will guarantee the clarity of the image (assuming the lens is focussed optimally and there is sufficient light, of course). This can be done very easily with the ViDiLabs Calc. Pixel Density can be used for any object that IP CCTV user might be interested in: face, licence plate, playing card, money and similar.iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �5

Page 7: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Let us now explore how many pixels per metre are attributed to various objects.One of the most commonly referred pixel densities is for Face Identification. Face Identification in CCTV means sufficient clarity of the image so that one can positively identify who the person on the screen is.

According to Australian Standards AS4806.2, for Face Identification in analogue CCTV, we require 100% person’s height to fit in the monitor screen height. The details of 100% person’s height on a screen have been tested many times and it’s been verified that they are sufficient for such a person to be identified. We know that PAL signal is composed of 576 active TV lines, so, according to AS4806.2, a person’s height would occupy all of the active lines to make it 100%. Head occupies around 15% of a person’s height, which is equivalent to around 87 lines (576 x 0.15 = 86.4), which is the same when converted to pixels (assuming recording is made full TV frame mode, which is equal to two TV fields). If we agree that an average person height is 170 cm, the head would occupy around 25 cm of that. The Pixel Density at the object, which is required to make a positive Face Identification according to AS 4806.2, can be calculated to be 87 pixels at 25 cm of head height. Since there are 4 times 25 cm in 1 m of height, this becomes 4 x 87 = 348 pix/m.So, one can say that with pixel density of approximately 350 pix/m at the objects plane it should be possible to positively identify a face, according to AS4806.2.

Some other standards may require different values, and one such (newer) standard is the IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards one should be able to identify a person).

Clearly, this number is not fixed in concrete, and it will depend on the observing ability of the operator, as well as other parameters (lens quality, illumination, compression artefacts,

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �6

s

f

d

w

Pixel density calculation

pD

f = focal length of a lens (mm)ph = sensor horizontal pixel count (e.g. 704, 1280, 1920,...)d = distance to the observed scene (m)w = width of the observed scene at a distance d (m)s = imaging sensor width (mm), examples below:

1/4” => s = 3.2mm1/3” => s = 4.8mm1/2” => s = 6.4mm1/2.5”=> s = 5.7mm (5MP mode)1/2.5”=> s = 4.2mm (1080 HD mode)

Drawing, maths and formulas by V.Damjanovski © 2014~2017

Camera end(sensor shown)

Observed scene

Lens

pD = f ‧ ph / ( d ‧ s ) (pix/m)

Page 8: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

etc…), but the key is to understand that such a Pixel Density can be calculated for any type of camera, irrespective if that is SD, HD, 4k or any other format. Any number for Face Identification Pixel Density can be specified in the ViDiLabs Calc, although the shortcut buttons are designed to show the IEC standard suggestion of 250 pix/m.

The next image quality down, as defined by the standards is for Face Recognition. The details of Face Recognition image should be sufficient to recognise the gender of a person, what he/she is wearing and possibly make an assertion of who that person might be, if picked from a bunch of people that have already been identified somewhere else (e.g. passport or drivers licence photo). This is basically an image with half the pixel density to the Face Identification, which according to AS4806.2 should be around 172 pix/m, while IEC62676-4 suggests 125 pix/m.

The following examples are from real systems:

Similarly, pixel density can be defined for vehicle licence plates visual recognition (not software automatic LPR). In the AS 4806.2, this is defined as 5% characters height on a display screen, which is around 30 TV lines (pixels) (to be very accurate 576 x 0.05 = 28.8). If we assume that a typical Australian number plate has characters of around 70 mm in height, than this equates to 14 x 30 pixels = 420 pix/m for the rear plates. The number 14 is obtained from dividing 1000 mm (1 m) with 70 mm. Front number plates are typically smaller, characters being around 50 mm in height. This yields pixel density of 600 pix/m.iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �7

Face Identification as per AS4806.2 Face Recognition as per AS4806.2

Page 9: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Licence Plates Recognition as per AS4806.2

When money and playing cards are observed in banks or casinos, many practical tests have shown that at least 50 pixels are required across the notes or cards longer side in order to positively identify the values. Standard playing cards dimensions are B8 according to ISO216 standard, which is 62 mm x 88 mm. So, we need the 88 mm card length to be covered with at least 50 pixels for proper identification. This means around 550 pix/m (1000 mm / 88 mm = 11 => 50 pix x 11 = 550 pix/m) should be sufficient for playing cards. We may require slightly better pixel density for identifying money, since notes size is typically larger than playing cards, so if one takes the Face Inspection pixels density of 1000 pix/m, it should attain pretty good identification, although as it can be seen from the real life example below, even 770 pix/m might be sufficient.

Playing cards and money shown above with 770 pix/m

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �8

Page 10: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

So the following table can be used as a rough guide for various pixel densities.

Object Minimum required pixel density (Pix/m)

Detect (IEC-62676-4) 30

Intrusion Detection (AS-4806.2) 35

Observe (IEC-62676-4) 60

Face Recognition (IEC-62676-4) 125

Face Recognition (AS-4806.2) 175

Face Identification (IEC-62676-4) 250

Face Identification (AS-4806.2) 350

Licence Plates rear (AS-4806.2) 420

Playing cards 500

Licence Plates front (AS-4806.2) 600

Money (notes) 800

Inspect (IEC-62676-4) 1000

Casino chips (39mm) 1200

Money (coins) 1500

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �9

Page 11: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

About the pixel blur effect of moving object

Most objects that we observe in IP CCTV, such as people and vehicles, are not static, but moving. When objects are moving their image will never be sharp and clear like static objects. The faster the objects moves the more blurry it will appear. The closer the moving object is to the camera, the more blurry it will appear. The longer the camera exposure is the more blurry the object will appear. The camera sensor size and focal length of the lens play also a role in how blurry the image will appear. And finally, the angle under which such an object moves relative to the camera viewing direction also plays a role. So, there is a very complex correlation between all the parameters mentioned above. The ViDiLabs Calc has been designed to calculate the effects of such a motion in the recorded video, and show it as pixel blur. To put it simply, this calculation shows how smudged a moving object image is.

This blurriness is an unwanted effect, as it makes it difficult to recognise the details of the moving object even if the camera is in focus at that point. By knowing how many “blurry pixels” will appear for a given object speed and the camera exposure setting, using the ViDiLabs calc it is possible to find the camera Exposure setting which will produce lesser or acceptable sensor blur.

To produce “live” video in CCTV, we require at least 25 fps (or 30fps). Each of the TV frames are therefore typically exposed at 1/25s = 40ms (in analogue 1/50s for TV Fields). In the bright daylight, the auto iris lens closes to reduce the amount of light for a correct exposure. If it is very bright, then the sensor electronic exposure kicks in. In low light, the auto iris lens opens up fully, and if this is not sufficient, the sensor electronic exposure increases further (this is usually called “integration”).

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �10

The meaning of electronic shutter

20 ms

<20 ms

>20 ms

Standard “live”exposure

Electronic shutter On - shorter than 20ms “live”exposures

Integration mode (longer than 20ms, blurry motion appearance)

Stop exposure voltage

Active exposure voltage

Stop exposure voltage

Active exposure voltage

Stop exposure voltage

Active exposure voltage

Page 12: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

The formula for calculating pixel blur (pixel shift) is shown below.

Here are some practical examples.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �11

f

d

wv (m/s)

pD

f = focal length of a lens (mm)d = distance to the observed scene (m)w = width of the observed scene at a distance d (m)v = velocity of the moving objects (m/s)t = exposure of the sensor (s), typically 1/25s or 1/30ss = imaging sensor width (mm)

1/4” => s = 3.2mm1/3” => s = 4.8mm1/2” => s = 6.4mm1/2.5”=> s = 5.7mm (5MP mode)1/2.5”=> s = 4.2mm (1080 HD mode)

ps = pixels size = s/ph, e.g. 4.2mm/1920 = 2.1875 μm

Drawing, maths and formulas by V.Damjanovski © 2014/2015

Camera end(sensor shown)

Observed scene

pV = (f ‧ v ‧ t) / (d ‧ ps)

pv = projected object speed on the sensorexpressed in pixels blur during the sensor exposure

pV = moving objects appearing on that many pixels

Lens

Page 13: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

If the object is moving at an angle relative to the camera optical axis, the same rules apply, but this time the projected speed “v” has to be used as a “real speed” of the moving object.The projected speed can be found as a “cosine” of the speed “v” relative to the angle alpha that is between the moving object direction and the perpendicular direction to the optical axis.

For example, if a bicycle rider moves with 40 km/h at an angle of 30˚ relative to the optical axis, this would produce an angle of 60˚ between the direction of movement of the bicycle rider and the perpendicular plane to the optical axis. Then, the cos 60˚ = 0.5, which means the projected speed of 40 km/h will be 20 km/h for the purpose of calculating the pixel shift.

To continue with the same example, let’s assume the bicycle rider is passing at 100 m away from the camera, and riding at the mentioned angle above. Let’s also assume we have an HD camera, with 1/3” sensor and have 8 mm lens installed. If we use the normal camera shutter of 1/25 s to produce live video, the resulting object motion blur from such movement will be 7.1 pixels. Over 7 pixels of smudged moving image might be just too much to be able to recognise the rider. So, we need to reduce the shutter speed so that there are much less blurred pixels. Using 1/250s shutter exposure will bring the blurriness to less than 1 pixels (0.7 in our example) which is much more acceptable.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �12

v

vvP = v cos aProjected pixels blur due to

moving object

Observed scene

Object

Width

HeightPixel Density

Velocity (v) of moving

blurred pixelsdue to motion

Camera

distan

ce

HFOV

VFOV

focal leng

th

vw

h

pd

f

d

y

xpx

sensor

lens

αβ

Speed of moving object,perpendicularly to the optical axis

Moving object

Optical axis

Camera

Speed anddirection

a

Page 14: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

About the storage calculation

The ViDiLabs Calc can calculate digital storage space required for a particular system, with a number of IP cameras using video or image compression, to achieve certain number of days recording.

The two major groups of compression, the image compression and video compression, are treated slightly differently, since video compression defines the amount of storage needed by it’s Mb/s requirement and it works with Group Of Pictures (GOPs) and motion vectors prediction, whilst the image compression “doesn’t care” about any “history” of images prior or post an image, so the frame size as well and how many such frames are produced every second is needed.

An IP camera encoder that produces video streaming at 4 Mb/s for example, will need 4 Mb/s each second, and this is multiplied by the number of minutes, and hours and days, to calculate the recording capacity. How many images per second are captured at the sensor level doesn’t affect the storage requirement, but only the quality. So, it is important to clarify the very often misunderstood nature of video compression where images per second are somehow influencing the storage requirement. This is not the case with video compression. Images per second captured by the sensor only defines the image quality, not the length of storage of such a stream. It is the Mb/s that describes the compression strength which defines how many days a certain IP camera stream can be recorded on a particular storage capacity.

If a particular camera cannot produce a video stream, but rather image compression stream (JPG or Motion-JPG for example), then the storage calculation is slightly different, and needs to include compressed image size as well as images per second produced by such a camera, in order to calculate the storage required for the days set in the calculator.

One thing that might be useful for system designers with this ViDiLabs Calc is the visual representation of the compression quality using the ViDi Labs SD/HD test chart as a reference. Although this is a simulated representation, it has been made to be very close to the actual compression appearance, which could be useful in determining the setting one may have on a particular camera.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �13

Page 15: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

More detailed instructionsViDiLabs Calc Visual mode

Working with the ViDiLabs Calc Visual AppThe Visual mode of the ViDiLabs Calc is used to calculate angles of view, distances, observed scene width and height, pixel density and motion blur of an image.

The very first parameter you need to select is the Image Sensor dimensions and the sensor type (ref) that your camera uses (x(mm) and y(mm)). This is entered in the blue window at the bottom left of the ViDiLabs Calc screen.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �14

Page 16: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

You will find the specific sensor used in your camera in its specifications.The ViDiLabs Calc has a database of almost all commercially available sensors.

NOTE: It is very important to enter the correct sensor size, as all calculations and angles of view depend on these parameters.

Once you enter the correct sensor dimensions, you then need to enter the correct pixel count for that sensor in the next window (horiz. pixels and vert. pixels).

ViDiLabs Calc has pre-defined standard entries, like 1080HD, 2048, QXGA etc. If your camera has a different number of pixels for the given sensor size, you will need to enter the correct number of pixels. The number of pixels relative to the sensor size define the pixel density, as well as image blur due to object motion.

NOTE: While Image Sensor dimensions are the most important for determining the angles of view and the scene’s width and height, for a given lens, many modern IP cameras use a larger mega-pixel sensor, from which a smaller scanning area can be selected by switching from full sensor area to the smaller one. This then changes the angles of view, and all other associated variables calculated, for the same lens. For example, a sensor with 4.8mmx3.6mm (4:3 aspect ratio), with a full pixel count of 2048 x 1536 pixels (also 4:3 aspect ratio), will have exactly the calculated angles of view and scene width and scene height, as shown in the screen-shot under the ViDiLabs Calc Visual mode subheading. If however, the same camera/sensor is switched to

1080 HD mode, which will have 1920x1080 pixels, the angles of view, and all other calculations, using the same lens, will have different values, which will be proportional to the pixel count reduction relative to the full sensor pixel count. This could be best illustrated when using your iPhone in Photo mode for taking normal photos (which are 4:3 aspect ratio). When switching the iPhone to Movie mode (16:9) the angles of view become smaller then when in Photo mode. This is because the iPhone is using less pixels for Movie mode than the Photo mode of the same sensor. It is imperative that you know what type of sensor and pixel count your camera has for the calculations to be correct.

If you don’t know the exact pixel count of your camera, you can still enter the closest value you can find. The calculated results will then be approximately correct, as your selection is only approximate to the real pixel count.

If you have a camera with a sensor of which you don’t know the resolution, but only the sensor size, it is possible to choose Unknown pixel count. In this case you may calculate the angles of view, scene height and width, or find the lens focal length to give you the required view, but you will not be able to find the pixel density or sensor blur due to motion, since you don’t know the pixels.

NOTE: If only the sensor dimensions are known, and not the actual exact pixel count, you can still find correct angles of view and a scene’s width and height, but the calculator will assume that the full sensor is used for producing the image.

Once the Image sensor dimensions and the Pixel count and aspect ratio are entered correctly, the ViDiLabs Calc will generate correct results.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �15

SD

720HD

1080HD

4MP

5MP

MegaPixel sensor

Different viewing modes of the MP

sensor

Page 17: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Having a default Exposure time of 1/25s is standard for PAL countries, and 1/30s for all NTSC countries. This entry doesn’t need to be changed, except when Image blurriness due to movement needs to be found (the two grey scroll window labelled Sensor blur and Motion Velocity).Lens selection

The most common use of the ViDiLabs Calc is finding out what focal length lens you require to cover a certain scene, or certain angle of view. This is selected via the Focal length scroll window in millimetres (mm). Your focal length lens can be selected here by scrolling the yellow window. Once a lens is selected it will show the horizontal and vertical angles of view produced for the previously selected

sensor size. It is advisable that once you know what lens you want to use, lock the selection so that it does not change when you change other variables. To lock the window from scrolling, hold it for more than a second. This will change the window from yellow to red, which indicates that the selected Focal length value will not change during calculations. At the same time, the Horizontal Field of View (HFOV) and the Vertical Field of View (VFOV) are also locked, since the angles of view stay the same for the given sensor and selected focal length lens.

You can now scroll the Distance to scene scroll window which will calculate the Scene width and Scene height.

All calculations within the ViDiLabs Calc will now be made based on the pre-selected sensor size and pixel count, and then selected focal length.

In order to release the Focal length scroll window from being locked, hold any of the yellow windows for distance, width or height, for more than a second which will make the window red and restore the Focal length window back to yellow. This then allows the Focal length to be changed, depending on the values of other yellow window variables.

For example, another method of calculation can be when locking the Scene width that needs to be obtained for the given camera (sensor) and distance. In such a case, changing the Distance to scene will show the required lens focal length to achieve the Scene width.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �16

Page 18: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Distance to scene selectionIf you know the distance between the camera installation point, and the object you want your camera to see, you may scroll and select the desired Distance to scene.

This is shown here as ten metres, but feet can also be selected by switching metres / feet. Based on the Scene width selection - the lens Focal length can be found, but also, based on the Focal length selection the Scene width or Scene height can be obtained for the chosen (locked) Distance to scene.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �17

Page 19: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Angles of view selectionSimilar to the above, if you know the angles of view you require for your project (either horizontal or vertical) you can select the Horizontal FOV (or the Vertical FOV) and lock them by holding the scroll window for more than a second. Focal length will also be locked at this time since the angles of view and focal length are interdependent. All other variables shown in yellow windows will be calculated from there.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �18

Page 20: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Pixel density selectionPixel density describes the clarity of the objects observed. The higher the Pixel density the better the details of the observed objects (assuming there is sufficient light and the lens is correctly focussed). Pixel density is expressed in pix/m (pix/ft - for the Imperial system) and it is a common measurement in the surveillance industry. The Pixel density can also be used in non-surveillance applications. In the ViDiLabs calc application there are selections for Face Recognition, Face Identification and Face Inspection, shown on the left, with three grey buttons.

According to some standards, the Pixel density of ≥125pix/m should be sufficient for a person to be recognised, and at least 250pix/m for a person to be identified as per many IP CCTV standards, most notably the IEC-62676-4.

Pixel density of ≥1000pix/m should be sufficient for visual object quality inspection, as per the standards. This could refer to determining the facial characteristics of a person, such as scars, colour of the eyes, skin spots and alike. The inspection Pixel density would also allow for identification of money, playing cards or even documents.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �19

Page 21: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

The Pixel density window will also allow for selecting any other non-standard values, and calculate the distance at which such density can be achieved.Sensor blur calculation

The sensor blur is a calculation that will show the spreading of the projected image of a moving object, which appears blurry due to the long exposure relative to the motion velocity.

This blurriness is an unwanted effect, as it makes it difficult to recognise the moving object even if the camera is in focus at that point. By knowing how many “blurry pixels” will appear for a given object speed and the

camera exposure setting, using the ViDiLabs calc it is possible to find the Exposure setting which will produce acceptable sensor blur. The blurriness calculation is a complex formula, which ViDi Labs has developed and tested. It depends on the speed and the direction of the moving object, the sensor size, distance to the object and the electronic exposure of the camera.

NOTE: For the purpose of simplifying the calculations, we have assumed that all moving objects are moving in perpendicular direction relative to the lens optical axis. If you wish to find sensor blurriness of objects moving at certain non-perpendicular angles relative to the optical axis, you need to use a little trigonometry and divide the finding by a cosine of the angle between the speed and direction of the moving vector and its projected length to the perpendicular plane of the optical axis.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �20

Page 22: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

In order to use the sensor blur calculation, the grey scroll window need to be unlocked by double-tapping. Once this is done, set any desired speed of the object (up to 160km/hr), and the sensor blur will be calculated for that speed and the exposure setting. Please be aware that the default exposure for PAL countries might be 1/25s and 1/30 for NTSC countries. For example, when using an 8mm lens, and a person is viewed walking at 10m distance perpendicularly to the camera viewing direction, with the default camera electronic Exposure of 1/25s we will find that the persons’ contours will spread across 17.8 pixels. This will make the person difficult to recognise. By reducing the exposure to 1/250s, we may find the sensor blur will be reduced to 1.8 pixels, which is much more acceptable.

Save/ExportWhen making a lot of calculations, testing with various lenses, distances and sensors, it may be useful to save these findings. This is possible by tapping on the Save button and a pop-up window

will prompt you to give a name to the specific calculation you wish to save.

As with all iOS and Android applications, it is also possible to take a screen-shot of your calculations by simultaneously pressing the On/Off and Home buttons of your iOS device.

Lastly, by tapping on the Export button, you can e-mail or save the screen shot to your Photo library.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �21

Page 23: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

ViDiLabs Calc Digital mode

Working with the ViDiLabs Calc Digital AppThe Digital mode of the ViDiLabs Calc is used to calculate the expected storage capacity of a number of IP cameras, with particular Image or Video compression.

To switch from Visual mode to Digital, tap the Menu in the top left hand corner and then Digital selection will appear, below which you will see Presets, About and Help selections.

Once you are in the Digital mode, select the Number of cameras that you want in your system.

Next, chose either your Video compression, or the Image compression of the cameras. You can double-tap either scroll window to switch between the two.

Next, you can choose the Estimated percentage of motion in the scene.

If you wish to record continuously, leave the Estimated percentage at 100%. This is often referred to as “permanent mode” of recording. However, if you have a site where the motion of objects is not continuous, for example - a shopping centre, where working hours are specific, you need to make an estimate of how much this percentage is (a shopping centre mall which is open between 8 a.m. and 8 p.m., would have no more than 50% motion.)

Finally, select the Required Days of recording (or hours).

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �22

Page 24: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Once all of the parameters above are entered the Storage capacity required will be calculated in the yellow window at bottom right.

Based on the selected individual Drive capacity that you wish to use in your system, the results will show the Minimum number of drives required in your system, depending on the arrangement of drives (JBOD, RAID-1, RAID-5 or RAID-6). The JBOD acronym comes from “Just a Bunch Of Drives” and this drive arrangement has no redundancy, while RAID-1, RAID-5 and RAID-6 are redundant drive arrangements, of which RAID-5 allows for any one drive to fail without loss of recording, while RAID-6 allows for any two drives to fails without loss of recording. More information of RAID hard drives arrangement is outlined in my book, CCTV - From Light to Pixels, (Elsevier 2014), page 345.

NOTE: Video compression can be any of the temporal compressions, MPEG-2, MPEG-4, H.264 or H.265. These compressions are most common in IP CCTV, but are also used in broadcast and digital cinematography. However, most cameras can produce streaming video with Image compressions as well, such as JPG, Wavelet or JPEG-2000. In order to get correct total storage required when using Image compression it is necessary to know the number of frames produced by the camera when recording motion.

On the right hand side of the Digital ViDiLabs calc there is an interactive test chart, Approximate static picture quality with the selected Compression (ViDi Labs SD/HD test chart). This test chart simulates the picture quality with the given video or image compression. When you choose a different compression, the image quality of such a choice will be automatically replicated in the test chart. Double-tap the test chart image in order to inspect the details at closer range by pinch-zooming.

NOTE: The compression image quality replicated in the chart is only a simulation and it is equivalent to a static scene observed with a camera (no motion artefacts are simulated). The simulation is made as close as possible to the actual quality observed with a chosen compression setting. The simulated images are obtained with numerous practical tests conducted in our labs, using H.264 for the Video compression and JPG for the Image compression. However, in reality your picture quality may be slightly different depending on the compression profile used, the various GOP settings and the internal filtering.

The examples shown in the Digital module of the ViDiLabs Calc, do not simulate lens distortion or loss of resolution, so we recommend it only be used as an approximate guide.

You can order a physical A3 format ViDi Labs SD/HD test chart test from our web site www.vidilabs.com.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �23

Page 25: Android and iOS programming · 2020. 5. 10. · IEC 62676-4, which defines 250 pix/m to be sufficient (i.e. suggests that with slightly lesser pixel density than the AS standards

Save/ExitAs with the Visual mode, you have the option to Save your specific calculation by tapping once on the Save button. A pop-up window will prompt you to give a name to the specific calculation you wish to save.

As with all iOS and Android applications, it is also possible to take a screen-shot of your calculations by simultaneously pressing the On/Off and Home buttons of your iOS device. Lastly, by tapping on the Export button, you can e-mail or save a screen shot to your Photo library.

iOS & Android - Sept 2018 ViDiLabs Calc v.1.5 �24