PC RECT 4.1. prirucnik za pregled

107
PC-Rect PC-RECT A Photograph Rectification Program Operating & Technical Manual Version 4.1 March 2009 © Dr. Steffan Datentechnik Linz, Austria Distributed and Supported in North America by:

description

PC RECT upustvo PC CRASH PC RECTudes nesreca

Transcript of PC RECT 4.1. prirucnik za pregled

  • PC-Rect

    PC-RECT A Photograph Rectification Program

    Operating & Technical Manual Version 4.1 March 2009 Dr. Steffan Datentechnik Linz, Austria

    Distributed and Supported in North America by:

  • Contents i

    Contents

    SOFTWARE LICENSE AGREEMENT I

    CHAPTER 1 AN INTRODUCTION TO PC-RECT 1 General Introduction 1 The Software Package PC-Rect 1 Minimum Hardware Requirements 1 Use of Mouse and Printers 2 Copy Protection 2 About This Manual 2 Starting the Program 3

    Creating a Back Up Copy 3 Installation of PC-Rect on the Hard Drive 3 Starting PC-Rect 3

    The Start-up Screen 4

    CHAPTER 2 WORKING WITH PC-RECT 5 Starting PC-Rect 5 Scanning Photographs 5 Loading Photographs 6

    Rectification of Several Pictures with Measurement Grid 7 Defining the Rectification Area 10 Edit Lengths / Rectify 11

    Rectification of a Single Picture 13 Defining the Rectification Area 13 Definition of Reference Distances 13 Display of Reference Distances 14 Zooming Reference Points 15

    The Four Point Method 15 Edit Lengths / Rectify 15 Repeated Rectification Based on the Rectified Picture 18 Connecting Several Pictures 19

    Lense Distortion 19 Rectification with Lense Distortion: 22 Lense Distortion after Rectification: 23

    Saving the Bitmap 24 Saving the Bitmap(s) as a Project 25 Printing the Bitmap 25 Creating a Drawing 26

    WORKING WITH PC-RECT 3D - A 3D RECTIFICATION (OPTIONAL) 27

  • ii Contents

    3D Example 28

    WORKING WITH PC-RECT VIDEO 34

    CHAPTER 3 MENU DESCRIPTION 37 File 37

    Open Picture (CTRL O) 37 Save Picture (CTRL S) 38 Save Picture As 38 Save All Pictures 39 Open Project 40 Save Project 41 Save Project As 41 Update PC-CRASH 42 Scan 42 Scanner Selection 42 Print 42 Print Preview 43 Printer Setup 44 Printer Scaling 44 Options 45 Exit 45

    Edit 45 Copy 45 Paste 46 Gray Scale Transformation 46 Color Reduction 46 Create True Color Bitmap 46 Bitmap Resolution 46

    Rectify 47 Film Format 47 Display Distances 47 Define Area 47 Define Distances 49 4 Point Method 51 Edit Lengths/Rectify 51

    Connect 56 Enter Connection Points 56 Delete Connection Points 57 Connect 57

    Picture 59 Redraw Picture (F2) 59 Contrast / Brightness 59 Invert 60 Adapt Palette 60 Bitmap Palette 60 System Palette 61 Rotate Bitmap 61 Fast Bitmap 61

    View 61 Bitmap 62 Drawing 62 Show Whole Picture (F3) 62 Tool Bar 63 Status Bar 63

    Drawing 63

  • Contents iii

    Open Drawing 64 Save Drawing 64 Load Object 66 Object Library 66 Edit Drawing 66 Select All 77 Scale Objects 77 Scaling 78

    3D-Conversion (optional) 78 Enter lengths 79 Save 3D results... 79 Input Window 80 2D->3D Conversion 80 3D View 80 Options... 83

    Window 84 New Window 84 Cascade 84 Tile 84 Arrange Icons 84 Close All Windows 84

    ? 85 About PC-Rect 85 Help 85

    CHAPTER 4 TECHNICAL DOCUMENTATION 87 The Perspective Projection 87 Transformation of a Point 88

    Explanation of the Coordinates Systems Used 88 Transformation of a Photograph Point into a Surface Point 89 Transformation of a Surface Point into a Photograph Point 91 Calculation of the Transformation Parameters 92

    CHAPTER 5 EXAMPLES 95 Rectification with the Four Point Method 95 Rectification with Different Reference Lengths 96 Video Rectification 97

    CHAPTER 6 HINTS FOR BEST RESULTS 98 General 98 Four Point Method 98 Other Information 99

  • Software License Agreement iv

    Software License Agreement

    Single User Product - This is a legal agreement between you, the end user, and the software company, Dr. Steffan Datentechnik.

    BY OPENING THE SEALED PACKAGE, YOU AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, PROMPTLY RETURN THE UNOPENED DISK PACKAGE AND THE ACCOMPANYING ITEMS TO THE PLACE YOU OBTAINED THEM FOR A FULL REFUND.

    1. GRANT OF LICENSE - DSD grants you the right to use one copy of the enclosed software program PC-Rect on a single computer. Installation on a network server for the sole purpose of distribution to one or more other computers shall not constitute "use" for which a separate license is required.

    2. COPYRIGHT - The software is owned by Dr. Steffan Datentechnik and is protected by copyright laws, international treaty provisions and all other applicable national laws. You may either make one copy of the software solely for backup or archival purposes or transfer the software to a single hard disk provided you keep the original solely for backup or archival purposes.

    You may not copy the Product Manuals or written materials accompanying the software.

    3. OTHER RESTRICTIONS -You may not rent or lease the software. You may not reverse engineer, decompile or disassemble the software.

    4. NO LIABILITY FOR CONSEQUENTIAL DAMAGES - To the maximum extent permitted by applicable law, in no event shall Dr. Steffan Datentechnik or its representatives or suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use or inability to use this product, even if Dr. Steffan Datentechnik has been advised of the possibility of such damages.

    5. NOTICE: Affiliated companies (collectively the "Publisher") make no representations or warranties of any kind whatsoever with respect to the contents hereof and specifically disclaim any implied warranties or fitness for any particular purpose. The

  • Software License Agreement v

    Publisher shall not be liable for errors contained herein for incidental or consequential damages in connection with the furnishing, performance, or use of this program or its contents.

  • Chapter 1 - An introduction to PC-Rect 1

    Chapter 1 An Introduction to PC-Rect

    General Introduction PC-Rect is a program for the rectification of photographs. Rectification is the transformation of a photograph oblique to a surface into a plan view, like a map. The program allows the user to rectify photographs of surfaces which are close to being planar, such as roadway surfaces at accident scenes. As a result of the rectification, an image view normal to the surface (a plan view for horizontal surfaces) is created. This makes it possible to view all distances in the planar surface true to scale and angle.

    The pictures created can be printed and saved as "Bitmap" files, and can be reused in other programs. The Bitmap files can also be transferred directly into PC-Crash.

    The Software Package PC-Rect The Software package PC-Rect contains:

    The installation CD-Rom of PC-Rect The PC-Rect Manual The hardware lock for the parallel port or USB port Note: The number and the names of the disks delivered with the software package PC-Rect may differ according to the type of disk drive used.

    Minimum Hardware Requirements PC-Rect is suitable for all 80386 and higher PC-compatible computers with MS-Windows 3.10 (or newer) from Microsoft. A minimum memory of 8 Mb RAM is recommended. PC-Rect takes about 8 Mb of hard drive space, not including bitmap files created with it.

    A Super-VGA video card with at least 256 colors is required. Monitor resolution must be at least 640 x 480, and 1024 x 768 is recommended.

  • 2 Chapter 1 - An Introduction to PC-Rect

    Before the installation of PC-Rect it is advisable that the user read this section and be familiar with the operation of MS-Windows.

    Use of Mouse and Printers PC-Rect can be used only with a mouse or other tracking device.

    All printers supported by MS-Windows can be used with PC-Rect. The settings are listed in the individual manuals of the printer drivers.

    README.TXT Note: Please read the file README.TXT on one of the PC-Rect diskette, if the file exists. It will contain information which is not included the manual.

    Copy Protection PC-Rect is protected against copying by a hardware lock. If this lock is not connected to a parallel port, PC-Rect will only run in a demonstration mode. In this mode, Bitmap files rectified cannot be saved or transferred to PC-Crash.

    The demonstration mode is recognizable by the title bar, which contains the word "Demoversion" instead of the user's name. As soon as a valid hardware lock is connected to the parallel port and a new project is loaded, the program automatically recognizes the owner's name and uses it in the title bar.

    About This Manual The purpose of this manual is to familiarize the user with PC-Rect so that it can be used effectively. This manual is divided into the following chapters:

    Chapter 1 "An Introduction to PC-Rect" gives instructions on how to install PC-Rect on your computer and how to start it.

    Chapter 2 "Working with PC-Rect" explains the working method and the most important features of PC-Rect.

    Chapter 3 "Menu Description" contains a detailed description of all menu items.

    Chapter 4 "Technical Documentation" contains a detailed description of the technical basis for the calculation.

    Chapter 5 "Examples" contains 2 examples which are included on the installation disk of PC-Rect.

    Chapter 6 "Hints for Best Results" contains information for obtaining the best results with PC-Rect.

  • Chapter 1 - An introduction to PC-Rect 3

    Starting the Program

    Creating a Back Up Copy Before installing PC-Rect on the hard drive it is important to create a back up copy of the delivered diskettes.

    This can be done with the file manager of Windows or with the DOS command Diskcopy : : (The drives can also be identical).

    Installation of PC-Rect on the Hard Drive PC-Rect cannot be run from the CD. PC-Rect must be installed on the hard drive, as follows:

    1. Insert the PC-Rect CD in the CD drive.

    2. Use the Run command in the Microsoft Windows Start menu (or the Windows Explorer).

    3. Select Setup.exe from the PC-Rect\Disk1 directory on the CD.

    4. Follow the instructions given by the installation wizard program.

    5. All necessary files are copied into the directory PCRect 40 by default. The user can change the name of this directory during installation.

    The following program icon is displayed in the group window created by PC-Rect:

    If you make a mistake: If you make a mistake during the execution of the installation program, restart the installation program and repeat the procedure.

    Starting PC-Rect Read the file README.TXT, if it exists, on the installation disk of PC-Rect to obtain information not contained in this manual.

    Start PC-Rect with a double click on the PC-Rect icon.

    Note: PC-Rect requires a hardware lock to be in place on the parallel port before it will operate in the licensed mode. On initial startup of the program, or if a new hardware lock is connected to the computer, the program takes longer to start.

    Additional information about MS-Windows can be found in the MS-Windows user manual.

  • 4 Chapter 1 - An Introduction to PC-Rect

    The Start-up Screen

    After the program has been started, the following menu options can be chosen:

    1. File 2. View 3. ?

    After a picture has been loaded, the following menu options can be chosen:

    1. File 2. Edit 3. Rectify 4. Connect 5. Picture 6. View 7. Drawing 8. Window 9. ?

    A detailed description of the individual menu options can be found in Chapter 3 "Menu Description".

  • Chapter 2 - Working with PC-Rect 5

    Chapter 2 Working with PC-Rect

    Starting PC-Rect Start PC-Rect by double clicking on its icon.

    Scanning Photographs Before the rectification process is begun, the photograph must be scanned into the computer. This can be done using any commercial photo scanner with corresponding software.

    If the scanner has a "TWAIN" interface it is possible to operate the scanner directly from PC-Rect. Use the menu option File - Scan to scan the picture. Follow the instructions of the TWAIN interface according to the user manual for the scanner.

    TWAIN is a standard for scanner control software, and is widely used on Windows PCs.

    A TWAIN control interface allows the scanner to be accessed from within another program (called the host application), for example graphics or DTP software. This means that instead of having to create the scanned image in a separate program, save it and then re-open it in the graphics application, the scanner delivers the image directly to the host application's window, thus saving time.

    The TWAIN interface allows the image acquisition device (scanner) to be controlled so that the parameters of the image such as colour balance, size, tonal range etc can be specified before the image is acquired.

    The TWAIN driver is called a " TWAIN source" and if more than one driver is present in a system, there will be a means to select the correct TWAIN source from the "file" menu of the host program.

    TWAIN limitations

    TWAIN relies on library (common) files and most applications will check for and install TWAIN libraries on first installation. However, some applications may install out of date library files which cause other TWAIN sources to fail. Furthermore, some implementations of TWAIN in host applications do not work well with other

  • 6 Chapter 2 - Working with PC-Rect

    manufacturer's TWAIN sources. Furthermore, some functions were and are not available in Versions of TWAIN such as the possibility to rotate the image (TWAIN 1.5) and the passing of colour space information (TWAIN 1.6 and later).

    Important: Only use a flat bed scanner for scanning. Hand scanners should not be used due to less accurate scanning results.

    Loading Photographs Photographs not scanned directly into PC-Rect can be loaded into the rectification program from a disk drive. Use the menu option File - Open Picture (or type CTRL O) to load the desired picture.

    After activating this menu option a window is displayed containing a list of available Bitmap files. PC-Rect supports the following Bitmap formats:

    Bitmap (*.BMP) Encapsulated Postscript (*.EPS) Graphic Interchange Format (*.GIF) JPEG (*.JPG) PCX (*.PCX) TIFF (*.TIF)

    By double clicking on the corresponding file name or by highlighting the corresponding file name and selecting the Open button, the picture is loaded and displayed on the screen. A detailed description of this menu option can be found in Chapter 3 "Menu Description".

  • Chapter 2 - Working with PC-Rect 7

    Rectification of Several Pictures with Measurement Grid

    Load the pictures by using menu option .

    Open measurement grid window with .

    Select by mouse click and open the dialog box by double click or right mouse click.

  • 8 Chapter 2 - Working with PC-Rect

    Edit length also 1 diagonal, you have 2 options, it depends on which diagonal was measured.

    For additional measurement grids select the first one again and open the dialog box by double click and use the symbol for adding it at the right position.

    Open the grid window again, edit length and confirm with OK. When you have defined a grid for every picture minimize the window.

  • Chapter 2 - Working with PC-Rect 9

    Edit Pictures:

    Connect picture 1 with grid 01 in dialog box M01.

    Define the points in the picture with P1 P4 according to the points in the measurement grid window. Choose P1 first, after that click on the corresponding point in the picture, then P2, P3

    For a better position of the points use zoom-funktion . Select area arount reference point 1 in the picture. After that press P 1 and position it in the defined area in the zoom window.

    Use f3 key for normal size and continue with point 2.

  • 10 Chapter 2 - Working with PC-Rect

    Defining the Rectification Area The rectification area is defined with the menu option -

    . A polygon outline which defines the area to be rectified is created as follows:

    1. Mark the individual points of the polygon outline by placing the cursor at the desired position on the picture and clicking on each point with the left mouse button.

    2. Close the last side of the polygon with a single click on the right mouse button. When all points of the polygon are defined, the polygon is shown in green.

    If you want to change the defined area again, click the button again and define new area.

  • Chapter 2 - Working with PC-Rect 11

    Edit Lengths / Rectify

    After activating this menu option the Edit Lengths/Rectify dialog box is displayed. All defined reference lengths are listed here.

    You will find a more detailed description in the next chapter, because for this method you need not change the settings.

    Activating the Optimize button starts a global optimization of all parameters based on the specified reference distances.

    After optimization the rectification is done using the Rectify button. After the Rectify button is pushed and the rectification process is finished, the Edit Lengths/Rectify dialog box disappears and the rectified picture is displayed in a new window.

    You will find the rectified area also in the measurement grid window now.

  • 12 Chapter 2 - Working with PC-Rect

    You can continue now with the next picture.

    You can change foreground and background of the pictures for getting pictures with higher resolution into front position. Select the grid and take menu option You can save the measurement grid picture as bitmap by using .

    Using in the main menu the whole project with all pictures will be saved.

  • Chapter 2 - Working with PC-Rect 13

    Rectification of a Single Picture Load the picture with See chapter Loading Photographs

    Defining the Rectification Area The rectification area is defined with the menu option -

    . A polygon outline which defines the area to be rectified is created as follows:

    3. Mark the individual points of the polygon outline by placing the cursor at the desired position on the picture and clicking on each point with the left mouse button.

    4. Close the last side of the polygon with a single click on the right mouse button. When all points of the polygon are defined, the polygon is shown in green.

    Definition of Reference Distances Using the menu option Rectify - Define Distances, between one and ten reference lengths can be defined on the screen.

    For the definition of each reference distance, proceed as follows:

    1. Move the cursor to one end of the reference distance. Press the left mouse button and hold it down.

    2. While holding the left mouse button down, move the cursor to the other end of the reference distance and release it.

    3. After releasing the left mouse button a small window is displayed, in which the length of the specified distance is entered. This value can be changed later in the Rectification parameters dialog box.

    4. If the selected point is not in the road plane, select the 3D

    Parameter check box. Then, input the correct vertical distance (normal to the road plane). Enter positive values for points above the plane, and negative values for points below the

  • 14 Chapter 2 - Working with PC-Rect

    plane.

    Important: Always use long reference distances. The greater the reference distance the more accurate the overall result will be. In addition both orthogonal and diagonal reference distances should be used. Try to locate the reference distances in the area of the picture that is of interest for the rectification. Optimally, the area of interest should be within an area defined by the reference points.

    Display of Reference Distances The menu option Rectify - Display Distances allows the user to specify whether or not the surrounding polygon and all defined reference distances are displayed. The display is toggled by activating this menu option.

  • Chapter 2 - Working with PC-Rect 15

    Zooming Reference Points

    To define the end points of the reference lengths more accurately, selected areas of the picture can be zoomed at any time. To activate the zoom feature, hold the SHIFT key down and click on the area to be zoomed with the left mouse button. The selected area immediately appears in a separate window in approximately five-fold enlargement. The point where the cursor was in the picture is the center of the zoom window.

    The reference length lines are also visible in this zoom window. The endpoints of the lines can be moved with the mouse in this zoom window. Click and hold the left mouse button with the cursor on the endpoint and move it to the desired position.

    When several endpoints are at the same position, they can be moved together by pressing the SHIFT key while clicking on the respective endpoints. The window can be closed by a double click with the mouse on the close symbol in the zoom window title bar or by pushing the ESC key.

    The Four Point Method If you have four reference points on your photo and know all six distances between these points the "Four Point method" should be used to define these distances.

    By activating the menu option Rectify - 4 Point Method, all four points can be defined in order by a single click on the left mouse button. After marking the last point a window is displayed which allows the user to specify the length of the first reference distance. If the four points define a square all six reference lengths are calculated automatically. Otherwise the correct lengths for all but the first reference distance must be entered in the Edit Lengths/Rectify dialog box.

    Edit Lengths / Rectify After activating this menu option the Edit Lengths/Rectify dialog box is displayed. All defined reference lengths are listed here.

  • 16 Chapter 2 - Working with PC-Rect

    This dialog box consists of three groups. The first group contains the definition of the reference distances, the weighting (user specified) of each respective distance as well as a list of errors for the current transformation parameters. Delete buttons with the designation Del allow deletion of individual reference distances.

    The Fix button accesses the Fix Parameters dialog box, in which the user can select camera parameters to be held fixed during the optimization. For example, if it is known the camera was exactly 3.2 meters above the road surface, the camera height can be fixed at this value.

    The Show 3D Parameters check box is also included in the first group. Selection of this increases the width of the Edit Length/Rectify dialogue box so that the vertical (normal) distance of the endpoints of each dimension can be inputted or changed.

  • Chapter 2 - Working with PC-Rect 17

    The second group contains four edit boxes (Cam. Inclination, Cam. Height, Cam. Rotation, and Focal length) with corresponding slider controls. The picture transformation is defined by these four values:

    The camera inclination to the road plane The height of the camera (normal to the road plane) The camera rotation The camera focal length.

    If any of the four values have been fixed using the Fix button, the value in the corresponding edit box must be changed to the desired value, either by typing it in or by moving the respective slider bar.

    Pressing one of the four Opt. buttons causes a minimizing of the weighted total error by changing only the value of the parameter next to the button pressed.

    The third and last group contains the Optimize and 1st Approx. buttons. Activating the Optimize button starts a global optimization of all parameters based on the specified reference distances. This optimization process can last several minutes, depending on the type of computer used and the given start values. Activating the 1st Approx. button (only applicable when the four point method was used) gives an instant approximate optimization.

  • 18 Chapter 2 - Working with PC-Rect

    Note: If the weighted total error after optimizing is greater than 2 to 3 %, try to specify other start values (better ones) for the optimization in the fields Cam. Inclination Cam. Height, Cam. Rotation, and Focal length. Then push the Optimize button again. If the error is still too large, check that the reference distances are correct, and that they are all in the same plane. If not, and the correct normal distances are known, enter them using the Show 3D Parameters check box. If the area desired to be rectified is not approximately planar and the vertical differences of the individual points are not known, the area should be broken down into several smaller areas which can then be rectified independently.

    After optimization the rectification is done using the Rectify button. The resolution of the calculated bitmap can be defined in the Resolution edit box in pixels/meter or pixels/foot. For example, when 50 pixels per meter is chosen, each pixel is equivalent to a length of 2 cm and when 20 is selected each pixel represents a length of 5 cm.

    The overall size of the area to be rectified, and the size of the bitmap file (which depends on the resolution), are indicated in the Resolution area in the third group of the Edit Lengths/Rectify dialog box.

    After the Rectify button is pushed and the rectification process is finished, the Edit Lengths/Rectify dialog box disappears and the rectified picture is displayed in a new window.

    The Print button in the Edit Lengths/Rectify dialog box gives a printout of the calculated parameters and assessed errors.

    The Cancel button closes the dialog box without starting the rectification.

    Repeated Rectification Based on the Rectified Picture If the rectified results are not satisfactory, the user should first check the entered values and the location of the end points of the reference lengths in the original picture. The entered values can be corrected in the Edit Lengths/Rectify dialog box and the end points of the reference lengths can be corrected using the Zoom window in the original picture.

    If the results are still not satisfactory, the user can move the end points of the reference lengths using the Zoom window in the rectified picture after the rectification. By re-optimizing using the Optimize button as well as re-rectifying using the Rectify button, the rectification can be improved on the basis of the corrected inputs. This can be repeated as often as necessary.

    Note: Every new rectified picture consumes memory in the computer. To save resources you should regularly close unused windows. This is done with a double click on the close symbol in the title bar of the respective window.

  • Chapter 2 - Working with PC-Rect 19

    Connecting Several Pictures PC-Rect allows the connection of several pictures using two common points in each picture.

    To do this, first rectify two pictures, or load two rectified pictures using the menu option File - Open Picture.

    Use the menu option Connect - Enter Connection Points to define the connecting line in the first window as follows:

    1. Put the cursor on the first connection point. Press and hold the left mouse button.

    2. Move the cursor to the second connection point and release the left mouse button.

    3. Repeat this procedure in the second picture, taking care to mark the connection points in the same order (the second point is marked with a square). Both start and both end points are assumed to be identical in position for the connection.

    The menu option Connect - Connect is used to connect the two pictures, after allowing the definition of some additional options. The resulting picture is presented as new picture. The originals remain unchanged.

    Lense Distortion Open and print the file pattern.pdf in the PC-Rect 4.1 directory

    Cover the picture with a glass plate and take a photo with the correspondent lense and the correspondent focal width. In this sample it is a EOS 50 D. The glass plate used as a cover so that the picture is on the table surface

    .

    Save the photograph in a directory for all your lense distortions.

  • 20 Chapter 2 - Working with PC-Rect

    For the name of the file it is useful to take the camera name and focal length (e.g. Canon EOS 50 D 17mm).

    You can also find the focal length details of the pictures in the explorer by clicking the right mouse button on the file in the properties.

    Open the reference picture in PC-Rect 4.1. (full screen mode). Choose

    Enter the horizontal and vertical number of the squares as well as the length of one tile, measured on the printed pattern picture.

  • Chapter 2 - Working with PC-Rect 21

    Choose

    Important: calculate correction only one time! Every further correction causes errors. The correction recognizes 43 junctures. If they are ok, press save.

  • 22 Chapter 2 - Working with PC-Rect

    Rectification with Lense Distortion: Load the picture for rectification. Choose

    In the window which now appears you can see the focal length which was used for photography.

    Choose and load the corresponding correction data.

  • Chapter 2 - Working with PC-Rect 23

    Press Ok for the correction of this picture. Save the corrected picture - the filename...corr.JPG is suggested. Further rectificatis will be done with the corrected picture.

    Important: run only one correction!

    Lense Distortion after Rectification: You can also perform lense correction after rectification:

    Load the rectified picture and perform lense distortion as described above.

    Save the corrected picture as xxxcorr.jpg.

  • 24 Chapter 2 - Working with PC-Rect

    After that choose the first rectified uncorrected picture and choose and the picture will be changed with the corrected one.

    Use Shift key and left mouse button for opening the zoom window. You can adapt the reference points now.

    After that perform rectification again.

    Saving the Bitmap The rectified picture can be saved using the menu option File - Save Picture As. After activating this menu option the Save Bitmap dialog box appears. The desired bitmap format can be chosen from the following bitmap formats, which PC-Rect supports:

    Bitmap (*.BMP) Encapsulated Postscript (*.EPS) Graphic Interchange Format (*.GIF) JPEG (*.JPG) PCX (*.PCX) TIFF (*.TIF)

    After choosing an existing file name from the list box or defining a new file name in the file name edit box, the Save button is used to

  • Chapter 2 - Working with PC-Rect 25

    save the rectified bitmap. The Cancel button closes the dialog box without saving.

    Important: Always make sure that the correct picture is the active window before saving. This can be ensured by a single click using either mouse button anywhere in the picture or its title bar.

    Saving the Bitmap(s) as a Project The original picture(s) and rectified picture(s), along with all the measurements and rectification parameters, can be saved as a project file using the menu option File - Save Project As. After activating this menu option the Save Project dialog box appears. Projects are saved as *.prj files.

    After the project has been named and saved using the File - Save Project As menu option, subsequent saves can be made using the File - Save Project menu option.

    Note that if one or more of the bitmaps in the project have not been previously saved, the user will be prompted with the Save Bitmap dialog box also. File names must be entered for each bitmap if the user wants them included in the project file.

    Previously saved projects are loaded by selecting the File - Open Project menu option.

    Printing the Bitmap The scaling of the picture to be printed defaults to 1:100. If a different scale is desired, select the File - Printer Scaling menu option, which accesses the Printer Scaling dialog box. This box allows the printing scale and some other parameters to be defined. In addition, the resulting picture size is shown in relation to the paper size.

  • 26 Chapter 2 - Working with PC-Rect

    The exact form of the printout can be viewed using the menu option File - Print Preview. If the picture scaling is too large for one page, the picture will be printed over more than one page. However, this only applies to the length (top to bottom) of the picture. If the picture is too wide for the selected paper size, the user must move the picture in the Printer Scaling dialog box so that the desired portion of the picture width is printed. A number of printouts can be made this way, so that a large picture can be formed out of individual small sheets.

    The rectified picture can be printed using the menu option File - Print, or by using the Print button after selecting the File - Print Preview menu option.

    Creating a Drawing PC-Rect allows the user to overlay all pictures with drawings and text. For this purpose a drawing program has been integrated in PC-Rect. This program is activated by the menu option Drawing - Edit Drawing. Upon activating this menu option the Draw dialog box containing different drawing functions is displayed.

    .

    A detailed description of the drawing group tool buttons is contained in Chapter 3 "Menu Description".

  • Chapter 2 - Working with PC-Rect 27

    Working with PC-RECT 3D - a 3D Rectification (optional)

    The 3D version of PC-Rect can be used to generate a 3-dimensional drawing from two or more photographs. The general proceeding is very similar to the way you have to work in the 2D version. In addition you have to have two or more photographs of the object from which you want to get 3-dimensional information.

    The following steps have to be performed, steps which have been discussed previously are only mentioned briefly.

    Start the program Scan or load the photographs of the object. The area of interest does not have to be specified for the 3D

    rectification process.

    As for the 2D rectification several reference lengths have to be specified in each photograph to get the camera parameters, the 4 point method can be used also.

    The reference distances in all pictures have to be specified within the same plane. The first reference distance specified in each picture must have the same start point.

    For the 3-dimesional rectification the option Rectify in the Edit Length/Rectify dialog box should not be used.

    In the next step one has to specify corresponding lines and

    polylines using the toolbar button or the menu option in the 3D-Conversion menu.

    Each lengths and every polygon has to be specified in a least two photographs. The direction and reference number have to be the same in the different pictures. Each reference number can be used only once per object.

  • 28 Chapter 2 - Working with PC-Rect

    3D Example In this example three photographs have been used to get 3-dimensional information about the shape of a BMW 316. First of all you have to load the pictures (BMW 316-1.jpg to BMW-3.jpg).

    Next the reference distances to get the camera parameters have to be specified. The area of interest does not have to be specified for a 3D rectification. In this case the 4-point method can be used also to specify the triangle on the ground.

    It is important to specify reference distances on the same plane in all pictures, in this case reference distances on the ground are used. The first reference distance have to be the same in all pictures to get a reference for the camera position in the global coordinate system.

    For the length of the reference distance you have to specify one of the side lengths of the triangle, distances which are not correct for the triangle can be changed in the dialog box.

    So far 6 lengths have been specified as can be seen in the picture below.

  • Chapter 2 - Working with PC-Rect 29

    Using the menu option can be used to adjust the lengths of the reference distances to the correct values. For this triangle the distances 3, 4 and 6 have to be set to 1 m, the distances 1 and 1 have to be set to 1.41 m and the lengths of distance 5 has to be set to 2 m.

    To calculate the camera parameters you have to press Optimize, the Rectify option is disabled as no area of interest has been specified.

    To use this picture for the 3-dimensional rectification you have to select this picture as an input windows for the corresponding distances using the option in the 3D-Conversion menu.

  • 30 Chapter 2 - Working with PC-Rect

    Next you may proceed with specifying corresponding distances in the photographs using the menu option in the 3D

    conversion menu. The following drawing tool appears which can be used to specify corresponding lines and polylines in the photographs.

    : This tool can be used to specify corresponding lines.

    : This tool can be used to specify corresponding polylines, the endpoint of a polyline have to be set by pressing the right mouse button.

    : This tool can be used to move the corresponding lines or polylines or to change the position of their start and endpoints. The handling of these tool is the same as for the drawing program within PC-Rect. With a double click onto a certain line the reference number can be changed:

    The corresponding lines and polylines are numbered in an ascending order automatically by the program, however, the reference numbers can be changed by the user by double clicking on the line or polyline to change.

    The following pictures show corresponding lines and polylines in the three pictures for this project, corresponding lines and polylines have to appear in a least two pictures to be used in the 3-dimensional rectification.

  • Chapter 2 - Working with PC-Rect 31

    BMW 316-1.jpg

    BMW 316-2.jpg

  • 32 Chapter 2 - Working with PC-Rect

    BMW 316-3.jpg

    The calculation of the 3-dimensional drawing is performed automatically if the menu option automatic calculation is switched on in the 3D-Conversion / Options... dialog, otherwise the calculation can be started manually by selecting the 3D Conversion> menu item.

    The results of the 2D to 3D conversion can be seen in a perspective and in a plan view by choosing the menu option in the 3D-Conversion menu:

  • Chapter 2 - Working with PC-Rect 33

    Using the menu item Camera the two different views can be selected and the refresh properties can be changed.

  • 34 Chapter 2 - Working with PC-Rect

    Working with PC-Rect Video

    PC-Rect 4.1 also enables to handle videos. The process is in principle the same as in the preceding versions.

    The video must be divided into individual pictures, which are continuous numbered.

    A cut-out has to be selected and reference distances have to be defined.

  • Chapter 2 - Working with PC-Rect 35

    Using opens the Edit Lengths / Rectify window, where the parameters for the video-rectification can be defined.

    Videorectification activated: opens the Videorectification window and enables the video-rectification.

    Calculated: status of the rectification. The corresponding picture is shown in the preview window.

    Resolution: the number of pixels per meter (Pixels / [m]:) rectified size can be defined.

    Rectify: starts the rectify.

  • 36 Chapter 2 - Working with PC-Rect

    Videorectification: Specification of parameters, considered for joining the single video pictures. Therefore the definition of the parameters will have a direct influence on the computing time.

    No. of frames: specifies the number of pictures used for the rectify.

    Direction change: definition of an angle, which will be considered for a change of the direction.

    Shift left: definition of a considered movement in pixels to the left.

    Shift right: definition of a considered movement in pixels to the right.

    Shift down: definition of a considered movement in pixels to the bottom.

    Shift up: definition of a considered movement in pixels to the top.

  • Chapter 3 - Menu description 37

    Chapter 3 Menu Description

    File Menu for loading and saving pictures and projects, printing of pictures, data communication with PC-Crash, and selection of language and unit options.

    Open Picture (CTRL O) Select this menu option to load a picture. The Open Bitmap dialog box, which is a standard MS-Windows dialog box, appears.

    Look in Shows the drive or network from which the picture is to be loaded. The available network drives, directories or sub-directories are shown in the list box below. The active path can be changed by clicking on the corresponding item.

    File name This edit box contains the name of the picture to be loaded. It can be typed in or selected from the list box above.

  • 38 Chapter 3 - Menu Description

    Important: If a DXF drawing with the same name (except for the file name extension) exists in the same directory, the user may select an automatic loading of this drawing with the picture, by selecting Yes in the following message box which appears.

    Files of type Allows the user to select which type of bitmap files are displayed in the list box. By default all file types are shown.

    PC-Rect supports the reading of the following bitmap formats: Bitmap (*.BMP) Encapsulated Postscript (*.EPS) Graphic Interchange Format (*.GIF) JPEG (*.JPG) PCX (*.PCX) TIFF (*.TIF)

    Open Selecting this button loads the picture with the selected name.

    Cancel Closes the dialog box without loading the file.

    Save Picture (CTRL S) Select this menu option to save a picture. If the picture has not been previously saved, the Save Bitmap dialog box appears (see next section), prompting the user to enter a file name for the picture. If the picture has been saved previously, it will be saved under the file name given to it previously, over-writing the existing file.

    Save Picture As Select this menu option to save a picture under a new name or to save a new picture. The Save Bitmap dialog box appears.

  • Chapter 3 - Menu description 39

    Save in Shows the drive or network in which the picture is to be saved. The available network drives, directories or sub-directories are shown in the list box below this heading. The active path can be changed by clicking on the corresponding item.

    File name This edit box contains the name of the picture to be saved. The name can be typed in or selected from the list box above.

    Save as type Allows the user to select which type of file the bitmap will be saved as, and/or to select which type of files are displayed in the list box. By default all file types are shown.

    PC-Rect supports saving in the following bitmap formats: Bitmap (*.BMP) Encapsulated Postscript (*.EPS) Graphic Interchange Format (*.GIF) JPEG (*.JPG) PCX (*.PCX) TIFF (*.TIF)

    Save Selecting this button saves the picture with the selected name.

    Cancel Closes the dialog box without saving the file.

    Save All Pictures This menu option is used to select the file format that pictures will be saved in. The Save all pictures dialog box appears. See the previous section for the file formats supported by PC-Rect.

  • 40 Chapter 3 - Menu Description

    Open Project Select this menu option to load a project previously saved. See the next section for a description of a project. The Load Project dialog box appears.

    Look in Shows the drive or network from which the project is to be loaded. The available network drives, directories or sub-directories are shown in the list box below. The active path can be changed by clicking on the corresponding item.

    File name This edit box contains the name of the project to be loaded. It can be typed in or selected from the list box above.

    Files of type Allows the user to select which type of files are displayed in the list box. By default all only project files (*.prj) are shown.

  • Chapter 3 - Menu description 41

    Open Selecting this button loads the project with the selected name.

    Cancel Closes the dialog box without loading the project.

    Save Project The user can save all work done in PC-Rect as a project file. A project file can contain a number of pictures (original and rectified), as well as all rectification input and output parameters.

    Select this menu option to save the current session as a project file. If the project has not been previously saved, the Save project dialog box appears (see next section), prompting the user to enter a file name for the project. If the project has been saved previously, it will be saved under the file name given to it previously, over-writing the existing file.

    Save Project As Select this menu option to save a project under a new name or to save a new project. The Save Project dialog box appears.

    Save in Shows the drive or network from which the project is to be saved. The available network drives, directories or sub-directories are shown in the list box below. The active path can be changed by clicking on the corresponding item.

    File name This edit box contains the name of the project to be saved. It can be typed in or selected from the list box above.

    Save as type Allows the user to select which type of files are displayed in the list box. By default only project files (*.prj) are shown, as this is the only file format supported by PC-Rect for saving projects.

  • 42 Chapter 3 - Menu Description

    Save Selecting this button saves the project with the selected name. Note that if one or more of the bitmaps in the project have not been previously saved, the user will be prompted with the Save Bitmap dialog box also. File names must be entered for each bitmap if the user wants them included in the project file.

    Cancel Closes the dialog box without saving the project.

    Update PC-CRASH On selection of this menu option the active picture on the screen is automatically copied into the program PC-Crash, if PC-Crash is loaded on the user's computer and is open. The transfer of a rectified picture occurs true to scale.

    Scan Interface to the scanner. This menu option can only be used if a TWAIN compatible scanner is connected to the computer. After activating this menu option a window is displayed (the appearance depends on the type of the scanner) which allows the scanning of photographs.

    Scanner Selection If several scanners are connected to the computer, the desired scanner can be chosen using this menu option. A dialog box is displayed which contains a list of the available devices. After clicking on the desired device it can be selected using the Select button.

    Print

    (Or use CTRL P or )

    On selection of this menu option, which allows the printout of the picture on a printer, the Print dialog box appears.

  • Chapter 3 - Menu description 43

    In this dialog box, the printer and its properties can be selected, along with the print range and the number of copies.

    Print Preview

    (Or use )

    Selection of this menu option shows the actual appearance of each page to be printed.

  • 44 Chapter 3 - Menu Description

    Printer Setup Selection of this menu option allows the user to change the printer and its properties, along with the paper size, source and orientation (portrait or landscape).

    Printer Scaling Selection of this menu option allows the user to change the scale of the printout, in the Printer Scaling dialog box.

    Distance: Left Margin / Top Margin Allows the location of the picture on the paper to be changed, by specifying the coordinates of its upper left corner.

    By entering negative values, the right side of a picture wider than one page width can be printed.

    Size: horizontal/vertical

  • Chapter 3 - Menu description 45

    Allows the size of the bitmap to be specified. Either the horizontal or vertical value can be changed, after which the other value is calculated automatically.

    Scale Defines the scale of the rectified picture in the printout. If the scale chosen makes the picture too long for one page, it will be printed out over more than one page.

    Pixels/m or Pixels/ft Shows the bitmap resolution. The value indicates how many pixels in the bitmap correspond to one meter or one foot distance.

    Center Centers the picture on the page.

    OK Initiates the printing of the picture.

    Cancel Closes the Print dialog box without printing the picture.

    Options This menu option allows the user to select the desired language and units.

    Exit This option is used to exit PC-Rect.

    Edit Menu for copying and pasting pictures or parts of pictures, exchanging pictures with other applications, or modifying their color or resolution.

    Copy

    (Or use CTRL C or )

    Copies the selected picture into the Windows clipboard.

    By copying graphics into the Windows clipboard the previously selected clipboard content is overwritten.

    A portion of a picture can be chosen for copying by firstly using

    , the Zoom Window tool bar button. Zoom in on the desired

  • 46 Chapter 3 - Menu Description

    area by marking a corner of it in the picture (click and hold the left mouse button), then drag the cursor to the opposite corner and release the button. Now, use the Copy command to copy only the contents of the new, zoomed in window.

    Paste

    (Or use CTRL V or )

    Inserts the content of the Windows clipboard as a new picture on the screen.

    Gray Scale Transformation Transforms color pictures into black and white pictures with 256 shades of gray.

    Color Reduction This command, which is only applicable for 16 bit, 24 bit or 32 bit "true color pictures, reduces them to 256 colors. This can be done to reduce the file size of the picture if enough detail can be seen at the lower color level.

    Create True Color Bitmap Changes a 256 color image into a 24 bit "true color image.

    This is necessary when connecting two rectified images, to avoid color distortion of one of the images (see the menu item Connect).

    Bitmap Resolution By selecting this menu option the following information about the selected picture is displayed.

    Important: In this dialog box there is a check box that allows the X/Y relationship of the pictures to be retained. This check box should not be switched off or distortions of the pictures will occur.

  • Chapter 3 - Menu description 47

    Rectify Menu for changing reference length values and for performing the photogrammetric rectification process.

    Film Format This command allows the user to specify the cameras film size (default is nominal 35mm film, which is 24mm high x 36mm wide). The Film Format dialog box also shows the height and width of the selected picture in pixels.

    The film height is the only value that can be changed by the user in this dialog box. The film width is calculated automatically.

    Important: A wrongly specified film size will result in an incorrect calculation of the camera focal length. However, the result of the rectification is not influenced by this wrong value, unless the focal length is fixed in the Edit Lengths/Rectify dialog box.

    Display Distances All defined distances and the selected area of rectification will be displayed on the picture if this menu option is selected. The defined distances are displayed in red and the area of rectification is displayed in green.

    Define Area

    (Or use )

    This menu option is used to draw a polygon around the area to be rectified.

  • 48 Chapter 3 - Menu Description

    After selection of this menu option, the used draws the polygon by moving the cursor to the desired position and clicking the left mouse button to select points in succession. The last leg of the polygon is closed with a click of the right mouse button.

    Important: To maximize the amount of detail in the rectified picture, keep the area of rectification as small as possible.

  • Chapter 3 - Menu description 49

    Define Distances

    (Or use )

    For the definition of up to ten known reference lengths in the picture. Reference lengths can only be defined after the area of rectification is defined (see previous section).

    After activating this menu option the reference lengths can be defined as follows:

    1. Move the cursor to one end of a reference length. Press the left mouse button and hold it down.

    2. While holding the left mouse button down, move the cursor to the other end of the reference length and release it.

    3. After releasing the left mouse button the Enter Length dialog box is displayed, in which the length of the specified distance is entered. This value can be changed later in the Edit Lengths/ Rectify dialog box.

    The Enter Length dialog box also includes a 3D Parameter check box. If this is selected, the dialog box expands to include heights z1 and z2 for each reference length. These heights are the distances of points above the road plane, normal to the plane. The z1 dimension is for the first point of the reference length and the z2 dimension is for the second point defined.

  • 50 Chapter 3 - Menu Description

    For example, if there is a traffic cone on the road and the top of it is selected as the second point of a reference length, the height of the cone must be entered by the user next to z2.

    Important: Always use long reference lengths. The greater the reference length the more accurate the result will be. In addition both orthogonal and diagonal reference lengths should be used. Try to locate the reference lengths in the area of the picture that is of interest for the rectification.

    Zooming the End Points To define the end points of the reference lengths more accurately, selected areas of the picture can be zoomed at any time. To activate the zoom feature, hold the SHIFT key down and click on the area to be zoomed with the left mouse button. The selected area immediately appears in a separate window in approximately five-fold enlargement. The point where the cursor was in the picture is the center of the zoom window.

    The reference length lines are also visible in this zoom window. The endpoints of the lines can be moved with the mouse in this zoom window. Click and hold the left mouse button with the cursor on the endpoint and move it to the desired position.

    When several endpoints are at the same position, they can be moved together by pressing and holding the SHIFT key while clicking on the respective endpoints.

  • Chapter 3 - Menu description 51

    The Zoom window can be closed by clicking the left mouse button on the close symbol in the title bar or by pushing the ESC key.

    4 Point Method

    (Or use )

    This menu option is also for defining reference lengths (see previous section), except that it allows the definition of six reference lengths in one step. It can be used only when all reference distances between four points are known. As with the method of defining reference lengths individually, this menu option can only be used after the area of rectification is defined.

    All four points are defined in order around the perimeter of the quadrilateral, rectangle or square by a single click on the left mouse button for each point. After marking the last point the Enter Length dialog box is displayed which allows the user to specify the length of the first reference distance.

    If the four points define a square all six reference lengths are calculated automatically. Otherwise the lengths for all but the first reference distance must be changed in the Edit Lengths/Rectify dialog box.

    Edit Lengths/Rectify

    (Or use )

    After activating this menu option the Edit Lengths/Rectify dialog box is displayed. This dialog box is used to view and change reference lengths and camera parameters, and to perform the rectification.

  • 52 Chapter 3 - Menu Description

    Length Given lengths of all reference lengths. Values can be changed at any time in these edit boxes.

    Weight Definition of the weighting (default = 100%) for the individual reference lengths. The given weight influences how much each reference length is taken into consideration for the optimization process.

    Higher values give a higher weight to the applicable reference distance during the optimization and lower values give less weight. If the value 0 is entered in this window, the reference distance is not taken into consideration during the process of optimization.

  • Chapter 3 - Menu description 53

    Del. These buttons allow the deletion of individual reference distances. Pushing one of these buttons deletes the reference length next to it, and all following defined distances are shifted one line upwards.

    Fix This button accesses the Fix Parameters dialog box, where individual camera parameters can be fixed during optimization. All combinations of fixing the four parameters are possible.

    Show 3D Parameters This check box is used to expand the Edit Lengths/Rectify dialog box to include the 3D parameters (heights z1 and z2), if required.

    Videorectification

  • 54 Chapter 3 - Menu Description

    This check box is used to expand the Edit Lengths/Rectify dialog box to include the Videorectivication parameters if required.

    Cam. Inclination, Height, Rotation and Focal length These four edit boxes show the camera parameters. They can also be used to change the parameters. Each parameter can be changed either by typing it in the edit box or by using the slider adjacent to it. If a new value is defined all errors are calculated automatically. If a parameter is selected in the Fix Parameters dialog box, the value shown in the applicable edit box will remain fixed during the optimization.

    When the matching Opt. button is pressed, PC-Rect adjusts the value of that parameter to minimize the weighted total error.

    Definitions: Camera Inclination - Angle of the camera lens axis below horizontal, in degrees (where horizontal is parallel to the road plane).

  • Chapter 3 - Menu description 55

    Camera Height - Distance of the camera above the road plane, normal to the plane, in meters or feet.

    Camera Rotation - Rotation of the camera about its lens axis (Positive degrees clockwise from horizontal, as viewed by the photographer), in degrees.

    Camera Focal Length - Nominal distance of the node of emission of the camera lens to the film plane, in mm.

    Optimize When this button is pressed, the optimization process is started. During this process, PC-Rect varies all camera parameters which were not fixed in the Fix Parameters dialog box, in order to obtain a minimal weighted total error of all the entered reference lengths. The optimization can be canceled at any time by a single click on the right mouse button.

    1st Approx. A first approximation of the camera parameters is calculated instantly when this button is pressed. This feature is available only when the four point method has been used.

    Print Prints the rectification parameters, the reference distances and their errors.

    Rectify Rectifies the picture to a scale plan view, after optimization. The time necessary for the rectification depends on the computer type as well as on the file size of the produced bitmap (see Resolution, following). The rectified image is displayed on the screen, along with the rectified reference lengths and defined area of rectification.

  • 56 Chapter 3 - Menu Description

    Cancel This button is for closing the Edit Lengths/Rectify dialog box without rectifying the picture. The specified rectification parameters will remain unchanged.

    Resolution Edit box for the definition of the resolution of the rectified picture. The input is in pixels/meter or pixels/foot. The size of the rectified area, and the file size of the rectified picture, which depends on the resolution, are shown below this edit box.

    Videorectification Specification of parameters, considered for joining the single video pictures. Therefore the definition of the parameters will have a direct influence on the computing time.

    No. of frames Specifies the number of pictures used for the rectify.

    Direction change Definition of an angle, which will be considered for a change of the direction.

    Shift left Definition of a considered movement in pixels to the left.

    Shift right Definition of a considered movement in pixels to the right.

    Shift down Definition of a considered movement in pixels to the bottom.

    Shift up Definition of a considered movement in pixels to the top.

    Connect Menu for the connection of several rectified pictures.

    Enter Connection Points This menu option is used to define two common points in each of two rectified pictures for the connection of the pictures.

    The connection points are selected the same way as the reference lengths are (see Rectify - Define Distances). After clicking the left mouse button on the first connection point, keep it pressed while moving the cursor to the second connection point. A violet line marks the connection line. The end point of the line (the second point selected) is marked with a small square. Repeat this in the second picture.

    The connection points can be redefined at any time.

    Zooming the Connection Points

  • Chapter 3 - Menu description 57

    To define the connection points more accurately, the user can zoom in on them the same way reference length end points are - hold the SHIFT key down and click on the area to be zoomed with the left mouse button. The selected area immediately appears in a separate window in approximately fivefold enlargement. The point where the cursor was in the picture is the center of the zoom window.

    The connection lines and end points are also visible in this zoom window. The connection points can be moved by clicking the left mouse button with the cursor on the connection point and moving it to the desired position.

    The Zoom window can be closed by clicking the left mouse button on the close symbol in the title bar or by pushing the ESC key.

    Delete Connection Points Selection of this menu option deletes all previously defined connection lines.

    Connect This menu option is used to connect two rectified pictures.

    Before the pictures can be connected, a connection line must be defined in each of the two pictures to be connected (see the previous section). When activating the Connect menu option, the length of these two connection lines are compared. Depending on the length difference (defined in % as [long length/short length - 1] * 100), PC-Rect does one of the following:

    1. If the length difference is too large (> 100%), an error message is displayed and a connection is refused.

    2. If the length difference is not too large (10% to 100%) a warning

    appears, but the connection may be performed.

  • 58 Chapter 3 - Menu Description

    3. If the length difference is less than 10%, the Connect dialog box

    opens immediately.

    The Connect dialog box includes the following: Main picture Specify which is to be the main picture and which is to be the secondary picture.

    Guideline: The secondary picture is rotated and adjusted in size to fit the main picture, which is not changed.

    Resolution Specify whether or not the resolution of the secondary picture should be changed to that the main picture.

    Connection Overlapping

    One picture overlaps the other picture. The two option buttons Overlapping 1 and Overlapping 2 allow the user to choose which picture is on top.

    Not Overlapping

    The two pictures are cut on the connection line and joined together.

  • Chapter 3 - Menu description 59

    The two option buttons Version 1 and Version 2 allow the user to choose which part of each picture is to be used.

    Connect Operation of this button connects the two pictures. The connected picture is shown on the screen.

    Cancel This button is for closing the Connect dialog box without connecting the pictures.

    Picture Menu for modifying picture appearance.

    Redraw Picture (F2) Repaints the active picture using the correct color palette. This menu option is useful for restoring the appearance of a picture on the screen if it is not shown correctly.

    Contrast / Brightness Menu option for changing the contrast and brightness of the active picture.

  • 60 Chapter 3 - Menu Description

    Picture contrast and brightness can be changed using the first two sliders in the Contrast & Brightness dialog box.

    In a picture with 256 colors or shades of gray, the influence of these parameters can be seen immediately by moving the slider. For higher color resolutions, select the Preview button after moving the slider.

    Select the OK button to accept the changes. Select the Reset button to return the settings to the original ones.

    Important: When this dialog box is closed by pressing the OK button, the picture is automatically converted and repainted using the new values for Contrast & Brightness. Information in the original picture will be lost, as contrast shades will be eliminated. It is not possible to go back to the original values.

    Invert Transformation of the picture from the positive into the negative and the reverse. This procedure is repeatable without affecting the quality of the picture.

    Adapt Palette If different pictures with different palettes are loaded simultaneously, this menu option ensures that the picture in front is presented in its original palette and all other pictures are converted automatically to this palette.

    If the button is off, the picture in front is again presented in its original palette. However, the other pictures are not adjusted automatically. Different pictures in the background may look temporarily destroyed.

    The original palette can always be reconstructed using the menu option Redraw Picture (F2).

    Bitmap Palette Activating this menu option displays the color palette of the selected picture.

  • Chapter 3 - Menu description 61

    System Palette Activating this menu option displays the current operating system color palette.

    Rotate Bitmap This menu option is used to rotate pictures. Pictures can be rotated 90 degrees clockwise, 90 degrees counterclockwise or by a user-defined angle.

    For the user-defined angle, a positive rotation angle results in a counterclockwise rotation.

    The picture is rotated by a different method if the rotate button

    ( ) in the tool bar is used instead of the Rotate menu option. After pressing this button, a base line is drawn by pressing and holding the left mouse button. On release of the button, a second line appears, with its origin at the same point as the first lines. Move the cursor so that the angle between the first and second lines is the desired rotation angle, and then press the left mouse button again. The Rotate Bitmap dialog box will appear, showing the defined angle. Push OK to rotate the picture. Important: If you rotate a picture with a user-defined angle rather than +/-90, the program defines a new framing window which is bigger than the original. With any such rotation the memory requirements for the picture increase and the user should attempt to keep the number of rotations per picture as low as possible. Also, the quality of the picture decreases with every rotation.

    Fast Bitmap This option allows switching between two different Bitmap presentations. If the menu option Fast Bitmap is activated (indicated by a 9 beside it) PC-Rect tries to draw the bitmaps as fast as possible (high memory requirements). If the menu option Fast Bitmap is deactivated PC-Rect tries to draw the bitmaps with memory requirements as low as possible (slower presentation speed).

    This menu option can be toggled at any time during the program execution and memory is freed or reserved automatically. The memory requirements of the program are approximately double if Fast Bitmap is selected.

    View This menu allows selection of the drawing options. Either the drawing, the photo or the two together can be visible on the

  • 62 Chapter 3 - Menu Description

    screen. After starting the program always ensure that both switches are on. The selections are always related to the active window, so it is possible to see the picture in one window and the drawing in another.

    Bitmap Activates or deactivates the display of the bitmap in the selected window. Choosing this menu option toggles the command.

    Drawing Activates or deactivates the display of the drawing in the selected window. Choosing this menu option toggles the command.

    Show Whole Picture (F3) This menu option is used after zooming in on a picture to show the whole picture.

  • Chapter 3 - Menu description 63

    Tool Bar Toggles the display of the toolbar at the top of the screen.

    The toolbar contains the following buttons:

    Load picture

    Save picture

    Print picture

    Print preview

    Copy picture

    Paste picture

    Define area to be rectified

    Define distances using four point method

    Define distances individually

    Edit lengths / rectify

    Zoom in

    Zoom out

    Zoom window

    Rotate picture

    Create/modify a DXF drawing

    Access Help file (on screen manual)

    Status Bar Toggles the display of the status bar at the bottom of the screen.

    Drawing PC-Rect includes a simple drawing program so that pictures can be overlayed with drawings and text. This menu covers all operations required to create, modify and save drawings.

  • 64 Chapter 3 - Menu Description

    Open Drawing This menu option loads previously saved drawings.

    The Open dialog box contains the following:

    Look in Shows the drive or network from which the drawing is to be loaded. The available network drives, directories or sub-directories are shown in the list box below. The active path can be changed by clicking on the corresponding item.

    File name This edit box contains the name of the drawing to be loaded. It can be typed in or selected from the list box above.

    Files of type Allows the user to select which type of files are displayed in the list box. By default only DXF file types are shown, which is the only drawing format PC-Rect supports.

    Open Selecting this button loads the drawing with the selected name.

    Cancel Closes the dialog box without loading the file.

    Save Drawing This menu option saves drawings created or modified in PC-Rect.

  • Chapter 3 - Menu description 65

    The Save As dialog box contains the following:

    Save in Shows the drive or network in which the drawing is to be saved. The available network drives, directories or sub-directories are shown in the list box below. The active path can be changed by clicking on the corresponding item.

    File name This edit box contains the name of the drawing to be saved. It can be typed in or selected from the list box above.

    Important: If the name given to the DXF drawing is the same name (not including the file name extension) as the picture it is on, and is saved in the same directory as that picture, the user will be prompted with the following message the next time the picture is loaded. The user can then load the drawing with the picture by selecting Yes in this message box.

    Another way of incorporating the drawing into the picture is to copy the window containing the picture and drawing to the windows

    clipboard , and then use the paste command to create a new picture. The new pasted picture will contain the drawing objects in bitmap form (they can no longer be modified as drawing objects), such that a separate DXF file is not required.

    Note, however, that the pasted bitmap will have only have the correct scale if the original picture was rectified at 50 pixels/meter. If it wasnt, the pasted picture will have to be scaled to the proper size using the Scaling menu option.

    Save as type

  • 66 Chapter 3 - Menu Description

    Allows the user to select which type of files are displayed in the list box. By default only DXF file types are shown, which is the only drawing format PC-Rect supports.

    Save Selecting this button saves the drawing with the selected name.

    Cancel Closes the dialog box without loading the file.

    Load Object This menu option loads previously saved drawings as objects.

    This command is the same as Open Drawing, except that all elements of a drawing loaded as an object are active after loading. The object can thus be moved and rotated as a unit immediately after loading it. This menu option is useful for loading traffic signs, vehicles, etc.

    Object Library PC-Rect allows the user to load graphical objects from a library. All objects are displayed graphically in a separate window. The names of these objects (which must be DXF files) have to be listed in a file with the extension ".lbr".

    On activation of this menu option the Symbols window is displayed, in which there is a list of available objects. Select the desired object by clicking on it. It will be loaded automatically when the Copy button at the bottom of this window is pressed..

    Edit Drawing

    (Or use )

    Activation of this menu option displays the Draw toolbox, which contains different drawing functions.

  • Chapter 3 - Menu description 67

    In addition to the tools in the Draw toolbar, a menu containing other functions can be accessed by right-clicking in its title bar or by left-clicking on the Windows symbol in the title bar.

    Move

    Close Move the Draw toolbar

    Close the Draw toolbar

    About Provides program information

    Snap Snap and Snap Spacing are selected here. When drawing with any drawing tool, and also when drawing Friction Polygons, Slope Polygons and Vehicle Paths, the drawn point will snap to the selected spacing.

  • 68 Chapter 3 - Menu Description

    Scale The selected drawing components can be scaled here.

    Select all Selects all drawing components.

    Rotate selected (3D) The selected drawing components can be rotated about the X, Y or Z axes here.

    Shift selected (3D) The selected drawing components can be

    shifted along the X, Y or Z axes.

    Scale selected (3D)

    The selected drawing components can be scaled along the X, Y or Z axes separately.

  • Chapter 3 - Menu description 69

    Insert object DXF drawings can be loaded as "objects". A DXF drawing object can be moved as a unit, independently of the main DXF drawing

    Save selected The selected drawing components can be saved as a DXF drawing

    Triangulate selected 3D surfaces can be created from a drawing containing 3D points. This feature is useful for creating 3D scenes from total station survey DXF files or contour lines.

    After selection of the desired points and

    activation of this feature, 3D triangular surfaces are created between the selected points.

    The following tool buttons are contained in the Draw toolbar:

    Select, Move This button is initially active when the Draw toolbar is opened. This enables the selection of existing drawing objects by clicking the cursor on the object with the left mouse button. After selection, objects can be moved, modified or scaled. Multiple elements can be selected by framing all objects within a window drawn with the mouse, or by holding down the SHIFT key while selecting additional objects.

    Modifying Objects - If only one single object is active, it can be modified in shape by moving the corner points (marked with small squares) with the left mouse button pressed.

    Moving Objects - If one or several objects are active, they can be shifted to a different location by putting the cursor on the object, clicking and holding the left mouse button, and moving the object to the new location.

    Selecting all Objects - If the whole drawing is to be moved,

  • 70 Chapter 3 - Menu Description

    rotated or scaled, all objects can be selected using the menu option Drawing - Select All Objects.

    Rotate Selected

    Operation: When this button is pressed, the symbol , which identifies the center of rotation, appears. Click and hold the left mouse button with the cursor on this symbol to move the center of rotation. Rotate the selected object(s) by clicking on any point outside this symbol in the drawing area and moving the cursor with the left mouse button pressed. The new position of the objects is displayed immediately.

    Measure Line Creates a dimension line of any length and direction.

    Operation: Mark the starting point of the line with the left mouse button pressed and held. Move the cursor to the opposite end of the line and release the left mouse button. If you simultaneously press the SHIFT key, the angle of the line will always be 0, 45 or 90 degrees.

    Line Creates a line of any length and direction.

    Operation: Click and hold the left mouse button to draw the first point and release it at the second point. If you simultaneously press the SHIFT key, the angle of the line will always be 0, 45 or 90 degrees.

    Polyline Creates an open polyline, consisting of several line parts.

    Operation: Click and hold the left mouse button to draw the first point and release it at the second point. Click at the desired locations to define subsequent points. If you simultaneously press the SHIFT key, the angle of the line will always be 0, 45 or 90 degrees. A single click of the right mouse button completes the polyline.

    Polygon Creates a polygon, consisting of several line parts.

    Operation: Click and hold the left mouse button to draw the first point and release it at the second point. Click at the desired locations to define subsequent points. After entering all points of the polygon, click the right mouse button to close the last side of the polygon. If you simultaneously press the SHIFT key, the angle of the line will always be 0, 45 or 90 degrees. A single click of the right mouse button closes the polygon.

    Note: Individual points of Lines, Polylines and Polygons can be

    adjusted using the button (they must be highlighted first) to access the Change Object window.

    The X, Y and Z coordinate of the ends of each line segment can be changed, and a radius can be applied between each line

  • Chapter 3 - Menu description 71

    segment. Alternatively a slope between the points can be defined, the second and the following points are adjusted. The current line segment, denoted by a number in the right portion of this dialog box, is highlighted with red endpoints on the main screen.

    Rectangle Creates a square or rectangle.

    Operation: Mark the starting corner of the square or rectangle with the left mouse button pressed and held. Move the cursor to the opposite corner and release the left mouse button.

    Circle Creates a circle or ellipse.

    Operation: Two selected points always define the surrounding rectangle of the circle or ellipse. Mark the starting corner of the circle or ellipse with the left mouse button pressed and held. Move the cursor to the opposite corner and release the left mouse button. If you simultaneously press the SHIFT key, a circle is automatically created.

    Arc Creates an arc of a circle.

    Operation: First, the full circle must be created. Mark the starting corner of the circle with the left mouse button pressed and held. Move the cursor to the opposite corner and release the left mouse button at the desired circle size. Then, define the beginning and end angles of the arc segment with single clicks of the left mouse button.

    Text Enters text.

    Operation: Mark the position where the text is to be entered in the drawing area by clicking the left mouse button. Then, type in the desired text.

  • 72 Chapter 3 - Menu Description

    Change Line Style Changes line styles, layers, colors and other object features.

    Operation: After pressing this button, the following dialog box appears:

    All changes done in this dialog box refer to objects that have been selected. If this menu option is chosen when no object is selected, the changes are for all future drawing operations.

    Different line styles can be selected, the layer can be selected, Line ends can be changed to different types. Line widths can be changed. The total width of the line is the sum of its left and right halves. There are several possibilities for wide line fill patterns (these hatch patterns are for lines only, not shapes, which can only be filled with a solid color).

    Filled fills rectangles, ellipses or polygons with a solid color.

    BSplines changes straight segments of polylines and polygons to curved segments.

    Color Buttons - the colors of all chosen objects can be changed in the Color dialog box that these buttons access. The left Color button is for all objects and lines. The right Color button is for the line fill, if a Line Width > 0 has been selected. To select a new color click on the desired box. By selecting the Define Custom Colors button, additional colors can be defined.

    Change Font, Text Color

    Modifies text. Text can also be modified by double-clicking on it. The following dialog box is displayed:

  • Chapter 3 - Menu description 73

    This dialog box allows the user to change the text color, size, the layer, font and content. Text several lines long can be entered in this window.

    Group Groups selected drawing components into objects, which can then be moved, rotated or scaled as one.

    Ungroup Ungroups selected drawing objects.

    Bring to Front This and the following tool work between lines only. This tool brings the selected line to the foreground.

    Move to Back Puts the selected line in the background behind other lines.

    Generate Road Element Draws a straight or curved road section. Road parameters are defined in the three folders of the Road Section dialog box.

  • 74 Chapter 3 - Menu Description

    Up to 6 lanes can be chosen. Different colors can be chosen for the different lines and road components. The dashed line spacing can be changed. The Filled check box allows the road to be shown in full color (below), or in outline only.

    Road sections can be easily joined to one another or to intersections (see next item) by moving the section so that the red line at the end is near the red line on the end of the other section or the desired street of an intersection. The road section will snap into place at the correct angle.

    Properties can be redefined at any time by double- clicking on a line or edge of the desired road section or intersection.

    Generate Intersection Draws an intersection, using the Intersection dialog box. An intersection with up to six streets can be created.

    After the roads and intersections are created, lines and symbols can be added using the other Drawing Toolbar tools. In the following figure, crosswalk lines have been drawn and left turn

  • Chapter 3 - Menu description 75

    symbols from the symbol library have been added.

    Copy Selected A copy is made of the selected objects. The copy will be attached to the cursor, and can be inserted by moving it to the desired location and clicking the left mouse button.

    Delete Selected All selected objects can be deleted with this tool or by pushing the DELETE key.

    Symbol Library Drawing symbols from a library can be loaded. Refer to the description under the Drawing Symbol Library menu option.

    Scale Selected The selected drawing components are scaled by the amount in the Scale Factor text box.

    Layers The Name of the Layers can be defined (select the Layer in the Layers box and change the text in the Name textbox). The name will be updated in all other windows. Within the Layers box different layers can be activated/deactivated.

  • 76 Chapter 3 - Menu Description

    The created drawings and text are relevant for the layer selected

    in the Layer selection box at the bottom of the Draw Toolbar. If the layer should be changed select the relevant

    drawings and use the Line styles window ( change linestyles)

    to change the layer. For text use the Fonts window ( change font, text color) to change the layer.

    Change objects Individual points of Lines, Polylines and Polygons can be adjusted using the Change Object window (they must be highlighted first).

    The X, Y and Z coordinate of the ends of each line segment can be changed, and a radius can be applied between each line segment. Alternatively a slope between the points can be defined, the second and the following points are adjusted. The current line segment, denoted by a number in the right portion of this dialog box, is highlighted with red endpoints on the main screen.

    Text can be positioned, scaled and rotated.

  • Chapter 3 - Menu description 77

    Solids:

    Circles can be defined using the enveloping rectangular or by selecting radius and center.

    Select All Selection of this menu option activates all DXF objects in the active window so they can be moved, rotated, or deleted together.

    Scale Objects This menu option allows the user to change the size of the selected objects in relation to the picture. When using this menu option the user must be aware that the size of the selected objects changes in relation to the bitmap picture.

    After activating the menu option the zoom (scale) factor can be entered. If the factor is greater than 1 the selected objects are enlarged and if the factor is less than 1 they are reduced.

  • 78 Chapter 3 - Menu Description

    Important: Drawing objects are always enlarged or reduced according to their actual center. If more than one object is selected, they may disappear from the visible image area if enlarged too much.

    Scaling This menu option allows the definition of the number of pixels that represent one meter of reality. This value also influences the display of the integrated tape measure. If the picture results from a rectification in PC-Rect, this factor is already defined correctly, as given in the Edit Lengths/Rectify dialog box.

    After activating this menu option the scale factor of the selected picture (in pixels/meter or pixels/foot) can be entered in the Picture Scaling dialog box using the slider or by typing in the value.

    Important: When a previously rectified bitmap is loaded into PC-Rect, the default scaling factor is 50 pixels/meter or 15 pixels/foot. If it was originally rectified at a different resolution, the user will have to change the scale factor accordingly so that the bitmap is scaled correctly, either for connecting with another bitmap or when using the measuring tool.

    3D-Conversion (optional) This menu option can be used to generate a 3-dimensional drawing of an object from 2 or more photographs, where corresponding lines and polylines have to be identified