Skip to main content
. 2018 Mar 21;20(4):213. doi: 10.3390/e20040213
Algorithm 1: Process of leaf simplification.
1  // Initialize the number of cameras
2  n=20
3  // Compute the initial VMI for the foliage F
4  Compute I(v,F) where v={1,,n}
5  // Initialize the set of leaves to evaluate
6  F=F
7  // Repeat the process until the number of leaves is the established number
8  while (number_of_leaves(F))>Leaves_To_Remain) do
9   min_cost=1000.0 // Initialize the cost
10   for (lF)
11    remove l to obtain F
12    Compute I(v,F) where v={1,,n}
13    Lpru(l)=I(v,F)I(v,F)
14    if min_cost>Lpru(l) then
15     leaf_to_prune = l
16     min_cost=Lpru(l)
17    end if
18    Undo removal
19   end for
20   // Remove leaf_to_prune
21   F=F(leaf_to_prune)
22   // Obtain the nearest_leaf of leaf_to_prune
23   nearest_leaf=Near_Leaf(F,leaf_to_prune)
24   // Scale the size of nearest_leaf according to Equation (5)
25   nearest_leaf.area_size=Resize(nearest_leaf,l,min_cost)
26  end while