CN108665413A - A kind of image adaptive amplification method, readable storage medium storing program for executing and terminal - Google Patents
A kind of image adaptive amplification method, readable storage medium storing program for executing and terminal Download PDFInfo
- Publication number
- CN108665413A CN108665413A CN201810402751.4A CN201810402751A CN108665413A CN 108665413 A CN108665413 A CN 108665413A CN 201810402751 A CN201810402751 A CN 201810402751A CN 108665413 A CN108665413 A CN 108665413A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- energy function
- cutting wires
- pending
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000003321 amplification Effects 0.000 title claims abstract description 32
- 238000003199 nucleic acid amplification method Methods 0.000 title claims abstract description 32
- 230000003044 adaptive effect Effects 0.000 title claims abstract description 23
- 230000006870 function Effects 0.000 claims abstract description 81
- 238000012545 processing Methods 0.000 claims abstract description 16
- 238000004422 calculation algorithm Methods 0.000 claims description 4
- 238000010606 normalization Methods 0.000 claims description 3
- 238000004590 computer program Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 6
- 239000011159 matrix material Substances 0.000 description 6
- 238000009966 trimming Methods 0.000 description 4
- 230000000007 visual effect Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000008447 perception Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- HUTDUHSNJYTCAR-UHFFFAOYSA-N ancymidol Chemical compound C1=CC(OC)=CC=C1C(O)(C=1C=NC=NC=1)C1CC1 HUTDUHSNJYTCAR-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000009827 uniform distribution Methods 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
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The present invention provides a kind of image adaptive amplification method, is applied to technical field of image processing, including:Obtain pending image and the corresponding target size of pending image;It converts pending image to gray level image, and builds the corresponding gradient energy function of each pixel in gray level image, and obtain the energy function of the corresponding view-based access control model conspicuousness information of each pixel;Build the corresponding total energy function of each pixel in pending image;According to default constraints, defines horizontal direction cutting wires and vertical direction cutting wires corresponding to pending image and optimal crop line is determined according to the total energy function minimum principle of cutting wires;According to optimal crop line, processing is amplified to pending image, pending image reaches target size until treated.The invention also discloses a kind of readable memory and terminals.Using the embodiment of the present invention, solve the problems, such as that image fault occurs after enhanced processing in image in the prior art.
Description
Technical field
The present invention relates to a kind of image magnification treatment technology, more particularly to a kind of image adaptive amplification method, readable
Storage medium and terminal.
Background technology
With the fast development of multimedia technology and mobile Internet, with visual multimedia equipment for example mobile phone, tablet computer,
The multiple terminals such as PC computers, TV are broadcast live to browse webpage, watch, see telecine etc..However, due to display equipment size and dividing
The difference of resolution, during page adjust automatically size, the size of image is typically changeless, can't basis
Display equipment and the space of a whole page need its size of adjust automatically.In addition, image, which must change its ratio of width to height, can just make its size
Different display equipment is adapted to, these equipment can be the monitor of large screen display, can also be the mobile phone that the small screen is shown
Or other handheld devices etc., therefore, image scaling techniques are just particularly important.
In practical application, image scaling problem includes that picture size reduces and problem of both picture size amplification.And
For image magnification in the prior art, the technology using linearity interpolation amplification includes mainly arest neighbors interpolation, bilinearity
Interpolation and cubic spline interpolation etc., such methods improve resolution ratio limited, fuzzy, strong edge sawtooth wave effect that there are edge details
Answer serious disadvantage;Another kind of non-linear interpolation method, such as fractal interpolation, Wavelet Interpolation, partial differential equation interpolation, such side
The image magnification of method can preferably enhance edge, enhance image spatial resolution, improve image definition.Image multiplication method
Mostly it is directed to the equal situation of the ratio of width to height of amplified target image and original image, and many situations in actual life
Under, picture and the corresponding the ratio of width to height of display equipment are often inconsistent, and since original image is different with display the ratio of width to height, interpolation is calculated
Method normally results in important content in original image and generates moderate finite deformation during scaling.Based on this, based on perception of content
Picture size self-adapting regulation method is developed, and the picture size self-adapting regulation method based on perception of content is according to image
Content significance level zooms in or out image, ensures that excessive deformation do not occur for the content of image important area as possible,
Specifically Avidan et al. proposed a kind of image-scaling method being based on line clipping (Seam Carving), the party in 2007
Method can be not only used for the diminution of picture size, can also be applied to the amplification of picture size.Line clipping method passes through continuous
Find in present image the minimum communication path of energy value in horizontal or vertical direction, then gradually delete (image down) or
Increase a pixel band (image magnification) on its left side or the right, until being finally reached target size.Especially when image has
When apparent important area is with insignificant region, line clipping method has apparent advantage.But existing line clipping method is only adopted
Energy function is defined with the gradient map of image, since the information that gradient map includes is single, the partial information of image can only be expressed,
The variation of image cannot be embodied, especially when image information is very dense, there are the defects of partial distortion for the image after enhanced processing.
Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of image adaptive amplification sides
Method, readable storage medium storing program for executing and terminal, for solving the problems, such as that image fault occurs after enhanced processing in image in the prior art.
In order to achieve the above objects and other related objects, the present invention provides a kind of image adaptive amplification method, the figure
As adaptive amplification method includes at least:Obtain pending image and the corresponding target size of the pending image;By institute
It states pending image and is converted into gray level image, and according to the gray level image, build each pixel in the gray level image
Corresponding gradient energy function, and according to the pending image, it is notable to obtain the corresponding view-based access control model of each pixel
The energy function of property information;According to the energy function of the gradient energy function and the view-based access control model conspicuousness information, structure
The corresponding total energy function of each pixel in the pending image;According to default constraints, define described pending
Horizontal direction cutting wires corresponding to image and vertical direction cutting wires, and from defined horizontal direction cutting wires and Vertical Square
Into cutting wires, according to the total energy function minimum principle of cutting wires, optimal crop line is determined;According to the optimal crop line,
Processing is amplified to the pending image, the pending image reaches the target size until treated.
Preferably, described according to the gray level image, build the corresponding gradient of each pixel in the gray level image
The step of energy function, including:The transverse gradients value of gray level image is calculated using first gradient operator, and utilizes the second ladder
Operator is spent to calculate longitudinal Grad of gray level image;According to the transverse gradients value and longitudinal Grad, the gray scale is built
The corresponding gradient energy function of each pixel in image.
Preferably, the gradient energy function is embodied as:Wherein,
EI'grad(i,j)For the gradient energy function that abscissa is the pixel that i ordinates are j, GxFor abscissa be i ordinates it is j's
The transverse gradients value of pixel, GyAbscissa is the longitudinal Grad for the pixel that i ordinates are j.
Preferably, described according to the pending image, obtain the corresponding view-based access control model conspicuousness letter of each pixel
The step of energy function of breath, including:It is calculated to every in the pending image using context aware Context-Aware algorithms
The vision significance value of one pixel, and obtained vision significance value is normalized, obtain each pixel
The energy function of the corresponding view-based access control model conspicuousness information of point.
Preferably, the total energy function is embodied as:EtotalI(i,j)=α EsmapI(i,j)+(1-α)EIgrad(i,j)
Wherein, EtotalI(i,j)For the total energy function that abscissa is the pixel that i ordinates are j, EsmapI(i,j)It is i vertical for abscissa
Coordinate is the energy function of the corresponding view-based access control model conspicuousness information of pixel of j, and α is weight coefficient, EIgrad(i,j)To pass through
EI' after normalizationgrad(i,j)。
Preferably, the total energy function minimum principle according to cutting wires determines optimal crop line, including:According to sanction
Shared pixel point in the total energy function minimum principle and cutting wires of trimming, determines optimal crop path.
Preferably, described according to the optimal crop line, processing is amplified to the pending image, until after processing
Pending image the step of reaching the target size, including:(21) determine that first cuts out in the optimal crop line
Trimming, and determine the second cutting wires of the adjacent default side of first cutting wires, it is cut out in first cutting wires and described second
It is inserted into object pixel band between trimming, obtains treated image, wherein any one pixel on the object pixel band
Value be:The pixel value of pixel is averaged with the pixel value of pixel on second cutting wires on first cutting wires
Value;(22) treated described in judging, and whether image reaches the target size;(23) if not, reaffirming the first cutting
Line executes step (21).
In addition, the invention also discloses a kind of readable storage medium storing program for executing, it is stored thereon with computer program, which is handled
The step of described image adaptive amplification method any one of is realized when device executes.
And a kind of terminal, including processor storage, memory have program stored therein instruction, processor operation program refers to
Enable the step of realizing any one of them image adaptive amplification method.
As described above, image adaptive amplification method, readable storage medium storing program for executing and the terminal of the present invention, have below beneficial to effect
Fruit:The gradient energy function of pixel on each gray-scale map, Yi Jigen are obtained by the gray-scale map corresponding to pending image
The energy function of the view-based access control model conspicuousness information of each pixel is obtained according to pending image, and then according to each gray scale
The energy function of the view-based access control model conspicuousness information of the gradient energy function of pixel and each pixel obtains each on figure
The total energy function of a pixel, further according in defined horizontal direction cutting wires and vertical direction cutting wires, cutting wires
Total energy function minimum principle obtains optimal crop line, and the enhanced processing that currently pending image is carried out according to optimal crop line is straight
To reaching target size.Since the embodiment of the present invention is using the corresponding gradient energy function of gray level image and using pending
The energy function of the corresponding view-based access control model conspicuousness information of image compared with the existing technology in only with gradient map define energy
Flow function more can comprehensively embody the pixel information of pending image, solve the letter for including due to gradient map in the prior art
Interest statement one, the variation that cannot embody image cause image after handling to there are problems that partial distortion.Therefore, using the reality of the present invention
Example is applied, solves the problems, such as to increase vision as the information representation excalation caused by energy function only with gradient information
Conspicuousness information effectively enhances energy function and effectively indicates, highlights the notable structural information of image, enhances the vision of people
Ornamental value.
Description of the drawings
Fig. 1 is shown as the flow diagram of the image adaptive amplification method of the present invention.
Fig. 2 is shown as schematic diagram of the optimal crop line without shared pixel point.
Fig. 3 is the corresponding image magnification schematic diagrames of Fig. 2.
Fig. 4 is the schematic diagram that optimal crop line has shared pixel point.
Fig. 5 is the corresponding image magnification schematic diagrames of Fig. 4.
Fig. 6 is the shared number statistical result schematic diagram of the shared pixel point of Fig. 4.
Component label instructions
S101~S105 steps
Specific implementation mode
Illustrate that embodiments of the present invention, those skilled in the art can be by this specification below by way of specific specific example
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.
It should be noted that the diagram provided in the present embodiment only illustrates the basic conception of the present invention in a schematic way,
Then component count, shape and size when only display is with related component in the present invention rather than according to actual implementation in schema are painted
System, when actual implementation kenel, quantity and the ratio of each component can be a kind of random change, and its assembly layout kenel also may be used
It can be increasingly complex.
It is a kind of flow diagram of image adaptive amplification method provided in an embodiment of the present invention, the side referring to Fig. 1
Method includes that steps are as follows:
S101 obtains pending image and the corresponding target size of the pending image.
It should be noted that pending image can by being obtained in the equipment such as video camera, camera, storage device, or
Person be above equipment upper level image processing process in the color digital image that obtains, meanwhile, user treats place if necessary
Reason image is amplified processing, then needing to send an amplification instruction for including pending image, instruction needs to include to wait locating
The corresponding target size after image magnification is managed, i.e. user wants pending image magnification to the instruction of what size.It can be with
Understand, the acquisition of target size can be the amplification instruction assigned by user, can also be putting of receiving between equipment
The default amplification mode of big instruction or equipment itself, the embodiment of the present invention are not specifically limited herein.
Illustratively, if user is in camera apparatus, the amplification instruction of input is by pending image magnification to 1.5
Times, it is assumed that the current size of pending image is 1000*1500, then the size of treated image is 1500*2250.
S102 converts the pending image to gray level image, and according to the gray level image, builds the gray-scale map
The corresponding gradient energy function of each pixel as in, and according to the pending image, obtain each pixel pair
The energy function for the view-based access control model conspicuousness information answered.
Coloured image is converted from RGB color space specifically, converting pending image to gray level image and may be used
At gray space, gray level image I is obtainedG, for any one pixel, calculation formula is as follows:
IG=0.299R+0.587G+0.114B
R, G, B respectively the pixel in three color channel values of red, green, blue of RGB color space, IGPass through for the pixel
Gray value after conversion.
For gray-scale map, the embodiment of the present invention calculates the gradient information of gray level image using Sobel gradient operators, point cross
To gradient and longitudinal gradient, Sobel operators and gray level image are made into planar convolution, specifically, utilizing first gradient operator Gx1Come
Calculate the transverse gradients value G of gray level imagex, and utilize the second gradient operator Gy1To calculate longitudinal Grad of gray level image
Gy;Its calculation formula is as follows:
Gx=Gx1*IG
Gy=Gy1*IG
In formula, GxAnd GyThe transverse gradients value and longitudinal Grad, symbol * for respectively representing the pixel represent two dimensional image
Convolution operation.In the embodiment of the present invention, Gx1、Gy1Value it is as follows.
It is that the pixel that i ordinates are j builds gradient energy function for abscissa specifically, in the embodiment of the present invention
Be embodied as:
Wherein, EIgrad(i,j)For the gradient energy function that abscissa is the pixel that i ordinates are j.
It is the corresponding transverse direction of each pixel and indulges it is understood that original line clipping method defines energy function
It sums to Grad absolute value, and in the present invention, define the L that the corresponding energy function of gradient information is gradient2Norm, in formula, Gx
It is equal toAnd GyIt is equal toTo EI'grad(i,j)Normalized is done, by EI'grad(i,j)In all values divided by
EI'grad(i,j)In maximum value, make EI'grad(i,j)Value range be 0 to 1 between, it is normalized.
In the embodiment of the present invention, each pixel in pending image is color pixel cell, specifically, can pass through
Context aware Context-Aware algorithms handle pending image, obtain institute's group of its each corresponding pixel
At vision significance Table Isamp.Then to IsampNormalized is done, by IsampIn all values divided by IsampIn maximum
Value, obtains the energy function E of view-based access control model conspicuousness informationsmapSo that EsmapValue range be 0 to 1 between.This will be passed through
The vision significance table output that process is calculated is the size of pending image.
S103, according to the energy function of the gradient energy function and the view-based access control model conspicuousness information, described in structure
The corresponding total energy function of each pixel in pending image.
Specifically, total energy function is embodied as in the embodiment of the present invention:
EtotalI(i,j)=α EsmapI(i,j)+(1-α)EIgrad(i,j)
Wherein, EtotalI(i,j)For the total energy function that abscissa is the pixel that i ordinates are j, EsmapI(i,j)For horizontal seat
It is designated as the energy function for the corresponding view-based access control model conspicuousness information of pixel that i ordinates are j, α is weight coefficient, EIgrad(i,j)
For the EI' after normalizationgrad(i,j)。
In above formula, EtotalI(i,j)For the energy function for line clipping method, α and (1- α) are respectively EsmapI(i,j)、
EIgrad(i,j)The corresponding weight coefficient of two kinds of different-energy functions.And it is understood that EtotalI(i,j)Value it is bigger, meaning
That the information that the pixel includes is more, and importance is also bigger.
Weight coefficient α is the corresponding weight coefficient of vision significance table of pending image, by obtained above pending
The notable Table I of vision of imagesampSize determine, the area of vision well-marked target object is bigger, α values correspond to it is bigger,
So as to preferably protect the very important visual information of different well-marked targets in pending image, calculation formula as follows:
N and M is respectively the notable Table I of vision of original color imagesmapLength and width, TsIt is the threshold value of setting.
S104 defines horizontal direction cutting wires corresponding to the pending image and vertical according to default constraints
Direction cutting wires, and from defined horizontal direction cutting wires and vertical direction cutting wires, according to the gross energy letter of cutting wires
Number minimum principle, determines optimal crop line.
In the embodiment of the present invention, when pending image size be n × m, then defining determining for the cutting wires of vertical direction
Justice is as follows:
Wherein, x is a mapping x:[1, L, n] → [1, L, m], representative are found from top to bottom along y-axis, then it is corresponded to
Pixel can correspond to the point in an x-axis, the position of the pixel is within the scope of 1 to m, i.e., corresponding 1 to arrive m in the horizontal direction
In the range of, it also has corresponding location of pixels and is found.The cutting wires S of this vertical directionxIt is to be opened from the first row pixel
Begin, finds a top-down seam in 8 contiguous ranges of each pixel, often row includes one and only one pixel.It can
With understanding,Indicate SxIn condition meet and look for continuous position mobile every time in vertical direction
The coordinate less than or equal to 1 is set, is attached, obtains this cutting wires Sx, the pixel of x (j) expression horizontal directions
Point position.
And so on, define the cutting wires of a horizontal direction:
Wherein, y is a mapping y:[1, L, m] → [1, L, n], x (i) indicate the pixel position of vertical direction,Indicate SyIn condition satisfaction look for continuous shift position to be every time less than or equal to 1 in the horizontal direction
Coordinate, be attached, obtain this cutting wires Sy.That i, j are represented is an index subscript, x (j) here
It is horizontally oriented and vertical direction pixel position with what y (i) was represented.
It is understood that the gross energy of pixel on cutting wires it is the sum of cumulative for the corresponding pixel of the cutting wires it is total
Energy, thus, it is possible to obtain the corresponding gross energy of each cutting wires, can also be carried out discharge capacity.According to the total of cutting wires
Energy function minimum principle determines that the cutting wires of the total energy function value minimum of all pixels point on cutting wires are optimal crop
Line.By taking the cutting wires of vertical direction as an example, it is embodied as:
E(I(Sj) indicate the ordinate that this cuts for the total energy function of the pixel of j, S*Upper picture is cut for this
The sum of gross energy of vegetarian refreshments.
It should be noted that find minimum gross energy, vertical and all pixels point is asked on the cutting wires of eight connectivity
Topic can be solved using Dynamic Programming.Illustratively, if matrix M storage be present image cumulative least energy, matrix E
Store the energy function value of image.The first trip of M is initialized to the first trip value of energy function E, and the value of next line is equal to current line in M
Energy function value plus the minimum value in M [i-i] [j-1], M [i-1] [j] and M [i-1] [j+1], be previously calculated by storing
Energy cost value as a result, can traverse all rows calculates cutting wires.
By taking vertical direction as an example, as follows is indicated for the energy of arbitrary input point (i, j) optimal crop line:
M [i] [j]=E [i] [j]+min (M [i-1] [j-1], M [i-1] [j], M [i-1] [j+1])
The minimum value in last column of Metzler matrix is calculated, which is the cost energy of optimal crop line, by from minimum
Cost energy value position carries out backtracking and finds optimal path.
S105 is amplified processing according to the optimal crop line to the pending image, until described in treated
Pending image reaches the target size.
Specifically, the optimal crop line determined in the embodiment of the present invention can be horizontally oriented cutting wires and vertical direction is cut out
Trimming, it is assumed that the quantity of determining optimal crop line is K, then for any one cutting in this K optimal crop line
Line executes following steps:
(21) any one cutting wires are determined in the optimal crop line as the first cutting wires, and determine described first
Second cutting wires of the adjacent default side of cutting wires are inserted into target picture between first cutting wires and second cutting wires
Plain band obtains treated image, wherein the value of any one pixel on the pixel band is:First cutting wires
The average value of the pixel value of upper pixel and the pixel value of corresponding pixel points on second cutting wires;(22) judge the processing
Whether image afterwards reaches the target size;(23) if not, reaffirming the first cutting wires, step (21) is executed.
Specifically, when the first cutting wires are vertical cutting wires, the left side of thread path can be cut (if it is water first
Flat cutting wires can be upside either downside) or right side be inserted into a pixel band, pixel value is the picture on the first cutting wires
The average value of the value of vegetarian refreshments and the value of its left side (upside either downside) or right pixel point.
In the embodiment of the present invention, the pixel on optimal crop line will appear shared situation, and pixel is carried and is likely to occur
Uneven transition is so as to cause image fault caused by shared pixel point is excessively concentrated.Based on this, the embodiment of the present invention uses:
According to the shared pixel point in the total energy function minimum principle and cutting wires of cutting wires, optimal crop path is determined, specifically
, it determines the shared number of pixel on each cutting wires, then judges to share whether number is more than preset times, if
Then to skip the cutting wires to continually look for, until finding the cutting wires of the condition of satisfaction, if meet the cutting wires of condition compared with
It is more, part therein, the embodiment of the present invention can be selected to be not specifically limited herein.
In a kind of realization method of the present invention, the method for determination of the shared rate of pixel is as follows on cutting wires:Setting one and
Pending image slices two-dimensional matrix C of the same size, stores the shared situation of each cutting wires pixel, uses dynamic programming algorithm
It calculates in image after minimum energy value, in trace-back process, a variable count is set, when some point A is in a cutting wires
On previous as another point B when, count adds 1, when A points simultaneously also as another cutting wires in before some point C
At one, count also adds 1, to become 2.Thus, it is possible to the shared number of some point is counted by count variables, and
By the corresponding count values of all the points, there are in Matrix C.The shared number divided by total pixel number of the pixel are the pixel
The shared rate of point can go to eliminate corresponding pixel from shared rate, can also carry out which shared pixel judged from Matrix C
It puts and is eliminated, and then eliminate the optimal crop line put where it.
As shown in Fig. 2, shared pixel point is not present in optimal crop line, Fig. 3 is that the cutting wires of Fig. 2 use implementation of the present invention
The design sketch of the enlargement processing method of example;Fig. 4 is optimal crop line there are the schematic diagram of shared pixel point, and Fig. 5 is the amplification of Fig. 4
Design sketch;Fig. 6 is shared statistical result number schematic diagram of the shared pixel point in Fig. 4.
Therefore, using the embodiment of the present invention, the case where by judging cutting wires shared pixel point in image and it is calculated
Shared rate waits for newly-increased cutting line position to determine.By the combination of both modes, improved image magnification method can reach
To better image amplification effect and visual experience.The shared pixel point treatment technology that application invention provides, can make image
The increase of the middle insignificant information area pixel band of visual attention location can obtain more uniform distribution, so that slight crack problem is obtained
To avoid further reduced distortion and the deformation phenomenon of the image caused by line clipping.
In conclusion image adaptive amplification method, readable storage medium storing program for executing and terminal of the invention, of the invention, have with
Lower advantageous effect:The gradient energy letter of pixel on each gray-scale map is obtained by the gray-scale map corresponding to pending image
Number, and the energy function of the view-based access control model conspicuousness information of each pixel is obtained according to pending image, and then basis
The energy letter of the view-based access control model conspicuousness information of the gradient energy function of pixel and each pixel on each gray-scale map
Number obtains the total energy function of each pixel, further according to defined horizontal direction cutting wires and vertical direction cutting wires
In, the total energy function minimum principles of cutting wires obtain optimal crop line, currently pending image is carried out according to optimal crop line
Enhanced processing until reach target size.Due to the embodiment of the present invention use the corresponding gradient energy function of gray level image, with
And using the corresponding view-based access control model conspicuousness information of pending image energy function compared with the existing technology in only with ladder
Degree figure can comprehensively embody the pixel information of pending image to define energy function more, solve in the prior art due to ladder
The information that degree figure includes is single, and the variation that cannot embody image causes image after handling to there are problems that partial distortion.Therefore, it answers
With the embodiment of the present invention, solves only with gradient information and to be asked as the information representation excalation caused by energy function
Topic, increases vision significance information and effectively enhances energy function and effectively indicate, highlights the notable structural information of image, increases
The strong vision ornamental value of people.So the present invention effectively overcomes various shortcoming in the prior art and has high industrial utilization
Value.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology can all carry out modifications and changes to above-described embodiment without violating the spirit and scope of the present invention.Cause
This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as
At all equivalent modifications or change, should by the present invention claim be covered.
Claims (9)
1. a kind of image adaptive amplification method, which is characterized in that the adaptive amplification method of described image includes at least:
Obtain pending image and the corresponding target size of the pending image;
It converts the pending image to gray level image, and according to the gray level image, builds each in the gray level image
The corresponding gradient energy function of a pixel, and according to the pending image, obtains that each pixel is corresponding to be based on
The energy function of vision significance information;
According to the energy function of the gradient energy function and the view-based access control model conspicuousness information, the pending image is built
In the corresponding total energy function of each pixel;
According to default constraints, defines horizontal direction cutting wires and vertical direction corresponding to the pending image and cut
Line, and from defined horizontal direction cutting wires and vertical direction cutting wires, it is minimum former according to the total energy function of cutting wires
Then, optimal crop line is determined;
According to the optimal crop line, processing is amplified to the pending image, pending image reaches until treated
To the target size.
2. image adaptive amplification method according to claim 1, which is characterized in that it is described according to the gray level image,
The step of building the corresponding gradient energy function of each pixel in the gray level image, including:
The transverse gradients value of gray level image is calculated using first gradient operator, and calculates gray scale using the second gradient operator
Longitudinal Grad of image;
According to the transverse gradients value and longitudinal Grad, the corresponding gradient energy of each pixel in the gray level image is built
Flow function.
3. image adaptive amplification method according to claim 2, which is characterized in that the gradient energy function it is specific
It is expressed as:
Wherein, EI'grad(i,j)For the gradient energy function that abscissa is the pixel that i ordinates are j, GxIt is the vertical seats of i for abscissa
It is designated as the transverse gradients value of the pixel of j, GyAbscissa is the longitudinal Grad for the pixel that i ordinates are j.
4. image adaptive amplification method according to claim 1, which is characterized in that described according to the pending figure
Picture, the step of obtaining the energy function of the corresponding view-based access control model conspicuousness information of each pixel, including:
It is calculated using context aware Context-Aware algorithms notable to the vision of each pixel in the pending image
Property value, and obtained vision significance value is normalized, it is notable to obtain the corresponding view-based access control model of each pixel
The energy function of property information.
5. image adaptive amplification method according to claim 1, which is characterized in that the specific table of the total energy function
Up to for:
EtotalI(i,j)=α EsmapI(i,j)+(1-α)EIgrad(i,j)
Wherein, EtotalI(i,j)For the total energy function that abscissa is the pixel that i ordinates are j, EsmapI(i,j)It is i for abscissa
Ordinate is the energy function of the corresponding view-based access control model conspicuousness information of pixel of j, and α is weight coefficient, EIgrad(i,j)For warp
Cross the EI' after normalizationgrad(i,j)。
6. image adaptive amplification method according to claim 1, which is characterized in that according to the total energy function of cutting wires
Minimum principle determines optimal crop line, including:
According to the shared pixel point in the total energy function minimum principle and cutting wires of cutting wires, optimal crop path is determined.
7. image adaptive amplification method according to claim 1, which is characterized in that described according to the optimal crop
Line is amplified processing to the pending image, until treated, the pending image reaches the target size
Step, including:
(21) the first cutting wires are determined in the optimal crop line, and determine the second of the adjacent default side of first cutting wires
Cutting wires are inserted into object pixel band between first cutting wires and second cutting wires, obtain treated image,
In, the value of any one pixel on the object pixel band is:The pixel value of pixel and institute on first cutting wires
State the average value of the pixel value of pixel on the second cutting wires;
(22) treated described in judging, and whether image reaches the target size;
(23) if not, reaffirming the first cutting wires, step (21) is executed.
8. a kind of readable storage medium storing program for executing, is stored thereon with computer program, which is characterized in that real when the program is executed by processor
The step of any one of existing claim 1 to 7 described image adaptive amplification method.
9. a kind of terminal, including processor storage, memory has program stored therein instruction, it is characterised in that:Processor runs journey
Sequence instruction is realized such as the step in 1 to 7 any one of them image adaptive amplification method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810402751.4A CN108665413A (en) | 2018-04-28 | 2018-04-28 | A kind of image adaptive amplification method, readable storage medium storing program for executing and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810402751.4A CN108665413A (en) | 2018-04-28 | 2018-04-28 | A kind of image adaptive amplification method, readable storage medium storing program for executing and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108665413A true CN108665413A (en) | 2018-10-16 |
Family
ID=63781473
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810402751.4A Pending CN108665413A (en) | 2018-04-28 | 2018-04-28 | A kind of image adaptive amplification method, readable storage medium storing program for executing and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108665413A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109978768A (en) * | 2019-03-28 | 2019-07-05 | 南京邮电大学 | A kind of image non-linear Zoom method of view-based access control model conspicuousness detection |
CN110580678A (en) * | 2019-09-10 | 2019-12-17 | 北京百度网讯科技有限公司 | image processing method and device |
CN114529715A (en) * | 2022-04-22 | 2022-05-24 | 中科南京智能技术研究院 | Image identification method and system based on edge extraction |
CN114911551A (en) * | 2021-02-08 | 2022-08-16 | 花瓣云科技有限公司 | Display method and electronic equipment |
CN117114997A (en) * | 2023-10-23 | 2023-11-24 | 四川新视创伟超高清科技有限公司 | Image stitching method and device based on suture line search algorithm |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140023293A1 (en) * | 2010-01-22 | 2014-01-23 | Corel Corporation, Inc. | Method of content aware image resizing |
CN103716559A (en) * | 2014-01-13 | 2014-04-09 | 中国科学院上海高等研究院 | Pixel unit readout device and method and pixel array readout device and method |
CN105488758A (en) * | 2015-11-30 | 2016-04-13 | 河北工业大学 | Image scaling method based on content awareness |
CN107330885A (en) * | 2017-07-07 | 2017-11-07 | 广西大学 | A kind of multi-operator image reorientation method of holding important content region the ratio of width to height |
-
2018
- 2018-04-28 CN CN201810402751.4A patent/CN108665413A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140023293A1 (en) * | 2010-01-22 | 2014-01-23 | Corel Corporation, Inc. | Method of content aware image resizing |
CN103716559A (en) * | 2014-01-13 | 2014-04-09 | 中国科学院上海高等研究院 | Pixel unit readout device and method and pixel array readout device and method |
CN105488758A (en) * | 2015-11-30 | 2016-04-13 | 河北工业大学 | Image scaling method based on content awareness |
CN107330885A (en) * | 2017-07-07 | 2017-11-07 | 广西大学 | A kind of multi-operator image reorientation method of holding important content region the ratio of width to height |
Non-Patent Citations (2)
Title |
---|
SHAI AVIDAN ET AL.: "Seam Carving for Content-Aware Image Resizing", 《ACM TRANSACTIONS ON GRAPHICS》 * |
陈小娥等: "基于 Seam Carving 的图像放大算法研究与改进", 《计算机系统应用》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109978768A (en) * | 2019-03-28 | 2019-07-05 | 南京邮电大学 | A kind of image non-linear Zoom method of view-based access control model conspicuousness detection |
CN109978768B (en) * | 2019-03-28 | 2022-10-11 | 南京邮电大学 | Image nonlinear scaling method based on visual saliency detection |
CN110580678A (en) * | 2019-09-10 | 2019-12-17 | 北京百度网讯科技有限公司 | image processing method and device |
CN114911551A (en) * | 2021-02-08 | 2022-08-16 | 花瓣云科技有限公司 | Display method and electronic equipment |
CN114529715A (en) * | 2022-04-22 | 2022-05-24 | 中科南京智能技术研究院 | Image identification method and system based on edge extraction |
CN114529715B (en) * | 2022-04-22 | 2022-07-19 | 中科南京智能技术研究院 | Image identification method and system based on edge extraction |
CN117114997A (en) * | 2023-10-23 | 2023-11-24 | 四川新视创伟超高清科技有限公司 | Image stitching method and device based on suture line search algorithm |
CN117114997B (en) * | 2023-10-23 | 2024-01-30 | 四川新视创伟超高清科技有限公司 | Image stitching method and device based on suture line search algorithm |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108665413A (en) | A kind of image adaptive amplification method, readable storage medium storing program for executing and terminal | |
CN105915909B (en) | A kind of high dynamic range images layered compression method | |
US10275887B2 (en) | Identifying features | |
CN103617599B (en) | A kind of based on grid deformation optimized image Non-uniformed mapping method | |
CN103778900B (en) | A kind of image processing method and system | |
US9542725B2 (en) | Image processing device, image processing method and medium | |
CN105005426A (en) | Screenshot method and system for touch screen terminal, and data sharing method and system for touch screen terminal | |
CN102104713A (en) | Adaptive edge enhancement using directional components from non-linear filtering | |
CN106910162A (en) | Image zoom processing method and device based on FPGA | |
US8687894B2 (en) | Continuous edge and detail mapping using a weighted monotony measurement | |
CN110062282A (en) | A kind of super-resolution video method for reconstructing, device and electronic equipment | |
CN109886890A (en) | A kind of application icon processing method and processing device | |
CN114004754A (en) | Scene depth completion system and method based on deep learning | |
CN105447819A (en) | Picture processing method and apparatus | |
CN109345454A (en) | Method, storage medium and the system of bitmap images vector quantization | |
CN104658030A (en) | Secondary image mixing method and apparatus | |
CN107291413A (en) | Display terminal, picture contrast improve method and computer-readable recording medium | |
CN113052923A (en) | Tone mapping method, tone mapping apparatus, electronic device, and storage medium | |
CN109978768B (en) | Image nonlinear scaling method based on visual saliency detection | |
US10275885B2 (en) | Perimeter detection | |
CN107886479A (en) | A kind of image HDR conversion methods, device, picture processing chip and storage device | |
CN111160063A (en) | Internet of things IPC two-dimensional code distribution network image enhancement method and system | |
CN105590294A (en) | Image-processing method and electronic equipment | |
CN105184785B (en) | The contour extraction method and contour extraction apparatus of image | |
CN111010605A (en) | Method for displaying video picture-in-picture window |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181016 |
|
RJ01 | Rejection of invention patent application after publication |