In order to make full use of texture features of image when fusing images, and taking into account the inherent advantages of fractal theory in this respect, a novel image fusion algorithm, which used fractal dimension and directional contrast, based on multi-wavelet transform was proposed in this paper. So, we put forward a new design of the intelligent lock which is mainly based on the technology of wireless sensor network. Particle swarm optimization (PSO) is a recently proposed intelligent algorithm which is motivated by swarm intelligence. PSO has been shown to perform well on many benchmark and real-world optimization problems; it easily falls into local optima when solving complex multimodal problems. Moreover, the objective indexes, which are image entropy, standard deviation and quality measure, were adopted to evaluate the comparative results of evaluating fusion quality. To avoid the local optimization, the algorithm renews population and enhances the diversity of population by using density calculation of immune theory and adjusting new chaos sequence.