Статьи о загранице, путешествиях и отдыхе

Все туры в Маврикий от ведущих: туры на мальдивы.

6 Август 2010

Increase the number of pixels in the image

написано в рубрике: News, Photos, Review — Метки: , , — admin @ 22:54

For quality printing press solution must be equal to 300 dpi. This means that to obtain high-quality photos size 10 x 15 cm (4 x 6 inches) must have a digital image of 1200 x 1800 pixels. This is an ideal. In practice, often a desire and / or need based on the available number of pixels to print the image for a larger format.

In some cases the problem is solved very simply. The value of 300 dpi requires that the image is viewed with a minimum distance comfort perception (approx. 25 cm), that is, the audience will keep the picture in his hands. If the picture will be considerably removed from the viewer, the value of 300 dpi can be safely reduced. For example, there is no sense to print a street poster with a resolution of 300 dpi. For such a case is quite suitable substantially lower resolution.

But as yet be in cases where viewing distance is small, and print format should be increased? There is only one – to increase the number of pixels in the image. In this case, of course, not rely on the fact that the image will appear smaller parts. Increasing the number of pixels has different goals. In general, you want to so extend the original pixels and fill the vacuum between them, to:

- The contours of the lines retained a sufficient degree of smoothness;
- Tonal color transitions have turned out quite smooth;
- The perceived sharpness and clarity deteriorated slightly.

Where to take the missing pixels?

Increase the number of pixels in an image, you can use almost any graphics editor. To do this, use the function, which usually is one of the following titles: Image Size, Resize, Resample, etc.
A detailed description of these procedures can be found in software manuals, as well as in numerous books devoted to graphics packages.

Let’s see what the results resulting from the use of popular algorithms.

Take the original image a simple square of size 3 x 3 pixels (see figure below). Increase its linear dimensions twice. Area of new square (6 x 6 pixels) will increase four times. Each pixel will now have four pixel (three + one new source). If we just painted the three new pixel in the color of the base pixel (and this is what happens when performing functions such as RESIZE: RESAMPLE: NEAREST NEIGHBOUR, etc.), then this would be tantamount to an increase in pixel size. In this case, the smooth lines of the contours of the image will become a significant “step”. Smooth tonal transitions will also be disrupted. In general, this is not the best way out, if we do not anticipate an increase in viewing distance.

Significantly improve the magnified image allows different mathematical interpolation algorithms (complex transformations in the group RESAMPLE). The easiest of them calculates the color of the intermediate pixel as the arithmetic mean of the basic colors of neighboring pixels.
More complex algorithms can be focused on:
- Construction of smooth curves through the base point (in this case themselves, these curves can be determined fairly complicated functions, but the color of the intermediate pixels will depend on the color of both immediate and more distant pixels);
- Replacement of point pixel blur (in this case the resulting color of each pixel will be determined as the result of superposition of spots next to each other).

Consider the consequences of the use of more complex algorithms in our simple example.
Here, though, I must say that this example is not entirely correct, since the source block size (3 x 3) is still very small. Nevertheless, this example is very obvious, and the obtained results based on it basically gives a correct idea of the nature of the issue, which will be further demonstrated by the second group of illustrations.

The use of the simplest “bicubic interpolation» (Bicubic Resample / Adobe ® Photoshop ®), enables new paint pixels in the intermediate color while preserving an acceptable level contour sharpness.

As can be seen from the above figure, filters Mitchel and B-Spline, available in the free program Irfan View, allow for greater fluidity of intermediate tones cost a significant decrease in the sharpness of edges.

Good compromise can be achieved using a filter Lanczos (Lanczos filter) that is included in the same free software. Application of this filter can often keep the sharpness of the lines while maintaining sufficient smoothness of tonal transitions.

The original result is obtained using the module Genuine Fractals ™ (Pay plug-in for Adobe ® Photoshop ®). On the one hand, for our example application of this filter has violated the axial symmetry of the original block of pixels (all the other filters considered symmetry preserved). On the other hand, the developers of this tool is clearly in their own way come to the above-mentioned alternative to the sharpness of the lines – smooth transitions. Categorical conclusions do, I think, inappropriate. However, it is to admit that this novel approach can save the situation in some cases.

Mini-testing based on real images

Let’s see what results can be achieved if we apply the algorithms to real photographic image. For testing, I chose the part of the photo, which shows a fragment of the roof of a very famous building. It contains extended and straight lines, running at different angles, and relatively small architectural details, and a rather large piece of rich hues of the sky.

Before you begin testing, I Shrunk the linear dimensions of the piece twice. Then I tried to restore the image to its original size by using the above-mentioned filters. Test results can be seen in the following photographs. (Mitchel Filter gives almost the same result as the B-Spline Filter, so to save space, I decided to limit demonstration of only one of them.)

To the right of the original image (Original) a photograph obtained using a simple interpolation algorithm (Resize). As expected, the oblique lines appeared typical notch-step. However, if you look at your computer screen from a distance of 2 meters (approximately), the image is obtained even in such a straightforward manner, will no longer seem so imperfect. In other words, I once again want to emphasize that even the simplest color pixel interpolation algorithm gives acceptable results, if you want to increase the distance between image and viewer.

In the second row shows images obtained using the “bicubic interpolation” filter and B-Spline. As expected, the B-Spline filter blurs the sharp lines too, so it is difficult to recommend for images with clear contours. Bicubic interpolation is pretty well handled the task. Missing parts of course it’s not restored, but the notch with oblique lines cleaned satisfactorily. To smooth tonal transitions serious claims to produce as it is impossible.

In the last row shows the results of the Lanczos filter (Lanczos Filter) and a software module Genuine Fractals ™. In my opinion, both these algorithms have coped well with the task. However, I think, much more interesting to get an answer to the question: to what extent they are better than simple bicubic interpolation? In my opinion, everyone should answer that question yourself. In the end, only you can decide which tool to use, and how – no.

Нет комментариев

Еще нет комментариев.

RSS лента комментариев к этой записи.

Извините, комментирование на данный момент закрыто.

Работает на WordPress