Digital Video Data - Introduction
The most simple way of thinking of a digital video is to consider it as a sequence of Digital Images.
A digital video composes a series of digital images. If displayed in rapid succession they elicit the impression of a moving scene. In the context of a video, these images are called frames. The rate at which frames are recorded or displayed is known as the frame rate and is measured in frames per second (FPS). Every frame represents a raster of pixels. Pixels have only one property, their intensity. The intensity of a pixel is represented by a fixed number of bits (pixel bit depth).
An example video can have a duration (T) of 1 hour (3600sec), a frame size of 640x480 pixels (WxH, resolution) and a frame rate of 25fps. This example video has the following properties:
- Duration: 3600sec
- Number of frames: 90.000 (duration ✕ frame rate)
- Number of pixels: 27.648.000.000 (number of frames ✕ resolution)
- Number of bits: 8,847,360,000bit (number of pixels ✕ 8)
Hence, recording with the above settings will result in a raw video of 8,847,360,000bit (actually a bit more as there is some overhead) which his equivalent to 1105.92MB. Continue here for more details on data rates and the effect of compression.
Frame Rate (Video)
The frame rate of a video describes how fast to play back the single images. For the human eye this frequency must be 25HZ or faster to elicit the impression of a fluently moving scene, the faster the more fluently motions appear, the slower the more jerky. the frame rate is measured in frames per second (FPS).
Recording a video describe the operation of saving an image sequence to a video file. Usually, the recording or camera frame rateframe rate is the same as the frame rate of the video.
In Motif the camera frame rate can be different to the video fate. The reason for this behavior is that certain parameters of the video codec are sensitive to the frame rate. To ensure the same quality image quality, the video frame rate is keep constant. The information about what the actual frame rate of the camera was is encoded either in the video metadata or in the imgstore metadata file.
For keeping track of the exact temporal distribution of frames use the imgstore. This logs the an exact timestamp for single frame.
There are multiple ways to acquire digital images from the real world: digital cameras, digital microscopes, scanners, computed tomography to name a few. When recording real world data into digital images what we record are numerical values for each of the points of the image. These points are called pixels.
Pixel Bit Depth
- 8bit: values from 0 (no signal) to 255 (bright, highest intensity)
Grayscale vs. Color Images
The term image ans frame are interchangeable, frame is a more technical expression and often used when talking about the data behind an image.
Intensity is how bright a particular pixel is, the higher the value, the greater the intensity. In Motif and Loopy, each gray scale pixel supports 256 distinct shades of gray. A gray pixel is one pixel with a value of 8bits.
Color Image (RBG)
Color videos (containing color images) can be thought of similar to grayscale images. More information needs to be stored, it is no longer one intensity per pixel, but also the intensity of each "color". Different ways for encoding color exist, one of which is the the RGB convention, for simplicity, we will speak about the simplest way to describe a color image - the RGB colorspace. Each pixel is split into 3 different parts: one intensity for the amount of red, another for the amount of green and the third for the amount of blue. Red, green and blue as primary colours can be mixed in different proportions to form any colour. RGB 8bit has 3 8bit values for each pixel, one for red (R) one for green (G) and one for the blue (B) channel
Image Coordinate System
An image can be seen as many rows and columns. Every cell is a pixel with a specific value (gray scale). The origin of the pixel coordinate system is in the upper left of the image, (x , y) is (0 , 0). The horizontal axis, the rows, are the x-axis, the vertical axis, the columns, are the y-axis. Values get larger towards the lower right if the image.
In terms of coordinates, a pixel can be identified by a pair of integers giving the column number and the row number. For example, the pixel with coordinates (5 , 1) would lie in column number 5 and row number 1. Conventionally, columns are numbered from left to right, starting with zero.