?

Log in

No account? Create an account

OpenWebGIS is online Geographic Information System

Previous Entry Share Next Entry
New module of Image Analysis in OpenWebGIS. Segmentation of regions by colors and vectorization.
openwebgis

This new module is for work with the image layer (photos, pictures, satellite photo in jpg,png, bmp). Now with the help of OpenWebGIS you can make segmentation of regions of satellite photo by colors of pixels and vectorization it. Also you can use sharpening, binarization, edge detection, inverting and grayscaling of images.
OpenWebGIS_ImageAnalysis5.png

To work with the Image Analysis module, first you must add a layer with the image on the map. To do this, select the menu item "Layers-> New Layer from Image file". See Figure 1.



Figure 1.

After clicking on this menu item a window shown in Figure 2 opens. Using the ‘Browse’ button, select an image file on disc of your device (pc,tablet computers,smartphone etc.) and specify the geographic coordinates of the lower left and upper right corners of the image (coordinates can be specified by simply clicking on the map). In this case, we use a small fragment of a satellite map area of ​​London from Google.
OpenWebGIS_ImageAnalysis2.png
Figure 2.

Increase the map to the image size you need and select the menu item "Edit-> Image Analysis.Remote sens." As it is shown in Figure 3.
Figure 3.

After selecting this menu item the window will appear with the parameters of the Image Analysis module. Select the name of the image layer, you are interested in,  in the list "Select Image Layer:" as shown in Figure 4. You can move this window, if you select menu item "Interface-> switch to interface drag".


Figure 4.

Then, for example, select on the satellite image the trees with a certain shade of trees foliage. To do this, click on the image area containing the desired color. This color should appear in the parameters square box of Image Analysis module window, as it is shown in Figure 5. Set up the other necessary parameters of segmentation. And then click the button “OK – segment”. As a result (orange polygons, but it can be also points or lines) of the segmentation operation the vector layer will be created with the name specified by you. In this case, it is "ImageVector". See the Figure 5. You can export the results of segmentation and vectorization to well-known vector GIS formats - gml, geojson, csv, kml. The process of image segmentation may require large computational resources of your CPU and is time-consuming. The larger the image size is, the more time the operation of segmentation will take.
Figure 5.

In image segmentation you may find useful the colors inverting operation (see the result of this operation in Figure 6), conversion to grayscale (see the result of this operation in Figure 7).

Figure 6.

Figure 7.

The result of edge detection is shown in Figure 8. For edge detection the user can select the  Roberts or Sobel methods. On the edge detection methods you can read here: http://en.wikipedia.org/wiki/Edge_detection. The result of binarization is shown in Figure 9.

Figure 8.

Figure 9.

In vectorization of images you can also use a new button in the upper right corner of the map called "create polygon from selected points or merge selected polygons" see Figure 10.

Figure 10.

If you want to see javascript source code of this operations(functions), download Javascript and html source code from the main menu of OpenWebGIS and see in opengis_eng.html file functions:OK_ImageAnalys2(), OK_ImageInvertColor(), OK_ImageGrayColor(), OK_ImageEdgeAnalys(), OK_ImageBinariAnalys(), OK_ImageSharpenAnalys().
Image Analysis module will also be useful for the ancient maps vectorization. Take a look at Figure 11 there is a segmentation and a vector layer creating of several buildings in the historic map of London of the 19th century. The historic map is taken from here http://www.vauxhallandkennington.org.uk/images/baconsw.jpg


Figure 11.