The purpose of multi-focus image fusion is gathering the essential information and the focused parts from the input multi-focus images into a single image. These multi-focused images are captured with different depths of focus of cameras. Multi-focus image fusion is very time-saving and appropriate in discrete cosine transform (DCT) domain, especially when JPEG images are used in visual sensor networks (VSN). The previous works in DCT domain have some errors in selection of the suitable divided blocks according to their criterion for measurement of the block contrast. In this paper, we used variance of Laplacian (VOL) and energy of Laplacian (EOL) as criterion to measure the contrast of image. Also in this paper, the EOL and VOL calculations directly in DCT domain are prepared using vector processing. We developed four matrices which calculate the Laplacian of block easily in DCT domain. Our works greatly reduce error due to unsuitable block selection. The results of the proposed algorithms are compared with the previous algorithms in order to demonstrate the superiority of the output image quality in the proposed methods. The several JPEG multi-focus images are used in experiments and their fused image by our proposed methods and the other algorithms are compared with different measurement criteria.
Filtering is an important issue in signals and images processing. Many images and videos are compressed using discrete cosine transform (DCT). For reducing the computation complexity, we are interested in filtering block and images directly in DCT domain. This article proposed an efficient and yet very simple filtering method directly in DCT domain for any symmetric, asymmetric, separable, inseparable and one or two dimensional filter. The proposed method is achieved by mathematical relations using vector processing for image filtering which it is equivalent to the spatial domain zero padding filtering. Also to avoid the zero padding artifacts around the edge of the block, we prepare preliminary matrices in DCT domain by implementation elements of selected mask which satisfies border replication for a block in the spatial domain. To evaluate the performance of the proposed algorithm, we compared the spatial domain filtering results with the results of the proposed method in DCT domain. The experiments show that the results of our proposed method in DCT are exactly the same as the spatial domain filtering.