{'fraction_non_alphanumeric': 0.030796855020812364, 'fraction_numerical': 0.011181543651549365, 'mean_word_length': 4.640325303053552, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Computer-aided Interpretable Features for Leaf Image Classification

Plant species identification is time consuming, costly, and requires lots of efforts, and expertise knowledge. In recent, many researchers use deep learning methods to classify plants directly using plant images. While deep learning models have achieved a great success, the lack of interpretability limit their widespread application. To overcome this, we explore the use of interpretable, measurable and computer-aided features extracted from plant leaf images. Image processing is one of the most challenging, and crucial steps in feature-extraction. The purpose of image processing is to improve the leaf image by removing undesired distortion. The main image processing steps of our algorithm involves: i) Convert original image to RGB (Red-Green-Blue) image, ii) Gray scaling, iii) Gaussian smoothing, iv) Binary thresholding, v) Remove stalk, vi) Closing holes, and vii) Resize image. The next step after image processing is to extract features from plant leaf images. We introduced 52 computationally efficient features to classify plant species. These features are mainly classified into four groups as: i) shape-based features, ii) color-based features, iii) texture-based features, and iv) scagnostic features. Length, width, area, texture correlation, monotonicity and scagnostics are to name few of them. We explore the ability of features to discriminate the classes of interest under supervised learning and unsupervised learning settings. For that, supervised dimensionality reduction technique, Linear Discriminant Analysis (LDA), and unsupervised dimensionality reduction technique, Principal Component Analysis (PCA) are used to convert and visualize the images from digital-image space to feature space. The results show that the features are sufficient to discriminate the classes of interest under both supervised and unsupervised learning settings.

The main aim of feature extraction is to reduce the dimensionality of this information by obtaining measurable patterns of leaf images. For example, shape, color, and texture are some of the patterns that may be observed. In this paper, we introduce a collection of interpretable, measurable, and computer-aided features that are useful in image leaf classification. This feature collection includes several pre-established features identified through a thorough review of the literature. Other than existing features, we introduce several features computed based on the Cartesian coordinate of the images. Furthermore, we explore the ability of features to discriminate the class of interest under a supervised learning setting and an unsupervised learning setting.
The paper is organized as follows. Section 2, describes the steps of image processing. Preprocessing is necessary before extracting features from the images. Section 3, discusses feature extraction in in-detail because features are highly influenced by the plant species to be classified. Under this section, we discuss mainly four types of features as shape, color, texture, and scagnostics and how to extract them. Section 4, presents empirical application. This section consists of details about the datasets that are used to explain the applications, and visualization of leaf images in the feature space using supervised, and unsupervised dimensionality reduction techniques. Section 5, consists of a summary of the software and packages used to extract the features. Some discussion about the outputs and concluding remarks are given in the last section.

Image Processing
Image processing is an essential step to reduce noise and content enhancement while keeping its features intact [Goyal et al., 2018]. The workflow we use to process images in this paper is shown in Figure 1. This includes seven main steps. They are: i) converting BGR (Blue-Green-Red) image to RGB (Red-Green-Blue), ii) gray scaling, iii) Gaussian filtering, iv) binary thresholding, v) remove stalk, vi) close holes, and vii) image resizing. Some of these steps are applicable only to specific images. For example, apply to remove stalk is applicable only to leaf images that have a stalk. In this study, we focus on leaves with a simple arrangement as shown in Figure 2c. A single leaf that is never divided into smaller leaflet units is known as a leaf with a simple arrangement. This type of leaf is attached to a twig by its stem or the petiole. The margins, or edges, of the leaf, can be smooth, lobed, or toothed (see Figure 2a).  BGR and RGB are conventions for the order of the different colour channels. They are not colour spaces. When converting BGR image to RGB, there are no computations other than switching around the order. Different image processing libraries have different pixel ordering. To be compatible with other libraries, we convert the BGR image into RGB format. For example, when we read an image using the OpenCV library in Python by default it interprets BGR format, but when we plot the image it takes the RGB format in matplotlib package in Python.

Step 2: Grayscaling
Gray-scaling is the process of converting an image to shades of gray from other colour spaces like RGB. This helps to increase the contrast and intensity of images [Goyal et al., 2018]. Gray scale images require only one single byte for each pixel whereas colour (RGB) image requires 3 bytes for each pixel. Hence, gray-scaling reduces the dimension of an image.
Another advantage of using gray-scaled images is to reduce model complexity. Consider an example of a training neural article on RGB images of 20 × 20 × 3 pixel. The input layer will have 1200 input nodes. Whereas for gray scaled images the same neural network will need only 400 (20 × 20) input node.

Step 3: Gaussian Filtering (Gaussian Blurring/Gaussian Smoothing)
Gaussian smoothing is an image smoothing technique. Image smoothing techniques are used to remove the noise that can be occurred due to the source (camera sensor). Image smoothing techniques help in smoothing images and removing intensity edges.
A Gaussian function is used to blur the image. It is a linear filter. We used the OpenCV package in Python for Gaussian smoothing. The width and height of the Gaussian kernel must be positive and odd. Furthermore, the kernel standard deviation along the x and y-axis should be specified. When the kernel standard deviation along the x-axis is specified, kernel standard deviation along the y-axis is taken as equal to the kernel standard deviation along the x-axis. However, if both kernel standard deviations are given as zeros, the calculations are done using the kernel size. In our research, the width and height of the kernel are defined as 55 and the kernel standard deviation along the x-axis is assigned as zero. An example of applying Gaussian smoothing to an image is shown in Figure 3.

Step 4: Binary Thresholding
Thresholding is a segmentation technique that is used to separate the foreground from its background. Thresholding converts the gray-scale images into binary images according to the threshold value. If the pixel value is smaller than the threshold value, the pixel value is set as 0, and if not the pixel value is set to a maximum value which is generally 255. The thresholding technique is done on the gray-scale images in computer vision. We used Otsu's binarization adaptive thresholding after Gaussian filtering to convert color images to binary images. The reason for using Otsu's binarization method is, it automatically determines the optimal threshold value.

Otsu's Thresholding
Nobuyuki Otsu introduced Otsu's method which is defined for a histogram of grayscale values of a histogram (ghist I ) of an input image Im. To segment an image Im into two subsets of pixels Otsu's method calculates an optimal threshold τ . The number of pixel locations of the grayscale image is defined as |Ω|. The algorithm maximizes the variance σ 2 between the two subsets (Within-class-variance) to find the threshold τ . The variance σ 2 is defined as where µ is the mean of the histogram, µ 1 and µ 2 are the mean values of first and second subset respectively. The corresponding class probabilities, P 1 and P 2 are defined as follows, where u is the candidate threshold and the maximum gray level (G max ) is assumed as 255. To find the optimal threshold τ for segmenting image Im, all candidate thresholds are evaluated this way. The algorithm of Otsu's method is defined as follows: For example, assume that candidate threshold value u is 2. Therefore, the image is separated into two classes, which are class 1 (pixel value <= 2 ) and class 2 (pixel value > 2). Class 1 represents the background and class 2 represents the foreground of the grayscale image. According to Figure 4, there are 9 pixel locations. The associated measurements are P 1 = 5 9 , P 2 = 4 9 , µ 1 = (0 * 2) + (1 * 1) + (2 * 2) (2 + 1 + 2) = 1, µ 2 = (3 * 3) + (4 * 1) (3 + 1) = 13 4 , Create a histogram for the grayscale image Set the histogram variance S max = 0 Other than the main image processing techniques discussed above, the following techniques are applied to some images where necessary after image thresholding.

Remove the Stalk
As shown in Figure 5a, this is used to remove the stalk of the image. Remove the petiole (stalk) of the leaf image is another version of the thresholding process. Thresholding is applied after finding the sure foreground area. To find the sure foreground area, the distance transform technique is used. The binary image is used as the input of the distance transform technique. In the distance transform technique, an image is created by assigning a number for each object pixel that corresponds to the distance to the nearest background pixel. The distance is calculated using the Euclidean distance. After finding the sure foreground area, Otsu's binarization is applied again as the thresholding technique.

Closing Holes
Holes inside leaf areas occur due to plant disease, light reflection, and noise. As shown in Figure 5b closing holes is used to remove small holes inside the foreground objects. This is achieved by pulling background pixels to foreground pixels. The closing holes are also known as dilation and while erosion does the opposite, which is open holes. This step is performed on a binary image.

Erosion
The basic idea of Erosion is that erodes the boundaries of the foreground object. Since the input is a binary image, a pixel in the original image is either 1 or 0. If all the pixels under the kernel is 1, a pixel of the original image is considered as 1, otherwise made to zero (eroded). This means that depending upon the size of the kernel all pixels near the boundary will be discarded. Therefore the thickness or size of the foreground object decreases (the white region of the image decreases).

Dilation
The opposite of erosion is defined as dilation. If at least one pixel under the kernel is 1, the pixel element is 1 in Dilation. It tends to increase the foreground of the image or the white region of the object.

Leaf Image Features
In the identification of plant species using leaf images, features of leaves play an important role, because each leaf possesses a unique feature that it makes different from others. The previous studies [Azlah et al., 2019, Mingqiang et al., 2008, Sun et al., 2017 use deep learning neural networks to classify medicinal plants based on pixel-based images. Given the leaf images, deep learning models automatically identify features based on the pixel space of the images. While deep learning models have achieved great success, the lack of interpretability of features limits their widespread application. To overcome this, we explore the use of interpretable, measurable, and computer-aided features extracted from plant leaf images. We identified 52 features. The features are classified into four groups as i) shape-based features, ii) color-based features, iii) texture-based features and iv) scagnostic features. In this study, we considered 21 shape features, 4 texture features, 6 color-based features, and 21 scagnostic features.

Shape Features
When identifying real-world objects, the shape is known as an essential sign for humans. We use the shape descriptors introduced by [Wäldchen and Mäder, 2018]. In addition to that, we introduce several new shape features such as the number of convex points, x and y coordinates of the center, number of maximum and minimum points, correlation of Cartesian contour points, etc. The shape features should be invariant to a certain class of geometric transformation of the object. The main geometric transformations are rotation reflection, scaling, and translation (see Figure 6). The shape features we considered in this study are invariant to the rotation and reflection. All the shape features are extracted from the binary images.
Extraction of image contour plays an important role in measuring the shape of an image. Simply contour (see Figure 7) is a curve joining all the continuous points (along the boundary), having the same color or intensity.
To extract the contour of the leaf, the leaf should be placed properly in the center of a white paper. If the image is placed as shown in Figure 8, as a result of inappropriate translation (a) and inappropriate scaling (b), problems arise in the calculations of the contour. Furthermore, it is difficult to recognize the contour, when the image is too small. Shape features can be classified into two main categories as contour-based and region-based features [Wäldchen and Mäder, 2018]. As illustrated in [Wäldchen and Mäder, 2018], contour-based shape features are computed based on the contour of a shape, whereas region-based shape features are extracted from the whole region of a shape (see Figure 9).
In this study, we use 6 initial shape features that are used to derive 12 shape features. The 6 initial features are i) diameter, ii) physiological length, iii) physiological width, iv) area, v) perimeter, and vi) eccentricity.

Diameter (F 1 )
Diameter is defined as the longest distance between any two points on the margin of the leaf [Wäldchen and Mäder, 2018]. To calculate the diameter of the leaf image, first, we need to find the contour of the leaf image. Then we need to select all pairs of contour points and measure the Euclidean distance between the two points separately. Finally, we have to find the maximum distance among the calculated distances. , the physiological width is "the span of leaf viewed from one side to the other, from the leftmost point to the rightmost point of leaf". There are straight (horizontal or vertical) and angled leaf images in our datasets, Flavia and Swedish (see example Figure 10). There are two types of bounding rectangles.

Physiological length (F
i) Straight bounding rectangle: This is a straight rectangle that does not consider the rotation of the object (see Figure 10 (a)).
ii) Rotated rectangle: This bounding rectangle is drawn with minimum background area. Therefore the rotation of the object is also considered (see Figure 10 (b)).
The straight bounding rectangle is enough to extract the physiological length and physiological width of straight (horizontal or vertical) leaf images. However, the straight bounding rectangle is not suitable to compute the physiological length and physiological width of angled leaf images. To solve this problem, we considered a rotated rectangle rather than a bounded rectangle in computing shape features of angled images. As shown in Figure 11, the length of the rotated rectangle is considered as the physiological length (F 2 ) and the width of the rotated rectangle is considered as the physiological width (F 3 ).

Area (F 4 )
The area is computed after applying the thresholding process. Next, we need to extract the best contour, and based on that contour area is measured. As shown in Figure 12b perimeter is defined as the summation of Euclidean distance of all continuous neighboring points in the contour. Let n be the number of distances around the contour, then the perimeter is defined as

Eccentricity (F 6 )
Eccentricity is a characteristic of any conic section of a leaf [Azlah et al., 2019]. Eccentricity is defined that how much the ellipse actually varying being circular. Eccentricity is calculated using the equation 2 as where a is semi-major axis and b is semi-minor axis (see Figure 12c).
The eccentricity of an ellipse is varied between 0 and 1. If eccentricity is 0, then we obtain a circle whereas eccentricity is 1, then we obtain an ellipse (see Figure 13b).

Number of Convex Points (F 21 ) and Verticies
Wilkinson et al. [2005] defined a convex hull as a "hull that contains all the straight line segments connecting any pair of points in its interior." The convex hull bounds a single polygon (see Figure 12d). We introduced two new features computed based on the convex hull: i) Number of convex points (F 21 ) and ii) Number of convex vertices (F 7 ).

Roundness/ Circularity
Roundness is named as aka form factor, circularity, or isoperimetrical factor. Roundness illustrates the difference between the leaf and a circle. Equation 3 is used to calculate roundness. Figure 13c visual explanation for roundness measure. The roundness is measured by

Compactness
Compactness is closely related to roundness. Compactness measures that how compatible the leaf fits a circle area (see Figure 13d). The compactness is measured using

Convexity
Convexity measures the curvature of the convex hull. The equations and software packages used to compute shape features are shown in Table 2.
Shape feature Feature name Figure  Formula Range Software package Perimeter ratio of physiological length and width

Texture Features
Texture features are used to describe the surface or the appearance of the leaf image. Texture can be assessed using a group of pixels. Color is a property of a pixel. The texture is defined as a feeling of various materials to human touch and texture is quantified based on visual interpretation of this feeling. The leaf surface is a natural texture that has random persistent patterns and does not show detectable quasi-periodic structure [Wäldchen and Mäder, 2018]. Therefore to describe the natural texture patterns of the leaf fractal theory [Wäldchen and Mäder, 2018] is the best approach. The In this study we used Haralick texture features [Dean, 1999]. Haralick texture features are functions of the normalized GLCM (Gray Level Co-occurrence Matrix) is a common method to represent image texture.
The GLCM is square with dimension n, where n is the number of gray levels in the image. Let h(a, b) is the probability that a pixel with value a will be found adjacent to a pixel of value b. Then h(a, b) is defined as h(a, b) = Number of times a pixel with value a is adjacent to a pixel with value b Total number of such comparisons made .
In order to calculate h(a, b), adjacency can be defined to occur in each of four directions in a 2D (see Figure 16), square pixel image (horizontal, vertical, left and right diagonals -see equation 14).
The Haralick statistics are calculated based on the matrices generated using each of these directions (see Figure 15) of adjacency . Haralick introduced 14 statistics to describe the texture of the image based on the four co-occurrences matrices generated [Dean, 1999]. In this research, we only used the following 4 statistics among 14 of them, because most of the researchers used these 4 statistics as texture features (see Figure 3) of leaf images. All the texture features  Table 3 shows the definitions of texture features.  Let h(a, b) = Probability density function of gray -level pairs (a, b) and dimension of GLCM is n × n (Number of columns × Number of rows). The associated measures are given by

Color Features
Color is an important characteristic of images [Wäldchen andMäder, 2018, Caglayan et al., 2013]. Some of the leaf images have very similar shapes like Hathawariya ( Figure 17) and Iramusu (Figure 17). Even though shapes are similar in some leaves, there are some differences in the colors of leaf images. Therefore in addition to the shape features, we extract features related to the color. The colors of an image are formed based on Red-Green-Blue (RGB) colour channels of an image. Color properties are defined within a particular color channel [Kodituwakku andSelvarajah, 2004, Wäldchen andMäder, 2018]. In the field of image recognition, several general color descriptors have been introduced. Color moments [Kodituwakku andSelvarajah, 2004, Wäldchen andMäder, 2018] are the simple descriptor among them. Mean, standard deviation skewness, and kurtosis are the common moments. Color moments are convenient for real-time applications due to their low dimension and low computational complexity. We used mean (M ) and standard deviation (SD) of intensity values of red, green and blue channels as color features. Let h be the number of pixels of the image and r is the channel type which can be red, green, or blue. The corresponding colour features are calculates as follows:

M =
Total insensity value of r th channel of the image pixels Total intensity value of the image , Total intensity value of the image .

Scagnostic features
Scagnostic features are used to quantify the characteristics of 2D scatterplot diagrams [Wilkinson and Wills, 2008]. Scagnostic measures are calculated based on the appearance of the scatterplot. All the scagnostics features are calculated by using the R package called binostics. Scagnostic features have the range of [0,1]. There are 9 measures that are classified into three categories as shown in Figure 18. Based on binary images, scagnostic features are extracted. To the best of our knowledge, this is the first time, the scagnostic features are used for image recognition.

Figure 18: Hierarchy of Scagnostics
We separately measure the scagnostic features based on the cartesian and polar coordinates of the contour (see Figure  19). As the first step, we have to extract the contour of the leaf image (see Figure 19). Then find the x and y coordinate values of the cartesian and polar separately. The x and y coordinate values are used to calculate the scagnostic features.
The following definitions can be useful in understanding scagnostics features. iii) Length of an edge: The Euclidean distance between vertices that are connected to an edge is defined as the length of an edge, length(e).
iv) Length of a graph: The sum of the lengths of edges in a graph is known as the length of a graph, length(Gr).
v) Path: A list of successively adjacent, distinct edges are known as a path. If the first and last vertices coincide, then the path is closed.
vi) Polygon: A region bounded by a closed path is known as a polygon (P ). A polygon bounded by exactly one closed path with no intersecting edges is known as a simple polygon.
vii) The perimeter of a simple polygon: The length of the boundary of a simple polygon is known as the perimeter of a simple polygon. The area of the interior of a simple polygon is known as the area of a simple polygon. The calculation of scagnostic features require identification of the minimum spanning tree, convex hull, and alpha hull.

Minimum Spanning Tree:
The spanning tree of the graph is defined as G (V , E ), where V = V e, E ⊂ Ed and E = |V e| − 1. A graph can have more than one spanning tree. The spanning-tree should not be disconnected and should not contain any cycles. A spanning tree whose total length is least of all spanning trees on a given set of points is known as a Minimum Spanning Tree (MST).

Convex hull and Alpha hull
i) Convex Hull (see Figure 20b): Given a set of points embedded in 2D Euclidean space, the convex hull of the set is the smallest convex polygon that contains all its points.
ii) Alpha Hull (see Figure 20b): The alpha hull is a generalization of the convex hull. It is defined as the union of all convex hulls of the input within balls of radius alpha. In other words, it is a set of piecewise linear simple curves in the Euclidean plane associated with a given set of points in the 2D Euclidean space. An open disk (D(r)) with radius r is used to define the indicator function to identify the associated points. If a point is on the boundary of D then D touches a point and if a point is inside D then D contains a point.

Preprocessing steps related to scagnostic features
To improve the performance of the algorithm and robustness of the measures, preprocessing techniques such as binning and deleting outliers are used before computing geometric graphs related features.

i) Binning
As the first step of binning, the data are normalized to the unit interval. Then use a 40 × 40 hexagonal grid to aggregate the points in each scatterplot. We reduce the bin size by half and rebind until no more than 250 non-empty cells. If there are more than 250 non-empty cells. When selecting the bins two important points to consider are: i) efficiency (too many bins slow down calculations of the geometric graphs) and ii) sensitivity (fewer bins obscure features in the scatterplots). To improve the performance, hexagon binning is used. To manage the problem of having too many points that start to overlap, hexagon binning is used. The plots of hexagonal binning are density rather than points. There are several reasons for using hexagon binning instead of square binning on a 2D surface. Hexagons are more similar to circles than squares. To keep scagnostics orientation-independent this bias reduction is important.
The weight function is defined as where t = n 500 (n is the number of vertex). If n > 2000 then this function is fairly constant. By using hex binning the shape and the parameters of the function are determined. In computing sparse, skewed, and convex scagnostics this weight function is used to adjust for bias.

ii) Deleting Outliers
To improve the robustness of the scagnostics, deleting outliers can be used. A vertex whose adjacent edges in the MST all have a weight (length) greater than ω is defined as an outlier in this context. By considering nonparametric criteria for the simplicity and Tukey's idea choose the following weight calculation is weight = qu 75 + 1.5(qu 75 − qu 25 ), where qu 75 is the 75th percentile of the MST edge lengths and (qu 75 − qu 25 ) is the interquartile range of the edge lengths.

iii) Degree of a Vertex
The degree of a vertex in an undirected graph is the number of edges associated with the vertex. For example, vertices of degree 5 means there are 5 edges associated with each vertex (see Figure 20a).

Definitions of Scagnostic Features
The definitions of scagnostic features are defined as follows. Our notations are as follows: i) Convex hull (CH), ii) Alpha hull (Al) and iii) Minimum spanning tree (M ST ). In the following section, we give a brief description of the calculation of scagnostic measures. For more details on rotation techniques, see Wilkinson and Wills [2008].

Density Measures
i) Outlying: The outlying measure is calculated before deleting the outliers for the other measures. The outlying measure is F sc1 = Total length of edges adjacent to outlying points Total edge length of the MST .
ii) Skewed: The skewed measure is the first measure of relative density, a relatively robust measure of skewness in the distribution of edge lengths. After adaptive binning skewed tends to decrease with n. The skewed measure is calculated using the equations where, and the calculation of weight is given in equation 7.
iii) Sparse: The second relative density measure is a sparse measure that measures whether points in a 2D scatterplot are confined to a lattice or a small number of locations on the plane. The sparse is measured by where the weight function is equation 7 and qu 90 is the 90th percentile of the distribution of edge lengths in the M ST . iv) Clumpy: Clumpiness measures the number of small-scale structures in the 2D-scatter plot (Wilkinson and Wills 2008). In order to calculate this feature another measurement called T is needed which is calculated based on the RUNT graph [Hartigan and Mohanty, 1992]. The clumpy is measured by In the formula below the j value goes over the edges in M ST and k runs over all edges in the RUNT graph.
v) Striated: Striated define the coherence in a set of points as the presence of relatively smooth paths in the minimum spanning tree. This measure is based on the number of adjacent edges whose cosine is less than minus 0.75. The stratified is measured by where V e (2) ⊆ V e and I() be an indicator function.

Scagnostic-based Shape Measures
Both topological and geometric aspects of the shape of a set of scattered points is considered. As an example, a set of scattered points on the plane appeared to be connected, convex, and so forth, want to know under the shape measures. By definition scattered points are not like this. Therefore to make inferences additional machinery (based on geometric graphs) is needed. By measuring the aspects of the convex hull, the alpha hull, and the minimum spanning tree is determined. i) Convex: The ratio of the area of the alpha hall (Al) and the area of the convex hull (CH) is the base of measuring convexity. The convex is measured by where the weight function is equation 7.
ii) Skinny: Skinny is measured by using the corrected and normalized ratio of perimeter to the area of polygon measures. The skinny is measured by iii) Stringy: A skinny shape with no branches is known as a stringy shape. By counting the vertices of degree 2 in the minimum spanning tree and comparing them to the overall number of vertices minus the number of single-degree vertices, a skinny measure is calculated. To adjust for negative skew in its conditional distribution of n, cube the stringy measure. The stringy is measured by where V e is the number of vertices.

Association Measure
Symmetric and relatively robust measures of the association are interested. To assess the monotonicity in a scatter plot, the squared Spearman correlation coefficient is used. In calculating monotonicity, the squared value of the coefficient is considered to remove the distinction between positive and negative coefficients. The reason is, the researchers are more interested in how strong the relationship is rather than their direction (negative or positive).

Number of Minimum (F 8 ) and Maximum Points (F 9 )
Number of minimum, and maximum points are new measures that are obtained from the polar coordinate of leaf contour. The number of global maximum points (F 8 ) and the number of global minimum points (F 9 ) are also considered as features.

Correlation of Cartesian Contour (F 10 )
Correlation is another new feature computed based on the cartesian contour. The measure is calculated as where (x i , y i ) is the coordinate of cartesian contour and m is the number of points in the cartesian contour 4 Empirical Application

Data sets
We use two publicly available datasets to demonstrate the applications of features. They are i) Flavia leaf image dataset and ii) Swedish leaf image dataset

Flavia Leaf Image Dataset
The Flavia dataset contains 1907 leaf images. There are 32 different species and each has 50-77 images. Scanners and digital cameras are used to acquire the leaf images on a plain background. The isolated leaf images contain blades only, without a petiole. These leaf images are collected from the most common plants in Yangtze, Delta, China [Wäldchen and Mäder, 2018]. Those leaves were sampled on the campus of the Nanjing University and the Sun Yat-Sen arboretum, Nanking, China [Wäldchen and Mäder, 2018] available at https://sourceforge.net/projects/flavia/files/ Leaf%2520Image%2520Dataset/.

Swedish Leaf Image Dataset
The Swedish dataset contains 1125 images. The images of isolated leaf scans on a plain background of 15 Swedish tree species, with 75 leaves per species. This dataset has been captured as part of a joined leaf classification project between the Linkoping University and the Swedish Museum of Natural History [Wäldchen and Mäder, 2018] available at https://www.cvl.isy.liu.se/en/research/datasets/swedish-leaf/.
We applied the aforementioned image processing techniques and computed features from each image.

Visualization of ability of features to distinguish classes of interest
In order to identify the ability of features to distinguish classes of interest, we first label features according to their shapes as i) diamond, ii) heart shape, iii) needle shape, iv) simple round, and v) round shape (see Figure 2b). We explore the ability of features to classify images under supervised learning settings and unsupervised learning settings. For this purpose, we use Linear Discriminant Analysis (LDA) and Principal Component Analysis (PCA). LDA is a supervised dimensionality reduction technique, and PCA is an unsupervised dimensionality reduction technique.
In this section, we visualize and compare the results obtained using LDA, and PCA on Flavia and Swedish datasets.
To compute the LDA projection shape label is taken as the response variable. There are 5 main shape categories as: diamond, simple round, round, needle, and heart shape.
We further explore the ability of our features to classify classes when there is a moderately large number of class labels. For that, we label the leaves according to their species type. In the Swedish data set, there are 12 species-wise class categories while the Flavia data set contains 32 species-wise class categories. Both PCA and LDA approaches were used to explore the class separability visually. To explore the class separability of species in the PCA space, we colour the points according to their species labels. For the corresponding LDA analysis, we use species class labels as the response variable.

Swedish Dataset
The visualization of PCA projections of the Swedish dataset is shown in Figure 22. The first three principal components (PCs) accounting for approximately 43% of the total variance in the original data, while the first 5 PCs account for 66% of the total variance in the original data. Hence, the first five PCs are plotted against each other to visualize data in the PCA space. The LDA projections of Swedish data are shown in Figure 23. According to the LDA results on the Swedish dataset, LDA1, LDA2, and LDA3 show a clear separation of shapes of leaf images.

Flavia Dataset
The LDA projections of Flavia data are shown in Figure 25. The visualization of PCA projections of the Flavia dataset is shown in Figure 24. The first three principal components (PCs) accounting for approximately 49% of the total variance in the original data, while the first 5 PCs account for 64% of the total variance in the original data. Hence, the first five PCs are plotted against each other to visualize data in the PCA projection space. According to the LDA results on the Flavia dataset, LDA1, LDA2, and LDA3 shows a clear separation of shapes of leaf images. Under both experimental settings, class separation is more clearly on the LDA space than the PCA space. The reason could be LDA is a supervised learning algorithm while PCA space is an unsupervised learning algorithm.  numbers of class labels and a large number of class labels. The PCA and LDA coefficients for shape-wise classification and species-wise classifications are shown in Table 4 and Table 5 respectively.

Discussion and Conclusions
In this paper we introduce computer-aided, interpretable features for image recognition. There are four main categories of features that are used to classify leaf images. Many research was based on shape, color, and texture-based image features. In this research paper, we introduce a new feature category called scagnostics for image classification. Other than that correlation of cartesian coordinate, number of convex points, number of minimum and maximum points are introduced as new shape features. We explore the ability of features to discriminate the classes of interest under supervised learning and unsupervised learning settings using principal component analysis and linear discriminant analysis. Under both experimental settings, a clear separation of classes is visible in their projection spaces. In our next paper, we introduce a meta-learning algorithm to classify plant species using the features introduced in this paper. A more detailed look at the most important features and approach of classification plant species will be presented in our next paper. We hope our analysis opens various research agendas in the field of image recognition. Reproducible research code to reproduce the results of this paper and codes to compute features are available here: https://github.com/SMART-Research/leaffeatures_paper.