Aligning and resizing scanned images

In one of previous exercises we have used the background of office.tif in order to create a new design by clearing some unwanted areas. The resolution, scale and orientation of the background image were correctly defined, but the original drawing may be not to the scale and the scanning process may have produced a skewed image with distorted size and proportions.

Open the office.tif rasterimage and then choose Document - Add Subdocument option to add the office2.dwg . This vector drawing contains a polygon drawn to the nominal dimensions of an office building. You will easily see the difference between vector-defined outline and the corresponding scanned image, as shown in the figure below.

You may repeat exercises made in chapter describing raster snaps to check that the distances on the scanned image are not according to horizontal and vertical dimensions that are shown on the image. If the scanned image is needed as a background for any kind of precision drafting, it must be dimensionally matched to its reference dimensions, and that may require independent X & Y resizing.

Before we resize the image, however, it is recommended that the scanned image be aligned either horizontally or vertically. In the exercise we will use Magnifying Glass , so choose the Options - Configuration option and check on the Magnifying Glass tab the Magnifying Glass active , Pop up on hot key pressed and Keep on display options. It would be wise to define F12 as Current hot key - simply select it in its box and press F12 .

Make sure that office.tif is selected for editing. Click the Rotate Raster button on the Raster toolbar. In order to align the whole image, so that the left wall is vertical, define two points at its edge.

The process of defining rotating operation starts from the Define base point phase, as can be read from the hint displayed in the Status line. The base point symbol, drawn in yellow color, moves under the cursor. Place the cursor at the outside edge near the left lower corner of the building. Hit F12 ( Magnifying glass hot key ) to pop up Magnifying Glass . Click exactly at the wall’s edge. If the picked point position looks good, accept it with a right click. The yellow symbol of the base point becomes placed in this position.

Now comes the Define endpoint of the reference vector phase. The reference vector , drawn in yellow color, is dragged by its end marked with an arrow. Place the cursor near the left upper corner of the building and repeat the action as previously. The yellow reference vector is placed along the left edge of the building.

The last phase, Define endpoint of the rotating vector , finally defines the rotating operation. Notice the rotating vector drawn in red color. You can observe the effect of rotation being defined, shown by rotated raster frame, and the rotation angle displayed numerically in the Input bar. Since we want to define alignment, not rotation, call Options and tools menu ( OTM ) with right click and choose the OTM Vertical option, then use the OTM Accept option for the whole alignment.

Wait until the raster is rotated and the Drawing window regenerates the image. The visible effect of alignment will be rather small, as the image was skewed only a little, but you may notice that some horizontal and vertical raster edges are now sharper. Save the aligned raster image as office4.tif .

Next, we will move the raster image, so that its left lower corner corresponds to the left lower corner of the reference vector data. Define zoom window around the left lower part of the building as follows. Move the cursor to the one corner of the area to be zoomed. Press and hold the left mouse button, dragging the window up to its opposite corner. Then leave the button to regenerate the image as shown in the figure below.

Click the Move raster button on the Raster toolbar. Use the Magnifying Glass as before to place yellow base point exactly at the intersection of reference lines at the left lower corner of the building. Repeat the action to place red symbol of the target point exactly at the left lower corner of vector reference polygon visible on the office2.dwg drawing. Choose the OTM Accept option; the left lower corner of the building’s wall should move to the desired position. If you are not satisfied with the result, click the Undo button on the Raster toolbar and repeat the Move raster operation.

The scanned image, now aligned and moved to the correct position, is apparently too large comparing with its reference vector data. Click the Resize raster button on Raster toolbar. The process of defining resizing operation consists of three phases, similar to those in rotating action: Define base point phase, Define endpoint of reference vector phase, and finally Define endpoint of resizing vector phase.

The left lower corner is at the correct position already, so we will use it as base point - its position will be not changed by the Resize operation. Place it using the Magnifying Glass as before at the left lower corner of vector reference polygon again, this time as the easiest way of defining base point that we have moved there previously. To define the endpoint of reference vector , scroll the Drawing window to show the right upper part of the building. Use the Magnifying Glass and click exactly at the intersection of reference lines in the right upper corner of the image (just under the J in a circle sign).

In the final step, define the endpoint of the resizing vector using Magnifying glass and place it at the right upper corner of vector reference polygon.

Choose the OTM Accept option for the whole resizing operation. After resizing the scanned image should quite exactly match its vector reference data, so that further drafting on its background may be done directly in world coordinates.

Click the Save button on Main toolbar.