Algorithm 1 Detection of pre-exiting termite mounds with hyperspectral imaging. |
|
Input: raw hyperspectral image file |
|
Pre-processing |
1. |
Calculate hyper-cube radiance |
2. |
Perform Orthorectification process |
3. |
Load GPS coordinates from register file, and obtain a ROI |
4. |
Apply closing operator once ▷ structuring element: 3 × 3 rectangle |
|
Material Classification |
5. |
Load illuminant spectrum from white reference |
6. |
Calculate reflectance |
7. |
Load material reflectance library |
8. |
Run SVM classifier |
9. |
Filter segmented material layers: “Eroded Soil” and “Light Grass” |
|
Object Detection |
10. |
Apply Smooth-Median Filter on soil layer ▷ kernel size: 3 |
11. |
Apply closing operator on soil layer once ▷ structuring element: 3 × 3 rectangle |
12. |
Create a temporal Image
|
13. |
double dilation operator on soil layer ▷ structuring element: 3 × 3 ellipse |
14. |
Apply Smooth-Median Filter on grass layer ▷ kernel size: 3 |
15. |
Create a temporal Image
|
16. |
AND operator between grass layer and
|
17. |
if Mean()
then return null |
18. |
end if |
19. |
Find contours from the soil layer |
20. |
for
do ▷ number of detected soil contours |
21. |
Select ▷ soil contour at i index |
22. |
Run method ▷ output:
|
23. |
perimeter of SC(i) |
24. |
if
then
|
25. |
Discard
|
26. |
else
|
27. |
Find contours from the grass layer |
28. |
for
do ▷ number of detected grass contours |
29. |
Select ▷ grass contour at j index |
30. |
perimeter of
|
31. |
distance between and centroids |
32. |
radius of
|
33. |
|
34. |
if
( || ) then
|
35. |
Minimum intersection line distance between and
|
36. |
if
then
|
37. |
Draw contours at ROI image |
38. |
end if
|
39. |
end if
|
40. |
end for
|
41. |
end if
|
42. |
end for |
43. |
return ROI Image |