cropmapteam / Scotland-crop-map

This is the repository for the Scottish Government collaboration with EDINA and JNCC to produce a crop map for Scotland by developing machine learning algorithms applied to Sentinel satellite data
3 stars 0 forks source link

Produce Orfeo field segmentation #4

Open quantoidb opened 5 years ago

quantoidb commented 5 years ago

Produce Orfeo field segmentation

Kostassan commented 5 years ago

Hello. I have managed to obtain the code/scripts for the segmentation. Will e-mail you more details.

geojamesc commented 5 years ago

Link to Orfeo toolbox:

https://www.orfeo-toolbox.org/ which I`m guessing the scripts will run against.

Kostassan commented 5 years ago

Hello Sorry for the delay. I have been testing the Orfeo toolbox segmentation algorithm and I think that it produces some good results. I have tested in a cloud corrected Sentinel 2 scene T30VVJ, and for the whole tile, it took about 20 minutes in my VM machine. I have attached here an example.

Let me know your thoughts.

Reference pic Segementation example

quantoidb commented 5 years ago

Hi Kostas, Do you need anyone else to review this before we close this issue?

Kostassan commented 5 years ago

I guess not, however, need to be added that all the segmentation produced .shp will have to go on thought another algorithm by GRASS GIS (v.generalise) in order to "smooth" out the edges pf he polygons.

Kostassan commented 5 years ago

The process used for this was via Orfeo Toolbox. I used the OTB toolbox that is available in QGIS The instructions of how to install it are here: Configure plugin in QGIS

Each cloud-free granule of Sentinel 2 was used with the following settings: The algorithm used was the Meanshift, with a spatial radius of 70 and a minimum region size 200. The rest of the setting was left in default. The output files were SQLite shapefiles this was selected to save space.

The resulting layers were then had their geometries simplified using the GRASS GIS algorithm v. generalise using the Douglas-Peucker Algorithm with a threshold of 10.

The final simplified layers were all merged together and then in the final output, the GRASS GIS v.clean was used to clean up the boundaries of the merge images.