-
Notifications
You must be signed in to change notification settings - Fork 3
Configuration
Areaselector can be configured in the JOSM preferences. There are multiple options, which can be adjusted, to provide better results.
There are to algorithms available:
The algorithm and how they work are described on the main Wiki page. The BoofCV Algorithm works good for high resolution images, with sharp border lines. The custom algorithm works better for low resolution images or with thick borders. You can manually select one of them. Setting the algorithm to "Auto" will first try to use BoofCV Canny Edge Detector and if it fails the custom algorithm will be tried.
In my experience it's best to try out which algorithm works for your images.
The distance tolerance defines how many pixels a point may be away from a line and still be considerd part of the line. If the value is increased, the polygons will be simpler but may not be that exact.
After detecting the polygon, lines with a small differing angle will be combined to one line. The angle tolerance defines how much the angle of two lines may differ and still be combined to one line.
The initial step in the custom algorithm is to detect all pixels with a similar color of the marked point. The algorithm checks if the RGB (red, green & blue) values of a pixel is in a range of plus minus the color threshold. I.e. if the RGB values of the selected pixel is [r=236,g=202,b=201] and the color threshold is 14, red values ranging from 224 to 250 will be accepted. So all the colors matching [224<r<236,188<r<216,187<b<215] will be set to a white pixel. All others will be black.
Instead of using the RGB values, to choose which pixel will be white, a HSV based algorithm can be used. This algorithm works like the RGB algorithm, but using hue, saturation and value instead of the RGB values.
The Thinning Iterations parameter defines how often the thinning and noise reduction are applied to the image, before polygons are detected. 2 is the default value and increasing the value will not improve the quality in most cases.
The areaselector plugin helps mapping buildings and assigning addresses to it. With the setting show address dialog a dialog will popup to enter the address info of that building.
The areselector plugin creates a polygon with it's own nodes. If the merge nodes setting is selected, the newly created nodes will be merged with existing ones. So if two buildings are built directly together, areselector will merge the nodes of the neighbouring walls.
The debug setting enables debugging of the ImageAnalyzer, the class which detects the polygon. This will write out images of each step conducted.