A guide to mapping with the help of image segmentation
Дасланы blkatbyhh 26 Лістапад 2022 на English. Апошняе абнаўленьне 27 Лістапад 2022.This guide is a translation of my previous diary written in Chinese. The motivation for developing this method is trying to find a way to map vast areas of forests with minimum human effort.
Methodology
The OpenStreetMap data is based on nodes and vector ways. Manual mapping requires a mapper to put nodes on the satellite pictures and connect nodes by mouse clicking, which is a time-consuming process. This guide proposes a software-assisted workflow to ease the mapping process, it includes the following steps.
- Raster image acquiring and segmentation
- Raster image preparation
- Vectorization
- Mapping to OSM
Raster image acquiring and segmentation
Software used in this step:
- JOSM
- Fiji (Fiji Is Just ImageJ)
Install the JOSM plugin importvec and restart JOSM, Download the map data of the region of interest (ROI), choose a satellite source and download the image. Hide the data layer and take a snapshot of the satellite image on (ROI). Save the snapshot as JPG or PNG file.
Open the snapshot image in Fiji. Turn to the menu: Plugins, Segmentation, Trainable Weka Segmentation. A new Weka window will pop up containing the image. On the right side of the window, there are two preset classes 1 and 2 representing features to be recognized in the image. Create more if needed with create new class button on the left side, and in settings button, you can rename the preset class 1 and 2 to meaningful names to avoid mistakes made by yourself.
Now you can use your mouse left click and hold to draw a curve on the image and click “add to class” button to tag the feature and repeat to create several items. Double-click an item to remove it if you tag it wrong. You don’t have to precisely draw along the edge of the feature, just draw a random curve inside it. When you have collected several items, you can click train classifier in the top-left corner to, well, train the classifier.