CN107730528A - A kind of interactive image segmentation and fusion method based on grabcut algorithms - Google Patents

A kind of interactive image segmentation and fusion method based on grabcut algorithms Download PDF

Info

Publication number
CN107730528A
CN107730528A CN201711027909.6A CN201711027909A CN107730528A CN 107730528 A CN107730528 A CN 107730528A CN 201711027909 A CN201711027909 A CN 201711027909A CN 107730528 A CN107730528 A CN 107730528A
Authority
CN
China
Prior art keywords
image
pixel
segmentation
images
mask
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
Application number
CN201711027909.6A
Other languages
Chinese (zh)
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.)
Tianjin University
Original Assignee
Tianjin University
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 Tianjin University filed Critical Tianjin University
Priority to CN201711027909.6A priority Critical patent/CN107730528A/en
Publication of CN107730528A publication Critical patent/CN107730528A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering

Abstract

The invention discloses a kind of interactive image segmentation and fusion method based on grabcut algorithms, comprise the steps of:The resolution ratio of image is reduced using pyramid down-sampling first, with a small amount of exemplary pixels point estimation GMM parameters;Secondly interaction techniques are used, marks the foreground and background of image, carry out watershed segmentation, the mask image obtained to segmentation is changed, and is passed to grabcut and is done fine segmentation;First make Morphological scale-space to segmentation figure picture, then pixel transform and Morphological scale-space are continued to the image after processing, obtain the components of trimap tri-;Using the components of trimap tri- and source images as input, the alpha channel images of foreground image are obtained using the shared stingy nomographys of shared matting;Finally with alpha channel images, source images and new background image for input, the image after being merged using the transparent hybrid algorithms of alpha blending.

Description

A kind of interactive image segmentation and fusion method based on grabcut algorithms
Technical field
It is more particularly to a kind of to be based on grabcut the present invention relates to the segmentation of the image based on interactive mode and integration technology field The interactive image segmentation and fusion method of algorithm.
Background technology
Target Segmentation and fusion are an important subjects of computer vision field, and wherein Target Segmentation is that target is melted The basis of conjunction, the quality of object segmentation result will directly affect follow-up classification, identify, the effect of understanding, how to improve target The accuracy and speed of segmentation has great Research Significance, and the hot issue of Recent study.
2001, figure hugger opinion was introduced image segmentation field by Boykov et al. first, figure cut be it is a kind of based on region and The interactive image segmentation algorithm on border, its main theory:Image is mapped as a network, the summit of pixel corresponding diagram, phase The weights on the corresponding two fixed points side of similitude between adjacent two pixels, and the capacity cut corresponds to its energy function, is done respectively not for pixel With mark, then corresponding side will be endowed different weights, network is cut to obtain minimum using max-flow/minimal cut algorithm Cut, obtain the profile of object.This method has the advantages of fast speed, global optimum, the anti-noise sound intensity and favorable expandability.Shortcoming is Gray level image is only applicable to, user mutual is complicated, poor to the fuzzy core marginal portion segmentation effect of soft image.
2004, Rother et al. proposed grabcut algorithms, was replaced first with the gauss hybrid models of coloured image Intensity histogram graph model describes the distribution of prospect and background pixel, and each passage of each pixel of coloured image used GMM is modeled;Secondly the energy function for realizing figure using alternative manner minimizes, and substitution once minimizes estimation to complete energy most Smallization process;The workload of interaction is reduced finally by non-fully label.This method achieves high-precision segmentation energy Power and more convenient efficiently man-machine interaction effect, but determine that the cost of GMM parameters is higher, turn into the bottleneck for restricting its efficiency.
With the development of technology, method that scientific and technical personnel propose many mask images, as Xu et al. enters to image first Row watershed transform, then on the over-segmentation image after its conversion, carried out using each cell as a pixel cell Grabcut is split.This method obtains metastable segmentation effect, and speed improves a lot, and shortcoming is due to that it is not based on The segmentation that pixel scale is carried out, the border of acquisition are relatively rough, it is difficult to obtain good segmentation effect.
The content of the invention
The invention aims to overcome deficiency of the prior art, there is provided a kind of interaction based on grabcut algorithms Formula image splits and fusion method, and the present invention reduces image based on grabcut is split, with image pyramid down-sampling Resolution ratio, with a small amount of exemplary pixels point estimation GMM parameters, improve iteration efficiency;The advantages of using Interactive Segmentation, mark figure As in foreground part and background parts, carry out watershed segmentation, solve to a certain extent full-automatic dividing poor universality and The problems such as segmentation is not accurate enough;The result mask obtained to segmentation is changed, and is passed to grabcut and is done fine segmentation, is solved When foreground and background is close, the problem of grabcut segmentation effects are bad;Make form after the completion of segmentation, then to segmentation curve Handle, and finally obtains more preferable segmentation effect;Pixel transform and form are carried out to the prospect bianry image after segmentation again Operation is learned to handle to obtain the components of trimap tri-;With the components of trimap tri-, original image is total to as input using shared matting Enjoy stingy nomography and obtain the alpha channel images of foreground image;With the alpha channel images and original image of foreground image, the new back of the body Scape image is input, the image after being merged using the transparent hybrid algorithms of alpha blending, solves use AddWeighted algorithms carry out image co-registration and the problem of prospect stratification occur.
The purpose of the present invention is achieved through the following technical solutions:
A kind of interactive image segmentation and fusion method based on grabcut algorithms, are comprised the steps of:
Step 1:Change of scale is carried out to input picture, generation ranks are the source images of even number, and gold is carried out to source images Word tower down-sampling obtains down-sampled images, and its ranks is the 1/2 of former ranks, reduces the resolution ratio of image;
Step 2:Increase the contrast of its down-sampled images for the less source images of contrast, then to down-sampled images Re-establishing filter is opened and closed, removes noise and isolated pixel;
Step 3:The interactive of foreground and background is carried out to the image after reconstruction to mark, and is divided using watershed algorithm Cut, heavy label is carried out to the mask image of algorithm output, generation comprises only the mask image of four kinds of pixel values;
Step 4:Using down-sampled images and the mask image of generation as input, the figure using grabcut algorithms to low resolution As carrying out pre-segmentation, the foreground image of pre-segmentation is generated, and obtain new mask image;
Step 5:The mask image exported to step 4 carries out the change of scale based on neighbor interpolation algorithm, generation and source figure As size identical mask image, i.e. ranks are original twice, and using mask image and source images as input, source images are entered Full segmentation of the row based on grabcut algorithms, exports the mask image after full segmentation;
Step 6:Pixel transform and morphological operation are carried out to the mask image that step 5 generates, generate the components of trimap tri-;
Step 7:Using the components of trimap tri- and source images as input, source images are split, obtain source images foreground picture The alpha channel images of picture;
Step 8:Based on the alpha channel images in step 7, the Background using source images and newly inputted uses as input The transparent hybrid algorithms of alpha blending merge above-mentioned image, obtain fused images.
Further, change of scale is carried out to input picture in step 1, specifically includes following steps:
1) the ranks number of input picture is judged;
2) if ranks number is even number, without change of scale;If ranks number, one of them or both is strange Number, then carry out change of scale by means of resize functions, and generation ranks are the source images of even number.
Further, re-establishing filter is opened and closed to down-sampled images in step 2, specifically includes following steps:
1) it is that morphological erosion operation is first carried out to image to open filtering reconstruction, rear to carry out morphological dilations reconstruction;
2) above-mentioned re-establishing filter image of opening is carried out closing re-establishing filter, morphological dilation is first carried out to image, it is rear right Image after expansion carries out morphological erosion reconstruction operation.
Further, generation is marked to the mask image of algorithm output in step 3 and comprises only covering for four kinds of pixel values Film image refers to that, as the basis of next step segmentation, it is 0 that the pixel value of cut zone in mask image is corresponded into pixel value Background, pixel value are 1 prospect, and pixel value is 2 possibility background, and pixel value is 3 possibility prospect, obtains new mask figure Picture.
Further, step 4 specifically includes following steps:
1) set the transparency of each pixel in down-sampled images corresponding with the pixel value of respective pixel in mask image;
2) each pixel x in down-sampled images is obtainednCorresponding GMM parameters kn, kn=argminDnn,kn,θ,xn);
Wherein:knIt is pixel xnGMM parameters, αnIt is pixel xnTransparency, θ be GMM Gaussian Distribution Parameters, DnFor GMM bears logarithmic function;
3) the α marks of all pixels in down-sampled images are optimized, renewal judges zone of ignorance, including may prospect With possible background, pixel is to belong to prospect or background area, α=argminE (α, m, θ, x, H);
Wherein:α is the transparency of pixel, x=(x1,x2,…xn,…,xN) be input picture all pixels set, m= (k1,k2,…kn,…,kN) be all pixels GMM parameters, θ is GMM Gaussian Distribution Parameters, and H is GMM entropy, and E is Gibbs Energy function;
4) max-flow/minimal cut algorithm segmentation figure picture is used;
5) repeat 3) with 4), iteration to Gibbs energy functions restrains;
6) target exports, and obtains Target Segmentation foreground picture and new mask image.
Further, step 6 comprises the following steps:
1) foreground part in mask image is extracted, and it is 255 to mark its pixel value, obtains prospect bianry image F1
2) to prospect bianry image F1Carry out morphological erosion twice to operate, generation image F2, it is therefore an objective to eliminate isolated make an uproar Sound point and diminution target prospect region;
3) to prospect bianry image F1Carry out an etching operation and expansive working twice, generation image F3, it is therefore an objective to eliminate Isolated noise point, while expand target area, by image F3The pixel that middle pixel value is 255 is changed into the ash that pixel value is 128 Color pixel dot image F4
4) by image F1And F4Carry out logic or operation, generation image F5, at this moment image F5In be only 0 comprising pixel value Background area, pixel value are 128 object edge region, and the target that pixel value is 255 determines that the trimap tri- of foreground area divides Figure, the input mask image as shared stingy nomography shared matting.
Further, step 7 comprises the following steps:
1) Expansion is extended, for the components of trimap tri- of input, small-scale extension is carried out to known region, made The number of unknown border area pixels point reduces;
2) sample and assemble (Sample and Gather), to each pixel in remaining zone of ignorance in prospect picture Plain region and background pixel region are sampled, and select a pair of optimal foreground and background sample points;
3) (Refinement) is redefined, in certain contiguous range, to the optimal of each point in zone of ignorance Pairing reconfigures;
4) it is local smooth (Local Smoothing), obtained foreground and background pair and transparence value is carried out local Smoothly, to reduce noise;
5) source images A is obtained1Each pixel access in pixel value alpha transparence values, obtain image A1Alpha Channel image R_alpha.
Compared with prior art, beneficial effect caused by technical scheme is:
1st, image pyramid down-sampling processing is carried out to source images, reduces image resolution ratio, improve segmentation efficiency.
2nd, grabcut algorithms do not use k-means clustering algorithms, and initial point is used as using the region that watershed algorithm is split Class, due to the high efficiency of fractional spins, reduce grabcut algorithms and split the consumed time.
3rd, using the pre-segmentation pattern based on down-sampled images, the full segmentation based on source images is then carried out, it is generally right In image similar in preceding background, a pre-segmentation and a full segmentation are with regard to that can reach good effect, and traditional grabcut is calculated Method generally requires iteration 3 times for image similar in preceding background or even more than 3 times could obtain suitable segmentation effect, so as to carry The high validity of algorithm.
It is not the result mask split firmly using grabcut to obtain foreground-segmented images when the 4th, carrying out image co-registration, and It is that the result mask transformation that grabcut is split firmly generates the components of trimap tri-, uses the shared stingy nomographys of alpha matting The alpha channel values of each pixel of source images are obtained, finally carry out image co-registration using the transparent hybrid algorithms of alpha blending, The fused images edge of acquisition is fine and smooth, improves the sense of reality of fused images.
Brief description of the drawings
Fig. 1 is the flow chart of the inventive method.
Embodiment
The present invention is described in detail with reference to the accompanying drawings and detailed description:
The present invention protects a kind of interactive image segmentation and fusion method based on grabcut algorithms, as shown in figure 1, bag Include following steps:
Step 1, input picture A, change of scale is carried out to input picture, and generation line number and columns are the source images of even number A1, to source images A1Pyramid down-sampling operation is carried out, obtains down-sampled images A3, down-sampled images A3Line number and columns it is equal For source images A11/2;
Step 2, image A is adjusted3Picture contrast, obtain the image A with appropriate contrast4, to image A4Opened Re-establishing filter is closed, some isolated pixels and noise spot in image is removed, obtains filtered image A5
201, if image A3Excessively expose, then reduce its contrast, obtain image A4;If image A3It is too small to comparing, Then increase its contrast, obtain image A4;If image A3Contrast is suitable, then need not adjust its contrast;
202, to image A4Open re-establishing filter to refer to, first to image A4Morphological erosion operation is carried out, then to carry out morphology swollen It is swollen to rebuild generation image A4, wherein morphological dilations, which are rebuild, refers to cvMin functions (minimizing) and (expansion of cvDilate functions Operation) function pair image the step of handle;
203, to image A4Morphological dilation is first carried out, then carries out morphological erosion and rebuilds to obtain image A5, wherein shape At the step of state expansion reconstruction refers to cvMin functions (minimizing) and cvErode functions (etching operation) function pair image Reason.
Step 3, to image A5Foreground area and background area are marked, and carries out watershed algorithm segmentation, after obtaining segmentation Mask image mask6, to mask image mask6Marked again, generation comprises only the mask image mask of four kinds of pixel values7, For image A3Pre-segmentation;
301, foreground area and background area are marked to image A5, obtain mask image mask5
302, with image A5 and mask5As input picture, watershed algorithm segmentation is carried out to image A5, after obtaining segmentation Mask image mask6
303, to mask image mask6Marked again, generation comprises only the mask image mask of four kinds of pixel values7, specifically Refer to, by mask image mask6In foreground area pixel pixel value be labeled as 1, background area pixels point pixel value mark For 0, possible foreground pixel point pixel value is labeled as 3, and possible background pixel point pixel value obtains mask image labeled as 2 mask7
Step 4, image A3With mask image mask7As input, image pre-segmentation, generation are carried out using grabcut algorithms Pre-segmentation mask image mask8, the change of scale for next step;
401, image A is set3In each pixel transparency, corresponding to mask image mask7Middle prospect, may prospect, can The pixel transparent degree of energy background is set to 1, corresponding to mask image mask7The pixel transparent degree of middle background is set to 0;
402, it is image A3In each pixel distributive mixing Gauss model GMM, using following formula:
kn=argminDnn,kn,θ,xn);
Wherein:knIt is pixel xnGMM parameters, αnIt is pixel xnTransparency, θ be GMM Gaussian Distribution Parameters, DnFor GMM bears logarithmic function.
403, to image A3Middle all pixels α mark optimize, renewal judge zone of ignorance (including may prospect with Possible background) pixel is to belong to prospect or background area:
α=argminE (α, m, θ, x, H);
Wherein:α is the transparency of pixel, x=(x1,x2,…xn,…,xN) be input picture all pixels set, m= (k1,k2,…kn,…,kN) be all pixels GMM parameters, θ is GMM Gaussian Distribution Parameters, and H is GMM entropy, and E is Gibbs Energy function.
405, using max-flow/minimal cut algorithm, to image A3Split:
Wherein:TUThe zone of ignorance of removing foreground and background in image is represented, α represents the transparency of pixel, and k represents pixel GMM parameters, θ is GMM Gaussian Distribution Parameters, and x represents the pixel value of pixel, and E is pixel Gibbs energy functions.
406,403,404 operations are repeated until Gibbs energy functions are restrained;
407, obtain segmenting foreground image and mask image mask8
Step 5, to mask image mask caused by step 48Carry out change of scale, generation mask image mask9, its line number With columns and image A1Ranks count up to it is exactly the same.With image A1With mask image mask9For input, grabcut algorithms pair are used Source images A1Full segmentation is carried out, obtains the mask image mask of full segmentation10, the then input figure as morphological operation Picture, if mask image mask now10Image co-registration is directly used in, often margin residual there are many figures to obtained fused images As A1Background pixel point, effect is undesirable;
Step 6, to mask image mask10Carry out pixel transform and morphological operation, generation only has three kinds of pixel values The component mask image mask of trimap tri-11
601, to mask10Carry out pixel transform:Background pixel point bgdPxls area pixels value is labeled as 0, foreground pixel point FgdPxls area pixels value is labeled as 1, and possible background pixel point prBgdPxls area pixels value is labeled as 2, possible prospect picture Vegetarian refreshments prFgdPxls area pixel points mark 3;
602, extraction image mask10Middle pixel value is 1 foreground pixel point, and it is 255 to convert pixel value, obtains Transformation Graphs As being foreground1
603, to image foreground1Carry out morphological erosion to operate 2 times, obtain image erodeImg, reduce mask The noise pixel point and diminution foreground image areas of image;To image foreground1Carry out 1 corrosion and 2 expansive workings Obtain image dilateImg, and carry out thresholding processing to image dilateImg, threshold (dilateImg, threImg,200,128,THRESH_BINARY);Wherein, threImg be generation binary image, foreground pixel point pixel Value is changed into 128;Image erodeImg and image dilateImg is subjected to logic or operation, obtains the component images of trimap tri- TriImg, the input as the shared stingy nomographys of shared matting;
Step 7, with image A1With image mask11For input, stingy nomography is shared to image using shareed matting A1Split, obtain image A1Alpha channel image R_alpha images, the shared stingy nomographys of wherein shared matting Image is split, including at least following steps:
701, Expansion is extended, for the components of trimap tri- of input, (pixel value is respectively labeled as to known region 255 foreground pixel point and labeled as 0 background pixel point) carry out small-scale extension, the pixel region at so unknown edge The number of (pixel value is labeled as 128 pixel) pixel decreases;
702, sample and assemble (Sample and Gather), one is pressed to each pixel in remaining zone of ignorance Fixed rule is sampled in foreground pixel region and background pixel region, and selects optimal a pair of foreground and backgrounds sampling Point;
703, (Refinement) is redefined, in certain territory, to each point in zone of ignorance most Good pairing re-starts combination;
704, local smooth (Local Smoothing), obtained foreground and background pair and alpha transparence values is entered Row local smoothing method, it is therefore an objective to reduce noise;
705, obtain source images A1Each pixel access in pixel alpha transparence values, obtain image A1's Alpha channel images R_alpha.
Step 8, input picture A1, new background image B and image A1Alpha channel image R_alpha images to be defeated Enter, merged using the transparent hybrid algorithms of alpha blending, used calculation formula is:
R=((R_src*alpha-R_dest*alpha)+R_dest*256)/256
In the optimization to calculating, divided by 256 equivalent to moving right 8, therefore above-mentioned formula is made and is amended as follows:
R=(R_src-R_dest) * alpha>>8+R_dest
Wherein, R represents newly-generated fused images, and R_src is image A1, R_dest is new background image B, and alpha is The alpha value of alpha channel images respective pixel point.
The present invention is not limited to embodiments described above.The description to embodiment is intended to describe and said above Bright technical scheme, above-mentioned embodiment is only schematical, is not restricted.This is not being departed from In the case of invention objective and scope of the claimed protection, one of ordinary skill in the art may be used also under the enlightenment of the present invention The specific conversion of many forms is made, these are belonged within protection scope of the present invention.

Claims (7)

1. a kind of interactive image segmentation and fusion method based on grabcut algorithms, it is characterised in that comprise the steps of:
Step 1:Change of scale is carried out to input picture, generation ranks are the source images of even number, and pyramid is carried out to source images Down-sampling obtains down-sampled images, and its ranks is the 1/2 of former ranks, reduces the resolution ratio of image;
Step 2:Increase the contrast of its down-sampled images for the less source images of contrast, then down-sampled images are carried out Re-establishing filter is opened and closed, removes noise and isolated pixel;
Step 3:The interactive of foreground and background is carried out to the image after reconstruction to mark, and is split using watershed algorithm, Heavy label is carried out to the mask image of algorithm output, generation comprises only the mask image of four kinds of pixel values;
Step 4:Using down-sampled images and the mask image of generation as input, the image of low resolution is entered using grabcut algorithms Row pre-segmentation, generates the foreground image of pre-segmentation, and obtains new mask image;
Step 5:The mask image exported to step 4 carries out the change of scale based on neighbor interpolation algorithm, generation and source images chi Very little identical mask image, i.e. ranks are original twice, and using mask image and source images as input, base is carried out to source images In the full segmentation of grabcut algorithms, the mask image after full segmentation is exported;
Step 6:Pixel transform and morphological operation are carried out to the mask image that step 5 generates, generate the components of trimap tri-;
Step 7:Using the components of trimap tri- and source images as input, source images are split, obtain source images foreground image Alpha channel images;
Step 8:Based on the alpha channel images in step 7, the Background using source images and newly inputted uses as input The transparent hybrid algorithms of alphablending merge above-mentioned image, obtain fused images.
2. a kind of interactive image segmentation and fusion method based on grabcut algorithms according to claim 1, its feature It is, change of scale is carried out to input picture in step 1, specifically includes following steps:
1) the ranks number of input picture is judged;
2) if ranks number is even number, without change of scale;If ranks number, one of them or both is odd number, Change of scale then is carried out by means of resize functions, generation ranks are the source images of even number.
3. a kind of interactive image segmentation and fusion method based on grabcut algorithms according to claim 1, its feature It is, re-establishing filter is opened and closed to down-sampled images in step 2, specifically includes following steps:
1) it is that morphological erosion operation is first carried out to image to open filtering reconstruction, rear to carry out morphological dilations reconstruction;
2) above-mentioned re-establishing filter image of opening is carried out closing re-establishing filter, first to image carry out morphological dilation, after to expansion Image afterwards carries out morphological erosion reconstruction operation.
4. a kind of interactive image segmentation and fusion method based on grabcut algorithms according to claim 1, its feature It is, generation is marked to the mask image of algorithm output in step 3 comprises only the mask images of four kinds of pixel values and refer to, makees For the basis split in next step, the pixel value of cut zone in mask image is corresponded into the background that pixel value is 0, pixel value is 1 prospect, pixel value are 2 possibility background, and pixel value is 3 possibility prospect, obtains new mask image.
5. a kind of interactive image segmentation and fusion method based on grabcut algorithms according to claim 1, its feature It is, step 4 specifically includes following steps:
1) set the transparency of each pixel in down-sampled images corresponding with the pixel value of respective pixel in mask image;
2) each pixel x in down-sampled images is obtainednCorresponding GMM parameters kn, kn=argminDnn,kn,θ,xn);
Wherein:knIt is pixel xnGMM parameters, αnIt is pixel xnTransparency, θ be GMM Gaussian Distribution Parameters, DnBorn for GMM Logarithmic function;
3) the α marks of all pixels in down-sampled images are optimized, renewal judges zone of ignorance, including may prospect with can Energy background, pixel is to belong to prospect or background area, α=argminE (α, m, θ, x, H);
Wherein:α is the transparency of pixel, x=(x1,x2,…xn,…,xN) be input picture all pixels set, m=(k1, k2,…kn,…,kN) be all pixels GMM parameters, θ is GMM Gaussian Distribution Parameters, and H is GMM entropy, and E is Gibbs energy Function;
4) max-flow/minimal cut algorithm segmentation figure picture is used;
5) repeat 3) with 4), iteration to Gibbs energy functions restrains;
6) target exports, and obtains Target Segmentation foreground picture and new mask image.
6. a kind of interactive image segmentation and fusion method based on grabcut algorithms according to claim 1, its feature It is, step 6 comprises the following steps:
1) foreground part in mask image is extracted, and it is 255 to mark its pixel value, obtains prospect bianry image F1
2) to prospect bianry image F1Carry out morphological erosion twice to operate, generation image F2, it is therefore an objective to eliminate isolated noise spot With diminution target prospect region;
3) to prospect bianry image F1Carry out an etching operation and expansive working twice, generation image F3, it is therefore an objective to eliminate isolated Noise spot, while expand target area, by image F3The pixel that middle pixel value is 255 is changed into the grey picture that pixel value is 128 Vegetarian refreshments image F4
4) by image F1And F4Carry out logic or operation, generation image F5, at this moment image F5In only comprising pixel value be 0 background area Domain, pixel value are 128 object edge region, and pixel value is that 255 target determines the components of trimap tri- of foreground area, as Shared stingy nomography shared matting input mask image.
7. a kind of interactive image segmentation and fusion method based on grabcut algorithms according to claim 1, its feature It is, step 7 comprises the following steps:
1) Expansion is extended, for the components of trimap tri- of input, small-scale extension is carried out to known region, made unknown The number of border area pixels point reduces;
2) sample and assemble (Sample and Gather), to each pixel in remaining zone of ignorance in foreground pixel area Domain and background pixel region are sampled, and select a pair of optimal foreground and background sample points;
3) (Refinement) is redefined, in certain contiguous range, to the best pairing of each point in zone of ignorance Reconfigure;
4) it is local smooth (Local Smoothing), local smoothing method is carried out to obtained foreground and background pair and transparence value, To reduce noise;
5) source images A is obtained1Each pixel access in pixel value alpha transparence values, obtain image A1Alpha passages Image R_alpha.
CN201711027909.6A 2017-10-28 2017-10-28 A kind of interactive image segmentation and fusion method based on grabcut algorithms Pending CN107730528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711027909.6A CN107730528A (en) 2017-10-28 2017-10-28 A kind of interactive image segmentation and fusion method based on grabcut algorithms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711027909.6A CN107730528A (en) 2017-10-28 2017-10-28 A kind of interactive image segmentation and fusion method based on grabcut algorithms

Publications (1)

Publication Number Publication Date
CN107730528A true CN107730528A (en) 2018-02-23

Family

ID=61203035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711027909.6A Pending CN107730528A (en) 2017-10-28 2017-10-28 A kind of interactive image segmentation and fusion method based on grabcut algorithms

Country Status (1)

Country Link
CN (1) CN107730528A (en)

Cited By (39)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108230341A (en) * 2018-03-07 2018-06-29 汕头大学 A kind of eye fundus image blood vessel segmentation method that nomography is scratched based on layering
CN108447068A (en) * 2017-12-22 2018-08-24 杭州美间科技有限公司 Ternary diagram automatic generation method and the foreground extracting method for utilizing the ternary diagram
CN108961303A (en) * 2018-07-23 2018-12-07 北京旷视科技有限公司 A kind of image processing method, device, electronic equipment and computer-readable medium
CN108986105A (en) * 2018-06-12 2018-12-11 四川斐讯信息技术有限公司 A kind of image pre-processing method and system based on content
CN109003282A (en) * 2018-07-27 2018-12-14 京东方科技集团股份有限公司 A kind of method, apparatus and computer storage medium of image procossing
CN109035253A (en) * 2018-07-04 2018-12-18 长沙全度影像科技有限公司 A kind of stingy drawing method of the deep learning automated graphics of semantic segmentation information guiding
CN109255790A (en) * 2018-07-27 2019-01-22 北京工业大学 A kind of automatic image marking method of Weakly supervised semantic segmentation
CN109360148A (en) * 2018-09-05 2019-02-19 北京悦图遥感科技发展有限公司 Based on mixing random down-sampled remote sensing image ultra-resolution ratio reconstructing method and device
CN109544587A (en) * 2018-10-31 2019-03-29 深圳变设龙信息科技有限公司 A kind of FIG pull handle method, apparatus and terminal device
CN109697722A (en) * 2017-10-23 2019-04-30 北京京东尚科信息技术有限公司 For generating the method and device of three components
CN109859258A (en) * 2019-02-02 2019-06-07 网易(杭州)网络有限公司 Interface processing method and device, electronic equipment
CN109934829A (en) * 2019-03-13 2019-06-25 安徽紫薇帝星数字科技有限公司 A kind of liver segmentation method for cutting algorithm based on three-dimensional figure
CN109934843A (en) * 2019-01-28 2019-06-25 北京华捷艾米科技有限公司 A kind of real-time profile, which refines, scratches image space method and storage medium
CN110136078A (en) * 2019-04-29 2019-08-16 天津大学 The semi-automatic reparation complementing method of single plant corn image leaf destruction
CN110136144A (en) * 2019-05-15 2019-08-16 北京华捷艾米科技有限公司 A kind of image partition method, device and terminal device
CN110210487A (en) * 2019-05-30 2019-09-06 上海商汤智能科技有限公司 A kind of image partition method and device, electronic equipment and storage medium
CN110276760A (en) * 2018-03-14 2019-09-24 广东欧珀移动通信有限公司 A kind of image scene segmentation method, terminal and storage medium
CN110288617A (en) * 2019-07-04 2019-09-27 大连理工大学 Based on the shared sliced image of human body automatic division method for scratching figure and ROI gradual change
CN110298851A (en) * 2019-07-04 2019-10-01 北京字节跳动网络技术有限公司 The training method and equipment of human body segmentation's neural network
CN110503704A (en) * 2019-08-27 2019-11-26 北京迈格威科技有限公司 Building method, device and the electronic equipment of three components
CN110533593A (en) * 2019-09-27 2019-12-03 山东工商学院 A kind of method of the accurate trimap of quick creation
CN110706167A (en) * 2019-09-25 2020-01-17 中国人民解放军61646部队 Fine completion processing method and device for remote sensing image to-be-repaired area
CN110930321A (en) * 2019-11-06 2020-03-27 杭州恩玖软件有限公司 Blue/green screen digital image matting method capable of automatically selecting target area
CN111127303A (en) * 2018-11-01 2020-05-08 Tcl集团股份有限公司 Background blurring method and device, terminal equipment and computer readable storage medium
CN111223108A (en) * 2019-12-31 2020-06-02 上海影卓信息科技有限公司 Method and system based on backdrop matting and fusion
CN111246246A (en) * 2018-11-28 2020-06-05 华为技术有限公司 Video playing method and device
CN111275729A (en) * 2020-01-17 2020-06-12 新华智云科技有限公司 Method and system for precisely dividing sky area and method and system for changing sky of image
CN111292335A (en) * 2018-12-10 2020-06-16 北京地平线机器人技术研发有限公司 Method and device for determining foreground mask feature map and electronic equipment
CN112101370A (en) * 2020-11-11 2020-12-18 广州卓腾科技有限公司 Automatic pure-color background image matting algorithm, computer-readable storage medium and equipment
CN112233127A (en) * 2020-10-15 2021-01-15 上海圭目机器人有限公司 Down-sampling method for curve splicing image
CN112581371A (en) * 2021-01-27 2021-03-30 仲恺农业工程学院 Panoramic real-time imaging splicing method based on novel structure of four-way camera
CN112634257A (en) * 2020-12-31 2021-04-09 常州奥创医疗科技有限公司 Fungus fluorescence detection method
CN112862683A (en) * 2021-02-07 2021-05-28 同济大学 Adjacent image splicing method based on elastic registration and grid optimization
CN113538456A (en) * 2021-06-22 2021-10-22 复旦大学 Image soft segmentation and background replacement system based on GAN network
CN113724273A (en) * 2021-08-31 2021-11-30 温州大学大数据与信息技术研究院 Edge light and shadow fusion method based on neural network regional target segmentation
CN114092364A (en) * 2021-08-12 2022-02-25 荣耀终端有限公司 Image processing method and related device
CN115375535A (en) * 2022-10-21 2022-11-22 珠海金山办公软件有限公司 Interactive matting method and device, electronic equipment and storage medium
CN116843708A (en) * 2023-08-30 2023-10-03 荣耀终端有限公司 Image processing method and device
CN117173200A (en) * 2023-11-03 2023-12-05 成都数之联科技股份有限公司 Image segmentation method, device, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473780A (en) * 2013-09-22 2013-12-25 广州市幸福网络技术有限公司 Portrait background cutout method
CN103559719A (en) * 2013-11-20 2014-02-05 电子科技大学 Interactive graph cutting method
KR101394895B1 (en) * 2012-10-12 2014-05-14 전남대학교산학협력단 Object segmentation using block clustering based on automatic initial region of interest estimation
CN103914843A (en) * 2014-04-04 2014-07-09 上海交通大学 Image segmentation method based on watershed algorithm and morphological marker
CN104102920A (en) * 2014-07-15 2014-10-15 中国科学院合肥物质科学研究院 Pest image classification method and pest image classification system based on morphological multi-feature fusion
CN104899877A (en) * 2015-05-20 2015-09-09 中国科学院西安光学精密机械研究所 Method for extracting image foreground based on super pixel and fast trimap image
CN106570830A (en) * 2016-09-29 2017-04-19 北京联合大学 GrabCut improvement-based image segmentation method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101394895B1 (en) * 2012-10-12 2014-05-14 전남대학교산학협력단 Object segmentation using block clustering based on automatic initial region of interest estimation
CN103473780A (en) * 2013-09-22 2013-12-25 广州市幸福网络技术有限公司 Portrait background cutout method
CN103559719A (en) * 2013-11-20 2014-02-05 电子科技大学 Interactive graph cutting method
CN103914843A (en) * 2014-04-04 2014-07-09 上海交通大学 Image segmentation method based on watershed algorithm and morphological marker
CN104102920A (en) * 2014-07-15 2014-10-15 中国科学院合肥物质科学研究院 Pest image classification method and pest image classification system based on morphological multi-feature fusion
CN104899877A (en) * 2015-05-20 2015-09-09 中国科学院西安光学精密机械研究所 Method for extracting image foreground based on super pixel and fast trimap image
CN106570830A (en) * 2016-09-29 2017-04-19 北京联合大学 GrabCut improvement-based image segmentation method

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
CHRISTOPH RHEMANN 等: "High Resolution Matting via Interactive Trimap Segmentation", 《2008 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION》 *
EDUARDO S.L. GASTAL 等: "Shared Sampling for Real-Time Alpha Matting", 《PROCEEDINGS OF EUROGRAPHICS 2010》 *
伊聪聪 等: "一种改进的Grabcut图像分割方法", 《小型微型计算机系统》 *
只(挚)爱图像处理: "图像抠图算法学习-Shared Sampling for Real-Time Alpha Matting", 《HTTPS://WWW.CNBLOGS.COM/IMAGESHOP/P/3550185.HTML》 *
夏倩 等: "一种快速的自动视频抠像算法研究", 《计算机应用与软件》 *
王钧铭 等: "Grabcut彩色图像分割算法的研究", 《数字视频》 *
胡玉平 等: "基于Grabcut改进算法的服装图像检索方法", 《计算机科学》 *
高新波 等编著: "《现代图像分析》", 31 May 2011, 西安电子科技大学出版社 *

Cited By (60)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697722A (en) * 2017-10-23 2019-04-30 北京京东尚科信息技术有限公司 For generating the method and device of three components
CN109697722B (en) * 2017-10-23 2021-10-15 北京京东尚科信息技术有限公司 Method and device for generating trisection graph
CN108447068A (en) * 2017-12-22 2018-08-24 杭州美间科技有限公司 Ternary diagram automatic generation method and the foreground extracting method for utilizing the ternary diagram
CN108230341B (en) * 2018-03-07 2021-12-17 汕头大学 Eyeground image blood vessel segmentation method based on layered matting algorithm
CN108230341A (en) * 2018-03-07 2018-06-29 汕头大学 A kind of eye fundus image blood vessel segmentation method that nomography is scratched based on layering
CN110276760A (en) * 2018-03-14 2019-09-24 广东欧珀移动通信有限公司 A kind of image scene segmentation method, terminal and storage medium
CN108986105A (en) * 2018-06-12 2018-12-11 四川斐讯信息技术有限公司 A kind of image pre-processing method and system based on content
CN109035253A (en) * 2018-07-04 2018-12-18 长沙全度影像科技有限公司 A kind of stingy drawing method of the deep learning automated graphics of semantic segmentation information guiding
CN108961303A (en) * 2018-07-23 2018-12-07 北京旷视科技有限公司 A kind of image processing method, device, electronic equipment and computer-readable medium
CN108961303B (en) * 2018-07-23 2021-05-07 北京旷视科技有限公司 Image processing method and device, electronic equipment and computer readable medium
CN109255790A (en) * 2018-07-27 2019-01-22 北京工业大学 A kind of automatic image marking method of Weakly supervised semantic segmentation
CN109003282B (en) * 2018-07-27 2022-04-29 京东方科技集团股份有限公司 Image processing method and device and computer storage medium
CN109003282A (en) * 2018-07-27 2018-12-14 京东方科技集团股份有限公司 A kind of method, apparatus and computer storage medium of image procossing
CN109360148B (en) * 2018-09-05 2023-11-07 北京悦图遥感科技发展有限公司 Remote sensing image super-resolution reconstruction method and device based on mixed random downsampling
CN109360148A (en) * 2018-09-05 2019-02-19 北京悦图遥感科技发展有限公司 Based on mixing random down-sampled remote sensing image ultra-resolution ratio reconstructing method and device
CN109544587A (en) * 2018-10-31 2019-03-29 深圳变设龙信息科技有限公司 A kind of FIG pull handle method, apparatus and terminal device
CN111127303A (en) * 2018-11-01 2020-05-08 Tcl集团股份有限公司 Background blurring method and device, terminal equipment and computer readable storage medium
CN111246246A (en) * 2018-11-28 2020-06-05 华为技术有限公司 Video playing method and device
CN111292335A (en) * 2018-12-10 2020-06-16 北京地平线机器人技术研发有限公司 Method and device for determining foreground mask feature map and electronic equipment
CN111292335B (en) * 2018-12-10 2023-06-13 北京地平线机器人技术研发有限公司 Method and device for determining foreground mask feature map and electronic equipment
CN109934843A (en) * 2019-01-28 2019-06-25 北京华捷艾米科技有限公司 A kind of real-time profile, which refines, scratches image space method and storage medium
CN109934843B (en) * 2019-01-28 2021-05-14 北京华捷艾米科技有限公司 Real-time contour refinement matting method and storage medium
CN109859258A (en) * 2019-02-02 2019-06-07 网易(杭州)网络有限公司 Interface processing method and device, electronic equipment
CN109934829B (en) * 2019-03-13 2022-02-11 安徽紫薇帝星数字科技有限公司 Liver segmentation method based on three-dimensional graph segmentation algorithm
CN109934829A (en) * 2019-03-13 2019-06-25 安徽紫薇帝星数字科技有限公司 A kind of liver segmentation method for cutting algorithm based on three-dimensional figure
CN110136078A (en) * 2019-04-29 2019-08-16 天津大学 The semi-automatic reparation complementing method of single plant corn image leaf destruction
CN110136144A (en) * 2019-05-15 2019-08-16 北京华捷艾米科技有限公司 A kind of image partition method, device and terminal device
CN110136144B (en) * 2019-05-15 2021-03-16 北京华捷艾米科技有限公司 Image segmentation method and device and terminal equipment
CN110210487A (en) * 2019-05-30 2019-09-06 上海商汤智能科技有限公司 A kind of image partition method and device, electronic equipment and storage medium
CN110288617B (en) * 2019-07-04 2023-02-03 大连理工大学 Automatic human body slice image segmentation method based on shared matting and ROI gradual change
CN110298851A (en) * 2019-07-04 2019-10-01 北京字节跳动网络技术有限公司 The training method and equipment of human body segmentation's neural network
CN110288617A (en) * 2019-07-04 2019-09-27 大连理工大学 Based on the shared sliced image of human body automatic division method for scratching figure and ROI gradual change
CN110503704A (en) * 2019-08-27 2019-11-26 北京迈格威科技有限公司 Building method, device and the electronic equipment of three components
CN110706167B (en) * 2019-09-25 2022-06-10 中国人民解放军61646部队 Fine completion processing method and device for remote sensing image to-be-repaired area
CN110706167A (en) * 2019-09-25 2020-01-17 中国人民解放军61646部队 Fine completion processing method and device for remote sensing image to-be-repaired area
CN110533593A (en) * 2019-09-27 2019-12-03 山东工商学院 A kind of method of the accurate trimap of quick creation
CN110930321A (en) * 2019-11-06 2020-03-27 杭州恩玖软件有限公司 Blue/green screen digital image matting method capable of automatically selecting target area
CN111223108A (en) * 2019-12-31 2020-06-02 上海影卓信息科技有限公司 Method and system based on backdrop matting and fusion
CN111275729A (en) * 2020-01-17 2020-06-12 新华智云科技有限公司 Method and system for precisely dividing sky area and method and system for changing sky of image
CN111275729B (en) * 2020-01-17 2023-05-30 新华智云科技有限公司 Method and system for finely dividing sky area and method and system for changing sky of image
CN112233127A (en) * 2020-10-15 2021-01-15 上海圭目机器人有限公司 Down-sampling method for curve splicing image
CN112101370A (en) * 2020-11-11 2020-12-18 广州卓腾科技有限公司 Automatic pure-color background image matting algorithm, computer-readable storage medium and equipment
CN112101370B (en) * 2020-11-11 2021-08-24 广州卓腾科技有限公司 Automatic image matting method for pure-color background image, computer-readable storage medium and equipment
CN112634257B (en) * 2020-12-31 2023-10-27 常州奥创医疗科技有限公司 Fungus fluorescence detection method
CN112634257A (en) * 2020-12-31 2021-04-09 常州奥创医疗科技有限公司 Fungus fluorescence detection method
CN112581371B (en) * 2021-01-27 2022-03-22 仲恺农业工程学院 Panoramic real-time imaging splicing method based on novel structure of four-way camera
CN112581371A (en) * 2021-01-27 2021-03-30 仲恺农业工程学院 Panoramic real-time imaging splicing method based on novel structure of four-way camera
CN112862683A (en) * 2021-02-07 2021-05-28 同济大学 Adjacent image splicing method based on elastic registration and grid optimization
CN112862683B (en) * 2021-02-07 2022-12-06 同济大学 Adjacent image splicing method based on elastic registration and grid optimization
CN113538456A (en) * 2021-06-22 2021-10-22 复旦大学 Image soft segmentation and background replacement system based on GAN network
CN113538456B (en) * 2021-06-22 2022-03-18 复旦大学 Image soft segmentation and background replacement system based on GAN network
CN114092364B (en) * 2021-08-12 2023-10-03 荣耀终端有限公司 Image processing method and related device
CN114092364A (en) * 2021-08-12 2022-02-25 荣耀终端有限公司 Image processing method and related device
CN113724273A (en) * 2021-08-31 2021-11-30 温州大学大数据与信息技术研究院 Edge light and shadow fusion method based on neural network regional target segmentation
CN113724273B (en) * 2021-08-31 2024-02-09 温州大学大数据与信息技术研究院 Edge light and shadow fusion method based on neural network region target segmentation
CN115375535A (en) * 2022-10-21 2022-11-22 珠海金山办公软件有限公司 Interactive matting method and device, electronic equipment and storage medium
CN116843708A (en) * 2023-08-30 2023-10-03 荣耀终端有限公司 Image processing method and device
CN116843708B (en) * 2023-08-30 2023-12-12 荣耀终端有限公司 Image processing method and device
CN117173200A (en) * 2023-11-03 2023-12-05 成都数之联科技股份有限公司 Image segmentation method, device, equipment and medium
CN117173200B (en) * 2023-11-03 2024-02-02 成都数之联科技股份有限公司 Image segmentation method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN107730528A (en) A kind of interactive image segmentation and fusion method based on grabcut algorithms
CN103473780B (en) The method of portrait background figure a kind of
CN107452010A (en) A kind of automatically stingy nomography and device
CN107256558A (en) The cervical cell image automatic segmentation method and system of a kind of unsupervised formula
CN110503649B (en) Liver segmentation method based on spatial multi-scale U-net and superpixel correction
CN104732506B (en) A kind of portrait photographs' Color Style conversion method based on face semantic analysis
CN103559719B (en) A kind of interactive image segmentation method
CN103236065B (en) Based on the analyzing biochips method of active contour model and cell neural network
CN101447076B (en) Method for partitioning interested areas in WEB image
CN108537239B (en) Method for detecting image saliency target
CN106910176A (en) A kind of facial image based on deep learning removes occlusion method
CN102024156B (en) Method for positioning lip region in color face image
CN103164855B (en) A kind of Bayesian decision foreground extracting method in conjunction with reflected light photograph
CN103984958A (en) Method and system for segmenting cervical caner cells
CN106981068A (en) A kind of interactive image segmentation method of joint pixel pait and super-pixel
CN110969631B (en) Method and system for dyeing hair by refined photos
CN103927727A (en) Method for converting scalar image into vector image
Qin et al. Automatic skin and hair masking using fully convolutional networks
CN111401380A (en) RGB-D image semantic segmentation method based on depth feature enhancement and edge optimization
CN108596992B (en) Rapid real-time lip gloss makeup method
CN115082334A (en) Image enhancement method combining backlight area segmentation and self-adaptive exposure correction
CN104182976B (en) Field moving object fining extraction method
CN109741358B (en) Superpixel segmentation method based on adaptive hypergraph learning
CN110473212B (en) Method and device for segmenting electron microscope diatom image by fusing significance and super-pixels
CN107247958A (en) A kind of skin disease feature extracting method based on image recognition

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180223