CN109472763A - A kind of image synthetic method and device - Google Patents

A kind of image synthetic method and device Download PDF

Info

Publication number
CN109472763A
CN109472763A CN201710801070.0A CN201710801070A CN109472763A CN 109472763 A CN109472763 A CN 109472763A CN 201710801070 A CN201710801070 A CN 201710801070A CN 109472763 A CN109472763 A CN 109472763A
Authority
CN
China
Prior art keywords
pixel
mixed
neighborhood
valid
image
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
Application number
CN201710801070.0A
Other languages
Chinese (zh)
Other versions
CN109472763B (en
Inventor
盛雪芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanechips Technology Co Ltd
Shenzhen ZTE Microelectronics Technology Co Ltd
Original Assignee
Shenzhen ZTE Microelectronics Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen ZTE Microelectronics Technology Co Ltd filed Critical Shenzhen ZTE Microelectronics Technology Co Ltd
Priority to CN201710801070.0A priority Critical patent/CN109472763B/en
Publication of CN109472763A publication Critical patent/CN109472763A/en
Application granted granted Critical
Publication of CN109472763B publication Critical patent/CN109472763B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

A kind of image synthetic method, comprising: the neighborhood for determining pixel to be mixed in image to be synthesized respectively determines neighborhood candidate pixel collection from the neighborhood;The valid pixel that the neighborhood candidate pixel is concentrated is analyzed, the valid pixel and the pixel to be mixed are determined as valid pixel collection;The corresponding coefficient of efficiency matrix of neighborhood territory pixel collection of the corresponding effective determining pixel to be mixed of mark of element is concentrated according to the valid pixel;Effective mixed number of the pixel to be mixed is obtained according to the valid pixel collection and the coefficient of efficiency matrix;Synthesis processing is carried out according to the image to be synthesized of effective mixed number of the pixel to be mixed of each image to be synthesized and mixed mode algorithm pair.A kind of device of image synthesis.This programme may be implemented to mix particular image, and flexibility ratio is high, using wide.

Description

A kind of image synthetic method and device
Technical field
The present invention relates to technical field of image processing, and in particular to a kind of image synthetic method and device.
Background technique
Color between image and image can be combined together by mixed mode, to create multi-effect.Hybrid guided mode Formula is very widely used in technical field of image processing, such as drawing tool, editor's adjustment tool, can apply mixed mode Two width of aliasing or multiple image are carried out, then is effectively and flexibly using mixing, but image is dazzling colorful.
It is unfailing research heat based on image composition method with the deep development and application of image processing techniques Point.Poisson described in the relevant technologies mixes under certain conditions, and the gradient of original image is maintained due to excessively imposing, causes to generate Colour-change phenomena and the unsmooth phenomenon of mixed edge.The relevant technologies are also based on further expanding on the basis of Poisson mixing, to solve Discoloration and the unsmooth phenomenon of mixed edge.But above-mentioned image blend is only that the rule followed based on most of image is mixed It is folded, it is directed to special image and is mixed, lack flexibility ratio and extensive use property.
Summary of the invention
The embodiment of the present invention provides a kind of image synthetic method and device, is mixed with realizing to particular image.
A kind of image synthetic method, comprising:
The neighborhood for determining pixel to be mixed in image to be synthesized respectively determines neighborhood candidate pixel collection from the neighborhood;
The valid pixel that the neighborhood candidate pixel is concentrated is analyzed, the valid pixel and the pixel to be mixed are determined For valid pixel collection;
The neighborhood territory pixel collection of the corresponding effective determining pixel to be mixed of mark of element is concentrated according to the valid pixel Corresponding coefficient of efficiency matrix;
Effective mixed number of the pixel to be mixed is obtained according to the valid pixel collection and the coefficient of efficiency matrix;
According to effective mixed number of the pixel to be mixed of each image to be synthesized and mixed mode algorithm pair to Composograph carries out synthesis processing.
Optionally, the neighborhood candidate pixel collection include in the neighborhood of the pixel to be mixed in addition to the pixel to be mixed All pixels, the neighborhood territory pixel collection includes that the neighborhood candidate pixel concentrates all pixels and the pixel to be mixed.
Optionally, the valid pixel that the analysis neighborhood candidate pixel is concentrated, comprising:
Analyze whether each pixel that the neighborhood candidate pixel is concentrated has according to the coefficient matrix of the neighborhood territory pixel collection Effect;
The valid pixel that the neighborhood candidate pixel is concentrated is determined according to each channel threshold value of three primary colours.
Optionally, the valid pixel for determining that the neighborhood candidate pixel is concentrated according to each channel threshold value of three primary colours, Include:
Determine that three primary colours are each according to each channel value of the corresponding three primary colours of the pixel to be mixed and each channel threshold value of three primary colours The valid interval of channel value;
If each channel value of the corresponding three primary colours of pixel that the neighborhood candidate pixel is concentrated in corresponding valid interval, Determine that the pixel is valid pixel.
Optionally, described that having for the pixel to be mixed is obtained according to the valid pixel collection and the coefficient of efficiency matrix Imitate mixed number, comprising:
The coefficient of all elements and its corresponding coefficient of efficiency matrix is concentrated to be weighted according to the valid pixel Averagely obtain effective mixed number of the pixel to be mixed.
Optionally, the mixed mode algorithm are as follows:
Pout=P "1×α+P″2× (255- α), wherein
PoutTo be being exported after image blend as a result, P "1It is mixed for the effective of the pixel to be mixed of the first image to be synthesized Conjunction value, P "2For effective mixed number of the pixel to be mixed of the second image to be synthesized, α is coefficient of transparency.
A kind of device of image synthesis, wherein include:
First determining module, for determining the neighborhood of pixel to be mixed in image to be synthesized respectively, from the neighborhood really Determine neighborhood candidate pixel collection;
Analysis module, the valid pixel concentrated for analyzing the neighborhood candidate pixel, by the valid pixel and described Pixel to be mixed is determined as valid pixel collection;
Second determining module, for concentrating the corresponding effective mark determination of element described to be mixed according to the valid pixel The corresponding coefficient of efficiency matrix of the neighborhood territory pixel collection of pixel;
Module is obtained, for obtaining the pixel to be mixed according to the valid pixel collection and the coefficient of efficiency matrix Effective mixed number;
Synthesis module, for being calculated according to the effective mixed number and mixed mode of the pixel to be mixed of each image to be synthesized The image to be synthesized of method pair carries out synthesis processing.
Optionally, the neighborhood candidate pixel collection include in the neighborhood of the pixel to be mixed in addition to the pixel to be mixed All pixels, the neighborhood territory pixel collection includes that the neighborhood candidate pixel concentrates all pixels and the pixel to be mixed.
Optionally, the analysis module analyzes the valid pixel that the neighborhood candidate pixel is concentrated, comprising: according to described Whether the coefficient matrix of neighborhood territory pixel collection analyzes each pixel that the neighborhood candidate pixel is concentrated effective;It is each logical according to three primary colours Road threshold value determines the valid pixel that the neighborhood candidate pixel is concentrated.
Optionally, the analysis module determines what the neighborhood candidate pixel was concentrated according to each channel threshold value of three primary colours Valid pixel, comprising: determine three according to each channel value of the corresponding three primary colours of the pixel to be mixed and each channel threshold value of three primary colours The valid interval of each channel value of primary colours;If each channel value of the corresponding three primary colours of pixel that the neighborhood candidate pixel is concentrated is in correspondence Valid interval in, it is determined that the pixel be valid pixel.
Optionally, the acquisition module obtains described to mixed according to the valid pixel collection and the coefficient of efficiency matrix Close effective mixed number of pixel, comprising: all elements and its corresponding coefficient of efficiency square are concentrated according to the valid pixel The coefficient of battle array is weighted and averaged the effective mixed number for obtaining the pixel to be mixed.
Optionally, the synthesis module, according to mixed mode algorithm are as follows: Pout=P "1×α+P″2× (255- α), In, PoutTo be being exported after image blend as a result, P "1For effective mixed number of the pixel to be mixed of the first image to be synthesized, P″2For effective mixed number of the pixel to be mixed of the second image to be synthesized, α is coefficient of transparency.
The device of a kind of image synthesis, comprising: memory, processor and storage can transport on a memory and on a processor Capable computer program, wherein the processor performs the steps of when executing described program
The neighborhood for determining pixel to be mixed in image to be synthesized respectively determines neighborhood candidate pixel collection from the neighborhood;
The valid pixel that the neighborhood candidate pixel is concentrated is analyzed, the valid pixel and the pixel to be mixed are determined For valid pixel collection;
The neighborhood territory pixel collection of the corresponding effective determining pixel to be mixed of mark of element is concentrated according to the valid pixel Corresponding coefficient of efficiency matrix;
Effective mixed number of the pixel to be mixed is obtained according to the valid pixel collection and the coefficient of efficiency matrix;
According to effective mixed number of the pixel to be mixed of each image to be synthesized and mixed mode algorithm pair to Composograph carries out synthesis processing.
To sum up, the embodiment of the present invention provides a kind of image synthetic method and device, may be implemented to carry out particular image Mixing, flexibility ratio is high, using wide.
Detailed description of the invention
Fig. 1 is a kind of flow chart of image synthetic method of the embodiment of the present invention one;
Fig. 2 is a kind of schematic diagram of image synthetic method of the embodiment of the present invention two;
Fig. 3 is the schematic diagram of the determination contiguous range of the embodiment of the present invention;
Fig. 4 is the schematic diagram for the device that a kind of image of the embodiment of the present invention two synthesizes.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application Feature can mutual any combination.
Embodiment one
Fig. 1 is a kind of flow chart of image synthetic method of the embodiment of the present invention, as shown in Figure 1, the side of the present embodiment Method the following steps are included:
Step 11, the neighborhood for determining pixel to be mixed in image to be synthesized respectively determine that neighborhood is candidate from the neighborhood Set of pixels;
The valid pixel that step 12, the analysis neighborhood candidate pixel are concentrated, by the valid pixel and described to be mixed Pixel is determined as valid pixel collection;
Step 13, the neighborhood that the corresponding effective determining pixel to be mixed of mark of element is concentrated according to the valid pixel The corresponding coefficient of efficiency matrix of set of pixels;
Step 14 obtains the effective mixed of the pixel to be mixed according to the valid pixel collection and the coefficient of efficiency matrix Conjunction value;
Step 15, according to effective mixed number of the pixel to be mixed of each image to be synthesized and mixed mode algorithm pair The image to be synthesized carries out synthesis processing.
The method of the present embodiment overcomes the limitation of the prior art, using pixel region mixing arbitrary sample image, together When can also overcome the unsmooth phenomenon of metachromatism and edge.Threshold can also be chosen by customized threshold value or according to pixel value The flexibility ratio of mixing rule can be improved in value, the neighborhood of mixed pixel, neighbour coefficient matrix.
Embodiment two
It is described in detail below with technical solution of the specific embodiment to this embodiment of the present invention.
As shown in Fig. 2, the method for the present embodiment comprises the steps of:
Step 101 determines neighborhood of pixels, based on the coordinate (x, y) of current mixed pixel point P, according to contiguous range parameter The coordinate of h_l, h_r, v_u, v_d and point P determine N × M neighborhood ε of pixel P.
If current mixed pixel point is P, the coordinate of the pixel is (x, y), its N × M neighborhood ε range of mixed pixel point P It is to be confirmed by this 4 contiguous range parameters of h_l, h_r, v_u and v_d.
Wherein, h_l indicates the distance of the coordinate x relative neighbo(u)rhood ε left margin of pixel P, and h_r indicates that the coordinate x of pixel P is opposite The distance of neighborhood ε right margin, v_u indicate the distance of the coboundary coordinate y relative neighbo(u)rhood ε of pixel P, and v_d indicates the coordinate of pixel P The distance of y relative neighbo(u)rhood ε lower boundary, then the horizontal direction field of mixed pixel point P is [x-h_l, x+h_r], vertical direction neck Domain be [y-v_u, x+v_d], neighborhood ε, as shown in Figure 3.
Step 102 determines neighborhood candidate pixel collection;
Neighborhood candidate pixel collection be in N × M neighborhood ε of current mixed pixel point P non-P as candidate pixel collection.
The coordinate (x, y) and contiguous range parameter h_l, h_r, v_u of current mixed pixel point P as described in step 101 It can determine the set of pixels S in point P neighborhood ε with v_dε, as shown in table 1.
Table 1
Point P neighborhood ε candidate pixel collection is the set of all pixels of non-P pixel in mixed pixel point P neighborhood ε, and note is based on Neighborhood candidate pixel integrates as Uε
Step 103, analysis valid pixel;
By the set of pixels S of pixel P neighborhood εεCoefficient matrix Dp, calculate candidate pixel collection UεIn each pixel it is whether effective, Then further confirm that whether each pixel is effective in previous step result based on each channel threshold value, then by candidate pixel collection UεMiddle valid pixel and pixel P constitute the valid pixel collection Γ of P pointε
If each channel threshold value of three primary colours is Rmin、Rmax、Gmin、Gmax、Bmin、Bmax, mixed pixel P neighborhood ε set of pixels SεSystem Matrix number is Dp。Rmin、Rmax、Gmin、Gmax、Bmin、Bmax、DpParameter is as point P neighborhood ε candidate pixel collection UεIn each pixel It whether is effective measurement standard.
Valid pixel analysis can be divided into following steps:
Step 103.1, by set of pixels SεCoefficient matrix is DpCalculate candidate pixel collection UεIn each pixel it is whether effective;
Set of pixels SεCoefficient matrix is DpBe it is known, be not just unfolded to illustrate here.
The width of P neighborhood ε of setting up an office is n, and a height of m can be obtained by step 101:
N=h_l+h_r+1,
M=v_u+v_d+1,
Then there is mixed pixel P neighborhood ε set of pixels SεCorresponding coefficient matrix DpAre as follows:
If using FUMatrix indicates set of pixels UεIn each pixel it is whether effective, FUAre as follows:
In FUIn matrix, current mixed pixel point P coordinate is (x, y) corresponding significant notation flagI, j, (wherein, i=x- H_l+1, j=y-v_u+1) it is permanent be 1.And candidate pixel collection UεMiddle pixel PI, jCorresponding significant notation is flagI, j, wherein 1≤ I≤n and i ≠ x-h_l+1,1≤j≤m and j ≠ y-v_u+1.Based on candidate pixel collection UεMiddle pixel PI, jCoefficient of correspondence matrix is Dp Middle dI, j, wherein 1≤i≤n and i ≠ x-h_l+1,1≤j≤m and j ≠ y-v_u+1, if dJ, jIt is 0, then corresponding flagI, j=0.
Step 103.2 is based on each channel threshold calculations candidate pixel collection UεIn each pixel it is whether effective;
If currently the corresponding each channel value of mixing point P is rp、gp、bp, candidate pixel collection UεMiddle pixel PI, jIt is corresponding each logical Road value is rI, j、gI, j、bI, j, wherein 1≤i≤n and i ≠ x-h_l+1,1≤j≤m and j ≠ y-v_u+1.Then by calculating rp、 gp、bpWith threshold value Rmin, Rmax, Gmin, Gmax, Bmin, BmaxThe valid interval of the value in the channel r is obtained respectivelyThe value in the channel g has Imitate sectionThe valid interval of the value in the channel b
The valid interval of the value in the channel rThe valid interval of the value in the channel gThe valid interval of the value in the channel b
Step 103.3 is based on the corresponding valid interval of r, g, bBy judging candidate pixel collection UεMiddle pixel PI, jCorresponding each channel value is rI, j、gI, j、bI, jWhether valid interval is fallen in It further calculates F in step 103.1UElement flag in matrixI, jWhether value is 0.If PI, jCorresponding flagI, jIt is 1, then PI, jFor effective candidate picture Element.And current mixed pixel P perseverance is valid pixel, then by PI, jThe valid pixel collection Γ of P point is constituted with pixel Pε
Step 104 determines mixed pixel P neighborhood ε set of pixels SεCorresponding coefficient of efficiency matrix D "P
By valid pixel collection Γ in step 103εThe corresponding effective mark of middle element determines set of pixels SεCorresponding coefficient of efficiency Matrix D "P.Obtained F is confirmed by step 103.2UFlag in matrixI, jValue (1≤i≤n, 1≤j≤m) determines DpWhether each element Effectively.
If effective coefficient matrix D "PAre as follows:
Then have:
Wherein, 1≤i≤n, 1≤j≤m.
Step 105 determines effective mixed number;
Effective mixed number is valid pixel collection ΓεAll elements and coefficient of correspondence, which are weighted and averaged, obtains mixed pixel point Effective mixed number of P.
If effective set of pixels ΓεIt is count_num that element, which corresponds to weight summation, and current mixed pixel P point is corresponding effectively Mixed number is P ", then:
Step 106 carries out image blend, passes through the P of foreground image (src) "srcWith the P " of background image (dst)dstAnd thoroughly Bright factor alpha carries out image aliasing, and formula is as follows:
Pout=P "src×α+P″dst×(255-α)
Foreground image Neighbourhood parameter hsrcAnd vsrcIt is mixed pixel point PsrcNeighborhood εsrcWidth and height, by currently mixing picture Vegetarian refreshments PsrcCoordinate (xsrc, ysrc) and contiguous range parameter h_lsrc、h_rsrc、v_usrcAnd v_dsrcMixed pixel is calculated Point PsrcNeighborhood εsrc.Then mixed pixel point PsrcHorizontal direction field be [xsrc-h_lsrc, xsrc+h_rsrc], vertical direction Field is [ysrc-v_usrc, ysrc+v_dsrc]。
Background image Neighbourhood parameter hdstAnd vdstIt is mixed pixel point PdstNeighborhood εdstWidth and height, by currently mixing picture Vegetarian refreshments PdstCoordinate (xdst, ydst) and contiguous range parameter h_ldst、h_rdst、v_udstAnd v_ddstMixed pixel is calculated Point PdstNeighborhood εdst.Then mixed pixel point PdstHorizontal direction field be [xdst-h_ldst, xdst+h_rdst], vertical direction Field is [ydst-v_udst, ydst+v_ddst]。
The neighborhood ε of foreground imagesrcIn candidate pixel collection beThe neighborhood ε of background imagedstIn candidate pixel collection For
Foreground image neighborhood εsrcSet of pixelsCoefficient matrix be denoted asEach channel threshold value of three primary colours is respectivelyRmaxsrc,ByIt determines with each channel threshold value of three primary colours Determine candidate pixel collectionValid pixel, candidate pixel collectionValid pixel and point PsrcConstitute the effective of foreground image Set of pixelsSo as to obtain set of pixelsCorresponding coefficient of efficiency matrix
Background image neighborhood candidate pixel collectionCoefficient matrix be denoted asEach channel threshold value of three primary colours is respectivelyByWith each channel threshold of three primary colours Value determines candidate pixel collectionValid pixel, candidate pixel collectionValid pixel and point PdstConstitute the effective of dst Set of pixelsSo as to obtain set of pixelsCorresponding coefficient of efficiency matrix
By above-mentioned set of pixelsCorresponding coefficient of efficiency matrixAnd set of pixelsCorresponding coefficient of efficiency MatrixValid pixel collection can be obtainedIt is sum that element, which corresponds to weight summation,srcWith valid pixel collectionElement is corresponding Weight summation is sumdst
Then there is foreground image mixed pixel point PsrcCorresponding effective mixed number is P "srcAre as follows:
Background image mixed pixel point PdstCorresponding effective mixed number is P "dstAre as follows:
Pass through the P of foreground image "srcWith the P of background image "dstAnd factor alpha carries out image aliasing and obtains Pout:
Pout=Psrc×α+P″dst×(255-α)
Using the method for the embodiment of the present invention, compared with prior art, chosen by customized threshold value or according to pixel value Threshold value, the neighborhood of mixed pixel, neighbour coefficient matrix, it is smooth based on image border, avoid metachromatism from occurring, keep image Texture while, improve image blend flexibility ratio and be widely applied property.
Fig. 3 is the schematic diagram for the device that a kind of image of the embodiment of the present invention synthesizes, as shown in figure 3, the dress of the present embodiment It sets and includes:
First determining module, for determining the neighborhood of pixel to be mixed in image to be synthesized respectively, from the neighborhood really Determine neighborhood candidate pixel collection;
Analysis module, the valid pixel concentrated for analyzing the neighborhood candidate pixel, by the valid pixel and described Pixel to be mixed is determined as valid pixel collection;
Second determining module, for concentrating the corresponding effective mark determination of element described to be mixed according to the valid pixel The corresponding coefficient of efficiency matrix of the neighborhood territory pixel collection of pixel;
Module is obtained, for obtaining the pixel to be mixed according to the valid pixel collection and the coefficient of efficiency matrix Effective mixed number;
Synthesis module, for being calculated according to the effective mixed number and mixed mode of the pixel to be mixed of each image to be synthesized The image to be synthesized of method pair carries out synthesis processing.
The device of the present embodiment overcomes the limitation of the prior art, using pixel region mixing arbitrary sample image, together When can also overcome the unsmooth phenomenon of metachromatism and edge.Threshold can also be chosen by customized threshold value or according to pixel value The flexibility ratio of mixing rule can be improved in value, the neighborhood of mixed pixel, neighbour coefficient matrix.
In one embodiment, the neighborhood candidate pixel collection includes in the neighborhood of the pixel to be mixed except described to be mixed All pixels outside pixel, the neighborhood territory pixel collection include that the neighborhood candidate pixel concentrates all pixels and the picture to be mixed Element.
In one embodiment, the analysis module analyzes the valid pixel that the neighborhood candidate pixel is concentrated, comprising: root It is whether effective that each pixel that the neighborhood candidate pixel is concentrated is analyzed according to the coefficient matrix of the neighborhood territory pixel collection;According to three bases Each channel threshold value of color determines the valid pixel that the neighborhood candidate pixel is concentrated.
In one embodiment, the analysis module determines the neighborhood candidate pixel according to each channel threshold value of three primary colours The valid pixel of concentration, comprising: according to each channel value of the corresponding three primary colours of the pixel to be mixed and each channel threshold value of three primary colours Determine the valid interval of each channel value of three primary colours;If each channel value of the corresponding three primary colours of pixel that the neighborhood candidate pixel is concentrated In corresponding valid interval, it is determined that the pixel is valid pixel.
In one embodiment, the acquisition module obtains institute according to the valid pixel collection and the coefficient of efficiency matrix State effective mixed number of pixel to be mixed, comprising: according to the valid pixel concentrate all elements and its it is corresponding it is described effectively The coefficient of coefficient matrix is weighted and averaged the effective mixed number for obtaining the pixel to be mixed.
In one embodiment, the synthesis module, according to mixed mode algorithm are as follows:
Pout=P "1×α+P″2× (255- α), wherein
PoutTo be being exported after image blend as a result, P "1It is mixed for the effective of the pixel to be mixed of the first image to be synthesized Conjunction value, P "2For effective mixed number of the pixel to be mixed of the second image to be synthesized, α is coefficient of transparency.
The embodiment of the present invention also provides a kind of device of image synthesis, comprising: memory, processor and is stored in memory Computer program that is upper and can running on a processor, which is characterized in that the processor is realized following when executing described program Step:
The neighborhood for determining pixel to be mixed in image to be synthesized respectively determines neighborhood candidate pixel collection from the neighborhood;
The valid pixel that the neighborhood candidate pixel is concentrated is analyzed, the valid pixel and the pixel to be mixed are determined For valid pixel collection;
The neighborhood territory pixel collection of the corresponding effective determining pixel to be mixed of mark of element is concentrated according to the valid pixel Corresponding coefficient of efficiency matrix;
Effective mixed number of the pixel to be mixed is obtained according to the valid pixel collection and the coefficient of efficiency matrix;
According to effective mixed number of the pixel to be mixed of each image to be synthesized and mixed mode algorithm pair to Composograph carries out synthesis processing.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored with computer executable instructions, The computer executable instructions, which are performed, realizes described image synthetic method.
Those of ordinary skill in the art will appreciate that all or part of the steps in the above method can be instructed by program Related hardware is completed, and described program can store in computer readable storage medium, such as read-only memory, disk or CD Deng.Optionally, one or more integrated circuits can be used also to realize in all or part of the steps of above-described embodiment.Accordingly Ground, each module/unit in above-described embodiment can take the form of hardware realization, can also use the shape of software function module Formula is realized.The present invention is not limited to the combinations of the hardware and software of any particular form.
The above is only a preferred embodiment of the present invention, and certainly, the invention may also have other embodiments, without departing substantially from this In the case where spirit and its essence, those skilled in the art make various corresponding changes in accordance with the present invention And deformation, but these corresponding changes and modifications all should fall within the scope of protection of the appended claims of the present invention.

Claims (13)

1. a kind of image synthetic method, comprising:
The neighborhood for determining pixel to be mixed in image to be synthesized respectively determines neighborhood candidate pixel collection from the neighborhood;
The valid pixel that the neighborhood candidate pixel is concentrated is analyzed, the valid pixel and the pixel to be mixed are determined as having Imitate set of pixels;
The corresponding effective mark of element is concentrated to determine that the neighborhood territory pixel collection of the pixel to be mixed is corresponding according to the valid pixel Coefficient of efficiency matrix;
Effective mixed number of the pixel to be mixed is obtained according to the valid pixel collection and the coefficient of efficiency matrix;
According to the described to be synthesized of effective mixed number of the pixel to be mixed of each image to be synthesized and mixed mode algorithm pair Image carries out synthesis processing.
2. the method as described in claim 1, it is characterised in that:
The neighborhood candidate pixel collection includes all pixels in the neighborhood of the pixel to be mixed in addition to the pixel to be mixed, The neighborhood territory pixel collection includes that the neighborhood candidate pixel concentrates all pixels and the pixel to be mixed.
3. the method as described in claim 1, it is characterised in that: effective picture that the analysis neighborhood candidate pixel is concentrated Element, comprising:
It is whether effective that each pixel that the neighborhood candidate pixel is concentrated is analyzed according to the coefficient matrix of the neighborhood territory pixel collection;
The valid pixel that the neighborhood candidate pixel is concentrated is determined according to each channel threshold value of three primary colours.
4. method as claimed in claim 3, it is characterised in that: described to determine the neighborhood according to each channel threshold value of three primary colours The valid pixel that candidate pixel is concentrated, comprising:
Each channel of three primary colours is determined according to each channel value of the corresponding three primary colours of the pixel to be mixed and each channel threshold value of three primary colours The valid interval of value;
If each channel value of the corresponding three primary colours of pixel that the neighborhood candidate pixel is concentrated is in corresponding valid interval, it is determined that The pixel is valid pixel.
5. the method as described in claim 1, it is characterised in that: described according to the valid pixel collection and the coefficient of efficiency square Battle array obtains effective mixed number of the pixel to be mixed, comprising:
The coefficient of all elements and its corresponding coefficient of efficiency matrix is concentrated to be weighted and averaged according to the valid pixel Obtain effective mixed number of the pixel to be mixed.
6. the method as described in claim 1, it is characterised in that: the mixed mode algorithm are as follows:
Pout=P "1×α+P″2× (255- α), wherein
PoutTo be being exported after image blend as a result, P "1For effective mixed number of the pixel to be mixed of the first image to be synthesized, P″2For effective mixed number of the pixel to be mixed of the second image to be synthesized, α is coefficient of transparency.
7. a kind of device of image synthesis characterized by comprising
First determining module determines adjacent for determining the neighborhood of pixel to be mixed in image to be synthesized respectively from the neighborhood Domain candidate pixel collection;
Analysis module, the valid pixel concentrated for analyzing the neighborhood candidate pixel, by the valid pixel and described to mixed It closes pixel and is determined as valid pixel collection;
Second determining module, for concentrating the corresponding effective mark of element to determine the pixel to be mixed according to the valid pixel The corresponding coefficient of efficiency matrix of neighborhood territory pixel collection;
Module is obtained, for obtaining the effective of the pixel to be mixed according to the valid pixel collection and the coefficient of efficiency matrix Mixed number;
Synthesis module, for the effective mixed number and mixed mode algorithm pair according to the pixel to be mixed of each image to be synthesized The image to be synthesized carry out synthesis processing.
8. device as claimed in claim 7, it is characterised in that:
The neighborhood candidate pixel collection includes all pixels in the neighborhood of the pixel to be mixed in addition to the pixel to be mixed, The neighborhood territory pixel collection includes that the neighborhood candidate pixel concentrates all pixels and the pixel to be mixed.
9. device as claimed in claim 7, it is characterised in that:
The analysis module analyzes the valid pixel that the neighborhood candidate pixel is concentrated, comprising: according to the neighborhood territory pixel collection Whether coefficient matrix analyzes each pixel that the neighborhood candidate pixel is concentrated effective;It is determined according to each channel threshold value of three primary colours The valid pixel that the neighborhood candidate pixel is concentrated.
10. device as claimed in claim 9, it is characterised in that:
The analysis module determines the valid pixel that the neighborhood candidate pixel is concentrated, packet according to each channel threshold value of three primary colours It includes: each channel value of three primary colours is determined according to each channel value of the corresponding three primary colours of the pixel to be mixed and each channel threshold value of three primary colours Valid interval;If each channel value of the corresponding three primary colours of pixel that the neighborhood candidate pixel is concentrated is in corresponding valid interval It is interior, it is determined that the pixel is valid pixel.
11. device as claimed in claim 7, it is characterised in that:
The acquisition module obtains the effective of the pixel to be mixed according to the valid pixel collection and the coefficient of efficiency matrix Mixed number, comprising: concentrate the coefficient of all elements and its corresponding coefficient of efficiency matrix to carry out according to the valid pixel Weighted average obtains effective mixed number of the pixel to be mixed.
12. such as the described in any item devices of claim 7-11, it is characterised in that:
The synthesis module, according to mixed mode algorithm are as follows: Pout=P "1×α+P″2× (255- α), wherein PoutFor image It is being exported after mixing as a result, P "1For effective mixed number of the pixel to be mixed of the first image to be synthesized, P "2For second wait close At effective mixed number of the pixel to be mixed of image, α is coefficient of transparency.
13. a kind of device of image synthesis, comprising: memory, processor and storage can transport on a memory and on a processor Capable computer program, which is characterized in that the processor performs the steps of when executing described program
The neighborhood for determining pixel to be mixed in image to be synthesized respectively determines neighborhood candidate pixel collection from the neighborhood;
The valid pixel that the neighborhood candidate pixel is concentrated is analyzed, the valid pixel and the pixel to be mixed are determined as having Imitate set of pixels;
The corresponding effective mark of element is concentrated to determine that the neighborhood territory pixel collection of the pixel to be mixed is corresponding according to the valid pixel Coefficient of efficiency matrix;
Effective mixed number of the pixel to be mixed is obtained according to the valid pixel collection and the coefficient of efficiency matrix;
According to the described to be synthesized of effective mixed number of the pixel to be mixed of each image to be synthesized and mixed mode algorithm pair Image carries out synthesis processing.
CN201710801070.0A 2017-09-07 2017-09-07 Image synthesis method and device Active CN109472763B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710801070.0A CN109472763B (en) 2017-09-07 2017-09-07 Image synthesis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710801070.0A CN109472763B (en) 2017-09-07 2017-09-07 Image synthesis method and device

Publications (2)

Publication Number Publication Date
CN109472763A true CN109472763A (en) 2019-03-15
CN109472763B CN109472763B (en) 2020-12-08

Family

ID=65657592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710801070.0A Active CN109472763B (en) 2017-09-07 2017-09-07 Image synthesis method and device

Country Status (1)

Country Link
CN (1) CN109472763B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5630037A (en) * 1994-05-18 1997-05-13 Schindler Imaging, Inc. Method and apparatus for extracting and treating digital images for seamless compositing
CN1217126A (en) * 1996-04-30 1999-05-19 Cfb(新图象设计中心)有限公司 Device and process for producing composite picture
CN1510656A (en) * 2002-11-27 2004-07-07 松下电器产业株式会社 Displaying device, method and programm
CN105578094A (en) * 2015-12-18 2016-05-11 深圳市帅映科技有限公司 Image edge fusion processing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5630037A (en) * 1994-05-18 1997-05-13 Schindler Imaging, Inc. Method and apparatus for extracting and treating digital images for seamless compositing
CN1217126A (en) * 1996-04-30 1999-05-19 Cfb(新图象设计中心)有限公司 Device and process for producing composite picture
CN1510656A (en) * 2002-11-27 2004-07-07 松下电器产业株式会社 Displaying device, method and programm
CN105578094A (en) * 2015-12-18 2016-05-11 深圳市帅映科技有限公司 Image edge fusion processing system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FENG DONG等: "Multiscaled Texture Synthesis Using Multisized Pixel Neighborhoods", 《 IEEE COMPUTER GRAPHICS AND APPLICATIONS》 *
吴昊: "高效图像合成技术研究", 《中国博士学位论文全文数据库信息科技辑》 *

Also Published As

Publication number Publication date
CN109472763B (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN106504220B (en) A kind of image processing method and device
CN103971126B (en) A kind of traffic sign recognition method and device
CN103136766B (en) A kind of object conspicuousness detection method based on color contrast and color distribution
CN104134200B (en) Mobile scene image splicing method based on improved weighted fusion
CN103208115B (en) Based on the saliency method for detecting area of geodesic line distance
CN101588438A (en) Mobile phone animation creation method for converting digitalized coloured picture into pictures of different styles
CN106530266B (en) A kind of infrared and visible light image fusion method based on region rarefaction representation
CN106022205B (en) Image processing apparatus and image processing method
RU2014154403A (en) SEGMENTATION MEANS
CN107527054A (en) Prospect extraction method based on various visual angles fusion
CN104933679B (en) A kind of method and its correspondence system of enlarged drawing
CN101826209A (en) Canny model-based method for segmenting three-dimensional medical image
CN110188730A (en) Face datection and alignment schemes based on MTCNN
Yang et al. Exploring Prior Knowledge for Pedestrian Detection.
CN106297492A (en) A kind of Educational toy external member and utilize color and the method for outline identification programming module
CN103700078A (en) Defogging method for image with few backgrounds containing fog
CN105303536A (en) Median filtering algorithm based on weighted mean filtering
CN103020959A (en) Gravity model-based oceanic front information extraction method
CN106650811A (en) Hyperspectral mixed pixel classification method based on neighbor cooperation enhancement
CN109472763A (en) A kind of image synthetic method and device
CN103295238A (en) ROI (region of interest) motion detection based real-time video positioning method for Android platform
CN106469432A (en) Object extraction method and object extraction equipment
CN107085859B (en) A kind of color lead painting style lattice method for drafting based on image
Liu et al. Depth-aware layered edge for object proposal
Savant et al. Color Image Edge Detection using Gradient Operator

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