Next Article in Journal
Two Generic Convergence Results for Infinite Products of Generalized Nonexpansive Mappings
Previous Article in Journal
Removal and Recovery of the Human Invisible Region
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fast Treetops Counting Using Mathematical Image Symmetry, Segmentation, and Fast k-Means Classification Algorithms

by
Eduardo Orbe-Trujillo
1,2,
Carlos J. Novillo
1,
Miguel Pérez-Ramírez
3,
Jose Luis Vazquez-Avila
2 and
Agustín Pérez-Ramírez
2,*
1
Research Group on Technologies for Landscape Analysis and Diagnosis (TADAT), Department of Chemical and Environmental Technology, ESCET, Rey Juan Carlos University, C/Tulipán s/n, Mostoles, 28933 Madrid, Spain
2
Telecommunications Academic Group, Mechatronics, Engineering Faculty, Universidad Autónoma del Carmen, Cd. del Carmen, Campeche 24180, Mexico
3
Instuto Nacional de Electricidad y Energías Limpias, Reforma 113, Cuernavaca, Morelos 62490, Mexico
*
Author to whom correspondence should be addressed.
Symmetry 2022, 14(3), 532; https://doi.org/10.3390/sym14030532
Submission received: 28 December 2021 / Revised: 23 February 2022 / Accepted: 1 March 2022 / Published: 4 March 2022

Abstract

:
Forests are important because they contribute to biodiversity, regulation of carbon dioxide, protection of hydrographic basins, wood production. This article presents a methodology for fast and effective counting of treetops using the mathematical symmetry of the grayscale image. For the treetop counting, the unsupervised k-means classification Algorithm was used with two groups or centroids: treetop and not-treetop. By using these groups and the mathematical symmetry of the image, a fast k-means classification Algorithm is generated. To solve the problem of treetop overlapping and perform a more accurate counting, the watershed Algorithm was used. This methodology has a mean treetop count accuracy of 98.3% with a confidence level of 99% in the interval (97.31, 99.7). Aerial images of the coniferous forest of Alcudia, Mallorca, Spain were used. Forests attenuate climatic changes originated by global warming. Drastic climatic changes cause catastrophes to humanity. This research would help the automatic, massive and recurring counting of treetops with the aim of obtaining forest inventories in order to take care of forests.

1. Introduction

The objective of this research is to present a methodology for fast and effective counting of treetops. Counting treetops using fast Algorithms saves a lot of time, work and is very useful in forest inventories; they give us precise information on the mapping or location of trees and timber resources [1]. Forests mitigate climate change caused by global warming. Drastic climate changes can cause catastrophes for humanity and the planet’s ecosystem in general [2,3]. Therefore, it is necessary to protect and take care of the forests. For better taking care of forests, it is necessary to have forests inventories [4,5,6].
Currently, the automatic counting of treetops is carried out by using satellite images [7,8,9], aerial images [5] or lidar data [10,11,12]. This work was carried out by using aerial images [13,14,15,16,17,18,19] because of their low cost [15].
Aerial digital images are decomposed into three RGB planes (red, green, blue), each plane is a grayscale image [20]. A grayscale image is defined as a function f : x 0 ,   255 (where is the set of natural numbers). One of the main problems in image analysis is the automatic recognition of objects within an image. In order to achieve this automatic recognition, several processes are generally carried out on the image, such as: preprocessing (to eliminate noise or unwanted information), classification and segmentation [21,22,23].
This paper presents a methodology for fast treetop counting by using the mathematical symmetry of the image. The mathematical symmetry of an object is a set of permutations in such a way that when applied to the object it remains invariant [24,25]. Mathematical symmetry is used to optimize the calculation processes, an example of this is the fast Fourier transform [26].
In this research, the existing mathematical symmetry in the digital image and machine learning Algorithms were integrated to perform the automatic treetop counting. Machine learning is a set of Algorithms or methods that extract patterns from data in order to optimally solve problems. Another goal of machine learning technology is for machines to make sense of data in the same way that humans do. Machine learning can be supervised and unsupervised [27]. Machine learning is very fast and even faster when implemented using parallel programming and can be used in real-time prediction [28,29,30], and it is also scalable with large data sets [31,32,33,34]. In this research, it is proposed to use an unsupervised k-means Algorithm with only two centroids and the watersheds Algorithm to solve the treetops overlap problem. The input to the proposed counting system is an image containing a number of treetops and the output is the approximate number of treetops.
In general, some of the problems in counting treetops to obtain forest inventories are the following: if the counting is carried out walking into the forests, it is tiring, dangerous and very expensive. Another problem is: the visual and manual treetop counting based on aerial or satellite images is also tiring, time-consuming and often incorrect. On the other hand, a problem in automatic treetop counting systems is the overlapping of the treetops, which decreases the counting accuracy. All the above problems arise again when the treetop counting must be carried out massively and recurrently to create or update forest inventories.
Automatic treetop counting systems are needed because forests play a fundamental role in hydrological and carbon cycles. Forests are a main indicator of the state of an ecosystem and provide us with information to understand climate change [35]. Given the global climate changes partially originated by reduction of forests, it is necessary to investigate the effects of damages caused on the different ecosystems [36,37]. For this, we must rely on precise indicators of forests and environmental conditions [38]. Forests mitigate climate change; but on the other hand, climate change affects forests such as increasing severity of insect pests, forest decline and alteration of phenological parameters in crops. Automatic treetop counting systems can provide us with accurate indicators about forests. These systems can be used intensively to cope with massive and recurring counting of treetops needs.
The objective of this proposal is to present a methodology for fast and effective treetop counting. In this methodology, a fast-unsupervised k-means Algorithm is proposed to classify the pixels of the image into treetop and not treetop. To create the fast k-means Algorithm, the mathematical symmetry of the image and the characteristics of the images to be processed were used. Then, the watersheds Algorithm was applied to the image to eliminate the treetops overlapping. The images are aerial images of the coniferous forest located in the region of Alcudia, Mallorca, Spain.
In this proposed methodology, the following results were obtained:
  • The mathematical symmetry in grayscale images, the proposal to use only two centroids in the k-means Algorithm and the analysis of the images to be processed allowed us to reduce the computational complexity of the k-means Algorithm.
  • The low computational complexity of the k-means Algorithm proposed in this work provides a time advantage over the standard k-means Algorithm. The values of the centroids found by both k-means Algorithms (standard and proposed) are approximately equal.
  • The application of the k-means and watersheds Algorithms allowed us to improve treetop counting.
  • This methodology has a mean treetop counting accuracy of 98.3% with a confidence level of 99% in the interval (97.31, 99.7).
  • This methodology has a mean F1-score of 98%, a mean recall of 97.67% and a mean AUC of 0.98.
  • Having mentioned the two previous points, this methodology sound and reliable for the automatic counting of treetops.
In order to measure the effectiveness of the automatic treetop counting system, manual treetop counts based on images were compared with the counts made by the system. Furthermore, the trees were also physically counted in order to know the real number of trees.
The remaining sections are organized as follows: Section 2 describes the mathematical symmetry of the images, the related works, and presents the proposed methodology. Section 3 provides development details of the proposed methodology, here also three k-means classification Algorithms are proposed and compared. Section 4 presents the results of the proposal, comparing computation times and accuracy of the centroids with respect to the standard k-means Algorithm and evaluating the results of the treetop counts. Then the main conclusions are included followed by a list of references.

2. Description of the Methodology and Related Works

One of the main problems in treetop counting using satellite or aerial images is the treetops overlapping and the counting time. This work was realized by using aerial images. These images are decomposed into three RGB planes (red, green, blue); each plane is a grayscale image [20]. The methodology proposed in this work, for fast treetop counting, consists of the application of an optimized k-means Algorithm. To apply the k-means Algorithm we use the mathematical symmetry of the image and classify the pixels that belong to treetop and not treetop, that is, only two centroids c 1 and c 2 were searched for, then a watershed Algorithm with 8 connected pixels was applied. The watersheds Algorithm separates overlapping treetops.
The mathematical symmetry of an object is a set of permutations in such a way that when applied to the object it remains invariant [24]. In a grayscale image f : x [ 0 ,   255 (where is the set of natural numbers) mathematical symmetry can be observed in pixels that have equal gray values. These pixel values can be swapped in position without the image changing its appearance. The pixels with the same gray levels can be grouped to reduce the number of calculations when applying some Transform on the image [25].
The total gray levels in a digital image go from 0 to 255. In most digital images f of size Q , it holds that P x Q > 256 . Therefore, by the Dirichlet principle [39] there will always be pixels with repeated gray level values. In this way, it is ensured that in a grayscale image there is mathematical symmetry [40,41,42,43].
In order to use the mathematical symmetry in some mathematical calculation or computational process of an image, it is necessary to calculate the maximum mathematical symmetry group of the image [41]. Mathematically, images can be 2-dimensional, 3-dimensional, or n-dimensional. In general, an n-dimensional image with m colors can be represented as a set of tuples A.
A = x 1 , x 2 , , x n ;   c 1 , c 2 , , c m
where x 1 , x 2 , x 3 , , x n are the pixels coordinates of an n-dimensional image and c 1 , c 2 , c 3 , , c m are the components of the color vector of each pixel. The elements of the set A are the tuples that represent all the pixels of the image. The place of the tuple in the set A represents the place of the corresponding pixel in the image.
Since we work with gray levels images, we would have a single component in the color vector. Therefore, without losing generality, we have the following:
A = x 1 , x 2 , , x n ;   c
Suppose that N 1 , N 2 , , N n is the size of each dimension; then:
x 1 = 1 , , N 1 x 2 = 1 , , N 2 x n = 1 , , N n c = 0 , 1 , 2 , M 1
Therefore, the set A can be partitioned according to color, as follows:
A = A 0 A 1 A 2 A M 1
where
A i = x 1 i , x 2 i , , x n i ; i , i = 0 , 1 , , M 1
And ⊕ is the group direct addition operator. Then factoring out the color A i can be represented as follows:
A i = i x 1 i , x 2 i , , x n i ; i = i B i
where * is the multiplication operation of real numbers.
B i = x 1 i , x 2 i , , x n i ; 1 , for   i = 0 , 1 , , M 1
Therefore, in (6) the factor i multiplies only the last element of the tuple, which is the color. The sets B i ( i = 0 , 1 , 2 , , M 1 )) can be considered as a basis that represent the image as follows:
A = B 0 i = 1 M 1 i B i
B 0 is the set of pixels in the image with a gray level of zero. Equation (8) allows defining a maximum symmetry group (G) of the image:
G = S 0 c a r d A 0 × S 1 c a r d A 1 × × S M 1 c a r d A M 1
where c a r d A i is the total number of elements in A i . S i c a r d A i = S i is a symmetry group (permutation group) defined over A i   or B i ( i = 0 , 1 , 2 , ,   M 1 ).
It is evident that applying the group S i to the sets A i or B i (considered as a set of pixels) modifies the position of each pixel but does not alter the corresponding images that are related to the set of tuples A i or B i . Applying group G to the image does not produce any change in it. Therefore
G A = S 0 B 0 + i = 1 M 1 i S i B i = B 0 + i = 1 M 1 i B i = A
According to (8), the image can be declared as the sum of partial images B i ( i = 0 , 1 , 2 , , M 1 ).
These properties of the mathematical symmetry of the grayscale image are used in the k-means Algorithm to find the centroids. In each iteration of the k-means Algorithm, to search for two centroids, a complete traversal of the image has to be performed. In the proposed Algorithm, which uses the mathematical symmetry of the image and two centroids, in each iteration the proposed k-means Algorithm (below in Section 3) only performs an addition and a division to determine to which class a gray level belongs (lines 4–14 of Algorithm 1, lines 11–20 of Algorithm 2 and line 14 of Algorithm 3).

2.1. Related Work

K-means Algorithm has been used in the treetop detection and counting. It also has been optimized in different ways. Some examples of related work are the following: In [44] an optimized k-means Algorithm searches for the invariant centroids in each iteration avoiding thus redundant calculations, but they do not use mathematical symmetry in the elements to be classified. The use of the existing mathematical symmetry in the objects manipulated in the processes allows us to obtain fast Algorithms.
In [45] they use the mathematical symmetry of the image, but they do not optimize the search for the centroids as in [44,46]. In [47] k-means and particle swarm are related to search for centroids. In [48] he obtains the centroids optimally for 2 classes but does not use the mathematical symmetry of the image. In [49] a methodology is proposed to choose the initial centroids and solve the problem of the k-means Algorithm when it is trapped in a local minimum, however, our Algorithm does not have this problem even though the two initial centroids are equal.
In [50], first, the treetops are obtained through a filter, then the watersheds are applied, finally, the k-means Algorithm is applied to segment the treetops from coarse to fine. The number of trees is the number of centroids in the k-means Algorithm. In our proposal, the number of centroids is not the number of cups. Furthermore, the computational complexity of our Algorithm is independent of the number of treetops found in the image and is also independent of the size of the image.
In [51] the detection of treetops is carried out with the inverse methodology that in [50], that is, they apply the k-means Algorithm to obtain the center of each crown and subsequently optimize the Algorithm of watersheds with the mean and variance. In [51] they use LiDAR data and the k-means Algorithm, but they do not optimize it, in our proposal we use aerial images and optimize the k-means Algorithm.
In [52,53] point out that, the k-means Algorithm in conjunction with Deep Learning methods are some of the best tree counting and classification Algorithms. In [54] the 3D methods to identify trees in a forest are presented, some of the methods mentioned in [54] use 2D image processing Algorithms in a dots cloud. These 3D methods also use the k-means Algorithm to classify treetops, but these methods do not use mathematical symmetry.

2.2. Proposed Methodology

This Section presents the flowchart and the steps of the proposed methodology to classify treetops, based on mathematical symmetry of images and the proposal to use only two centroids. These considerations allowed us to obtain a fast k-means classification Algorithm.
The images are aerial images of the coniferous forest located in the region of Alcudia, Mallorca, Spain.
The methodology used for counting treetops is the following:
  • Image preprocessing.
    (a)
    Obtaining the grayscale image.
    (b)
    Apply the medium filter to the grayscale image.
  • Classification using the fast k-means Algorithm.
    (a)
    Apply the fast k-means Algorithm using the mathematical symmetry of the image and the classification conditions of treetop and no treetop.
    (b)
    Apply the opening operation.
  • Image segmentation applying watersheds.
    (a)
    Segment the image using watershed by flooding.
    (b)
    At the same time that the image is segmented, count the treetops.
Figure 1 shows the blocks diagram of the proposed methodology, this diagram also indicates the preprocessing steps performed on the digital image containing the treetops.
A color image has 3 RGB planes (red, green, blue). Vegetation reflects the wavelengths corresponding to the color green. Therefore, the green plane was taken to process the image. Several tests were carried out and it was found that the green plane shows greater uniformity of gray levels and higher values of gray levels in the regions where the treetops are found [55]. This decreases over-segmentation by applying the watershed Algorithm, obtaining greater accuracy in treetop counting. When using the red and green planes, there is less accuracy in the counting.
The green plane is a grayscale image. To eliminate the noise in this image, the means filter [40] was applied. By doing thus, the k-means Algorithm [44] was more effective. The input to the k-means Algorithm is a gray level image and the output is a segmented binary image.
Pixel classification based on gray level was performed by using the optimized unsupervised k-means Algorithm [45]. This optimization is achieved by the mathematical symmetry found in all gray level images [40,41,42]. The groups used to classify the objects within the image are: treetop and non-treetop. Once the image has been classified, a segmented binarized image is obtained. The bushes are smaller than the treetops. In order to eliminate the bushes, an opening operation is applied to the segmented binary image. The opening operation was applied with a 3 × 3 structural element, with all its elements having a value of one.
The coordinates of the black pixels of the classified image were used to form a new image. In the new image at these coordinates the gray levels of the original image were assigned. In this new image, all pixels were assigned a value of 255 (white) except the coordinates of the classified image.
The watershed Algorithm was applied to this last grayscale image to segment and count the treetops. Watersheds were used to solve the treetops overlapping problem and make the treetop counting more accurate.

3. Development

In this section, three k-means Algorithms are presented, and they use only two centroids. The first k-means Algorithm (standard k-means) does not use the mathematical symmetry of the image, the second k-means Algorithm makes use of the mathematical symmetry of the image, the third k-means Algorithm uses the mathematical symmetry of the image and takes advantage of the fact that only two centroids are calculated.
In this study, it was found that one of the properties of the k-means classification Algorithm using only two centroids is that: given two images A, B of the same size (n × m). If image A contains p treetops and image B contains q treetops such that p >> q, the k-means Algorithm uses the same computation time on each of the images to perform the treetop classification. Therefore, the computational complexity does not depend on the number of treetops to be counted, but on the size of the image.
Mathematical symmetry is used to eliminate redundant calculations and optimize processes [41,42]. By eliminating redundant calculations, processes are performed in less computing time. In this work, the centroids sought c 1 (it is a treetop) and c 2 (it is not a treetop) are gray levels. If f n x m is a grayscale image, then to obtain c 1 , p × n × m subtractions would have to be performed (where × is the multiplication operation and p is the total number of iterations carried out by the Algorithm until the centroids are found). If the value of n and m are of the order of megabytes, then the computation time is very long. Using the mathematical symmetry of the image, the k-means Algorithm performs very few operations in each iteration (see Table 1), regardless of whether n and m have values of the order of megas or teras. Then we have that n × m 255 and therefore the computation time is much less when using the mathematical symmetry of the grayscale image.
Then the advantages of Algorithm 2 and 3 with respect to Algorithm 1 (standard k-means) is that they use the mathematical symmetry of the grayscale image and therefore the computational complexity is reduced and the computational time in the process of classification. On the other hand, the advantage of Algorithm 3 with respect to Algorithm 2 is that Algorithm 3 takes advantage of the reduced number of centroids and the mathematical symmetry of the image to reduce a little more complexity and computation time. The k-means Algorithms applied to the grayscale image are shown below. The internet link of the document that contains the functions in Matlab that implement these Algorithms are in Appendix A.
Algorithm 1 (Standard Algorithm)
Inputs: grayscale image bnxm, N (total number of iterations)
Output: dnxm segmented binary image
[n, m] = size(b), n and m are respectively the total rows and columns of b
1Randomly obtain two different centroids c1 and c2 (c1 and c2 are gray levels of the image)
2 ε = 10 6
3for k = 1 to N
4    s1 = 0
5    n1 = 0
6    s2 = 0
7    n2 = 0
8    for i = 1 to n
9     for j = 0 to m
10     p = abs(b(i,j)-c1)
11     q = abs(b(i,j)-c2)
12     if(p < q)
13       s1 = s1 + b(i,j)
14       n1 = n1 + 1
15     else
16       s2 = s2 + b(i,j)
17       n2 = n2 + 1
18     end
19   end
20    c u 1 = s 1 / n 1
21    c u 2 = s 2 / n 2
22   if(abs(c1-cu1) ≤ ε and abs(c2-cu2) ≤   ε )
23    break
24   end
25   c 1 = c u 1
26   c 2 = c u 2
27end
28for u = 1 to n
29 for v = 1 to m
30  p = (c1-b(u,v))
31  q = (c2-b(u,v))
32  if(p ≤ q)
33   d(u,v) = 0
34  else
35   d(u,v) = 255
36  end
37 end
38end
Algorithm 2 (Using Mathematical Symmetry)
Inputs: grayscale image b, N(total number of iterations)
Output: segmented binary image
[n, m] = size(b), n and m are respectively the total rows and columns of b
1Obtain histogram of image h; h is an array of 256 locations.
2Randomly obtain two different centroids c1 and c2 (c1 and c2 are gray levels of the image)
3 ε = 10 6
4tg = 0
5for i = 1:256
6 tg = tg + (i-1)*h(i)
7end
8 t = n m
9for k = 1 to N
10   %Find all gray levels closest to c1
11   s1 = 0
12   n1 = 0
13   for i = 0 to 255
14     p = abs(i-c1)
15     q = abs(i-c2)
16     if(p<q)
17      s1 = s1 + i*h(i+1)
18      n1 = n1 + h(i+1)
19    end
20   end
21    c u 1 = s 1 / n 1
22    c u 2 = t g s 1 / t n 1
23   if(abs(c1-cu1) ≤   ε and abs(c2-cu2) ≤   ε )
24     break
25   end
26    c 1 = c u 1
27    c 2 = c u 2
28end
29d = zeros(n,m)   % create an array filled with zeroes
30for i = 1 to n
31  for j = 1 to m
32   p = abs(b(i,j)-c1)
33   q = abs(b(i,j)-c2)
34   if(p ≤ q)
35    d(i,j) = 0
36   else
37    d(i,j) = 255
38   end
39  end
40end
Algorithm 3 (Proposed Algorithm)
Inputs: grayscale image bnxm, total N of iterations
Output: dnxm segmented binary image
[n, m] = size(b), n and m are respectively the total number of rows and columns of b
1Obtain histogram (h) of the image; h is an array of 256 locations.
2Randomly obtain two different centroids c1 and c2 (c1 and c2 are gray levels of the image)
3 ε = 10 6
4 a h 1 = h 1
5for k = 2 to 256
6 a h k = a h k 1 + h k
7end
8 a s 1 = 0
9for k = 2 to 256
10   a s k = a s k 1 + k 1 h k
11end
12for i = 1 to N
13    % find all gray levels closest to c1
14    w = floor((c1 + c2)/2)
15     c u 1 = a s w / a h w
16     c u 2 = a s 256 a s w / a h 256 a h w
17    if(abs(c1-cu1) ≤   ε and abs(c2-cu2) ≤   ε )
18      break
19    end
20     c 1 = c u 1
21     c 2 = c u 2
22end
23 d = zeros(n,m)
24for i = 1 to n
25  for j = 1 to m
26   p = abs(c1-b(i,j))
27   q = abs(c2-b(i,j))
28   if(p < q)
29     d(i,j) = 0
30   else
31     d(i,j) = 255
32   end
33 end
34end
Algorithm 1 can be improved by using the mathematical symmetry found in all grayscale images. This mathematical symmetry is implemented using the histogram of the image.
Algorithm 2 can be improved by using the mathematical symmetry found in all grayscale images and the following properties:
(a)
We want to classify only two groups: treetop and no-treetop. Let c1 and c2 be the centroids of each group. c1 and c2 are integer values of gray levels, that is, c1,c2 ∈ [0.255].
(b)
The gray values of the pixels that form the treetops are always lower than the values of the pixels of other objects (roads, sand). The objects have a different color than the background [56].
(c)
Without losing generality let c1 < c2. Let p = (c1 + c2)/2. Then all pixels with gray levels g such that g ≤ p will belong to the first group whose centroid is c1, the rest of the pixels in the image will belong to the second group whose centroid is c2. That is, any point less than or equal to p is closer to c1 than to c2.
(d)
In all grayscale images, there is always mathematical symmetry [39,40,41].
Table 1 shows the total number of operations performed by Algorithm 1, Algorithm 2 and Algorithm 3. The number of multiplications and divisions is neglected since for our study N is a small number (N ≈ 11). The number of sums, comparisons and assignments that are a function of N is also neglected (except for Algorithm 2 and Algorithm 3, since the difference in computational complexity between them is not very large). However, the sums, comparisons and assignments that are a function of n and m are counted, since n × m is of the order of megabytes.
Once the image was classified, the next step was to apply the open operation to the binary image to remove the bushes. Then, the problem of the overlap between the treetops was solved and counted more accurately. To do this, immersion watersheds with 8-connected neighbors were used [54].
The immersion watershed was implemented by image labeling [20,57,58] and using 8-connected neighbors. Each basin found was counted and in this way, the Algorithm for segmentation and counting of treetops was optimized. That is, at the same time that the image was segmented, the tops of the trees were counted. In order to eliminate bushes, the images were analyzed, and it was determined that a treetop must have a minimum of 70 pixels, that is, only the basins that had more than 70 pixels were counted.

4. Outcomes

This section presents the outcomes of the treetop counts carried out in the RGB planes of the image. That is the results of the proposed methodology, as well as the times of each k-means Algorithm (Algorithm 1, Algorithm 2 and Algorithm 3). The comparison of the centroids found by each k-means Algorithm is shown. Finally, the counting effectiveness for different images is presented. For a fair comparison among the three Algorithms, the centroids in each of them c1 and c2 are initialized with the values of 92 and 163 respectively.
Several tests were also carried out to choose the image plane to work with according to [55], and based on the results obtained, the green plane was chosen. Figure 2 shows the counts made in the different image planes (RGB). In this figure, it can be seen that by using the green plane we obtain greater precision in the treetop counting. In Figure 2b (green plane) 86 of 87 treetops were counted, in Figure 2c (blue plane) 104 of 87 treetops were counted, in Figure 2d (red plane) 100 of 87 treetops were counted.
Figure 3 shows the results of the proposed methodology. Figure 3a shows the original image. Figure 3b shows the image in gray scale, it is the green plane of image 3a. The proposed k-means Algorithm was applied to image 3b and the result is shown in Figure 3c. Figure 3d shows the result of applying the opening operation to the image shown in Figure 3c. Figure 3e shows the image shown in 3d with the gray levels of image 3b except for the white pixels. The watersheds Algorithm was applied to the image shown in Figure 3e to be able to count and separate the overlapping treetops, the result is shown in Figure 3f.
The execution times (in seconds) of each of the k-means Algorithms are presented in Table 2. Image 2 mentioned in Table 2 is a 12 × 12 image of the image shown in Figure 2a. Image 2 size is 12,000 × 12,000 pixels. Image 2 was used to more clearly see the execution time difference between Algorithm 1, Algorithm 2 and Algorithm 3.
Table 3 shows the centroids calculated by each of the k-means Algorithms. In Algorithm 3 the centroids vary with respect to Algorithm 1 and Algorithm 2 by one grayscale unit value. Therefore, there is a relative error of 1.5% with respect to Algorithm 1 and 2. However, the proposed Algorithm 3 is approximately 1.8 times faster than Algorithm 1 (see Table 2).
The proposed methodology was applied to different images. Figure 4 shows the treetop counting in three different images. In Figure 4a the original image is shown in Figure 4b the resulting count is shown, the same was done for Figure 4c–f. Table 4 shows the counting effectiveness for each image in Figure 4. In order to measure the effectiveness of the treetop counting system, the counts made manually in treetops images were compared with the counts made by the system. This methodology has a mean treetop counting accuracy of 98.3% with a confidence level of 99% in the interval (97.31, 99.7).
To evaluate this methodology, several metrics were calculated. This treetop counting methodology has an average F1-score of 98% and an average recall of 97.67%. The ROC curve was constructed [59,60], which is shown in Figure 5 with a mean AUC of 0.98. With the values of the previous metrics, it is concluded that the proposed methodology is sound and reliable for treetop counting.
Thus far, the outcomes of our methodology have been shown when applied to aerial images, however, this methodology can also be used with LiDAR data. To do so, 2D images must be obtained from the LiDAR data using interpolation techniques, as is done in [61]. On the other hand, this methodology can be applied to the analysis, classification and segmentation of Synthetic Aperture Radar (SAR) images [62,63]. In addition, this methodology can be applied to holographic particles counting [64].

5. Conclusions

In this new treetop counting methodology, the k-means Algorithm uses only two centroids. Using only two centroids allowed us to optimize the k-means Algorithm. In addition, the mathematical symmetry in the grayscale images and the analysis of the images to be processed allowed us to reduce the computational complexity of the k-means Algorithm. One of the main findings is that the time that the k-means Algorithm uses to classify the treetops is independent of the number of treetops found in the image but is dependent on the size of the image. However, using the mathematical symmetry of the image, the k-means Algorithm in each iteration performs only 255 × 4 subtraction operations and one multiplication operation regardless of the size of the image. On the other hand, the k-means Algorithm that uses mathematical symmetry and takes advantage of the fact that only two centroids will be obtained only uses a division and an addition to determine to which class a gray level belongs. Preprocessing before applying the k-means Algorithm is very important as it helps us to obtain better classification results. Additionally, after applying the k-means Algorithm to the image, the size of the structural element in the opening operations allowed us to remove the small bushes. The application of the k-means and watersheds Algorithms allowed us a better count of the tree crowns. In this methodology, an average accuracy of 98.3% tree crown count was obtained with a confidence level of 99% in the interval (97.31, 99.7). This methodology has a mean F1-score of 98%, a mean recall of 97.67, and a mean AUC of 0.98. Therefore, the proposed methodology is reliable. This methodology could also be applied to: LiDAR data, Synthetic Aperture Radar (SAR) images or holographic particle counting. However, this methodology does not allow us to detect the classes of trees. In future works, the proposed methodology for denser forests will be improved. On the other hand, in this methodology, one of the processes that uses more computing time is the media filter, in future works it will also be optimized.

Author Contributions

Conceptualization, C.J.N.; methodology, E.O.-T. and A.P.-R.; software, E.O.-T. and A.P.-R.; validation, C.J.N. and M.P.-R.; formal analysis, E.O.-T. and A.P.-R.; investigation, M.P.-R. and J.L.V.-A.; resources, E.O.-T. and C.J.N.; writing—original draft preparation, M.P.-R., A.P.-R.; writing—review and editing, M.P.-R. and J.L.V.-A.; funding acquisition, E.O.-T. and C.J.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Ministry of Public Education (SEP) through National Conventional Scholarship for doctoral studies No. PROMEP/103.5/08/3390. The APC was funded by UNACAR (Universidad Autónoma del Carmen).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The internet links of the document that contains the functions in Matlab that implement the Algorithms 1–3 are:

References

  1. Wang, L.; Gong, P.; Biging, G.; Wang, S.L. Individual tree-crown delineation and treetop detection in high-spatial-resolution aerial imagery. Photogram. Eng. Rem. S. 2004, 70, 351–357. [Google Scholar] [CrossRef] [Green Version]
  2. Sam, K.; Chakma, N. Climate Change in the Forest of Bengal Duars Response of Life and Livelihoods, 1st ed.; Springer: Cham, Switzerland, 2021; pp. 42–47. [Google Scholar]
  3. Nunes, L.J.; Meireles, C.I.; Gomes, C.J.P.; Ribeiro, N.; Almeida, M.C. The impact of climate change on forest development: A sustainable approach to management models applied to mediterranean-type climate regions. Plants 2021, 11, 69. [Google Scholar] [CrossRef]
  4. Keren, S. Modeling tree species count data in the understory and canopy layer of two mixed old-growth forests in the dinaric region. Forests 2020, 11, 531. [Google Scholar] [CrossRef]
  5. Chen, G.; Shang, Y. Transformer for tree counting in aerial images. Remote Sens. 2022, 14, 476. [Google Scholar] [CrossRef]
  6. Cimburova, Z.; Barton, D.N. The potential of geospatial analysis and Bayesian networks to enable i-Tree Eco assessment of existing tree inventories. Urban For. Urban Green 2020, 55, 126801. [Google Scholar] [CrossRef]
  7. Sheeren, D.; Fauvel, M.; Josipović, V.; Lopes, M.; Planque, C.; Willm, J.; Dejoux, J.-F. Tree species classification in temperate forests using formosat-2 satellite image time series. Remote Sens. 2016, 8, 734. [Google Scholar] [CrossRef] [Green Version]
  8. Karasiak, N.; Dejoux, J.-F.; Fauvel, M.; Willm, J.; Monteil, C.; Sheeren, D. Statistical stability and spatial instability in mapping forest tree species by comparing 9 years of satellite image time series. Remote Sens. 2019, 11, 2512. [Google Scholar] [CrossRef] [Green Version]
  9. Moussaid, A.; Fkihi, S.E.; Zennayi, Y. Tree crowns segmentation and classification in overlapping orchards based on satellite images and unsupervised learning algorithms. J. Imaging 2021, 7, 241. [Google Scholar] [CrossRef]
  10. Rodríguez-Puerta, F.; Gómez-García, E.; Martín-García, S.; Pérez-Rodríguez, F.; Prada, E. UAV-based LiDAR scanning for individual tree detection and height measurement in young forest permanent trials. Remote Sens. 2022, 14, 170. [Google Scholar] [CrossRef]
  11. Cao, Y.; Cheng, X.; Shan, R.; Li, J.; Yang, Z. A Combination method based on CSF and minimum weighted graph cuts to Determine location and height of individual tree from airborne LiDAR data. In Proceedings of the 40th Asian Conference on Remote Sensing (ACRS 2019), Daejeon, Korea, 14–18 October 2019. [Google Scholar]
  12. Eysn, L.; Hollaus, M.; Lindberg, E.; Berger, F.; Monnet, J.-M.; Dalponte, M.; Kobal, M.; Pellegrini, M.; Lingua, E.; Mongus, D.; et al. A benchmark of lidar-based single tree detection methods using heterogeneous forest data from the alpine space. Forests 2015, 6, 1721–1747. [Google Scholar] [CrossRef] [Green Version]
  13. Onishi, M.; Ise, T. Explainable identification and mapping of trees using UAV RGB image and deep learning. Sci. Rep. 2021, 11, 903. [Google Scholar] [CrossRef] [PubMed]
  14. Sylvain, J.D.; Drolet, G.; Brown, N. Mapping dead forest cover using a deep convolutional neural network and digital aerial photography. ISPRS J. Photogramm. Remote Sens 2019, 156, 14–26. [Google Scholar] [CrossRef]
  15. Michez, A.; Huylenbroeck, L.; Bolyn, C.; Latte, N.; Bauwens, S.; Lejeune, P. Can regional aerial images from orthophoto surveys produce high quality photogrammetric canopy height model? A single tree approach in Western Europe. Int. J. Appl. Earth Obs. Geoinf. 2020, 92, 02190. [Google Scholar] [CrossRef]
  16. Weinstein, B.G.; Marconi, S.; Bohlman, S.; Zare, A.; White, E. Individual tree-crown detection in RGB imagery using semi-supervised deep learning neural networks. Remote Sens. 2019, 11, 1309. [Google Scholar] [CrossRef] [Green Version]
  17. Bipul Neupane, B.; Horanont, T.; Hung, N.D. Deep learning based banana plant detection and counting using high-resolution red-greenblue (RGB) images collected from unmanned aerial vehicle (UAV). PLoS ONE 2019, 14, e0223906. [Google Scholar] [CrossRef]
  18. Cheng, Z.; Qi, L.; Cheng, Y.; Wu, Y.; Zhang, H. Interlacing orchard canopy separation and assessment using UAV images. Remote Sens. 2020, 12, 767. [Google Scholar] [CrossRef] [Green Version]
  19. Hassaan, O.; Nasir, A.K.; Roth, H.; Khan, M.F. Precision forestry: Trees counting in urban areas using visible imagery based on an unmanned aerial vehicle. In Proceedings of the 5th IFAC Conference on Sensing, Control and Automation Technologies for Agriculture AGRICONTROL 2016, Seattle, WA, USA, 14–17 August 2016. [Google Scholar] [CrossRef]
  20. Gonzalez, R.C. Digital Image Processing, 3rd ed.; Prentice Halls: Hoboken, NJ, USA, 2008. [Google Scholar]
  21. Wu, G.; Zhu, Q.; Huang, M.; Guo, Y.; Qin, J. Automatic recognition of juicy peaches on trees based on 3D contour features and colour data. Biosyst. Eng. 2019, 18, 1–13. [Google Scholar] [CrossRef]
  22. Arunkumar, N.; Mohammed, M.A.; Abd Ghani, M.K.; Ibrahim, D.A.; Abdulhay, E.; Ramirez-Gonzalez, G. K-Means clustering and neural network for object detecting and identifying abnormality of brain tumor. Soft Comput. 2019, 23, 9083–9096. [Google Scholar] [CrossRef]
  23. Basha, C.Z.; Pravallika, B.L.; Vineela, D.; Prathyusha, S.L. An effective and robust cancer detection in the lungs with BPNN and watershed segmentation. In Proceedings of the International Conference for Emerging Technology (INCET), Belgaum, India, 5–7 June 2020. [Google Scholar]
  24. Hamermesh, M. Group Theory and Its Applications to Physical Problems; Addison-Wesley: New York, NY, USA, 1962. [Google Scholar]
  25. Maslen, D.K.; Rockmore, D.N. The Cooley–Tukey FFT and group theory. Modern signal processing. MSRI Publ. 2003, 46, 281–300. [Google Scholar]
  26. Proakis, J.G.; Manolakis, D.G. Digital Signal Processing, 4th ed.; Prentice Hall of India: Delhi, India, 2006; pp. 458–480. [Google Scholar]
  27. Kirk, M. Thougthful Machine Learning with Phyton a Test-Driven Approach, 1st ed.; O’Reilly Media: Sebastopol, CA, USA, 2017; ee.uu; pp. 15–19. [Google Scholar]
  28. Mitchell, R.; Adinets, A.; Rao, T.; Frank, E. XGBoost: Scalable GPU accelerated learning. arXiv 2018, arXiv:1806.11248. [Google Scholar]
  29. Kristensen, K.; Nielsen, A.; Berg, C.W.; Skaug, H.; Bell, B.M. TMB: Automatic diferentiation and laplace approximation. J. Stat. Softw. 2016, 70, 1–21. [Google Scholar] [CrossRef]
  30. Rahimi, A.; Recht, B. Random features for large-scale kernel machines. Adv. Neural Inf. Process Syst. 2007, 20, 1–10. [Google Scholar]
  31. Zhao, B.; Lu, H.; Chen, S.; Liu, J.; Wu, D. Convolutional neural networks for time series classification. J. Syst. Eng. 2017, 28, 62–169. [Google Scholar] [CrossRef]
  32. Bergstra, J.; Bengio, Y. Random search for hyper-parameter optimization. J. Mach. Learn. Res. 2012, 13, 281–305. [Google Scholar]
  33. Caraka, R.E.; Lee, Y.; Chen, R.C.; Toharudin, T. Using hierarchical likelihood towards support vector machine: Theory and its application. IEEE Access 2020, 8, 194795–194807. [Google Scholar] [CrossRef]
  34. Arora, P.; Deepali; Varshney, S. Analysis of K-Means and K-medoids algorithm for big data. Procedia Comput. Sci. 2016, 78, 507–512. [Google Scholar] [CrossRef] [Green Version]
  35. Gillison, A.N. Plant functional indicators of vegetation response to climate change, past present and future: I. Trends, emerging hypotheses and plant functional modality. Flora 2019, 254, 12–30. [Google Scholar] [CrossRef]
  36. Li, J.; Wu, C.; Wang, X.; Peng, J.; Dong, D.; Lin, G.; Gonsamo, A. Satellite observed indicators of the maximum plant growth potential and their responses to drought over Tibetan Plateau (1982–2015). Ecol. Indic. 2020, 108, 105732. [Google Scholar] [CrossRef]
  37. Zhang, P.; Cai, Y.; Yang, W.; Yi, Y.; Yang, Z.; Fu, Q. Contributions of climatic and anthropogenic drivers to vegetation dynamics indicated by NDVI in a large dam-reservoir-river system. J. Clean. Prod. 2020, 256, 120477. [Google Scholar] [CrossRef]
  38. Dalle Fratte, M.; Brusa, G.; Cerabolini, B.E.L. A low-cost and repeatable procedure for modelling the regional distribution of Natura 2000 terrestrial habitats. J. Maps 2019, 15, 80–89. [Google Scholar] [CrossRef]
  39. Johnsonbaugh, R. Discrete Mathematics, 6th ed.; Prentice Halls: New York, NY, USA, 2005; pp. 271–273. [Google Scholar]
  40. Armstrong, M.A. Groups and Symmetry; Springer: New York, NY, USA, 1997; pp. 26–61. [Google Scholar]
  41. Pérez-Ramírez, A.; Guerrero-Juk, J.; Sanchez-Lara, R.; Trejo-Sánchez, J.A.; Cruz-May, L. Application of mathematical symmetrical group theory in the creation process of digital holograms. Math. Probl. Eng. 2017, 2017, 7. [Google Scholar] [CrossRef] [Green Version]
  42. Shelomov, E.; Seguel, J.; Ortiz, A.; Ruz, J.; Shelomova, G. Analisis de Fourier en grupos finitos con utilidades de Matlab. In Proceedings of the CINVESTAV, Mexico City, Mexico, 4–5 September 2002; pp. 90–116. [Google Scholar]
  43. Meza-Cruz, O.; Pilatowsky, I.; Pérez-Ramírez, A.; Rivera-Blanco, C.; El Hamzaoui, Y.; Perez-Ramirez, M.; Sanchez, M.A. Modeling a thermochemical reactor of a solar refrigerator by BaCl2-NH3 sorption using artificial neural networks and mathematical symmetry groups. Math. Probl. Eng. 2020, 2020, 9098709. [Google Scholar] [CrossRef]
  44. Poteras, C.M.; Mihaescu, M.C.; Mocanu, M. An optimized version of the K-means clustering algorithm. In Proceedings of the Federated Conference on Computer Science and Information Systems, Warsaw, Poland, 7–10 September 2014. [Google Scholar] [CrossRef] [Green Version]
  45. Benrais, L.; Baha, N. Towards a faster image segmentation using the k-means algorithm on grayscale histogram. Int. J. Inf. Syst. Serv. Sect. 2016, 8, 57–69. [Google Scholar] [CrossRef] [Green Version]
  46. Almerhag, I.; El-Feghi, I.; Dulla, A. A modified K-means clustering algorithm gray image segmentation. In Proceedings of the International Arab Conference on Information Technology (ACIT 2010), Benghazi, Libya, 14–16 December 2010. [Google Scholar]
  47. Lin, Y.; Tong, N.; Shi, M.; Fan, K.; Yuan, D.; Qu, L.; Fu, Q. K-means optimization clustering algorithm based on particle swarm optimization and multiclass merging. Adv. Intell. Syst. 2012, 168, 569–578. [Google Scholar]
  48. Belhaouari, S.B.; Ahmed, S.; Mansour, S.; Milovanovic, G. Optimized K-means algorithm. Math. Prob. Eng. 2014, 2014, 506480. [Google Scholar] [CrossRef] [Green Version]
  49. Barakbah, A.R.; Helen, A. Optimized K-means: An algorithm of initial centroids optimization for K-means. In Proceedings of the Seminar on Soft Computing, Intelligent System, and Information Technology (SIIT), Surabaya, Indonesia, 28–29 July 2005; Petra Christian University: Surabaya, Indonesia, 2005. [Google Scholar]
  50. Yang, J.; Kang, Z.; Cheng, S.; Yang, Z.; Akwensi, P.H. An individual tree segmentation method based on watershed algorithm and three-dimensional spatial distribution analysis from airborne LiDAR point clouds. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2020, 13, 1055–1067. [Google Scholar] [CrossRef]
  51. Mu, Y.; Zhou, G.; Wang, H. Canopy lidar point cloud data k-means clustering watershed segmentation method. ISPRS 2020, 6, 67–73. [Google Scholar] [CrossRef]
  52. Moritake, K.; Dies, Y.; Kentsch, S.; Lopez-Caceres, M.L.; Nguyen, H.T. Detection and classification of trees using deep learning. In Proceedings of the 34th Annual Conference of the Japanese Society for Artificial Intelligence, Kumamoto, Japan, 9–12 June 2020. [Google Scholar]
  53. Serey, J.; Quezada, L.; Alfaro, M.; Fuertes, G.; Vargas, M.; Ternero, R.; Sabattin, J.; Duran, C.; Gutierrez, S. Artificial intelligence methodologies for data management. Symmetry 2021, 13, 2040. [Google Scholar] [CrossRef]
  54. Lindberg, E.; Holmgren, J. Individual tree crown methods for 3D data from remote Sensing. Remote Sens. 2017, 3, 19–31. [Google Scholar] [CrossRef] [Green Version]
  55. Motohka, T.; Nasahara, K.N.; Oguma, H.; Tsuchida, S. Applicability of green-red vegetation index for remote sensing of vegetation phenology. Remote Sens. 2010, 2, 2369–2387. [Google Scholar] [CrossRef] [Green Version]
  56. Zhang, H.; Wang, X.; Chen, Y.; Jiang, G.; Lin, S. Research on vision-based navigation for plant protection UAV under the near color background. Symmetry 2019, 11, 533. [Google Scholar] [CrossRef] [Green Version]
  57. Roerdink, J.B.T.M.; Meijster, A. The watershed transform: Definitions, algorithms and parallelization strategies. Fundam. Inform. 2001, 41, 87–228. [Google Scholar] [CrossRef] [Green Version]
  58. Chung, T.D.; Khan, M.K.A.A. Watershed-based real-time image processing for multi-potholes detection on asphalt road. In Proceedings of the ICSET, Shah Alam, Malaysia, 7 October 2019. [Google Scholar]
  59. Lee, G.N.; Fujita, H. K-means clustering for classifying unlabelled MRI data. In Proceedings of the 9th Biennial Conference of the Australian Pattern Recognition Society on Digital Image Computing Techniques and Applications (DICTA 2007), Glenelg, SA, Australia, 3–5 December 2007. [Google Scholar] [CrossRef] [Green Version]
  60. Narkhede, S. Understanding AUC-ROC curve. Towar. Data Sci. 2018, 26, 220–227. [Google Scholar]
  61. Ashraf, I.; Hur, S.; Park, Y. An investigation of interpolation techniques to generate 2D intensity image from LIDAR Data. IEEE Access 2017, 5, 8250–8260. [Google Scholar] [CrossRef]
  62. Siemiatkowska, B.; Gromada, K. A new approach to the histogram-based segmentation of synthetic aperture radar images. J. Autom. Mob. Robot. Intell. Syst. 2021, 15, 39–42. [Google Scholar] [CrossRef]
  63. Shang, R.; Yuan, Y.; Jiao, L.; Hou, B.; Esfahani, A.M.G.; Stolkin, R. A fast algorithm for SAR image segmentation based on key pixels. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2017, 10, 5657–5673. [Google Scholar] [CrossRef]
  64. Brunnhofer, G.; Bergmann, A.; Klug, A.; Kraft, M. Design and validation of a holographic particle counter. Sensors 2019, 19, 4899. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Blocks diagram of the proposed methodology.
Figure 1. Blocks diagram of the proposed methodology.
Symmetry 14 00532 g001
Figure 2. Treetop counts are shown in the RGB planes of the original image 2a. (a) Original image; (b) Result when using the green plane of a, 86 of 87 treetops were counted; (c) Result when using the blue plane of a, 104 of 87 treetops were counted; (d) Result when using the red plane of a, 100 of 87 treetops were counted.
Figure 2. Treetop counts are shown in the RGB planes of the original image 2a. (a) Original image; (b) Result when using the green plane of a, 86 of 87 treetops were counted; (c) Result when using the blue plane of a, 104 of 87 treetops were counted; (d) Result when using the red plane of a, 100 of 87 treetops were counted.
Symmetry 14 00532 g002
Figure 3. Outcomes of the steps of the methodology for treetop counting. (a) Original image, size 1000 × 1000; (b) Grayscale image (green plane of a); (c) Resulting image when classifying image b with the k-means Algorithm; (d) Resulting image when applying the opening operation to c; Image (e), with gray levels from b except the white pixels; (f) Resulting image by segmenting image e with the watersheds Algorithm.
Figure 3. Outcomes of the steps of the methodology for treetop counting. (a) Original image, size 1000 × 1000; (b) Grayscale image (green plane of a); (c) Resulting image when classifying image b with the k-means Algorithm; (d) Resulting image when applying the opening operation to c; Image (e), with gray levels from b except the white pixels; (f) Resulting image by segmenting image e with the watersheds Algorithm.
Symmetry 14 00532 g003aSymmetry 14 00532 g003b
Figure 4. Different images are shown in which the proposed methodology for treetop counting was applied. (a) Original image, size 1000 × 1000; (b) Resulting image, 823 of 830 treetops were counted; (c) Original image, size 1000 × 1000; (d) Resulting image, 161 of 166 treetops were counted; (e) Original image, size 278 × 311; (f) Resulting image, 86 of 87 treetops were counted.
Figure 4. Different images are shown in which the proposed methodology for treetop counting was applied. (a) Original image, size 1000 × 1000; (b) Resulting image, 823 of 830 treetops were counted; (c) Original image, size 1000 × 1000; (d) Resulting image, 161 of 166 treetops were counted; (e) Original image, size 278 × 311; (f) Resulting image, 86 of 87 treetops were counted.
Symmetry 14 00532 g004aSymmetry 14 00532 g004b
Figure 5. ROC curve of the proposed classifier with an AUC of 0.98, the red line indicates the curve.
Figure 5. ROC curve of the proposed classifier with an AUC of 0.98, the red line indicates the curve.
Symmetry 14 00532 g005
Table 1. Computational complexity.
Table 1. Computational complexity.
OperationsAlgorithm 1Algorithm 2Algorithm 3
Sums 4 × N × n × m + ( 2 × n × m ) 3 × n × m + 4 × 255 × N ( 3 × n × m )
Comparisons N × n × m + ( n × m ) n × m + 255 × N n × m
Assignments 4 × N × n × m + ( 3 × n × m ) 4 × n × m + 4 × 255 × N ( 4 × n × m )
Table 2. Times table.
Table 2. Times table.
Image 1Image 2
AlgorithmImage size in pixelsTimeImage size in pixelsTime
Algorithm 1 (K-means)1000 × 1000 = 1,000,000 pixels0.6450 s12,000 × 12,000 = 144,000,000198.002 s
Algorithm 21000 × 1000 = 1,000,000 pixels0.4425 s 12,000 × 12,000 = 144,000,000124.87 s
Algorithm 2 (proposed K-means)1000 × 1000 = 1,000,000 pixels0.3312 s12,000 × 12,000 = 144,000,000105.05 s
Table 3. Centroids calculated by each Algorithm for different images.
Table 3. Centroids calculated by each Algorithm for different images.
Algorithm 1Algorithm 2Algorithm 3 (Proposed k-Means)
Centroidsc1c2c1c2c1c2
Figure 3a60.8322147.914260.8322147.914261.8322148.9142
Figure 3c63.1681147.044063.1681147.044064.1681148.0440
Figure 3e62.7159150.244562.7159150.244563.7159151.2445
Table 4. Counting effectiveness.
Table 4. Counting effectiveness.
ImageCounting Effectiveness
3a98.8%
3c96.9%
3e99.1%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Orbe-Trujillo, E.; Novillo, C.J.; Pérez-Ramírez, M.; Vazquez-Avila, J.L.; Pérez-Ramírez, A. Fast Treetops Counting Using Mathematical Image Symmetry, Segmentation, and Fast k-Means Classification Algorithms. Symmetry 2022, 14, 532. https://doi.org/10.3390/sym14030532

AMA Style

Orbe-Trujillo E, Novillo CJ, Pérez-Ramírez M, Vazquez-Avila JL, Pérez-Ramírez A. Fast Treetops Counting Using Mathematical Image Symmetry, Segmentation, and Fast k-Means Classification Algorithms. Symmetry. 2022; 14(3):532. https://doi.org/10.3390/sym14030532

Chicago/Turabian Style

Orbe-Trujillo, Eduardo, Carlos J. Novillo, Miguel Pérez-Ramírez, Jose Luis Vazquez-Avila, and Agustín Pérez-Ramírez. 2022. "Fast Treetops Counting Using Mathematical Image Symmetry, Segmentation, and Fast k-Means Classification Algorithms" Symmetry 14, no. 3: 532. https://doi.org/10.3390/sym14030532

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop