|
|
Help file: WiseImage for for WindowsWith
Larissa Penkova of RasterTech Australia
|
Multi-CAD,
December, 2002
|
from the bizarre to the sublime
|
W |
ith a smart editing solution you can do amazing editing things.
One day I received a request from a prospective client to
vectorise their scanned image. They
were not using AutoCAD and had been looking for standalone smart raster
editing/converting solution. Their original drawings were hand made and of
really poor quality. When I opened the sample, I saw a completely black image (figure one),
full of dots and with no indication of readable raster objects (
lines, polylines, arcs, circles, etc). My first thought was ‘don’t
even try - nothing can be done’.
However, I decided that I
could try to clean up some of the noisy information using the WiseImage’s
Separation by size tool (Image>Separation by size). Using this command, the
program searches for objects (isolated groups of image dots) with a size within
a specified range and moves the found areas to a new raster image.
I defined a range from 1 to 6
dots and the groups of dots within this range
were removed from original image. The result was astonishing – the
drawing’s objects were right there in front of me.
The beauty of this tool is
its ability to control the operation performance. No image objects are lost,
since they only move to a separate raster layer. If you do not need the objects
removed from the original image, you can erase the entire raster layer
obtained.
If any important objects are
transferred to this layer, you can select them and transfer them back to the
original image, and then remove an unnecessary raster layer.
Now I had a picture but the
image seemed distorted, with a shape like a parallelogram. A simple way to
eliminate parallelogram, trapezoid or projective distortions of images is
four-point correction (Image>4 point Correction).
This procedure is based on
the assumption that both the outside image frame and the image contents are
distorted in the same way. To perform this procedure, you need to indicate the
current locations of the frame corner points on the image and specify the real
frame size (width and height).
If the monochrome image
contains a frame, WiseImage can estimate corner positions automatically. In the
case of several frames, it detects the outer one. After applying correction, an
image is transformed so that the frame corner dots are moved to the rectangular
frame corners of the specified size.
When I zoomed in on the
image, the raster objects were mostly rough. I decided to start the smoothing
filter (Filters>Smoothing). Its main task is to smooth raster object
outlines, fill edges and inner background droplets, and partially remove raster
speckles.
Using the preview
window I adjusted the optimal parameter values – Medianning (72% ) and
Threshold (191%).
Alternatively, you can apply a smoothing operation to the separate
raster objects (lines, circles, arcs, polylines) if
the
whole image is pretty good. As the result of listed
manipulations, the raster became clean
and ready for vectorization (figure two).
Tuning the parameters in R2V Conversion Options (Convert>Conversion
Options) was my next step. I selected the objects to be converted into vectors
such as lines (including type – dashed, dashed-dotted, continuous), circles,
arcs, polylines, texts. As I was pretty
sure that, because of quality, the text recognition would be far from precise,
I chose ‘Text Areas’ option instead of OCR.
figure1. Original Image
This creates rectangles bounding
text in raster format The raster text
itself is not vectorised, but vector texts can be entered manually with the
help of the review and correction procedure for recognized texts.
figure2. Raster image after editing
Then, under the Options Tab, I defined
maximum width and minimum length of raster to be recognized, and maximum gap to
be ignored.
I switched on The Conversion Options dialog, which
gave me the opportunity to preview the vectorisation results with current
parameters. The
result was
displayed directly in the document window on the existing raster, and the Image was now one button click from automatic raster-to-vector
conversion (figure three).
As the original image was
imperfect and quite complicated, with crossing objects such as an overlapping
text, the resulting vectors required correction. WiseImage offers advanced
tools for vectors editing and I made extensive use of commands to ‘merge
vectors to polylines, arcs, circles and lines’. Commands
such as’ Break vectors’ allowed me to break existing object and
create new ones.
To apply any
correction command, I selected vectors first, then chose the correction tool
from Correct Menu. In the end, the whole job took about three hours.
Note that all of the editing
operations described here are also included in the WiseImage Pro version
developed for AutoCAD and AutoCAD LT.
For more information, visit
the RasterTech web site: www.rastertech.com.au
figure3. Vectorized image