Tutorial: Extracting Agricultural Fields in Google Maps Aerial Images
Identification
Resources
I. Objective
The objective is to extract agricultural fields in aerial images.
The image are taken from Google Maps.
| |
Whiteboard capture. | Result image. |
II. Method
The method is based on the assumption that agricultural fields
are homogeneous areas with contrasted edges with other fields.
Thus, the processing algorithm includes:
- Oversegmentation using watershed segmentation where seeds correspond to zero gradients.
- Merging of neighbour regions with close luminance values.
- Merging of too small regions into most inclusive ones.
III. The Complete Pandore Script (bash)
Code
pany2pan input.jpg data_3_13_0.pan
pmcmfiltering 2 data_3_13_0.pan data_3_9_0.pan
pimc2img 0 data_3_9_0.pan data_3_5_0.pan
pgradient 2 data_3_5_0.pan data_3_4_0.pan data_3_4_1.pan
pbinarization 0 0 data_3_4_0.pan data_3_6_0.pan
plabeling 8 data_3_6_0.pan data_5_3_0.pan
paddcst 1 data_3_4_0.pan data_5_4_0.pan
pmin data_5_4_0.pan data_3_4_0.pan data_5_5_0.pan
perosionreconstruction 8 data_3_4_0.pan data_5_5_0.pan data_5_6_0.pan
pwatershed data_5_3_0.pan data_5_6_0.pan data_5_2_0.pan
prg2gr data_5_2_0.pan data_3_12_0.pan
pmeanmerging -1 10 data_5_2_0.pan data_3_12_0.pan data_3_5_0.pan data_3_8_0.pan data_3_8_1.pan
pboundary 8 data_3_8_0.pan data_4_2_0.pan
psuperimposition 1 data_3_13_0.pan data_4_2_0.pan output.pan
ppan2jpeg output.pan output.jpg