Fuzzified Circular Gabor Filter for Circular and Near-Circular Object Detection

This paper presents a new algorithm for filtering and detecting circular and deformed circular objects. The resulting procedure is based on fuzzifying the parameters of a circular Gabor filter to optimize the response of the circular Gabor filter and achieve additional selectivity of the filter. Circular and deformed circular objects of interest were efficiently extracted, and considerable resistance to noise and image degradation was achieved.


I. INTRODUCTION
Texture analysis and texture detection are important methods for detecting objects in complex images and are among the most researched fields in image processing [1]- [42]. Of all procedures, Gabor filters belong to those that achieve the most significant results [1], [2], [3]. Filtering an image with a Gabor filter is a simple procedure for extracting the spatially localized spectral properties of an image. Gabor filters are robust and are resistant to noise of various origins, and they provide good filtering results for images captured using lowquality, inexpensive devices.
In the present paper, a specific type of circular Gabor filter is presented for processing circular image segments. For this circular Gabor filter, the parameters are fuzzified to increase the robustness of the filter when the shape of the target object in the image is deformed into a circular or near-circular shape; this fuzzification is important because, depending on the angle at which the image was captured, a circular object can be perceived as a shape similar to an ellipse or some deformation that resembles a circle. By correctly choosing the parameters of a circular Gabor filter, it is possible to reliably and efficiently detect even deformed circular and elliptical shapes within an image. Since the deformities of circular objects vary, it has been observed that there is no unique combination of parameter settings of a circular Gabor The associate editor coordinating the review of this manuscript and approving it for publication was Senthil Kumar.
filter that corresponds to all varieties of deformity. Therefore, fuzzification has been used to determine the parameters of a circular Gabor filter because it introduces human reasoning to determine the parameters of the filter, improving the flexibility and adaptability of the filter in problems of filtering deformed circular shapes in an image. Fuzzification has also provided excellent results in modifying classical Gabor filters [1].

II. RELATED WORK
Compared with classical Gabor filters and Gabor wavelets, circular Gabor filters are less represented in the literature. Only a small number of papers have been published on the topic of circular Gabor filters, although they have very good characteristics in terms of simplicity, resistance to various kinds of noise and robustness to low-quality input images.
Zhang et al. [3] applied a circular Gabor filter to detect textures with invariant orientations. They used a symmetrical circular filter in the shape of a regular circle. The authors claimed that the constructed filter with appropriately selected parameters gave satisfactory results in filtering symmetrical circular shapes. Zhu et al. [5] presented a method for measuring the likeness of objects. This method is based on using a circular Gabor filter and the procedure of measuring the Hausdorff distance. The circular Gabor filter was used for detecting textures and edges, while the Hausdorff distance was used as a measure of similarity between binary images. The proposed algorithm was claimed to be resistant to rotation and noise. Yin and Kim [6] presented circular Gabor wavelets for the classification of textures that are invariant to rotational changes. The algorithm was tested on a large database of images and proved to be highly efficient. Xu et al. [7] used a bank of circular Gabor filters to improve the edges of cells in antiviral experiments. The final segmentation was achieved by clustering with very high reliability. Meng et al. [8] presented a biometrical algorithm for identifying the retina using an augmented circular Gabor filter based on wavelets. Ghandehari and Safabakhsh [9] used a classic and circular Gabor filter for the verification of fingerprints by comparing two images with the Hamming distance. The circular Gabor filter is shown to provide much better results than the classic Gabor filter. Doublet et al. [10] used a circular Gabor filter combined with string matching for contactless authentication of fingerprints; the margin of error was reported to be less than 1.2%. Song et al. [11] proposed a method for classifying textures that are invariant to rotation based on the LETRIST (Locally Encoded TRansform feature hISTogram) algorithm, which uses a derivative of a symmetric circular Gauss function. This method was noted for its robustness, simplicity of implementation, and the lack of the need to train the algorithm. Radman et al. [12] introduced a new iris segmentation method based on the circular Gabor filter. The filter is utilized to localize the rough position of the pupil center. The authors claimed that the proposed optimization scheme easily fits iris boundaries with a free coordinates contour. Xu et al. [13] presented an optimization design method for the Gabor filters based on the analysis of an iris texture model. The analysis shows that the energy distribution of the iris texture is centralized around lower frequencies in the spatial frequency domain. Therefore, an iterative algorithm is designed to optimize the Gabor parameter field. The experimental results showed the efficiency of the algorithm. Wang et al. [14] used a feature selection scheme for multiclass texture segmentation using Rough Set Enytopy-RSE. Simulations demonstrated that only a little number of features can fulfill the segmentation task without reducing the accuracy. Manthalkar et al. [18] developed a rotation invariant texture classification scheme using even symmetric Gabor filters for a large texture database. Then, sixty Brodatz textures were rotated in 12 different directions and were classified using the features derived by Gabor filters. Sousa et al. [21] proposed a fuzzy classification system to perform word indexing in ancient printed documents. The authors claimed that the indexing system is flexible and lightweight compared to other optimal recognizers. Kim and So [24] introduced a rotation-invariant feature using four types of directional statistics obtained from both the modulus and phase parts of Gabor filtered images. The experimental results showed that the proposed method yields excellent performance compared with several conventional methods from literature. Allagwail et al. [32] presented a two-dimensional discrete wavelet transform based on the local binary pattern for face recognition using a symmetry. The introduced method has three main stages: preprocessing, feature extraction and classification. The proposed method was implemented and evaluated using the Olivetti Research Laboratory and Yale datasets. The authors stated that the experimental results showed a recognition accuracy of 100%, for both datasets. Wu et al. [40] proposed a new automatic recognition method based on Gabor filter for extracting residential areas from historical raster topographic maps. The experiments were conducted on the samples of three typical areas. The results showed the effectiveness of the proposed method and outperformed the previous methods in both integrity and positional accuracy of the residential boundary. Zhang et al. [43] combined the convolutional neural networks with a Gabor filter to calculate the gradient of the Gabor filter parameters. The calculation was based on the objective function, then the parameter optimization was performed via back-propagation. The experiments demonstrated that the proposed method outperforms other state-of-the-art methods in finger-vein classification.
The novelty of the proposed method in this paper lies in the use of fuzzy reasoning in order to enhance the efficiency of the circular Gabor filter in near-circular object detection.

III. MATH A. CIRCULAR GABOR FILTER
The impulse response of the Gabor filter is a 2D sinusoid of a modulated Gauss function; i.e., multiplying the 2D sinusoid with a 2-dimensional Gauss function produces a 2D Gabor filter with an orientation of 0 • , where f is the spatial frequency, and is the orientation of the Gabor filter, and it can be formulated as [1], [2]: where the first exponential function represents a 2D Gauss curve that is called an envelope and the second exponential function represents a complex sinusoid named a carrier with the initial phase ϕ. Parameter A is the amplitude of the function, (x 0 ,y 0 ) is the center of the function, and σ x and σ y are the standard deviations of the Gauss function along the spatial coordinates. The filter defined as such has proven to be highly efficient in detecting various textures, primarily due to its ease of optimizing parameters such as changes in orientation, changes in frequency, and changes in bandwidth, which can be adjusted with the values of the standard deviation. However, defining the filter in this way, i.e., as a non-circular shape [1], is not suitable for detecting circular objects and deformations of circles. For the detection of circular and deformed circular objects to be successful, it is necessary to use a circular Gabor filter with fuzzified parameters.
A circular Gabor filter can be defined as [2]: where F is called the central frequency and in the present case is determined empirically as [3]: where λ represents the wavelength of the circular Gabor filter in pixels, i.e., the size of the filter. The circular Gabor filter can be formulated as: where the real and imaginary parts are as follows: The response of the circular Gabor filter on the input image is obtained by convolution [4]. If I(x,y) represents the image, and G(x,y) represents the response of the circular Gabor filter at point (x,y) on the plane of the image, then Y can be formulated based on (7), as shown in Fig. 1: In Fig. 1, the cosine component of the circular Gabor filter has a clearly expressed response in the shape of a circle, which can be used in the detection of circular objects. In the example in Fig. 1(b), the cosine component of the circular Gabor filter has the strongest response that forms a full circle. Therefore, in subsequent experiments, filtering is performed using only the cosine component of the circular Gabor filter after fuzzification. It has been shown in experiments that the sine component, especially the amplitude of the filter, yields much poorer results in filtering circular shapes, and thus these components are not considered in this paper.

B. FUZZIFICATION OF CIRCULAR GABOR FILTER PARAMETERS
As noted, to obtain an appropriate response, it is most important to correctly select the parameters of the filter. The selection of Gabor parameters has been a long research focus in the field of Gabor based image processing. Sometimes the same parameter needs to be given a higher number of values that describe the nature of the problem equally well. One of the solutions to this issue is using filter banks, which allow for the use of a larger number of values for one or multiple parameters. The largest hurdle with this solution lies in the processing time and in the issue of insufficient memory during processing in certain extreme cases [1]. Another major problem is that the selected values of the parameters are predefined. To remove this limitation, recent research has implemented fuzzy logic, i.e., fuzzy inference  In the rest of this section, the procedure for fuzzifying a circular Gabor filter and its application in filtering circular objects are briefly described.
The processing pipeline introducing the order of each algorithm step is presented in Fig. 2.
In all three cases, a generalized Bell membership function was used on the input, as its shape smoothly and evenly describes the parameters of interest. For a deviation in the  direction of the x-axis, this function can be formulated as follows [4]: where σ x ∈ σ x 1 , σ x 2 . For a deviation in the direction of the y-axis, formula (8) and the intervals completely overlap, while for wavelengths, formula (8) remains the same, but the selected intervals differ, as shown in Fig. 3. The reason for this phenomenon is that in the selected examples, the images contained various shapes of interest in certain limited dimensions, and it was empirically concluded that the Bell membership function represents an appropriate choice in this case. In cases where the dimensions of the desired shapes are much larger, i.e., they occupy a much larger interval of the input values that they are to describe, some other membership functions, such as a trapezoidal membership function, can be used with different interval values; however, the choice of the membership function does not affect the essence with regard to the way the fuzzy system is formed [4].
Initially, triangular membership functions were used to reduce the intervals of the desired values of the parameters [1], [4]. Thus, a better-quality response was obtained. If a lower number of adjacent parameters was considered for a desired value of a parameter, then a lower number of wavelengths and a lower number of standard deviations were obtained for both values of the spatial coordinates. At the output points of the interval, where the maximum value of the triangular membership function was located in the direction of the x-axis (Fig. 4), µ σ x crisp = 1 was obtained for the standard deviation. The initial and final points of the interval were chosen empirically as follows [4]: where the interval of value σ x was selected from the condition. For σ y , all formulae and values of the interval were identical to the choices of parameters in the direction of the xaxis. For wavelength λ, formula (9) remained the same, while the number and values of the interval differed when using the data in Fig. 4 (b). Thus, the input and output membership functions were defined. However, the IF-THEN rules must be defined and defuzzification must be completed to create the fuzzy system.  It must be emphasized that in the literature [4], an existing function had already been created (fuzzysysfcn [4]) to automatically generate IF-THEN rules and create a fuzzy system for the provided input and output membership functions without any intervening steps. As a result, the fuzzy systems shown in Fig. 5 were created.
Notably, fuzzy systems with standard deviations in the directions of the x-and y-axes overlapped since the membership functions at the input and output were identical for σ x and σ y . For wavelengths, a different type of fuzzy system was created as the input and output of the system. Similarly, the intervals of the values in the case of wavelengths were different than the input and output of systems that describe the standard deviation. The resulting fuzzy system was then used in the filtering algorithm. In this study, the system has 55 features in total: 17 for σ x , 17 for σ y and 21 for wavelengths. It must be noted that the number of features can be changed easily, but a large number of features will result in increased processing time. With the help of the fuzzy systems, a series of circular Gabor filters and filter banks was created; this series was used to perform filtering in accordance with the properties of the created fuzzy system, whose collective response created the filtering result.
In the example in Fig. 6, the fuzzified circular Gabor filter is shown for the case when the value of the wavelength was 12 pixels, and the standard deviation values were σ x = 9.9918 and σ y = 14.

IV. RESULTS AND EXPERIMENTS
The efficiency of this new procedure was tested on test images specifically selected for this purpose. In this section, some of the results of using fuzzified circular Gabor filters VOLUME 8, 2020 are presented to highlight the differences in the results of filtering compared to the case when a regular circular Gabor filter, and the filter proposed by Zhang et al. [3] are used for cropping image segments of a regular circular shape. As mentioned earlier, only the cosine component of the fuzzified circular Gabor filter was used for filtering in all experiments since it produces a stronger response to the edges of objects that are of a circular or deformed circular shape.
In Fig. 7, some examples of the images and the results of the experiments are shown. The first column (a) shows the original input images, the second column (b) highlights the results of filtering with the filter proposed by Zhang et al. [3], the third column (c) shows the results of filtering with a classic circular filter, and the fourth column (d) shows the results of filtering with a fuzzified circular Gabor filter.
In the image in the first row, a prism-shaped object that has a hole in the middle shaped similar to a regular circle is shown. The image was captured sideways, and therefore, the circular shape in the image was deformed into a shape similar to an ellipse. If the image is compared to the resulting image after filtering, it is noticeable that the fuzzified circular Gabor filter detects the deformed shape much better, the response of the fuzzified filter is significantly better and the hole in the prism is clearly visible in the image. In the second example (in the second row), an image of an insect, whose body is shaped more similar to a deformed ellipse than a circle, can be seen. When filtered with both the classic circular Gabor filter and the filter proposed by Zhang et al. [3], only certain parts of the body of the insect were detected, but the body shape of the insect could barely be recognized. The response was much better when filtered with a fuzzified filter, and the image more closely resembled that of the body of the insect, i.e., the insect was detected better and in much greater detail. The third example shows a traffic sign consisting of two parts, a circular part and a rectangular part. The background of the sign has various details and shadows. The image was captured with a classic camera of modest capabilities; in the first two examples, the origin of the images is unknown. In this case, a better response can also be clearly observed in filtering with the fuzzified circular Gabor filter since the circular shape of the traffic sign is more visible in the fourth column and is well detected in an image with a highly complex background. The following example shows an image of Streptococcus pneumoniae bacteria, which are egg-shaped, not spherical, and would suit the circular filter (original image courtesy of Dr. Med. Sci. Uffe B. Skov Sørensen, Department of Biomedicine -Research and Education, Aarhus University, Aarhus, Denmark); the image is of low quality. In this case, all three filters localized the components of the image acceptably, but the fuzzified filter had a stronger response here as well: the lines forming the shape of the bacteria are sharper in the image obtained by filtering through the fuzzified filter. This result was expected since fuzzification greatly adjusted the filter to the deformed shapes compared to a classic circular filter, or to the filter proposed by Zhang et al. [3]. The last example also shows another type of bacterium: Clostridium tetani. In addition to circular components, these bacteria also have an elongated sequence. The entire structure of the bacteria resembles an elongated, deformed ellipse or a type of stick. As the shape of the bacteria differs from a circle in many ways, a weaker response of the classic circular filter was expected, although even the classic circular filter managed to localize the bacteria in the image. The circular filter proposed by Zhang et al. [3] has a better response then the classic circular filter, and the outcome in this case is similar to the result using the fuzzified circular filter. However, in addition to good localization of the target components, the fuzzified circular filter also achieved a better response with a higher number of detected components when compared to the classic circular Gabor filter.
In the examples in Fig. 7, the efficiency of the fuzzified circular Gabor filter for detecting segments of images with circular or deformed circular shapes was obvious compared to that of the classic circular Gabor filter and the circular filter proposed by Zhang et al. [3]. The input images were of various origins, but the procedure presented in this paper proved to be efficient in all discussed examples.  Finally, Fig. 8 presents the fuzzification effects of different parameters on experiments with the first example from Fig. 7. The first image shows the result of filtration only with fuzzified standard deviation σ x along the x coordinate, the second image shows the result of filtration only with fuzzified standard deviation σ y along the y coordinate and the third image shows the result of filtration only with fuzzified wavelengths. As it can be noticed, the filtering with fuzzified standard deviations yields good results, but the fuzzified wavelengths individually give a bad result. However, all three parameters together achieve an excellent filtering and detecting results as it can be seen in Fig 7 (d).
With additional processing, the results of filtering can be improved even further in terms of extraction of the target components, and it is also possible to eliminate unnecessary components from the image, which lies outside the scope of this paper. The aim of this paper was to show the efficiency of fuzzifying the parameters of a circular Gabor filter in relation to a classic circular Gabor filter.

V. CONCLUSION
This paper presents a procedure for detecting circular and deformed circular shapes in complex images. Detection is achieved through filtering by applying a new circular Gabor filter with fuzzified parameters, namely, wavelength and standard deviations in both coordinate directions. It has been experimentally proven that, by using the cosine component of the filter, more efficient extraction of the segments of interest can be achieved. It became evident on the test images that the fuzzified circular Gabor filter can more efficiently filter and detect the components of a circular or deformed circular shape in complex images of various origins.

FUTURE WORKS
In the future, an optimized method for selecting the parameters of the fuzzified circular Gabor filter will be developed to achieve automatic detection of specific shapes that resemble a circle or a deformed circle. Special emphasis will be placed on developing automated procedures for selecting particular microorganisms from complex pictorial structures.