CN110349089A - Improve the image processing method and device of linear interpolation effect - Google Patents
Improve the image processing method and device of linear interpolation effect Download PDFInfo
- Publication number
- CN110349089A CN110349089A CN201910638377.2A CN201910638377A CN110349089A CN 110349089 A CN110349089 A CN 110349089A CN 201910638377 A CN201910638377 A CN 201910638377A CN 110349089 A CN110349089 A CN 110349089A
- Authority
- CN
- China
- Prior art keywords
- pixel
- interpolation point
- interpolation
- neighbor
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000000694 effects Effects 0.000 title claims abstract description 28
- 238000003672 processing method Methods 0.000 title claims abstract description 19
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 42
- 238000000034 method Methods 0.000 claims abstract description 14
- 238000012790 confirmation Methods 0.000 claims abstract description 10
- 238000010586 diagram Methods 0.000 description 8
- 238000003860 storage Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 230000003416 augmentation Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4023—Scaling of whole images or parts thereof, e.g. expanding or contracting based on decimating pixels or lines of pixels; based on inserting pixels or lines of pixels
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a kind of image processing methods for improving linear interpolation effect, applied to image technique field, this method comprises: confirmation increases the interpolation point in image to be processed newly, whether fall on the oblique line of multiple neighbor pixels composition of interpolation point, if on the oblique line that the multiple neighbor pixels for not falling within interpolation point are constituted, then according to horizontal direction interpolation algorithm and vertical direction interpolation algorithm, calculate the pixel value of interpolation point, if on the oblique line that the multiple neighbor pixels for falling in interpolation point are constituted, then judge whether interpolation point falls on the figure of oblique line directions, if falling on the figure of oblique line directions, then linear interpolation calculating is carried out according to oblique line directions interpolation algorithm, obtain the pixel value of interpolation point, the interpolation point is inserted into the image to be processed according to the pixel value of the interpolation point.The embodiment of the invention also discloses a kind of image processing apparatus for improving linear interpolation effect, and the clarity of image after interpolation can be improved.
Description
Technical field
The invention belongs to image technique field more particularly to a kind of image processing methods and dress for improving linear interpolation effect
It sets.
Background technique
Information age, visual basis of the image as the human perception world are that the mankind obtain information, expressing information and transmitting
The important means of information.Digital Image Processing is handled image with computer, technology is also increasingly developed.Carrying out figure
When as enhanced processing, usually using the mode of bilinear interpolation, i.e., bilinear interpolation is done respectively by lateral, longitudinal, reach and put
The purpose of big picture size.
But the above-mentioned prior art only considers horizontal, vertical direction linear, causes image bend direction figure
Interpolation is poor, and when adjacent preimage vegetarian refreshments value differences are huge, increases the pixel value of interpolation point newly between the two
Between preimage vegetarian refreshments pixel value, to keep the graphic limit after interpolation in image fuzzy, originally boundary becomes obscurity boundary clearly.
Summary of the invention
The present invention provides a kind of image processing method for improving linear interpolation effect, it is intended to solve in image augmentation processing
The problem of poor in image definition.
The embodiment of the invention provides a kind of image processing methods for improving linear interpolation effect, comprising:
Confirmation increases the interpolation point in image to be processed newly, if the multiple neighbor pixels for falling in the interpolation point are constituted
Oblique line on;
If on the oblique line that the multiple neighbor pixels for not falling within the interpolation point are constituted, according to horizontal direction interpolation algorithm
With vertical direction interpolation algorithm, the pixel value of the interpolation point is calculated;
If judging whether the interpolation point falls on the oblique line that the multiple neighbor pixels for falling in the interpolation point are constituted
On the figure of the oblique line directions;
If falling on the figure of the oblique line directions, linear interpolation calculating is carried out according to oblique line directions interpolation algorithm, is obtained
To the pixel value of the interpolation point;
The interpolation point is inserted into the image to be processed according to the pixel value of the interpolation point.
The embodiment of the invention also provides a kind of image processing apparatus for improving linear interpolation effect, comprising:
Confirmation module, for confirming the interpolation point increased newly in image to be processed, if fall in the multiple of the interpolation point
On the oblique line that neighbor pixel is constituted;
Computing module, if the oblique line that multiple neighbor pixels for not falling within the interpolation point are constituted, according to water
Square to interpolation algorithm and vertical direction interpolation algorithm, the pixel value of the interpolation point is calculated;
Judgment module, if the oblique line that multiple neighbor pixels for falling in the interpolation point are constituted, described in judgement
Whether interpolation point falls on the figure of the oblique line directions;
The computing module, if being also used to fall on the figure of the oblique line directions, according to oblique line directions interpolation algorithm
Linear interpolation calculating is carried out, the pixel value of the interpolation point is obtained;
Processing module, for the interpolation point to be inserted into the image to be processed according to the pixel value of the interpolation point.
From the embodiments of the present invention it is found that being increased newly by confirmation to the interpolation point in image to be processed, if fall in institute
State on the oblique line that multiple neighbor pixels of interpolation point are constituted, if not falling on oblique line, according to horizontal direction interpolation algorithm and
The pixel value that vertical direction interpolation algorithm calculates interpolation point judges whether interpolation point falls in oblique line directions if falling on oblique line
Figure on, if falling according to oblique line directions interpolation algorithm carry out linear interpolation calculating, obtain the pixel value of the interpolation point, can
Improve the interpolation of the figure in image bend direction, the sharpness of border degree of the image after improving interpolation processing.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention.
Fig. 1 is the flow diagram of the image processing method provided in an embodiment of the present invention for improving linear interpolation effect;
Fig. 2 is that interpolation point does not fall within it in the image processing method provided in an embodiment of the present invention for improving linear interpolation effect
The schematic diagram on any bar oblique line that neighbor pixel is constituted;
Fig. 3 be it is provided in an embodiment of the present invention improve linear interpolation effect image processing method in interpolation point do not fall within appoint
When on one oblique line, the positional diagram of interpolation point pixel adjacent thereto, derivative interpolation point;
Fig. 4 is that interpolation point falls in one in the image processing method provided in an embodiment of the present invention for improving linear interpolation effect
When on the figure of oblique line directions, interpolation point pixel adjacent thereto, derivative interpolation point positional relationship a kind of schematic diagram;
Fig. 5 is that interpolation point falls in one in the image processing method provided in an embodiment of the present invention for improving linear interpolation effect
When on the figure of oblique line directions, interpolation point pixel adjacent thereto, derivative interpolation point positional relationship another schematic diagram;
Fig. 6 is that interpolation point falls in two in the image processing method provided in an embodiment of the present invention for improving linear interpolation effect
When oblique line directions, interpolation point pixel adjacent thereto, derivative interpolation point positional relationship schematic diagram;
Fig. 7 is the structural schematic diagram of the image processing apparatus provided in an embodiment of the present invention for improving linear interpolation effect.
Specific embodiment
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention
Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described reality
Applying example is only a part of the embodiment of the present invention, and not all embodiments.Based on the embodiments of the present invention, those skilled in the art
Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Referring to Fig. 1, Fig. 1 is the image processing method provided in an embodiment of the present invention for improving linear interpolation effect, this method
It can apply in the scene for passing through interpolation processing image, for ease of description, the neighbor pixel in the present embodiment is with 4
Example, the scene of more neighbor pixels are also suitable the image processing method of improvement linear interpolation effect in this present embodiment.
This method mainly includes the following steps:
S101, confirmation increase the interpolation point in image to be processed newly, if fall in multiple neighbor pixels of the interpolation point
On the oblique line of composition;
Interpolation point refers to the new pixel being inserted into handle image into image, for example, for enlarged image and
The new pixel being inserted into image.
As shown in Fig. 2, the interpolation point has 4 neighbor pixels, which is four pictures in four quadrants of origin
Vegetarian refreshments is located at four pixels of the interpolation point upper left, upper right, lower-left and lower right, and in four neighbor pixels
The first neighbor pixel it is identical as the abscissa of the second neighbor pixel, third neighbor pixel and the 4th neighbor pixel
Abscissa is identical, and the first neighbor pixel is identical as the ordinate of third neighbor pixel, the second neighbor pixel and the 4th phase
The ordinate of adjacent pixel is identical.
4 neighbor pixels may make up two oblique lines as shown in Figure 2.
If on the oblique line that S102, the multiple neighbor pixels for not falling within the interpolation point are constituted, according to horizontal direction interpolation
Algorithm and vertical direction interpolation algorithm, calculate the pixel value of the interpolation point;
It can judge whether the interpolation point falls in multiple picture by the coordinate of the interpolation point and multiple neighbor pixel
On the oblique line that vegetarian refreshments is constituted.
If not falling on any oblique line, according to horizontal direction and vertical direction interpolation, the picture of the interpolation point is calculated
Element value.
Specifically, as shown in figure 3, derivative interpolation point is according between the interpolation point and the neighbor pixel of the interpolation point
What positional relationship was derived, convenient for calculating the pixel value of the interpolation point.The X of first derivative interpolation point and the second derivative interpolation point
Coordinate is identical as the interpolation point, the company of the first derivative interpolation point between the first neighbor pixel and the second neighbor pixel
On line, and, the second derivative interpolation point is on the line between third neighbor pixel and the 4th neighbor pixel.
The pixel value of the interpolation point is P_vy, and the pixel value of the first neighbor pixel is P_h1, second neighbor pixel
Pixel value is P_h2, third neighbor pixel pixel value be P_h3, the 4th neighbor pixel pixel value be P_h4, this first
The pixel value of derivative interpolation point is P_hx1, the pixel value of the second derivative interpolation point is P_hx2.The first derivative interpolation point is to the
The distance of one neighbor pixel is S_h1, the distance of first derivative interpolation point to second neighbor pixel is S_h2, this second spreads out
The distance of raw interpolation point to third neighbor pixel is S_h1, the distance of second derivative interpolation point to the 4th neighbor pixel is
S_h2, the distance of first derivative interpolation point to the interpolation point is S_v1, the distance of the interpolation point to the second derivative interpolation point is S_
v2, the distance of the interpolation point to first neighbor pixel is S_L1, the distance of the interpolation point to second neighbor pixel is S_
L2, the distance of the interpolation point to the third neighbor pixel is S_L3, the distance of the interpolation point to the 4th neighbor pixel is S_
L4.First preset threshold is Pth_h, and the second preset threshold is Pth_v, third predetermined threshold value Pth_L.
Firstly, calculating the absolute of the difference of the pixel value of multiple neighbor pixels of the interpolation point according to horizontal direction interpolation
Value, if be greater than the first preset threshold, if so, using the pixel value with the interpolation point apart from nearest neighbor pixel as this
The pixel value of the derivative interpolation point of interpolation point, the derivative interpolating pixel point are located at multiple neighbor pixel companies in the horizontal direction
On line;If it is not, the weighted average of the pixel value of multiple neighbor pixels is then calculated, the derivative interpolation as the interpolation point
Pixel value.
Further, the absolute value of the difference of the derivative interpolation point pixel value is calculated according to vertical direction interpolation, if be greater than
Second preset threshold, if so, using the pixel value with the interpolation point apart from nearest derivative interpolation point as the picture of the interpolation point
Element value;If it is not, the weighted average of the pixel value of each derivative interpolation point is then calculated, the pixel value as the interpolation point.
Specifically, according to horizontal direction interpolation calculate first neighbor pixel and the second neighbor pixel pixel value it
Whether absolute value of the difference is greater than first preset threshold, if more than first preset threshold, then by the first pixel and the second picture
Pixel value of the pixel value as the first derivative interpolation point in vegetarian refreshments with interpolation point apart from nearest neighbor pixel:
Calculate the absolute value of the difference of the pixel value of the first neighbor pixel and the second neighbor pixel | P_h1–P_h2|;
If the absolute value is greater than first preset threshold, that is, | P_h1–P_h2|>Pth_h;
Then further compare the interpolation point to the first neighbor pixel distance S_h1With the interpolation point to the second adjacent picture
The distance S_h of vegetarian refreshments2Size, and using the pixel value with the interpolation point apart from nearest neighbor pixel as the interpolation point
Pixel value:
If S_h1>S_h2, then P_hx1=P_h2;If S_h2>S_h1, then P_hx1=P_h1。
If being not more than first preset threshold, pixel value and the first weighting of the first neighbor pixel of interpolation point are calculated
The product of coefficient, and, the pixel value of the second neighbor pixel of interpolation point and the product of the second weighting coefficient, and this two are multiplied
Pixel value of the sum of the product as interpolation point, the first weighting coefficient are adjacent with first for the distance of the second neighbor pixel and interpolation point
The ratio of the distance of pixel and the second neighbor pixel, the second weighting coefficient are the distance of the first neighbor pixel and interpolation point
Ratio at a distance from the first neighbor pixel and the second neighbor pixel:
That is, if | P_h1–P_h2|≤Pth_h, then:
Similarly, the difference of the pixel value of third neighbor pixel and the 4th neighbor pixel is calculated according to horizontal direction interpolation
Whether absolute value is greater than first preset threshold, if more than first preset threshold, then by third pixel and the 4th pixel
In the pixel value of pixel value with the interpolation point apart from nearest neighbor pixel as the second derivative interpolation point:
Calculate the absolute value of the difference of the pixel value of third neighbor pixel and the 4th neighbor pixel | P_h3–P_h4|;
If the absolute value is greater than first preset threshold, that is, | P_h3–P_h4|>Pth_h;
Then further compare the interpolation point to third neighbor pixel distance S_h3With the interpolation point to the 4th adjacent picture
The distance S_h of vegetarian refreshments4Size, and using the pixel value with the interpolation point apart from nearest neighbor pixel as the interpolation point
Pixel value:
If S_h3>S_h4, then P_hx2=P_h4;If S_h4>S_h3, then P_hx2=P_h3。
If being not more than first preset threshold, the pixel value and third for calculating the third neighbor pixel of interpolation point are weighted
The product of coefficient, and, the pixel value of the 4th neighbor pixel of interpolation point and the product of the 4th weighting coefficient, and this two are multiplied
Pixel value of the sum of the product as interpolation point, third weighting coefficient are adjacent with third for the distance of third neighbor pixel and interpolation point
The ratio of the distance of pixel and the 4th neighbor pixel, the 4th weighting coefficient are the distance of the 4th neighbor pixel and interpolation point
Ratio at a distance from third neighbor pixel and the 4th neighbor pixel:
That is, if | P_h3–P_h4|≤Pth_h, then:
Further, the absolute value of the difference of the pixel value of the first derivative interpolation point and the second derivative interpolation point is calculated | P_
hx1–P_hx2|。
If the absolute value is greater than second preset threshold, that is, | P_hx1–P_hx2|>Pth_v;
Then distance S_v of the further relatively first derivative interpolation point to the interpolation point1It is inserted with the second derivative interpolation point to this
It is worth the distance S_v of point2Size, and using the pixel value with the interpolation point apart from nearest derivative interpolation point as the interpolation point
Pixel value:
If S_v1>S_v2, then P_vy=P_hx2;If S_v2>S_v1, then P_vy=P_hx1。
If the absolute value is not more than the preset threshold of the vertical interpolation, that is, | P_hx1–P_hx2|≤Pth_v;
Then, the pixel value of the first derivative interpolation point and the product of the 5th weighting coefficient are calculated, and, the second derivative interpolation point
The product of pixel value and the 6th weighting coefficient, and using two sum of products as the pixel value of interpolation point, the 5th weighting coefficient is
Ratio of the distance of interpolation point and the second derivative interpolation point at a distance from the first derivative interpolation point and the second derivative interpolation point, the 6th
Weighting coefficient be interpolation point and the first derivative interpolation point distance and the first derivative interpolation point and the second derivative interpolation point away from
From ratio.That is:
If judging whether the interpolation point falls on the oblique line that S103, the multiple neighbor pixels for falling in the interpolation point are constituted
On the figure of the oblique line directions;
If falling on a wherein oblique line for each oblique line of composition, corresponding two adjacent pixels on this oblique line are calculated
The absolute value of the difference of the pixel value of point confirms that interpolation point falls in this oblique line if the absolute value is less than the third predetermined threshold value
On the figure in direction.
If falling on the two of them oblique line of each oblique line of composition, corresponding two of two oblique lines are calculated separately
The absolute value of the difference of the pixel value of neighbor pixel, if the pixel value of corresponding two neighbor pixels of two oblique lines it
Absolute value of the difference is respectively less than the third predetermined threshold value, then confirms that the interpolation point is fallen on the figure of two oblique line directions;If should
Wherein the absolute value of the difference of the pixel value of corresponding two neighbor pixel is less than the preset threshold in two oblique lines, and another
The absolute value of the difference of the pixel value of one corresponding two neighbor pixel is not less than the preset threshold, then confirms that the interpolation point is fallen
Figure on the figure of this oblique line directions, without falling in another oblique line directions;If two oblique lines are corresponding
The absolute value of the difference of the pixel value of two neighbor pixels is not less than the preset threshold, then confirms that the interpolation point does not fall within this
On the figure of two oblique line directions.
Referring specifically to Fig. 4~Fig. 6.In Fig. 4, if the interpolation point fall in the first neighbor pixel and the 4th neighbor pixel it
Between oblique line on, calculate the absolute value of the difference of the pixel value of the first neighbor pixel and the 4th neighbor pixel:
|P_h1–P_h4|;
If the absolute value is less than the third predetermined threshold value, that is, | P_h1–P_h4| < Pth_L then confirms that the interpolation point is fallen
On the figure of this oblique line directions.
In Fig. 5, if the interpolation point is fallen on the oblique line between the second neighbor pixel and third neighbor pixel, the is calculated
The absolute value of the difference of the pixel value of two neighbor pixels and third neighbor pixel:
|P_h2–P_h3|;
If the absolute value is less than the third predetermined threshold value, that is, | P_h2–P_h3| < Pth_L then confirms that the interpolation point is fallen
On the figure of this oblique line directions.
In Fig. 6, if the interpolation point is fallen on the oblique line between the first neighbor pixel and the 4th neighbor pixel simultaneously, with
And on the second oblique line between neighbor pixel and third neighbor pixel, then the first neighbor pixel and the 4th adjacent is calculated
The absolute value of the difference of the pixel value of pixel | P_h1–P_h4|, and, calculate the second neighbor pixel and third neighbor pixel
Pixel value absolute value of the difference | P_h2–P_h3|;
If above-mentioned two absolute value is respectively less than the third predetermined threshold value, it may be assumed that
|P_h1–P_h4| < Pth_L, and, | P_h2–P_h3| < Pth_L;
Then confirm that the interpolation point is fallen on the figure of two oblique line directions;
If | P_h1–P_h4| < Pth_L, and, | P_h2–P_h3|≥Pth_L;
Then confirm the figure for the oblique line directions that the interpolation point is fallen between the first neighbor pixel and the 4th neighbor pixel
On;
If | P_h1–P_h4| >=Pth_L, and, | P_h2–P_h3| < Pth_L;
Then confirm the figure for the oblique line directions that the interpolation point is fallen between the second neighbor pixel and third neighbor pixel
On.
On the figure of oblique line directions of the interpolation point between the first pixel and the 4th pixel in Fig. 4;Inserting in Fig. 5
On the figure of oblique line directions of the value o'clock between the second pixel and third pixel;Interpolation point in Fig. 6 is simultaneously in the first picture
On the figure of oblique line directions between vegetarian refreshments and the 4th pixel, and, it is oblique between the second pixel and third pixel
On figure on line direction.
If S104, falling on the figure of the oblique line directions, linear interpolation calculating is carried out according to oblique line directions interpolation algorithm,
Obtain the pixel value of the interpolation point;
Specifically, if interpolation point is fallen on the figure of in a plurality of oblique line oblique line directions, calculate two it is different
The product of the pixel value of weighting coefficient two neighbor pixels corresponding with the oblique line fallen in, and using two sum of products as
The pixel value of interpolation point, two weighting coefficients are respectively the distance and two neighbor pixels of two neighbor pixels and interpolation point
Distance ratio, two different weighting coefficients are inversely proportional at a distance from two neighbor pixels and interpolation point.
Further, two kinds of situations of component 4 and Fig. 5 on the figure of an oblique line directions are fallen in, oblique line is the first adjacent picture
Vegetarian refreshments and the 4th neighbor pixel are constituted, and, oblique line is that the second neighbor pixel and third neighbor pixel are constituted.
In Fig. 4, which falls in the figure of the oblique line directions between the first neighbor pixel and the 4th neighbor pixel
On, the pixel value of the first neighbor pixel of interpolation point and the product of the first weighting coefficient are calculated, and, the 4th of interpolation point is adjacent
The product of the pixel value of pixel and the second weighting coefficient, and using this two sum of products as the pixel value of interpolation point, first
Weighting coefficient be the 4th neighbor pixel and the interpolation point distance and the first neighbor pixel and the 4th neighbor pixel away from
From (equal to the interpolation point and the first neighbor pixel and the interpolation point with a distance from the first neighbor pixel and the 4th neighbor pixel
The sum of with the 4th neighbor pixel) ratio, the second weighting coefficient is the distance and the of the first neighbor pixel and interpolation point
The ratio of the distance of one neighbor pixel and the 4th neighbor pixel.That is:
If the absolute value is not less than the preset threshold, that is, | P_h1–P_h4|≥Pth_L;
Then, the pixel of the interpolation is calculated according to bilinear interpolation algorithm, it may be assumed that first according to Horizontal interpolation algorithm, according to the
The pixel of one neighbor pixel, the pixel of the second neighbor pixel, the pixel of third neighbor pixel, the 4th neighbor pixel
The distance of pixel, the first derivative interpolation point and the first neighbor pixel, and, the first derivative interpolation point and the second neighbor pixel
Distance, calculate the pixel of the first derivative interpolation point and the pixel of the second derivative interpolation point, according still further to vertical interpolation algorithm, according to
The pixel of first derivative interpolation point, the pixel of the second derivative interpolation point, the distance of the first derivative interpolation point and the interpolation point, with
And second derivative interpolation point and the interpolation point distance, calculate the pixel of the interpolation point;
The pixel of first derivative interpolation point are as follows:
The pixel of second derivative interpolation point are as follows:
The pixel of interpolation point are as follows:
In Fig. 5, which falls in the figure of the oblique line directions between the second neighbor pixel and third neighbor pixel
On, the pixel value of the second neighbor pixel of interpolation point and the product of third weighting coefficient are calculated, and, the third of interpolation point is adjacent
The product of the pixel value of pixel and the 4th weighting coefficient, and using this two sum of products as the pixel value of the interpolation point,
Three weighting coefficients are third neighbor pixel and the distance and the second neighbor pixel and third neighbor pixel of the interpolation point
(distance of the second neighbor pixel and third neighbor pixel is equal to the interpolation point and the second neighbor pixel and the interpolation to distance
Point is the sum of with the third neighbor pixel) ratio, the second weighting coefficient be the second neighbor pixel and interpolation point distance and
The ratio of the distance of second neighbor pixel and third neighbor pixel.That is:
If the absolute value is not less than the preset threshold, that is, | P_h2–P_h3|≥Pth_L;
Then, the pixel of the interpolation is calculated according to above-mentioned bilinear interpolation algorithm, it may be assumed that first according to Horizontal interpolation algorithm,
According to the pixel of the first neighbor pixel, the pixel of the second neighbor pixel, the pixel of third neighbor pixel, the 4th adjacent picture
The distance of the pixel of vegetarian refreshments, the first derivative interpolation point and the first neighbor pixel, and, the first derivative interpolation point and second adjacent
The distance of pixel calculates the pixel of the first derivative interpolation point and the pixel of the second derivative interpolation point, calculates according still further to vertical interpolation
Method, according to the pixel of the first derivative interpolation point, the pixel of the second derivative interpolation point, the first derivative interpolation point and the interpolation point away from
From, and, the distance of the second derivative interpolation point and the interpolation point calculates the pixel of the interpolation point;
The pixel of first derivative interpolation point are as follows:
The pixel of second derivative interpolation point are as follows:
The pixel of interpolation point are as follows:
In Fig. 6, which falls in the oblique line directions between the first neighbor pixel and the 4th neighbor pixel simultaneously
On figure, and, on the figure of the oblique line directions between the second neighbor pixel and third neighbor pixel, calculate interpolation point
The arithmetic mean of instantaneous value of second pixel value of the first pixel value and interpolation point, first pixel value and second pixel value is the interpolation
The pixel value of point.
Specifically, calculate the first pixel value of interpolation point: the pixel value of the first neighbor pixel of interpolation point and first adds
The product of weight coefficient, and, the pixel value of the 4th neighbor pixel of interpolation point and the product of the second weighting coefficient, and by this two
First pixel value of the sum of products as the interpolation point, the first weighting coefficient are the distance of the 4th neighbor pixel and the interpolation point
Ratio at a distance from the first neighbor pixel and the 4th neighbor pixel, the second weighting coefficient are the first neighbor pixel and insert
It is worth ratio of the distance of point at a distance from the first neighbor pixel and the 4th neighbor pixel.That is:
Calculate the second pixel value of interpolation point: the pixel value and third weighting for calculating the second neighbor pixel of interpolation point are
Several products, and, the pixel value of the third neighbor pixel of interpolation point and the product of the 4th weighting coefficient, and by this two products
The sum of pixel value as the interpolation point, third weighting coefficient be the distance and the second phase of third neighbor pixel and the interpolation point
The ratio of the distance of adjacent pixel and third neighbor pixel, the second weighting coefficient be the second neighbor pixel and interpolation point away from
From the ratio at a distance from the second neighbor pixel and third neighbor pixel.That is:
The pixel value of the interpolation point is equal to the arithmetic mean of instantaneous value of first pixel value and second pixel value.That is:
If the absolute value of the difference of the pixel value of the first neighbor pixel and the 4th neighbor pixel is less than the preset threshold,
And the absolute value of the difference of the pixel value of the second neighbor pixel and third neighbor pixel is not less than the preset threshold.That is, | P_
h1–P_h4| < Pth_L, and, | P_h2–P_h3|≥Pth_L;
Then, the pixel value of the first neighbor pixel of interpolation point and the product of the first weighting coefficient are calculated, and, interpolation point
The pixel value of 4th neighbor pixel and the product of the second weighting coefficient, and using this two sum of products as the pixel of interpolation point
Value, the first weighting coefficient are the 4th neighbor pixel and the distance and the first neighbor pixel and the 4th adjacent pixel of the interpolation point
(distance of the first neighbor pixel and the 4th neighbor pixel is equal to the interpolation point and the first neighbor pixel and should the distance of point
The sum of interpolation point and the 4th neighbor pixel) ratio, the second weighting coefficient be the first neighbor pixel and interpolation point away from
From the ratio at a distance from the first neighbor pixel and the 4th neighbor pixel.That is:
If the absolute value of the difference of the pixel value of the first neighbor pixel and the 4th neighbor pixel is not less than the default threshold
Value, and the absolute value of the difference of the pixel value of the second neighbor pixel and third neighbor pixel is less than the preset threshold.That is, | P_
h1–P_h4| >=Pth_L, and, | P_h2–P_h3| < Pth_L;
Then, the pixel value of the second neighbor pixel of interpolation point and the product of third weighting coefficient are calculated, and, interpolation point
The product of the pixel value of third neighbor pixel and the 4th weighting coefficient, and using this two sum of products as the picture of the interpolation point
Element value, third weighting coefficient are the distance picture adjacent with the second neighbor pixel and third of third neighbor pixel and the interpolation point
Vegetarian refreshments distance (distance of the second neighbor pixel and third neighbor pixel be equal to the interpolation point and the second neighbor pixel and
The sum of the interpolation point and the third neighbor pixel) ratio, the second weighting coefficient is the second neighbor pixel and interpolation point
Ratio of the distance at a distance from the second neighbor pixel and third neighbor pixel.That is:
If the absolute value of the difference of the pixel value of the first neighbor pixel and the 4th neighbor pixel is not less than the default threshold
The absolute value of the difference of the pixel value of value, the second neighbor pixel and third neighbor pixel is nor less than the preset threshold.That is, |
P_h1–P_h4| >=Pth_L, and, | P_h2-P_h3 | >=Pth_L;
The pixel of the interpolation is then calculated according to above-mentioned bilinear interpolation algorithm, it may be assumed that first according to Horizontal interpolation algorithm, root
According to the pixel of the first neighbor pixel, the pixel of the second neighbor pixel, the pixel of third neighbor pixel, the 4th adjacent pixel
The distance of the pixel of point, the first derivative interpolation point and the first neighbor pixel, and, the first derivative interpolation point and the second adjacent picture
The distance of vegetarian refreshments calculates the pixel of the first derivative interpolation point and the pixel of the second derivative interpolation point, according still further to vertical interpolation algorithm,
Derive the distance of interpolation point and the interpolation point according to the pixel of the first derivative interpolation point, the pixel of the second derivative interpolation point, first,
And second derivative interpolation point and the interpolation point distance, calculate the pixel of the interpolation point;
The pixel of first derivative interpolation point are as follows:
The pixel of second derivative interpolation point are as follows:
The pixel of interpolation point are as follows:
S105, the interpolation point is inserted into the image to be processed according to the pixel value of the interpolation point.
After the pixel value for calculating the interpolation point, according to the pixel value, which is inserted into the image to be processed,
Complete the processing to the image to be processed.
In the embodiment of the present invention, by confirming the interpolation point increased newly in image to be processed, if fall in the interpolation point
Multiple neighbor pixels constitute oblique line on, if not falling on oblique line, according to horizontal direction interpolation algorithm and vertical direction
The pixel value that interpolation algorithm calculates interpolation point judges whether interpolation point falls on the figure of oblique line directions if falling on oblique line,
Linear interpolation calculating is carried out according to oblique line directions interpolation algorithm if falling in, the pixel value of the interpolation point is obtained, image can be improved
The interpolation of the figure in bend direction, the sharpness of border degree of the image after improving interpolation processing.
Fig. 7 is referred to, Fig. 7 is the structure of the image processing apparatus provided in an embodiment of the present invention for improving linear interpolation effect
Schematic diagram, for ease of description, only parts related to embodiments of the present invention are shown.The exemplary improvement linear interpolation effect of Fig. 7
The image processing apparatus of fruit can be the image processing method for the improvement linear interpolation effect that aforementioned embodiment illustrated in fig. 1 provides
The image processing apparatus of executing subject, the improvement linear interpolation effect is built-in in the terminal, terminal include PC computer, mobile phone and
Other electronic equipments.The image processing apparatus of the improvement linear interpolation effect includes:
Confirmation module 401, for confirming the interpolation point increased newly in image to be processed, if fall in the more of the interpolation point
On the oblique line that a neighbor pixel is constituted;
Computing module 402, if confirming for confirmation module 401, the multiple neighbor pixels for not falling within the interpolation point are constituted
Oblique line on, then according to horizontal direction interpolation algorithm and vertical direction interpolation algorithm, calculate the pixel value of the interpolation point;
Judgment module 403, if confirming what the multiple neighbor pixels for falling in the interpolation point were constituted for confirmation module 401
On oblique line, then judge whether the interpolation point falls on the figure of the oblique line directions;
Computing module 402, if being also used to fall on the figure of the oblique line directions, according to oblique line directions interpolation algorithm into
Line interpolation calculation obtains the pixel value of the interpolation point;
Processing module 404, for the interpolation point to be inserted into the image to be processed according to the pixel value of the interpolation point
In.
Further, computing module 402 are also used to calculate multiple phases of the interpolation point according to horizontal direction interpolation
The absolute value of the difference of the pixel value of adjacent pixel, if be greater than the first preset threshold, if so, will be with the interpolation point distance most
Pixel value of the pixel value of close neighbor pixel as the derivative interpolation point of the interpolation point, the derivative interpolating pixel point
In on multiple neighbor pixel lines in the horizontal direction;
The absolute value of the difference of the pixel value of the derivative interpolation point is calculated according to vertical direction interpolation, if it is pre- to be greater than second
If threshold value, if so, using the pixel value with the interpolation point apart from nearest derivative interpolation point as the pixel of the interpolation point
Value.
Further, the neighbor pixel of the interpolation point includes: four be located at using the interpolation point as origin
Four neighbor pixels in quadrant, and the first neighbor pixel and the second neighbor pixel in four neighbor pixels
Abscissa it is identical, third neighbor pixel is identical as the abscissa of the 4th neighbor pixel, first neighbor pixel with
The ordinate of the third neighbor pixel is identical, the ordinate of second neighbor pixel and the 4th neighbor pixel
It is identical.
Computing module 402 is also used to calculate first neighbor pixel and second phase according to horizontal direction interpolation
Whether the absolute value of the difference of the pixel value between adjacent pixel is greater than first preset threshold, if more than the described first default threshold
Value, then by the pixel in first pixel and second pixel with the interpolation point apart from nearest neighbor pixel
Pixel value of the value as the first derivative interpolation point, the first derivative interpolating pixel point are located at first neighbor pixel and the
On the line of two neighbor pixels, the X-coordinate of the described first derivative interpolating pixel point is identical as the X-coordinate of the interpolation point;
According to horizontal direction interpolation calculate the third neighbor pixel and the 4th neighbor pixel pixel value it
Whether absolute value of the difference is greater than first preset threshold, if more than first preset threshold, then by the third pixel
With the pixel value in the 4th pixel with the interpolation point apart from nearest neighbor pixel as the second derivative interpolation point
Pixel value, the first derivative interpolating pixel point is located at the line of the third neighbor pixel and the 4th neighbor pixel
On, the X-coordinate of the described second derivative interpolating pixel point is identical as the X-coordinate of the interpolation point;
Computing module 402 is also used to calculate the interpolation point and third neighbor pixel and the according to vertical direction interpolation
Whether the absolute value of the difference of the pixel value between four neighbor pixels is greater than first preset threshold, pre- if more than described first
If threshold value, then by the third pixel and the 4th pixel with the interpolation point apart from nearest neighbor pixel
Pixel value of the pixel value as the second derivative interpolation point.
Further, judgment module 403 calculate if being also used to fall on a wherein oblique line for each oblique line of composition
The absolute value of the difference of the pixel value of corresponding two neighbor pixels on this oblique line, if the absolute value is less than third and presets threshold
Value, then confirm that the interpolation point is fallen on the figure of this oblique line directions;
If falling on the two of them oblique line of each oblique line of composition, two oblique lines corresponding two are calculated separately
The absolute value of the difference of the pixel value of a neighbor pixel;
If the absolute value of the difference of the pixel value of corresponding two neighbor pixels of two oblique lines is respectively less than third
Preset threshold then confirms that the interpolation point is fallen on the figure of two oblique line directions.
Computing module 402, if being also used to the figure for the oblique line directions that the interpolation point is fallen in a plurality of oblique line
On, then the product of the pixel value for the first neighbor pixel corresponding with the oblique line fallen in that calculates the first weighting coefficient, and,
The product of the pixel value of two weighting coefficients the second neighbor pixel corresponding with the oblique line fallen in, and two sum of products are made
For the pixel value of the interpolation point, first weighting coefficient be second neighbor pixel and the interpolation point distance with
The ratio of the distance of first neighbor pixel and the second neighbor pixel.
Computing module 402, if be also used to the interpolation point while falling in two oblique line directions in a plurality of oblique line
On figure, then the pixel value for the first neighbor pixel corresponding with the first oblique line fallen in that calculates the first weighting coefficient multiplies
Product, and, the product of the pixel value of the second weighting coefficient the 4th neighbor pixel corresponding with the first oblique line fallen in, and will
First pixel value of two sum of products as the interpolation point, first weighting coefficient be the 4th neighbor pixel and
Ratio of the distance of the interpolation point at a distance from the first neighbor pixel and the 4th neighbor pixel;
The product of the pixel value of third weighting coefficient the second neighbor pixel corresponding with the second oblique line fallen in is calculated,
And the 4th corresponding with the second oblique line fallen in the third neighbor pixel of weighting coefficient pixel value product, and by two
Second pixel value of a sum of products as the interpolation point, the third weighting coefficient be third neighbor pixel and it is described insert
It is worth ratio of the distance of point at a distance from the second neighbor pixel and third neighbor pixel;
The first pixel value of the interpolation point and the arithmetic mean of instantaneous value of the second pixel value are calculated, the picture of the interpolation point is obtained
Element value.
The other details of the present embodiment, referring to the description of aforementioned embodiment illustrated in fig. 1.
In the present embodiment, by confirming the interpolation point increased newly in image to be processed, if fall in the more of the interpolation point
On the oblique line that a neighbor pixel is constituted, if not falling on oblique line, according to horizontal direction interpolation algorithm and vertical direction interpolation
The pixel value that algorithm calculates interpolation point judges whether interpolation point falls on the figure of oblique line directions if falling on oblique line, if falling
Linear interpolation calculating then is being carried out according to oblique line directions interpolation algorithm, is obtaining the pixel value of the interpolation point, can improved in image tiltedly
The interpolation of the figure in line direction, the sharpness of border degree of the image after improving interpolation processing.
The embodiment of the invention also provides a kind of terminals, comprising: memory, processor and is stored on the memory simultaneously
The computer program that can be run on the processor when the processor executes the computer program, realizes such as earlier figures 1
The image processing method of the improvement linear interpolation effect.
Further, the embodiment of the invention also provides a kind of computer readable storage medium, the computer-readable storages
Medium, which can be, to be set in above-mentioned terminal, which can be the memory of aforementioned terminals.The meter
It is stored with computer program on calculation machine readable storage medium storing program for executing, which realizes aforementioned embodiment illustrated in fig. 1 when being executed by processor
Described in improve linear interpolation effect image processing method.Further, the computer can storage medium can also be U
Disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), RAM, magnetic or disk etc. are various to can store journey
The medium of sequence code.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this hair
Necessary to bright.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
The above are to the image processing method provided by the present invention for improving linear interpolation effect and improvement linear interpolation effect
The description of the image processing apparatus of fruit, for those skilled in the art, thought according to an embodiment of the present invention is being embodied
There will be changes in mode and application range, and to sum up, the contents of this specification are not to be construed as limiting the invention.
Claims (10)
1. a kind of image processing method for improving linear interpolation effect characterized by comprising
Confirmation increases the interpolation point in image to be processed newly, if falls in the oblique of multiple neighbor pixels composition of the interpolation point
On line;
If on the oblique line that the multiple neighbor pixels for not falling within the interpolation point are constituted, according to horizontal direction interpolation algorithm and erecting
Histogram calculates the pixel value of the interpolation point to interpolation algorithm;
If on the oblique line that the multiple neighbor pixels for falling in the interpolation point are constituted, it is described to judge whether the interpolation point falls in
On the figure of oblique line directions;
If falling on the figure of the oblique line directions, linear interpolation calculating is carried out according to oblique line directions interpolation algorithm, obtains institute
State the pixel value of interpolation point;
The interpolation point is inserted into the image to be processed according to the pixel value of the interpolation point.
2. the method according to claim 1, wherein described insert according to horizontal direction interpolation algorithm and vertical direction
Value-based algorithm, the pixel value for calculating the interpolation point include:
The absolute value of the difference that the pixel value of multiple neighbor pixels of the interpolation point is calculated according to horizontal direction interpolation is
It is no to be greater than the first preset threshold, if so, using the pixel value with the interpolation point apart from nearest neighbor pixel as described in
The pixel value of the derivative interpolation point of interpolation point, the derivative interpolating pixel point are located at multiple neighbor pixels in the horizontal direction
Line on;
The absolute value of the difference of the pixel value of the derivative interpolation point is calculated according to vertical direction interpolation, if be greater than the second default threshold
Value, if so, using the pixel value with the interpolation point apart from nearest derivative interpolation point as the pixel value of the interpolation point.
3. according to the method described in claim 2, it is characterized in that, the neighbor pixel of the interpolation point includes: to be located at
Using the interpolation point as four neighbor pixels in four quadrants of origin, and the first phase in four neighbor pixels
Adjacent pixel is identical as the abscissa of the second neighbor pixel, the abscissa phase of third neighbor pixel and the 4th neighbor pixel
Together, first neighbor pixel is identical as the ordinate of the third neighbor pixel, second neighbor pixel and institute
The ordinate for stating the 4th neighbor pixel is identical, then multiple phases that the interpolation point is calculated according to horizontal direction interpolation
The absolute value of the difference of the pixel value of adjacent pixel, if be greater than the first preset threshold, if so, will be with the interpolation point distance most
The pixel value of close neighbor pixel includes: as the pixel value of the derivative interpolation picture point of the interpolation point
According to horizontal direction interpolation calculate the pixel value between first neighbor pixel and second neighbor pixel it
Whether absolute value of the difference is greater than first preset threshold, if more than first preset threshold, then by first pixel
With the pixel value in second pixel with the interpolation point apart from nearest neighbor pixel as the first derivative interpolation point
Pixel value, the first derivative interpolating pixel point is located at the line of first neighbor pixel and the second neighbor pixel
On, the X-coordinate of the described first derivative interpolating pixel point is identical as the X-coordinate of the interpolation point;
The difference of the pixel value of the third neighbor pixel and the 4th neighbor pixel is calculated according to horizontal direction interpolation
Whether absolute value is greater than first preset threshold, if more than first preset threshold, then by the third pixel and institute
State picture of the pixel value as the second derivative interpolation point in the 4th pixel with the interpolation point apart from nearest neighbor pixel
Element value, the described first derivative interpolating pixel point are located on the line of the third neighbor pixel and the 4th neighbor pixel, institute
The X-coordinate for stating the second derivative interpolating pixel point is identical as the X-coordinate of the interpolation point;
Then, the absolute value of the difference that the derivative interpolation point pixel value is calculated according to vertical direction interpolation, if be greater than second
Preset threshold, if so, using the pixel value with the interpolation point apart from nearest derivative interpolation point as the picture of the interpolation point
Plain value includes:
The pixel between the interpolation point and third neighbor pixel and the 4th neighbor pixel is calculated according to vertical direction interpolation
Whether the absolute value of the difference of value is greater than first preset threshold, if more than first preset threshold, then by the third picture
Pixel value in vegetarian refreshments and the 4th pixel with the interpolation point apart from nearest neighbor pixel is derivative slotting as second
It is worth the pixel value of point.
4. if according to the method described in claim 3, the it is characterized in that, multiple neighbor pixels for falling in the interpolation point
On the oblique line of composition, then judge the interpolation point whether to fall on the figures of the oblique line directions to include:
If falling on a wherein oblique line for each oblique line of composition, corresponding two neighbor pixels on this oblique line are calculated
The absolute value of the difference of pixel value confirms that the interpolation point falls in this oblique line if the absolute value is less than third predetermined threshold value
On the figure in direction.
5. if according to the method described in claim 3, the it is characterized in that, multiple neighbor pixels for falling in the interpolation point
On the oblique line of composition, then judge the interpolation point whether to fall on the figures of the oblique line directions to include:
If falling on the two of them oblique line of each oblique line of composition, corresponding two phases of two oblique lines are calculated separately
The absolute value of the difference of the pixel value of adjacent pixel;
If the absolute value of the difference of the pixel value of corresponding two neighbor pixels of two oblique lines is respectively less than the third
Preset threshold then confirms that the interpolation point is fallen on the figure of two oblique line directions.
6. according to the method described in claim 4, it is characterized in that, described carry out linear interpolation according to oblique line directions interpolation algorithm
It calculates, the pixel value for obtaining the interpolation point includes:
If the interpolation point is fallen on the figure of an oblique line directions in a plurality of oblique line, calculate the first weighting coefficient with
The product of the pixel value of corresponding first neighbor pixel of the oblique line fallen in, and, the second weighting coefficient with fallen in it is oblique
The product of the pixel value of corresponding second neighbor pixel of line, and using two sum of products as the pixel value of the interpolation point,
First weighting coefficient is distance and the first neighbor pixel and second of second neighbor pixel and the interpolation point
The ratio of the distance of neighbor pixel.
7. according to the method described in claim 5, it is characterized in that, described carry out linear interpolation according to oblique line directions interpolation algorithm
It calculates, the pixel value for obtaining the interpolation point includes:
If the interpolation point is fallen on the figure of two oblique line directions in a plurality of oblique line simultaneously, the first weighting system is calculated
The product of the pixel value of number the first neighbor pixel corresponding with the first oblique line fallen in, and, the second weighting coefficient and institute
The product of the pixel value of corresponding 4th neighbor pixel of the first oblique line fallen in, and using two sum of products as the interpolation
First pixel value of point, first weighting coefficient are the distance and the first phase of the 4th neighbor pixel and the interpolation point
The ratio of the distance of adjacent pixel and the 4th neighbor pixel;
The product of the pixel value of third weighting coefficient the second neighbor pixel corresponding with the second oblique line fallen in is calculated, with
And the 4th corresponding with the second oblique line fallen in the third neighbor pixel of weighting coefficient pixel value product, and by two
Second pixel value of the sum of products as the interpolation point, the third weighting coefficient are third neighbor pixel and the interpolation
Ratio of the distance of point at a distance from the second neighbor pixel and third neighbor pixel;
The first pixel value of the interpolation point and the arithmetic mean of instantaneous value of the second pixel value are calculated, the pixel of the interpolation point is obtained
Value.
8. a kind of image processing apparatus for improving linear interpolation effect characterized by comprising
Confirmation module, for confirming the interpolation point increased newly in image to be processed, if fall in the multiple adjacent of the interpolation point
On the oblique line that pixel is constituted;
Computing module, if the oblique line that multiple neighbor pixels for not falling within the interpolation point are constituted, according to level side
To interpolation algorithm and vertical direction interpolation algorithm, the pixel value of the interpolation point is calculated;
Judgment module, if the oblique line that multiple neighbor pixels for falling in the interpolation point are constituted, judges the interpolation
Whether point falls on the figure of the oblique line directions;
The computing module carries out if being also used to fall on the figure of the oblique line directions according to oblique line directions interpolation algorithm
Linear interpolation calculates, and obtains the pixel value of the interpolation point;
Processing module, for the interpolation point to be inserted into the image to be processed according to the pixel value of the interpolation point.
9. device according to claim 8, which is characterized in that the computing module is also used to according to horizontal direction interpolation
Calculate the absolute value of the difference of the pixel value of multiple neighbor pixels of the interpolation point, if it is greater than the first preset threshold,
If so, using the pixel value with the interpolation point apart from nearest neighbor pixel as the derivative interpolation point of the interpolation point
Pixel value, the derivative interpolating pixel point are located on multiple neighbor pixel lines in the horizontal direction;
The absolute value of the difference of the pixel value of the derivative interpolation point is calculated according to vertical direction interpolation, if be greater than the second default threshold
Value, if so, using the pixel value with the interpolation point apart from nearest derivative interpolation point as the pixel value of the interpolation point.
10. device according to claim 9, which is characterized in that the judgment module, if being also used to fall in each oblique of composition
On a wherein oblique line for line, then the absolute value of the difference of the pixel value of corresponding two neighbor pixels on this oblique line is calculated,
If the absolute value is less than third predetermined threshold value, confirm that the interpolation point is fallen on the figure of this oblique line directions;
If falling on the two of them oblique line of each oblique line of composition, corresponding two phases of two oblique lines are calculated separately
The absolute value of the difference of the pixel value of adjacent pixel;
If it is default that the absolute value of the difference of the pixel value of corresponding two neighbor pixels of two oblique lines is respectively less than third
Threshold value then confirms that the interpolation point is fallen on the figure of two oblique line directions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910638377.2A CN110349089B (en) | 2019-07-16 | 2019-07-16 | Image processing method and device for improving linear interpolation effect |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910638377.2A CN110349089B (en) | 2019-07-16 | 2019-07-16 | Image processing method and device for improving linear interpolation effect |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110349089A true CN110349089A (en) | 2019-10-18 |
CN110349089B CN110349089B (en) | 2023-03-10 |
Family
ID=68176394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910638377.2A Active CN110349089B (en) | 2019-07-16 | 2019-07-16 | Image processing method and device for improving linear interpolation effect |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110349089B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080127031A1 (en) * | 2003-11-12 | 2008-05-29 | Micronic Laser Systems Ab | Method and device for correcting SLM stamp image imperfections |
CN103366342A (en) * | 2013-07-02 | 2013-10-23 | 天津大学 | Piecewise linear interpolation method applied to video image amplification |
CN107734281A (en) * | 2017-09-22 | 2018-02-23 | 维沃移动通信有限公司 | A kind of image magnification method and mobile terminal |
-
2019
- 2019-07-16 CN CN201910638377.2A patent/CN110349089B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080127031A1 (en) * | 2003-11-12 | 2008-05-29 | Micronic Laser Systems Ab | Method and device for correcting SLM stamp image imperfections |
CN103366342A (en) * | 2013-07-02 | 2013-10-23 | 天津大学 | Piecewise linear interpolation method applied to video image amplification |
CN107734281A (en) * | 2017-09-22 | 2018-02-23 | 维沃移动通信有限公司 | A kind of image magnification method and mobile terminal |
Non-Patent Citations (1)
Title |
---|
孟利民等: "基于局部特征的图像插值算法在B/S视频监控中的应用", 《浙江工业大学学报》 * |
Also Published As
Publication number | Publication date |
---|---|
CN110349089B (en) | 2023-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102440284B1 (en) | Image processing device, image processing method and program | |
CN106485720A (en) | Image processing method and device | |
EP2169619A2 (en) | Conversion method and apparatus with depth map generation | |
CN104700360B (en) | Image-scaling method and system based on edge self-adaption | |
CN103167218A (en) | Super-resolution reconstruction method and equipment based on non-locality | |
CN105389801A (en) | Figure outline setting method, shooting terminal, figure image blurring method and system | |
CN112991165B (en) | Image processing method and device | |
CN114862725B (en) | Method and device for realizing motion perception fuzzy special effect based on optical flow method | |
CN105279473B (en) | Face image correction method and device and face recognition method and system | |
CN103226824B (en) | Maintain the video Redirectional system of vision significance | |
US20120062548A1 (en) | Reducing viewing discomfort | |
CN106295652A (en) | A kind of linear feature matching process and system | |
WO2017096814A1 (en) | Image processing method and apparatus | |
CN102098528A (en) | Method and device for converting planar image into stereoscopic image | |
CN111026297A (en) | Screen image rotation method, control device, storage medium and computer equipment | |
CN110415285A (en) | Image processing method, device and electronic equipment | |
CN108648205A (en) | A kind of sub-pixel edge detection method | |
CN112785492A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN110363723A (en) | Improve the image processing method and device of image boundary effect | |
KR20130036430A (en) | Method for generating high resolution depth image from low resolution depth image, and medium recording the same | |
CN107424583B (en) | Display data processing method and system for special-shaped image | |
CN110349089A (en) | Improve the image processing method and device of linear interpolation effect | |
CN104978720A (en) | Video image raindrop removal method and apparatus | |
CN109741426A (en) | A kind of caricature form method for transformation and device | |
US9336573B2 (en) | Self-adaptive image edge correction device and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |