Image scaling

In computer graphics, digital imaging and scaling refers to the change in size of a digital image, with a distinction between raster and vector graphics. In video technology, the magnification of digital material as up-scaling ( upscaling ) or resolution enhancement is called.

When scaling of raster graphics image whose resolution is changed. This means that from a given raster graphics, a new image with a higher or lower number of picture elements (pixels ) is generated. When you scale a vector graphic, however, are before the screening graphical primitives, which make up the vector graphic, stretched by geometric transformation.

In contrast to the lossless scaling of vector graphics scaling of raster graphics is usually connected to a visible loss of quality. From the standpoint of the digital signal processing, the scaling of raster graphics is an example of sample rate conversion, the conversion of a discrete signal of a sampling rate (in this case the local sampling rate) to another.

  • 3.1 Requirements for technical graphics
  • 3.2 problems with linear scaling
  • 3.3 improvements by non-linear scaling

Applications

The scaling of images found, among other applications in Web browsers, image editing programs, image and file viewer, software, magnifying glasses, while using digital zoom, playback zoom and generation of preview images as well as on the issue of images through screens or printers.

The magnification of images is to be operated for the home theater area of ​​importance in the HDTV -enabled output devices with material in PAL resolution, which comes from a DVD player, for example. Upscaling is here ( video scaler ) of special chips performed in real time, wherein the output signal is not stored. The upscaling is therefore in contrast to the up-conversion of a material in which the output signal is not mandatory created in real-time, but will be stored instead.

Scaling methods for raster graphics

Scaling with Reconstruction Filter

Image processing programs typically provide several scaling methods. The most commonly supported method - pixel replication, bilinear and bicubic interpolation - scale the image by means of a reconstruction filter.

When scaling the given image grid must be transferred to a different large output grid. The scaling can therefore be concretely shown by the pixel grid of the output image to be calculated is placed over the pixel grid of the input image. Each pixel of the output image is assigned a color value which is calculated from the past in the vicinity of pixels of the input image. The reconstruction filter used to determine which pixels of the input image are used to calculate, and how their color values ​​are weighted.

A two-dimensional scaling in the reconstruction filter is placed over each pixel of the output image. The color value is calculated as the sum of the color values ​​of the overlapped by the support of the reconstruction filter pixels of the input image, weighted by the value of the reconstruction filter at these pixels.

Usually take reconstruction filter with increasing distance from the center. This nearby at the output pixel color values ​​are stronger, and further more distant weighted weaker. The size of a reconstruction filter is measured by the height of the input image and the reduction in the height of the output image.

Some reconstruction filters have negative portions; such filters lead to a sharpening of the image similar to the unsharp masking. This color values ​​can arise outside the permitted range of values ​​, which are then usually set to the minimum or maximum value. It must also be borne in mind that at the edges less pixels are overlapped by the reconstruction filter than in the rest of the image. To prevent dark pixels at the image edges, the filter must be renormalized here. In this case, the determined color value of the output image is divided by the sum of the values ​​of the reconstruction filter to the overlapped pixels of the input value. A further possibility is to use the nearest color value for the edge of the image falling outside the image points.

Construction of two-dimensional filter

When comparing different reconstruction filter, the one-dimensional filter can first be considered. Reconstruction filters that are defined as polynomials are also referred to as splines. Other well-known filters are the Lanczos filter and the Gaussian filter.

There are two ways in which a two-dimensional can be formed from a one-dimensional reconstruction filter, namely, by means of radial symmetry, and by separation.

The Gaussian filter is the only radially symmetric reconstruction filter, which is also separable. For all other filters leads the separable and radially symmetric produce different results.

Pixel replication

In the pixel repetition, also Nearest neighbor ( " nearest neighbor " ) called, each pixel of the output image, the color value of the closest pixel of the input image is assigned. The reduction of images using this method can lead to severe aliasing effects, which manifest themselves as image artifacts. At increase by pixel replication, there is a stand-offs like, " pixelated " representation.

At increase corresponds to the pixel repetition of the reconstruction with a 1 × 1 pixel box filter. Such a filter overlaps only one pixel of the input image, that is the closest.

Bilinear interpolation

In the bilinear interpolation, the color value of a pixel of the output image from the four neighboring color values ​​of the input image is interpolated.

This filter is separable and can be used as a series of interpolations with a one-dimensional reconstruction filter to be calculated ( the delta filter). In this case, an interpolated color value is calculated only for each of the two picture lines concerned, and then interpolating between the two vertical points. According to this method, the color value of the output pixel is calculated as follows:

The bilinear interpolation corresponds to the reconstruction with a filter of the functional equation for and in.

Bicubic interpolation

When bicubic interpolation, a color value of the output image from the neighboring color values ​​of the input image by means of cubic splines (see Mitchell Netravali filter) is interpolated. There are several commonly used cubic splines with different properties; the term " bi-cubic interpolation" is therefore ambiguous.

The image editor GIMP ( version 2.7) used Catmull-Rom splines. In this spline type it comes to overshoot the color values ​​at edges, which manifests itself as a sharpening of the image. The image editing program Paint.NET ( version 3:36 ), however, used cubic B -splines, which lead to a verschwommeneren representation. Catmull-Rom splines are also just - smooth, while cubic B - splines are smooth.

Both GIMP and Paint.NET use the separable version of the two-dimensional reconstruction filter with 4 × 4 pixels large carrier. As with the bi-linear interpolation of the two-dimensional filter can be replaced with a number of interpolations by a one-dimensional filter.

Other scaling methods

Non-linear scaling of vector graphics

Requirements for technical graphics

Technical drawings as the design, construction and survey plans and maps in addition to the object geometry in addition symbols, dimensions and explanatory text entries. These drawings are based on pure vector graphics and are therefore easily influenced. The design of these plans is the extent unified by general and industry specific drafting standards and sample sheets that users can interpret and implement this plan content. Serve as a means for uniform plan design

  • Symbols for small-scale objects, point representation and standard components
  • Dash pattern for different line types (eg hidden / visible)
  • Highlighting of important lines due to enlarged linewidth
  • Surface representation through peripheral lines, hatches or color surfaces
  • Dimensions with dimensional chains
  • Objects assigned texts for specific statements or information.

For technical drawings a good plan design is important in order to interpret the plan content. This includes the presentation of the material plan contents and the explanatory Additional details are available in a balanced ratio, which is only possible in the scaling range that satisfies these requirements. To output vector graphics to raster graphics must be converted, subject to their limits so that even for vector graphics on the issue. Magnifications are generally less problematic here limits the plan size scaling. In case of reductions, however, represent the same information density less pixels available; the presentation then acts quickly cluttered and is difficult differentiable.

However, in the course of this conversion, it is possible to influence the output, for example to hide small and therefore indistinctly visible detail. In symbol outputs, text entries and dimensions of the importance of the entry is generally recognizable by the size of the display, which provides a good overview for the plan users wins the easier an overall impression and can be better incorporated into the plan content. Subordinated details, however, are characterized by small, but still readable representation. This representation allows to control automatically the information density to a certain extent.

Problems with linear scaling

Any additional information in a graph requires a free surface, because it is superimposed on the primary object representation at most so far and displace that this gap can be " skipped " in perception. The information density of a plan thus defines the basic scaling of the chart. A reduction narrow limits, because texts and symbols below a certain size, about 1.3 mm, are no longer legible. Also enlargements are not arbitrary feasible. By linear scaling the additional information deliberately restrained shown in the basic plan quickly become very dominant and thus disturb the overall impression considerably. With a scaling factor of 2, the area occupied by symbols and texts plan area grows quadratically by a factor of 4 and pushes into the perception to the fore. In contrast Flächenschraffuren forfeit the surface impression of a hatch because the hatch spacing is too large and more takes on the impression of parallel single lines. The perception of the essential plan content is difficult due to excessive additional information and overall a poorer quality plan.

The example shows a small portion of a topographic plan as a basis for planning; the output scale is due to the high information density 1:250. Shown are a pumping station, the breaklines of the terrain, slopes and roadsides, contour lines, as well as some important lines. In addition displayed were the points recorded with height information that forms the basis of the digital terrain model.

At reduction on the scale of 1:500 ( scale factor 0.5 ) the additional altitude below the readability limit and eliminated. Only two major, consequently highlighted points are now linked to additional information. The representation is therefore only an overview useful because accurate altitude readings are now missing.

At increase of 1:100 ( scale factor 2.5 ), the additional information and the subordinate auxiliary lines compared with the important terrain breaklines very dominant, which thereby seem a bit restrained.

1:100 scale (linear)

1:500 scale ( non-linear)

1:100 scale ( non-linear)

Improvements by non-linear scaling

A better representation of the additional information in the context of the possible scaling brings a width scaling with the square root of the scale factor so that their face claim by the scaling factor of the floor plan geometry coincides linear. Coupled with an automatic positioning of the text data corresponding to the resulting open spaces can be avoided in a loss of information, but not an impaired quality of representation at the limit of scaling.

The reduction in the scale of 1:500 (scaling factor 0.5 / 0.7) goes even without loss of information, however, brings automatic text positioning the limits of their possibilities. The plan quality is poor but still useful if only a screen view or a temporary work schedule is required in a handy format for design purposes.

The magnification on the 1:100 scale (scaling factor 2.5 / 1.6) is quite useful and therefore needs no rework. Though there are here the guides a bit more prominent, but the additional information remain so reluctant to allow the presentation of the key terrain contours is not displaced.

711503
de