# The Application Of Mamdani Fuzzy Model For Auto Zoom Function Of A Digital Camera

*I. Elamvazuthi, P. Vasant Universiti Technologi PETRONAS 
 Tronoh, Malaysia J.Webb University of Technology Swinnburne, Sarawak Campus, Kuching, Sarawak, Malaysia Abstract—Mamdani Fuzzy Model is an important technique in Computational Intelligence (CI) study. This paper presents an implementation of a supervised learning method based on membership function training in the context of Mamdani fuzzy models. Specifically, auto zoom function of a digital camera is modelled using Mamdani technique. The performance of control method is verified through a series of simulation and numerical results are provided as illustrations. 

Keywords-component: *Mamdani fuzzy model, fuzzy logic, auto* zoom, digital camera 

## I. Introduction

The adoption and adaptation of digital signal processing technology in consumer digital cameras has improved the performance of automatic adjustments including auto facus 
(AF), auto exposure (AE) and zoom tracking, which are important features for high image quality, under various shot conditions [1]. In a digital camera, optical parameters such as zoom, focus and aperture, are usually motor (computer) 
controlled [2]. 

The zoom tracking is the continuous adjustment of a camera's focal length, to keep in-focus state of camera image during zoom operation. Without zoom tracking operation, a camera system cannot maintain in-focus state during zooming. Some conventional zoom tracking techniques were implemented using curve trace stored in a look-up table [3]-
[6]. The simple look-up table method, however, requires a large system memory. Moreover, it is difficult to select a proper curve when the zoom lens moves toward the tele-angle. 

There are several methods that determine the variations of the intrinsic parameters developed in the literature. Recently, some research has been conducted by the employment of neural networks [7]. Nevertheless, this method is too complex to be used and require a lot of training data which might not be always available. The simplest modeling technique is to measure the intrinsic parameters using a standard offline calibration technique at several zoom and focus settings and then store the data in a look-up table [8]. This leads unfortunately to a large memory requirement especially when a precise model is needed. A novel technique using moving least-squares approach to model the variation of the camera internal parameters as a function of focus and zoom was proposed by [9]. Compared to a previous technique using a global least-squares regression scheme with bivariate polynomial functions, the new method resulted in reduction of the mean estimation error. 

System Modelling based on conventional mathematical tools (e.g., differential equations) is not well suited for dealing with ill-defined and uncertain systems. By contrast, a fuzzy system employing fuzzy if-then rules can model the qualitative aspects of human knowledge and reasoning processes without employing precise quantitative analysis [10]. Increasingly, fuzzy system as a promising Computational Intelligence technique has found many industrial applications. Different fuzzy models have been developed, and successfully applied such as Mamdani model and Sugeno model. There is not a universally best fuzzy model, but each model or may have its suitable types of application. So how to automatically choose an appropriate fuzzy model or for a specific application is always important and sometimes difficult [11]. 

Interest has been shown recently in the applications in the fields of image recognition, especially for image zooming. 

Image zooming involves the adjustment of a camera's focal length to keep in-focus state of camera image during zooming operation. It is well known that there are two types of zooming operations, i.e., optical and digital zoom. Many compact digital cameras can perform both an optical and a digital zoom. A camera performs an optical zoom by moving the zoom lens so that it increases the magnification of light before it even reaches the digital sensor. In contrast, a digital zoom degrades quality by simply interpolating the image- after it has been acquired at the sensor [12]-[14]. 

Digital Camera involves the zooming function which allows us to focus our target image in variety of distance. Generally, the determination of zoom in (+nX) and zoom out 
(-nX) is proportional to the distance between the digital camera and the object that want to capture. In this paper, the auto image zooming that was implemented by using Mamdani fuzzy model is described where rules are derived from multiple knowledge sources such as previously published databases and models, existing literature, intuition and solicitation of expert opinion to verify the gathered information. This paper is not concerned with theoretical discussion of digital camera zooming functions, rather, it concentrates on the application Mamdani fuzzy model in the zooming functions of digital camera. Preliminary results of this study were published in CIM conference proceedings [15].