Implementation and Optimization of Image Processing on the Map of SABRE i.MX_6

Vision relieves humans to understand the environmental deviations over a period. These deviations are seen by capturing the images. The digital image plays a dynamic role in everyday life. One of the processes of optimizing the details of an image whilst removing the random noise is image denoising. It is a well-explored research topic in the field of image processing. In the past, the progress made in image denoising has advanced from the improved modeling of digital images. Hence, the major challenges of the image process denoising algorithm is to advance the visual appearance whilst preserving the other details of the real image. Significant research today focuses on wavelet-based denoising methods. This research paper presents a new approach to understand the Sobel imaging process algorithm on the Linux platform and develop an effective algorithm by using different optimization techniques on SABRE i.MX_6. Our work concentrated more on the image process algorithm optimization. By using the OpenCV environment, this paper is intended to simulate a Salt and Pepper noisy phenomenon and remove the noisy pixels by using Median Filter Algorithm. the meaningful addition of the visual quality of the images and the algorithmic optimization assessment.

I. INTRODUCTION

Study Background
Denoising plays an additional important role in modern image processing and analysis. Image denoising approaches are with an aim to preserve the details of an image as well as to remove the random noise to the degree that is possible. It is one of the most used concepts in most image-processing applications. A digital image is subject to a variety of noise that affects the quality of an image. This noise is salt and pepper that is generated by an image sensor defect. Salt and pepper noise is mainly caused by defective pixels in camera sensors that are frequently found in digital transmission. Once an image is corrupted by salt and pepper noise, the pixel values may have any random value inside the maximum as well as minimum values in the dynamic range [1]. In signal processing, it is often desirable to perform some notable noise reduction on an image or signal. The median filter is a nonlinear digital filtering technique that is often used to remove noise. The removal of salt and pepper noise is normally achieved by using median-type filters [2].
The Sobel operator, also sometimes referred to as the Sobel Filter, is used in image processing and computer vision, particularly in edge detection algorithms. This creates an image that emphasizes the edges and transitions. This is known as Loop unrolling or Loop unwinding. It is a Loop transformation technique that attempts to optimize a program's execution speed at the expense of its binary size (space-time trade-off).
This transformation is undertaken manually by the programmer or by an optimizing compiler. On a single processor, multithreading is generally implemented by time-division multiplexing (as in multitasking). Here the processor (CPU) alternates between different software threads.

Study Objective
The objective of this research is to implement by optimizing a chain of image processing on the map SABRE i.MX_6 (ARM_Cortex-A9) in implementation.

Specific Objectives
To design algorithmic optimization for image processing (lower complexity algorithm in the mathematical sense, appropriate data structures).
Optimization for efficient use of hardware resources (access to data, cache management, multi-thread).

Expected Outputs
The main outputs of this research will be: • Mathematic moulding and realization • Optimization.
• Analysis for board and statistics.

II. RELATED WORKS
The most important issue in image processing is to remove noise from images. This is achieved by maintaining their details as well as features such as texture edges and colours [3][4][5][6][7][8][9]. Image denoising also affects the rate of segmentation, classification and similar functions. After the images are captured, some interference occurs in the pixels during the digitalization process. Moreover, vibrations ensue on the sensors during the imaging process [4-8, 11, 12].
This deterioration is categorized as salt and pepper noise (SPN) [13,14]. SPN generally reduces the image quality [15]. Consequently, many linear/nonlinear filters have been developed to sort out this problem.
SPN is easily removed with numerous filters, however, only when practically applied to some few noisy pixels [16,17] however, others work on all noisy pixels [18]. To fix the new value of a pixel, these filters use a window that consists of the neighbouring pixels of the noisy pixel recognized as the center pixel. The most common filter is the median filter (MF) [19,20]. MF works on the whole item on all pixels. Applying the filter in this manner, nonetheless, blurs the image as well as distorts from the original pixel values. Standard Median Filtering (SMF) works well in low-intensity noise, by applying a small window size on it [21,22]. The scheme [23] has to remove SPN by a noise level of 90% by using an adaptive median filter. This paper focuses on the quality of an image [24] for different noise densities in the range of 10%-90% with other nonlinear filters. Each method has its advantages and disadvantages.
In this paper, algorithmic optimization has improvised advanced steps with the system architecture modelling. The proposed model manages to remove noise. This research will add value to other former models by introducing algorithmic optimization.

The Outline of the System
The diagram below describes the flow of the system's data.  (1).
After that, the flames are processed as grey images and the flames will be entered into the Doping System. In the doping system, the flames will have added some random white and black pixels these points are 'Salt-Pepper Noisy'. srand((unsigned)time(NULL)); The use of a median filter on these noisy points will be removed. Then the image will also be smoother in visual terms. The median filter is an important process before the Sobel edge detection process. Here, the noisy points will be enlarged by the edge detection algorithm. The median filter is non-linear.
This means for two images A(x) and B(x): The Sobel operator performs a 2-D spatial gradient measurement on an image. This emphasizes regions of high spatial frequency that correspond to edges.
Typically, it is used to find the approximate absolute gradient magnitude at each point in an input grayscale image. In theory, at least, the operator consists of a pair of 3×3 convolution kernels as shown in Figure 2. One kernel is simply the other rotated by 90°. This is quite similar to the Roberts Cross operator.
Typically, an approximate magnitude is computed using: This is much faster to compute. The angle of orientation of the edge (relative to the pixel grid) gives rise to the spatial gradient given by: 3.2 Salt-Pepper Noise Simulation

Salt-Pepper Noise
SPN is a form of noise sometimes seen in images. It presents itself as sparsely occurring white and black pixels. Fat-tail distributed, or "impulsive" noise is sometimes called SPN or spike noise [27]. An image containing salt-and-pepper noise will have dark pixels in bright regions and bright pixels in dark regions [28].
This type of noise can be caused by various means including analogue-to digital converter errors and bit errors in transmission [29]. It can be mostly eliminated by using dark frame subtraction and interpolating around dark/bright pixels. Dead pixels in LCD monitors produce a similar, but non-random, display.    will produce more severe smoothing [31]. Figure 8 indicates the effect of the median filter for clearing noisy points.

Sobel Filter
The Sobel operator is slower to compute than the Roberts Cross operator. It is largely convolution kernel smoothed the input image to a greater extent.
It also makes the operator less sensitive to noise. The operator also generally produces considerably higher output values for similar edges, compared with the Roberts Cross.

Statistic Data of Original Code
Based on the 'gprof' instruction of the Linux System we analysed our code and acquired the original information.
The program parameters were set as below. The test result was shown in Figure 12. loop as assignment operations. In theory after this process, there are "height * width * 9" loops that will be reduced as "height * width" loops mean "height * width * 8" loops will be removed in Median Filter Module every flame.

Statistic of Loop Unrolling Optimization
This paper tested the time cost of the program that processed by loop unrolling and achieved the statistic result of Figure 13.