Analysis of displacement filters ("Stretching to fit" the law of substitution) one of

Source: Internet
Author: User
Tags filter
Filter

Revisit the principle of substitution:

PS Help in the following points on the replacement map. Note: [] is added by the author. What foreigners translate is hard to understand.

1. The "permutation" filter uses the color values in the displacement chart [in fact, according to the specified channel's gray value] to change the selection [pixel movement]-0 is the largest negative change value, 255 is the largest positive change, gray value 128 does not produce displacement.

2. If the displacement chart [only] has one channel, the image changes [pixel movement] along the diagonal defined by the horizontal and vertical proportions.

If a displacement diagram has multiple channels, the first channel controls the horizontal [directional pixel] permutation, and the second channel controls the vertical [directional pixel] permutation.

3. When both the horizontal and vertical proportions are set to 100%, the maximum displacement is 128 pixels (because the middle Gray does not generate permutations).

4. Use an image called a displacement chart to determine how to distort a selection [pixel]. For example, an image created using a parabolic displacement pattern looks like it is printed on a two-angle, fixed-dangling cloth.

We can use the following diagram to simulate the above principle:

From the above figure, you can know that the displacement map can be a channel of black-gray-Bai map, can also be red, green two channels of black-gray-Bai diagram for production.

The movement law, all is changes with the gray level, presses the 45 degree diagonal to carry on the displacement movement. The picture size of the displacement chart can be large and small, without regulation.

In displacement, only the gray value is extracted as the basis for calculation.

One. Permutation pattern of a permutation chart with only one channel (set: horizontal and vertical displacement ratio 10%, "repeat Edge pixel")

Welcome friends who are interested to do it. No hands, never master!

This is the original image:

Example 1:

Displacement diagram:

Effect after substitution:

Example 1

From the top down, as the gray-scale value of the linear descent and then rise (---128--225), pixels to the right and then to the left of the linear displacement.

Example 2:

Displacement diagram:

Effect after substitution:

Example 2

From the top down, as the gray-scale value of the linear rise and then drop (0---128--0), pixels to the left and then to the right to occur linear displacement.

Example 3:

Displacement diagram:

Effect after substitution:

Example 3

From the top down, as the gray-scale value of the linear rise and then drop (128--225,225--128), pixels to the right and then to the left of the linear displacement.

You can get the pixel movement rule: Watch the displacement chart (see the vertical direction), lighten to the left, darken to the right.

Example 4:

Displacement diagram:

Effect after substitution:

Example 4

Looking from left to right, as the gray-scale value of the linear descent (255-----0), the pixel downward also linear displacement.

Example 5:

Displacement diagram:

Effect after substitution:

Example 5

From left to right, as the gray-scale value increases linearly (0-----225), the pixel is also linearly shifted upward.

Example 6:

Displacement diagram:

Effect after substitution:

Example 6

From left to right, as the gray-scale value of the linear rise and then drop (0--225,225--0), the pixel upward and then downward linear displacement.

Example 7:

Displacement diagram:

Effect after substitution:

Example 7

From left to right, as the gray-scale value of the linear rise and then drop (0--128,128--0), the pixel upward and then downward linear displacement.

Example 8:

Displacement diagram:

Effect after substitution:

Example 8

From left to right, as the gray-scale value of the linear descent and then rise (225--128,128--225), pixels downward and then upward linear displacement.

Example 9:

Displacement diagram:

Effect after substitution:

Example 9

From left to right, as the gray-scale value of the linear rise and then drop (128--225,225--128), the pixel downward and then upward linear displacement.

Example 10:

Displacement diagram:

Effect after substitution:

Example 10

From left to right, as the gray-scale value drops and then rises (128--0,0--128), the pixel shifts downward and upward.

You can get the pixel movement rule: observe the displacement map (see the horizontal direction), lighten up, darken downward.

The 4th of the permutation principle can be validated from instance 1, 2, 3, 6--instance 10.

The following examples can also be seen to have a certain law: the gray scale occurs where the jump, displacement also occurs. The pixel displacements at the same gray-scale values are the same. In a certain direction, the gray scale does not change and the displacement is unchanged.

Summary: Through the above examples of observation and analysis, there are the following common pixel Movement law: (The following statement may not be standardized)

1. Observe the displacement chart (see along the horizontal direction), lighten up, darken downward.

2. Observe the displacement chart (see along the vertical direction), lighten to the left, darken to the right.

3. The pixel displacement distances of the same gray-scale values are the same in the direction of gray-scale changes. The gray-scale value determines the distance at which pixels move.

4. In a certain direction, the gray scale value does not change, the pixel does not move.

5. The most special law:: (This is PS help and I can see the existing information is not mentioned, please interested friends attention!) If there are any errors, please remind me to correct them immediately! )

The change of the gray scale in the horizontal direction of the displacement chart controls the vertical movement of the pixel.

Changes in the vertical gray-scale value of the displacement chart control the movement of the pixel horizontally.

This is also the most difficult reason for the difficulty of permutation and the production of displacement patterns. )

If you see it and understand it, you will know what the replacement map should do.

By violating the principle of substitution, the displacement map will make the pixel move in a disorderly motion.

The above analysis, such as to make friends of the replacement of the filter can be further, in the production of replacement map, the purpose of this article is achieved.

Related reading: An analysis of displacement filters ("Stretching to fit" the study of Substitution law) bis



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.