Introduction
Simulink broadens video as well as image processing with a wide range of provisions that are able to offer rich, customizable structure for swift authentication, execution, replication as well as the blueprint of video and image processing algorithms and systems. Simulink has superior as well as fundamental algorithms used in several different applications such as surveillance for defence, medical electronics industries, teaching, consumer electronics, and communication in the automotive industry. Blocksets that use Simulink application have many capabilities. They include: morphological operations, geometric transformations, 2-D (two-dimensional) filters, motion estimation techniques, input/output (I/O) capabilities as well as 2-D transforms. For the purposes of C-code generation, simulation and modelling, the blockset is capable of handling floating as well as fixed-point data types. To be able to quickly optimize and debug models, it has statistical functions and has the ability to analyze data as well. Its useful functions are endless; it can validate simulation results, it has several image and video data visualization techniques, video displays and scopes. Optical flow estimation technique is one of the models it uses to estimate the motion vectors in each frame of the video sequence to track cars.
Modelling and Simulating Video and Imaging Systems
With Simulink, the blockset for video and image processing has a particular library for crafting the performance of your imaging structure. Regardless of your system’s intricacy, the Simulink environment offers apparatus for subsystem customization, data management, as well as hierarchical modelling that makes it simple to come up with crisp and precise depictions. Despite the fact that certain blocksets support integer and fixed-data point data types, all blocks used in the video and image processing blockset support both single-precision as well as double-precision floating-point data types.
The video and image processing blockset and Simulink makes it much easier to quickly run simulations for real-time entrenched video, vision as well as imaging systems. To have a golden reference for the purpose of authentication throughout the design process, you can communicate to the system to downstream design teams through creation of executable specifications.
Generating and Optimizing C Code
To be able to automatically generate ANSI/ISO C code from your model, the video and image processing blockset has to interface with real-time workshop and real-time workshop embedded coder. They are both available separately. The generated C code can be used for large-scale simulations or be deployed from your models on programmable processors (DSP or GPP). Basic primitives as well as highly advanced video algorithms and other features for designing real-time video and imaging systems are all included in the video and image processing blockset library.
Multimedia I/O, Video Viewer, and Display Blocks
Files such as AVI, MPEG, WMA or any other windows media supported file can be brought into the video and image processing blockset. With the video viewer, you are able to go through your entire simulations one frame at a time since you are able to start, pause or stop it. This makes it much easier for you to analyze the video stream in real time throughout the model. The video and imaging system models can now be designed and restored at a much faster pace due to these great and time efficient features. This video and image processing blockset offers several functions, they include:
- They are able to relay real-time video data to a video output device, screen or camera as long as its linked to the system
- From your workstation screen or your PC, you are able to watch the video stream
- It also lets you write the input to an assortment of the MATLAB workspace
- Intensity or RGB Video streams as well as images can be displayed
- Video signals in Simulink models, video files or MATLAB workspace can be easily viewed by use of MPlay GUI
- Video frames can be converted into a multimedia file for analysis whose results can be easily shared
Text as well as graphic objects can be inserted into the video stream through this blockset. Images can be interpreted and combined, overlay and marked regions can all be achieved through this blockset. By use of Blob analysis block and Kalman filtering subsystem people tracking application, every person can be detected and tracked in a video frame. The same people can be tracked systematically from one frame to the next with each individual being highlighted by a bounding box.
Algorithms Used For Video and Image Processing
Primitives for geometric transformations, transforms as well as 2-D filters are provided in this video and image processing blockset. Tasks like noise reduction, smoothing and sharpening are eliminated with the help of 2-D filters. The video stream frequency content is analyzed by use of the 2-D transforms. A fine example is the elimination of unwanted frequency content in MPEG by use of DCT to condense the video pixel information. With this blockset, you can execute 2-D FIR filtering of input matrix I, by using a filter coefficient matrix, H. This blockset also helps you to translate images for alignment or registration, rotate, resize and apply protective transformation. It also enables you to output the complex fast Fourier transform in two dimensions (2-DFFT) of a real or complex input.
Primitives for Filtering, Transforms and Geometric Transformations
Through this blockset, geometric transformations, 2-D transforms and 2-D filters are provided. Duties such as noise removal, smoothing as well as sharpening are performed by 2-D filters. A video stream’s frequency components are distinguished by the 2-D transforms. To be able to trade-off between performance and precision, three interpolation methods of nearest neighbour, bilinear and bicubic are provided by the geometric transformation block.
Example: Select the Separable filter coefficients check box if your filter coefficients are separable. Using separable filter coefficients reduces the amount of calculations the block must perform to compute the output. For example, suppose your input image is M-by-N and your filter coefficient matrix is x-by-y. For a non-separable filter with the Output size parameter set to same as input port I, it would take x * y * M *N multiply-accumulate (MAC) operations for the block to calculate the output. For a separable filter, it would only take (x + y) * M *N.
Colour Operations
For different video formats, you need colour space conversion operations to make it possible to represent and manipulate colour signals and conversions. To decouple colour information from luminance, colour space conversion makes it possible to process these two components independently. With this colour operation, extensively used colour formats like RGB can be converted to or from YCbCr, RGB to or from XYZ, RGB to or from HSV and RGB to or from L*a*b*. It also makes it possible to either apply gamma correction to an image or removal of gamma correction from an image. Referred to as binarization, an intensity image can be automatically or manually changed to binary image. You can upsample or downsample chrominance components of images.
Analyzing Videos and Images
To be able to get concrete information from the video streams, you need image analysis techniques. These techniques are used for the extraction of image features, correction of non-uniform illumination as well as noise removal. This video and image processing blockset enables you to do the following functions:
- By use of optical flow technique, you can identify motion in a video sequence, 2-D sum of absolute differences (SAD) or block match for motion estimation
- Cross-correlation technique helps you to match patterns to an existing template
- A video scene’s relative focus can be judged
- Moving objects can be tracked and classified
- Segmentation techniques are used to separate foreground from background
- Edge detection methods by Roberts, Prewitt, Sobel or Canny are used to identify object boundaries in an image frame
- Spatial coordinate locations such as bounding boxes or centroid for labelled regions in a binary image statistic and return values can be calculated by using Blob analysis.
To calculate 2-D statistical analysis standard deviation, mean, min, max, correlation, variance as well as histograms can be accomplished through statistics library. Arbitrary of Interest (ROI) is the basis on which mean variance as well as standard deviation is calculated.