This brief description of ShiftN refers to version 4.0

Translated to English by Hal Hagan and Keith Morris



==== ShiftN functionality =====

Converging lines in photographs, particularly of buildings, forests and so on, can often detract from the desired effect. Architectural elements in photographs often have diagonal lines, but the mind thinks of buildings as having vertical and horizontal lines. Converging lines are caused by the film-plane being angled relative to the object of the photo, and that effect can be avoided optically by the use of either a shift lens (quite expensive) or the use of a medium or large-format view camera having swing features. With a shift lens, the lens itself is shifted perpendicularly to the z-axis, so that the film level can remain parallel to the subject. Shift lenses are mechanically and optically more complex than standard lenses, which is why they are comparatively expensive. Often, one is shooting with a "point and shoot" camera, where the option of changing lenses does not exist. The advent of digital photography or scanning existing photos from prints opens up new possibilities for manipulating the picture. Here is where ShiftN shows its strength.

ShiftN permits correction of converging lines; a majority of the correction work is taken over automatically by the program. Using the "automatic correction" item in the menu is in most cases sufficient to produce a satisfying result. Both the effects of converging lines and poor camera angle are corrected automatically.

The process in ShiftN is to search the image first for straight lines and edges, and to consider those which are sufficiently vertical to be likely architectural elements. On the basis of these straight line segments the program runs an optimization process that attempts to determine perspective, correcting the image so the lines are made parallel to each other.


=========== Options ===========

To control the action of ShiftN, various parameters can be set using menu Options | Parameter. The user can make changes safely, since all values can be reset to their defaults at any time using the Reset button on the parameter panel.

The first parameter (minimum line length) indicates how long lines must be to be considered for the calculation of convergence angle. If this number is too small, it can cause most of the lines found in the picture to be considered - even those that do not come from buildings but from trees or clouds. This can lead to poor or inaccurate correction results. If the number is too large then line length guide might fail to find suitable guide lines on which to base the correction. A setting of "0" lets the program determine a value.

The parameter "minimum line contrast" specifies the contrast between the lines and the background in order for lines to be considered as guides. If the contrast setting is too low, the program chooses more lines, which can also lead to poorer results.

The parameter Maximum Tangential Deviation determines the maximum angle in degrees, for which a line is still to be understood by the program as likely to be a vertical line. For example, a setting of 45 would still permit lines which run diagonally under this angle.

Note: Often architectural photographs appear more natural if the perspective correction is not applied to correct the picture 100%, but perhaps only to 80% it will reduce, but not eliminate the convergence of lines in the photo. This is a question of aesthetic interpretation. Anyhow the degree of the correction can be regulated over a percentage figure in the field "Amount of Correction [%]".

ShiftN implements perspective correction in such a way that it emulates a shift lens with the same focal length, however this sometimes leads to unnatural changes to the picture in the horizontal dimension, particularly with photos taken using longer focal lengths. The parameter for the horizontal resolution specifies whether to correct according to the focal length (value: 0.0) or to use a focal length-independent neutral value (1.0) for the correction. The value 0.5 could represent a compromise.

Beside convergence correction (shift, rotation) radial distortion errors can also be reduced - these result from the optics of the camera, especially with the use of very wide-angle lenses. If the user wants to correct this effect, use a value between -1 and +1 (correction of barrel or pincushion distortion) for the Radial Distortion value. This should be done with care since distortion of zoom lenses varies substantially according to selected focal length.

The perspective correction depends on the focal length. Therefore also this parameter can be entered in to the program, whereby the focal length is to be indicated here in millimeters according to the 35mm equivalent. Focal length dependence shows up in the result by interfering with the picture perpendicularly to the shift direction. With JPEG pictures of certain cameras the program tries to determine the focal length from the EXIF data. If that is not possible and the focal length used with the photographs is not readily determined, it can be estimated. Usually one is correcting convergence distortion caused by the use of wide-angle lenses, so the program takes a "safe" standard assuming a 28mm wide-angle lens was used.

Computation of the perspective correction can be done substantially faster if the picture is reduced in resolution. The resolution parameter specifies the approximate picture size to be used. This setting has no impact on the final picture's resolution, but maybe on the quality of the perspective correction.

If one does not want to accomplish an automatic correction of camera rotation, one can deactivate this feature by un-checking the "Try to correct rotations automatically" checkbox.

Many digital cameras store camera orientation information in the EXIF data, which contains information as to how the camera was positioned/angled when the photo was taken. Thus the pictures can be easily corrected automatically when this information is available. This makes ShiftN very effective at correcting JPEG pictures, if the "Rely on EXIF orientation tag" checkbox is checked. Unfortunately the appropriate EXIF information may be inconsistent, especially if the pictures have already been processed with other software. Therefore this type of correction should be used with caution.


========= File formats ========

If a photo was corrected and the result is satisfactory, ShiftN offers three file formats (JPEG, BMP and TIFF) for saving the corrected photo. These can be selected through the menu "Options | Type of Output".

Note that the correction procedure will produce white areas (usually at the bottom left and right of the corrected photo) because the perspective illustration of the picture is no longer a rectangle. Therefore one can specify that the program should eliminate these white areas by checking the "Trim pictures automatically" checkbox. This is done in such a way that as little of the original picture as possible is lost. However it can change the aspect ratio and important details might be inadvertently lost. In such cases the user would be better served to not use automatic trimming, and instead "lasso" the desired cutout in the ShiftN edit screen using the mouse. Lassoing with the right mouse button retains the original aspect ratio; lassoing with the left mouse button makes a selection from the corrected image.

For perspective corrections and the removal of distortion the picture must be re-interpolated. There are two options for re-interpolation, bilinear or bicubic interpolation. Using Bicubic interpolation a new calculation of the picture is made but image quality is better in the result. The procedure of interpolation is equivalent to the application of a low-pass filter, so that resharpening of the picture can enhance contrast detail of the original. ShiftN utilizes an unsharp mask filter, as in many other picture editing programs such as Paint Shop Pro or Photoshop. This is defined by a sharpening parameter, which indicates the factor, around which the detail contrast is increased. At value "1" no sharpening would take place; the value "1.3" restores the details of the original when used with bicubic interpolation.

Save the corrected output of ShiftN by means of menu "File | Save results". Corrected files are always saved in the same directory as the input file, but the default "_ShiftN" is added to the end of the original filename. This text addition to the file name can be custom configured. An empty input field leads to overwriting the original filename. One has free choice of the file name (without ending) under menu option "file, save results". During batch processing a separate directory listing is selected (see below). If the point of recording time from the EXIF information can be determined, this can be used as the file date for the result.

Alternatively to storing as a file, one can copy the contents of the workspace or a lassoed area using menu option "Edit | copy" or through the Windows-standard "Ctrl+C" keyboard command.


========= ShiftN use ==========

ShiftN as already mentioned is an extremely easy program to use. In most cases only the Automatic Correction button need be used. Thereby corrections are carried out automatically (if selected in checkbox settings). Pressing the "Page up" and "Page down" keys allows comparison between original picture and result of correction.

Depending on the picture content sometimes lines are used in correction computation which obviously don't belong to the relevant object, and which can give inappropriate results. In this case the user has the possibility of de-selecting in the outline drawing the detected individual segment lines (using the left mouse button or pressing the "Del" key). In a similar way switched off lines can be re-activated again (using the right mouse button). After making such changes, request a new computation of the perspective correction by clicking the Re-Optimize button.

If the user is still dissatisfied with the correction result, he can adapt the correction and manually intervene before using the automatically found (turn, shift) or fixed (distortion) values. This happens by clicking the "Adjust correction" button, and altering values by means of sliding controls or numeric input.

If a larger number of pictures is to be processed automatically, this can be specified in ShiftN using batch processing. In addition to specifying those files to be processed, one can also specify a directory for the output. The files are then processed with the current parameter option settings.


=== Command Line Parameters ===

Examples of calling ShiftN, with command line parameters:
"ShiftN.exe filename.jpg" loads the requested file directly.
"ShiftN.exe filename.jpg outputfile" loads the file, processes and stores the result under the argument given as "outputfile" in the example, with standard parameters.
"ShiftN.exe filename.jpg outputfile M1" loads the file, permits manual call of the processing (M), stores the result under "outputfile" as JPEG (1).
"ShiftN.exe filename.jpg outputfile A2" loads the file, processes it automatically (A), stores the result under "outputfile" as BMP (2).
"ShiftN.exe Clipboard Clipboard A 24" takes image data from the clipboard, processes it automatically (A) presuming a focal length of 24mm, and copies the result back to the clipboard.
The third parameter A and/or M specifies the behavior after program call, which indicates in optional values 1-7 which file formats the output file is to have (1: JPEG, 2: BMP, 4: TIFF). Note that these values are additive, so option 3 would indicate that options 1 and 2 are selected (outputting both a JPEG and BMP), or option 7 would indicate that options 1, 2, 4 (1+2+4=7) have been selected and the output(s) will be a JPEG, a BMP and a TIFF file.
A fourth parameter can be used to specify the focal length according to the 35mm equivalent.

Translated to English by Hal Hagan and Keith Morris

 

back