Filtering spots

Scanned drawings often contain areas that require some cleaning in order to remove unwanted spots. Cleaning of empty parts of the drawing, like margins and bigger white areas, is best done using the Crop or Clear functions. Removing spots between drawing lines, however, may be done easier through filtering.

Start SuperEdit and open townmap.tcd . Double-click the townmap1.tif and townmap2.tif nodes on TCD Contents window to select them. You should see on the Drawing window that there is some dirt in the upper part of both selected subdocuments. It shows as a number of spots, as in the figure below.

Click the Filter spots / holes button on Raster toolbar. Choose a spot sample on the screen to define maximal spot size to remove; draw a rectangle over the area containing such spot. The OTM options appear automatically and you can read the calculated spot size, e.g. 29 for the lower spot and 40 for the upper one.

You can examine various spots on the drawing in this way or choose the OTM Spot size... option to enter your own value, e.g. 33. Finally, choose the OTM Accept option to start filtering. All isolated spots that are less than or equal to 33 connected pixels disappear from both selected subdocuments. You can compare the view before and after filtering by clicking the Undo and Redo buttons on Main toolbar a number of times.

Once determined, the value of spot size will be used as the default one in further executions of the Filter function, so you do not have to define it each time. Simply right-click to call the OTM options and choose Accept if the spot size is satisfactory.

The Filter spots / holes function must be used carefully as to not damage finer details of the image, like small texts or pattern lines. You can correct the editing area to some smaller one (e.g. covering only the place with dense spots). After starting the Filter spots / holes function, the rectangle defining editing area covers the common extents of raster drawings selected; you can correct it simply dragging its corners. Spots that are too large to be filtered out must be removed manually using the Clear rectangle or Clear polygon commands.

Instead of clearing spots, you may also fill small white holes that can appear on black parts of the drawing. The OTM Clear spots / Fill holes options let you choose the kind of filtering. Color or gray-scaled raster drawings cannot be filtered.

Exit SuperEdit without saving the filtering changes made to townmap.tcd subdocuments.