International Journal of Applied Engineering Research, ISSN 0973-4562 Vol. 10 No.55 (2015) © Research India Publications; httpwww.ripublication.comijaer.htm
Embedded zero tree Wavelet (EZW) Algorithm based Image Transformation for Easy Optimization with HALIDE Language 1
Dr.T. Karthikeyan and 2*C.Thirumoorthi Associate Professor, Department of Computer Science, PSG College of Arts and Science, Coimbatore, India. 2* Research Scholar, Bharathiar University, Assistant Professor, Department of Computer Science, Hindustan College of Arts and Science, Coimbatore, India.
[email protected] 1
transformation. Programming languages like C++, Matlab and for graphics CUDA, open CL are the efficient languages that are used in the current image processing technology. For video and computer aided animations, programmers spend a lot of time and money in planning and executing the operations. An efficient algorithm is required to do image processing in reduced code and less computational time. Halide[10] is developed under these purposes.
Abstract Early optimization in Image Processing comes at the programmer cost and code complexity. A programming language called halide brings in reduced code length and complexity of the image processing technique. This paper evaluates the performance of image processing using Halide. This research mainly concentrates on process of applying EZW Algorithm for signal processing in Halide. An image compression method shows dynamic part in multimedia and satellite applications. Wavelet transforms requireconservativemajor care newly appropriate to their correctness for a number of signal and image compression applications and they have established their feasibility for the same. In this paper, we discuss zero tree, Embedded Zero Tree Wavelet (EZW), Image Transformation and HALIDE language.
2.1 Fast Fourier Transform FFT[1] is an algorithm which is used to compute Discrete Fourier Transform (DFT) in a very effective way. It splits the larger size M = NxN matrix into smaller N’s of DFT in time domain. The FFT was first developed by Carl Friedrich Gauss around 1805. After in 1965 James Cooley (IBM) and John Tukey (Princeton) reinvented this algorithm to run efficiently in computers. Although there are several forms are available to implement this algorithm, but Radix-2 Decimation in Time (DIT) FFT is the simplest and effective method. This method is used to compute 2n point DFT [2]. It splits the points into odd and even sequences by their indexes. After that both the sequence are combined to attain the whole DFT sequence. This will reduce the computational time to O(NlogN) when several iterations and interpolations are made. FFT has an efficient implementation with runtime O(NlogN) which is competitive with FFTW for n = 222 and k 135[3]. For a periodic signal, FFT will have the approximately same value of amplitude. For an aperiodic signal, the FFT will be reduced in amplitude. So some windows function or twiddle factor are added to the original aperiodic signal to make it as periodic [4]. In FFT algorithm the weights are multiplied by the even indexes to attain the maximum efficient output, but a slight increase in bandwidth. The output must be the bit reversal form of the input signal. The complex conjugate symmetry is used to represent the imaginary part.
Keywords:Image Processing, EZW algorithm, Zero Tree, Embedded Zero Tree Wavelet (EZW), HALIDE Language. 1. Introduction This paper describes how Halide language is computing for image processing techniques by using Fast Fourier Transform Algorithm (FFT). This paper also describes the EZW algorithm which is even faster than FFT. This EZW algorithm is implemented using Halide and the performance is analyzed by making comparisons with Matlab and C++ performances obtained earlier. Matlab is considered as the efficient language for image processing, but it has a higher value of program complexity and the individual Kernels which are used by building to attain faster implementation which is not enough for modern machines. So a new method needs to be developed to make faster performance and less computational time. 3D graphics needs these types of implementation and hardware compatibility programming language with less code complexity. Programming languages now used in image processing are having a large number of codes and complex mathematical functions which takes longer time for computation.
2.2 EZW The Embedded Zero tree Wavelet coding [5] is a simple, effective progressive image coding algorithm and can be worn for both lossless and lossy compression systems. This algorithm works well with the proposed coding scheme because the zero tree
2. Literature Review Image processing technologies are widely used in all fields. Computing Image (2D and 3D) has many techniques and algorithms for the process of image
1551
International Journal of Applied Engineering Research, ISSN 0973-4562 Vol. 10 No.55 (2015) © Research India Publications; httpwww.ripublication.comijaer.htm
structure is effective in describing the significance map of the transform coefficients, as it exploits the inherent self-similarity of the subband image over the range of scales, and the positioning of majority of zero valued coefficients in the higher frequency subbands. The EZW algorithm [5] applies Successive Approximation Quantization in order to provide multiprecision representation of the transformed coefficients and to facilitate the embedded coding. The algorithm codes the transformed coefficients in decreasing order in several scans. Each scan of the algorithm consists of two passes: significant map encoding and refinement pass.
using Halide language is to include a single header file and the entire compiler is included in a self contained static library. It is organized for keeping the processing pipelines which are running at maximum efficiency by avoiding restarts. 3. Research Design and Methodology The design phase is done by three steps. 1. The first phase of the research is made with FFTW to compute the Fourier Transform in a single array. 2. The second phase is the execution of the EZW algorithm in Ubuntu 12.10 terminal. Coding is based on Embedded C++ with Halide library function and header files. 3. The third phase is by obtaining the graph for the given value (values and points given by me) using GNUPLOT . For Ubuntu the library package configuration is using lua5.1.pc instead of lua.pc.Before configure (./configure) use
ln –s /usr/lib/pkgconfig/lua5.1.pc /usr/lib/pkgconfig/lua.pc Fig.1. Zero tree structures.
4. Development and Implementation 4.1 Development The development of EZW algorithm for computing DFT should be Yk j (1) Here the value of i = . The input signal is defined as x and the corresponding EZW transform is . The convolution of x and y are denoted by (x*y). This algorithm will recover the block of bits which is indexed to the EZW Coefficient at a time. Each block consist of O(log log n) bits. But this algorithm is not having the freedom of using linear measurements arbitrarily of the vector . So instead of bit recovery block recovery is performed. In EZW algorithm each coefficient is isolated with a constant probability and the filtering process is repeated to ensure that all the coefficients are identified correctly. The median eliminator is used to identify each coefficient having the probability value high. The filtering is performed in O(log n) times. For k EZW case the algorithm has a running time of O(k log2 n), seeing as each filter step takes (klogn)time.
In the embedded zero tree wavelet coding strategy, developed by Shapiro[6], a wavelet/subband decomposition of the image is performed. The wavelet coefficients/pixels are then grouped into Spatial Orientation Trees[12]. The magnitude of each wavelet coefficients/pixels in a tree, starting with the root of the tree, is then compared to a particular threshold T.If the magnitude of all the wavelet coefficients/pixels in the tree are smaller than T, the entire tree structure (that is the root and all its descendant nodes) is coded by one symbol, the zerotree symbol ZTR [7]. If however, there exit significant wavelet coefficients/pixels, then the tree root is coded as being significant or insignificant, if its magnitude is larger than or smaller than T, respectively. The descendant nodes are then each examined in turn to determine whether each is the root of a possible sub zero tree structure, or not. This process is carried out such that all the nodes in all the trees are examined for possible sub zero tree structures [8]. 2.3 Halide Halide programming language was developed by the researchers from the Computer Science and Artificial Intelligence Laboratory (CSAIL) at MIT. The language is developed for Image Processing applications for higher performance systems. Halide uses code optimization procedure for faster execution. Halide is embedded in C++ which runs on X86-64, ARM, GPU processors. Halide compiler concentrates on SIMD units, multiple cores and difficult memory hierarchies. It is considered to be a very efficient language for computer graphics [9]. Halide is a open source domain specific language for modern computational photographic techniques [9][10]. The advantage of
4.2 Implementation Program implementation uses two tools pseudorandom spectrum permutation and flat filtering window [1][11]. The permutation is defined as P a b and also π b(i) = (i - b)modn. Efficient window function construction, the window function is defined by Gaussian with a standard deviation
.Where the standard
window function is defined as . This definition will shows that the window function acts as a filter to
1552
International Journal of Applied Engineering Research, ISSN 0973-4562 Vol. 10 No.55 (2015) © Research India Publications; httpwww.ripublication.comijaer.htm
isolate the Fourier coefficient inside the pass region.This is same for Dolph – Chebyshev window function, but the big-Oh constant is minimum. 5. Testing and Evaluation For exact sparse signal, the total EZW time is calculates. Total EZW time = time to create EZW plan + time to run EZW (2) N is the signal size, and k is the sparsity. N value should be 2n Table I -For signals that are exact EZW N K Total EZW time 65536 50 0.005123 131072 50 0.00332 262144 50 0.005034 1048576 50 0.009543 Table II-For other signals N 65536 131072 262144 1048576
K 50 50 50 50
Fig.4. SNR vs Energy per Large Frequency
Total sFFT time 0.005823 0.003632 0.006098 0.012841
For exact EZWSignal
EZW for other signals
Fig.5. Runtime Vs Signal Size Fig.2. Comparison of EZW and FFTW with different signals
5.1 Limitations 1. EZW algorithm is implemented for the size of the signal N and it must be in the powers of 2 (2n). 2. Halide is a developing language and it is having some rough edges. One single error may cause different changes in the outcome. 3. Halide is not developed for Windows. One needs to clone to work in windows, but it is not recommendable for the higher number of iteration algorithms. 6. Conclusion The implementation of EZW in GPU and Multicore processors will be much higher than X86. By using the Halide compiler it will take only very few micro seconds. Matlab has the computational time of 55 ms when executed in Quad core system using Halide for
Fig.3. Comparison of EZW and FFTW with different signal sparisity.
1553
International Journal of Applied Engineering Research, ISSN 0973-4562 Vol. 10 No.55 (2015) © Research India Publications; httpwww.ripublication.comijaer.htm
valued fast fourier transform algorithms”, IEEE Transactions on Acoustics, Speech, and Signal Processing, pp.849-863, 1987. [5] T. Karthikeyan and P. Manikandaprabhu. Feature Selection Based Hybrid Classification Algorithm With Embedded Zero Tree Wavelet. ARPN Journal of Engineering and Applied Sciences; Volume 10 Issue 4,pp: 17231731,2015. [6] R.M. Haralick and L.G. Shapiro. Image segmentation techniques. In 1985 Technical Symposium East, International Society for Optics and Photonics, pp:2-9,1985. [7] R. Krishnamoorthy, K. Rajavijayalakshmi and R. Punidha, "Low Complexity Hybrid Lossy To Lossless Image Coder With Combined Orthogonal Polynomials Transform And Integer Wavelet Transform”, ICTACT Journal On Image And Video Processing, Vol. 2, No. 04, pp.410416, May 2012. [8] Julien Reichel, Gloria Menegaz, Marcus J. Nadenau, and Murat Kunt, “Integer Wavelet Transform for Embedded Lossy to Lossless Image Compression”, IEEE Trans. Image Processing, Vol. 10, No. 3, pp. 383-392, 2001. [9] Jonathan Rogan-Kelly, Andrew Adams, Fredo Durand and Saman Amarasingha, “Decoupling Algorithms from Schedules for Easy Optimization of Image Processing Pipelines”, ACM Transaction on Graphics (TOG), Vol.31, Issue.4, pp:1-12,July 2012. [10] Jonathan Rogan-Kelly, Andrew Adams, Fredo Durand and Saman Amarasingha, “Halide: A Language and Compiler for Optimizing Parallelism, Locality, and Recomputation in Image Processing Pipelines”, ACM Transaction on Graphics (TOG), Vol.31, Issue.4, pp: 519530, July 2012. [11] A.C.Gilbert, M.J. Strauss and J.A. Tropp, “A Tutorial on Fast Fourier Sampling”, appeared on Signal Processing Magazine, 2008. [12] Dr.T.Karthikeyan and C.Thirumoorthi, “A Survey on Embedded Zero Tree Wavelet “, International Journal of Computer Science (IJCS) ,ISSN:2348-6600,Vol.2, Issue 2, No:3, RefID:IJCS-061, Page No:353-357, October -2014.
148 lines. It must be higher for EZW implementation and also because of high level syntax the implementation of EZW becomes hard and difficult. For normal C++, the length of the coding is very length and for some process of filtering normal C++ is not efficient for correct output. For 3D graphics it should be a milestone. Other languages compilers are optimized to do numerical programs based on loop transformation, auto vectorization, fusion and tiling. Optimization of loop does not consider recomputation of values, it computes each point in each loop only once. In processing recomputing values without storing will gives higher performance and reduces memory space. Image processing for pictures taken from satellites can be easily processed by this algorithm with Halide. Future work in computing the EZW will gives greater image and signal processing efficiency for medical imaging. Images which contain higher frequency coefficients are processed very highly for motion detecting instead of taking several images. For every image processing techniques Halide will gives the highest computational speed. Implementation of any new algorithm in Halide is easy when compared to other languages. Halide uses its static compiler which leads to compile any image processing logarithm with higher speed.
References [1] A.Gilbert, M. Muthukrishnan and M.Strauss, “Improved time bounds for near optimal space Fourier representations”, In Proceedings of SPIE, the International Society for Optical Engineering, 2005. [2] Jiaxi Hu, Zhaosen Wang, Qiyuan Qiu, Weijun Xiao and D.J.Lilja, “Sparse Fast Fourier Transform on GPU’s and Multicore CPU’s”, In Proceedings of IEEE 24th International Symbosium on SBAC-PAD Digital Object Identifier, pp. 83-91, October 2012. [3] Haritham Hassanieh, Piotr Indyk, Dina Katabi, and Eric Prince, “Simple and Practical Algorithms for Sparse Fourier Transform”,In Proceedings of 23rd Annual ACM – SIAM Symposium on Discrete Algorithms, January 2012. [4] Henrik V. Sorenson, Douglas L. Jones, Michael T. Heideman, and C. Sidney Burrus, “Real-
1554