CN110163869A - A kind of image repeat element dividing method, smart machine and storage medium - Google Patents

A kind of image repeat element dividing method, smart machine and storage medium Download PDF

Info

Publication number
CN110163869A
CN110163869A CN201910313823.2A CN201910313823A CN110163869A CN 110163869 A CN110163869 A CN 110163869A CN 201910313823 A CN201910313823 A CN 201910313823A CN 110163869 A CN110163869 A CN 110163869A
Authority
CN
China
Prior art keywords
pixel
super
image
cluster
repeat element
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
CN201910313823.2A
Other languages
Chinese (zh)
Other versions
CN110163869B (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.)
Shenzhen University
Original Assignee
Shenzhen 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 Shenzhen University filed Critical Shenzhen University
Priority to CN201910313823.2A priority Critical patent/CN110163869B/en
Publication of CN110163869A publication Critical patent/CN110163869A/en
Application granted granted Critical
Publication of CN110163869B publication Critical patent/CN110163869B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • 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/20092Interactive image processing based on input by user

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of image repeat element dividing method, smart machine and storage mediums, which comprises reads in image, forms the block of pixels with similar grain, color and brightness between adjacent pixels;After image forms super-pixel, foreground area is generated, during cluster, according to the color distance for covering super-pixel, the distance of the path center that space length and super-pixel to user input carries out super-pixel merging, formation connected region;Cluster result is diffused into from top to bottom in each super-pixel, different weight informations is distributed for each cluster result, obtains the matching error i.e. prospect probability of each super-pixel;It is inputted prospect super-pixel colouring information as data, using the color similarity between super-pixel as similar matrix, the data that can become representative sample in all samples are filtered out by way of continuous iteration, and the repeat element in image is gone out by simply interactive Fast Segmentation.

Description

A kind of image repeat element dividing method, smart machine and storage medium
Technical field
The present invention relates to image dividing processing technical field more particularly to a kind of image repeat element dividing methods, intelligence Equipment and storage medium.
Background technique
Image segmentation is the important content of image understanding and computer vision field, and the range of application spreads medicine, aviation The fields such as space flight, graphics, robot have obtained the great attention of people in theoretical research and practical application.Image segmentation It is important link of the image from processing to analysis, the superiority and inferiority of segmentation result directly affects further information processing.Therefore Image segmentation carries the effect of foundation stone, has important shadow to the feature extraction etc. of next step in whole image processing It rings.And repeat element is the role that performer is indispensable in present invention life, is automatically separated out from image and repeats member Element has actual meaning, can reduce duplicate search work, and all similar repeat elements are treated as one on the whole It is to be processed, directly repeat element is separated.
There is the history of decades to the research of image segmentation algorithm, has proposed that the segmentation of thousands of seed types is calculated at present Method, due to the complexity of image, many segmentation work can not be automatically performed by computer, and segmentation workload is excessive by hand, mark It is quasi- difficult unified, thus there are some image partition methods based on interactive mode, be used to quickly positioning target region, reduces and calculate Amount.Common image Segmentation Technology refers to being split extraction to some interesting target object in image, while to more A interesting target extracts, and needs more priori knowledges.
The prior art related to the present invention is first is that interactive image segmentation, the Graph cuts that Boykov et al. is proposed are Based on optimal interactive image segmentation algorithm is combined, this is the efficient image dividing method based on graph theory, and this kind of algorithm needs User's specified portions pixel is target and background, constructs weighted graph, the pixel of original image is indicated with the point in figure, between image Neighbouring relations as side, be converted into and seek minimal cut problem.Lazy Snapping lazyboot system is then cut algorithm to figure and is changed Into it has the advantages that need user to provide foreground and background pixel based on region and edge partitioning algorithm, efficiently and accurately simultaneously Information.The Grabcut algorithm that Cheng is proposed, optimizes classic map and cuts algorithm, and interactive means have been changed to rectangle frame from brush, will Outer rectangular frame is defined as background, is only split to the pixel in rectangle frame, compensates for the time-consuming that figure cuts algorithm to a certain extent Drawback.Jifeng proposes a kind of interactive image segmentation method based on region merging technique.User only needs using stroke (referred to as Label) roughly indicate object and background position and region.Region syncretizing mechanism based on maximum comparability, utilizes a flag to Instruct fusion process.
The shortcomings that prior art one, is: the existing input that user is often excessively relied on based on interactive image Segmentation Technology Information needs user's specified portions foreground and background seed, is used in the case of multiple objects segmentation, inevitably must be by User inputs foreground and background one by one, excessively cumbersome.
For the prior art related to the present invention second is that repeat element detects, repeat element has very much like texture, face Color, brightness and geometrical characteristic.Cheng et al. takes full advantage of the geometrical characteristic relationship of repeat element, with template global registration Repeat element in image.And Huang et al. is by considering the appearance similitude between repeat element, it is random based on markov Field model designs new Optimized model, increases new smooth item for solving while dividing and is located at the weight of image different location Complex element.Element of interest in Leung et al. detection image first, by these elements and their surrounding pixel progress Match, estimate the affine transformation between them, so that it is quickly poly- to complete that similar image subblock is expanded into bigger connected domain Class.
The concept divided jointly is introduced within 2006, i.e., divides the common portion in different images simultaneously.This segmentation mould Deduction in type leads to the MRF item using space encoder coherence and attempts the overall situation of the appearance histogram of matching common portion about Beam minimizes energy, reaches the result of segmentation.The model that Hochbaum is proposed bypasses the survey of histogram difference in direct mode Amount, this is and initially cooperates with the place for dividing different from.Armand et al. proposes a kind of sentencing for image collaboration segmentation Not Ju Lei frame, be able to use in several images from same object class share information come improve all images point It cuts.Differentiate that cluster has been well adapted for collaboration segmentation problem, existing feature can be reused and exercised supervision classification or detection.
The shortcomings that prior art two is: Cheng et al. starts with from the geometrical characteristic of repeat element, although the result being matched to It is quite similar with template, but from the point of view of in input level, it is played a crucial role wherein for matched template, slightly The edge of deviation may cause the inconsistent of result.The method of Huang et al. substantially optimizes graph cut figure and cuts calculation Method is allowed to be suitable for repeat element segmentation, lacks the observation to repeat element, and also require user setting foreground and background picture Element.
For the prior art related to the present invention third is that area-of-interest selects, Paint selection algorithm provides one The mouse action of similar paintbrush allows user to select interested target with brush on the image, and provides feedback in real time, directly It connects by user and arbitrary area-of-interest is set.The brush that Xu et al. (Lazy selection) is inputted by analysis user, The some regions combination for being best suitable for user intent is filtered out, the information given from user discloses the area that user is most interested in Domain.
The shortcomings that prior art three is: Paint selection does not support simultaneously to select multiple connected regions, nothing Method is in the selective extraction of repeat element, and at the same time selection multiple regions have to expend many energy.Lazy The multiple regions that selection is extracted are not necessarily all repeat elements, wherein some enclosed regions of shape difference are may included, The special nature and complex situations on the image of repeat element are not considered.
Research all at present requires information of user's offer about repeat element, for matching in full figure, also It is to say, existing repeat element extractive technique is most of that user is needed to specify a primary template, is used in the overall situation to profile It scans for or user draws on repeat element, be set to foreground pixel, then background pixel is set with brush, Cut algorithm by figure, be partitioned into repetition object, these work more or less both provide repeat element itself colouring information or Person's profile information priori knowledge, these require user and are manually entered, and means are excessively many and diverse.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
The technical problem to be solved in the present invention is that for when carrying out the segmentation of image repeat element, needing in the prior art The problem of wanting user to provide the information about repeat element matched for full figure, the present invention provide a kind of image repeat element point Segmentation method, smart machine and storage medium go out the repeat element in image by simply interactive Fast Segmentation, give a width packet Color image containing repeat element, the simple rough dragging brush of user, is therefrom partitioned into rapidly the desired repetition of user Element, the general estimation and the detection of repeat element for focusing on foreground area of the invention, will with image segmentation algorithm The repeat element of foreground part is distinguished with background.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of image repeat element dividing method, wherein described image repeat element dividing method includes:
Image is read in, pretreatment grouping is carried out to image by linear iteraction cluster, formed has between adjacent pixels The block of pixels of similar grain, color and brightness;
After image forms super-pixel, generate foreground area, during cluster, according to cover the color of super-pixel away from The distance of the path center inputted from, space length and super-pixel to user carries out super-pixel merging, forms connected region;
Cluster result is diffused into from top to bottom in each super-pixel, different weight letters is distributed for each cluster result Breath, obtains the matching error i.e. prospect probability of each super-pixel;
It is inputted prospect super-pixel colouring information as data, using the color similarity between super-pixel as similar square Battle array filters out the data that can become representative sample in all samples by way of continuous iteration.
The image repeat element dividing method, wherein the reading image, by linear iteraction cluster to image into The step of row pretreatment grouping, formed has similar grain between adjacent pixels, the block of pixels of color and brightness, comprising:
The spatial position feature and color characteristic of each pixel are combined, formed one five dimension feature vector Fk lk, ak,bk,xk,yk};
Wherein l, a, b attribute respectively correspond value of the pixel on the space LAB, and x, y represent the coordinate of pixel in the picture Position, k indicate each pixel;
N number of seed point is randomly choosed, N is determined by the size or number of super-pixel, within the specified range search and seed For point apart from immediate pixel, the distance is the similarity distance D between pixel:
Wherein, dsAnd dcIt respectively represents the space length between pixel and the color distance on the space CIELAB is poor, use M and s coordinates the relationship between the two attributes;Parameter s is got by the maximum probable value calculating in the space XY, and parameter m represents LAB The spatially maximum value possible of distance;
The distance is determined by the feature of pixel;
Similar pixel is classified as one kind, finds corresponding classification for each pixel in image, then to each class The average cluster center that all pixels point in the middle is looked for novelty, iteration obtains new N number of super-pixel until convergence again.
The image repeat element dividing method, wherein the m value range is [Isosorbide-5-Nitrae 0].
The image repeat element dividing method, wherein after described image forms super-pixel, foreground area is generated, During cluster, according to the color distance for covering super-pixel, in the path that space length and super-pixel are inputted to user The distance of the heart is come the step of carrying out super-pixel merging, form connected region, comprising:
By all super-pixel bottom-up mergings, until all super-pixel are all classified as one kind, merging regulation compliance is most It is closely preferential to merge;
The minimum distance refers to covering what the color distance of super-pixel, space length and super-pixel were inputted to user The distance of path center;
Since each super-pixel of the bottom, selects immediate two super-pixel of similarity to polymerize cluster, calculate two A cluster similarity:
GI, j=dc·σ(dP)·σ(ds);
Wherein, GI, jFor measuring the similarity between two clusters, the distance between two clusters, d are representedcIt is RGB color sky Between in Euclidean distance, dPIndicate the distance of two clusters spatially, the central point distance being defined as between two clusters, ds Then represent two clusters to brush average distance.
The image repeat element dividing method, wherein control super-pixel has more Gao Quanchong in the width of brush, By dsValue replaces with ds/wi, wiIt is brush width, σ () refers to Sigmoid function, for limiting the space length of cluster to totality Influence;
If dPAnd dsTend to positive infinity, then the value of σ () mapping tends to 1.
The image repeat element dividing method, wherein from each cluster of the angle analysis of spatial distribution and distance and pen Brush the matching degree in region:
R=β (μp→ss→p)+(1-β)(σp→ss→p)
Wherein, μp→sAnd μs→pIndicate measurement brush and the matching degree of each cluster in position, σp→sAnd σs→pIndicate each The matching capacity of cluster and brush in distribution introduces β parameter to balance both abilities;μp→sIt indicates in from sampled point to candidate Brush average minimum distance, μs→pIndicate average minimum distance of the brush to sampled point from candidate, σp→sIt indicates from adopting Sampling point to brush minimum distance standard deviation, σs→pIndicate the standard deviation of the minimum distance from brush to sampled point, β's Value is 0.5.
The image repeat element dividing method, wherein described that cluster result is diffused into each super picture from top to bottom On element, different weight informations is distributed for each cluster result, obtains the matching error i.e. step of prospect probability of each super-pixel Suddenly, comprising:
Basis based on super-pixel segmentation, the point of some fixed quantities of uniform sampling, which is used as, from each super-pixel represents, The cluster newly formed is just made of its internal all sampled point for being included;
By all super-pixel score normalizations to [0,255], score is close to 255 just closer to prospect;
Calculate the prospect expressive force of the super-pixel in each cluster:
There are super-pixel in merging process gradually with background area merger, and matching error is gradually increased;
In merging process there are super-pixel gradually with foreground area merger, matching error present reduction trend;
Wherein, RiThe prospect reference value of i-th of cluster, wikRefer to the weight of i-th of cluster comprising k-th of super-pixel, weight Value is the sum of all pixels of i-th of cluster, and the value of n is not fixed for each super-pixel;By all super-pixel expressive force scores It is normalized to [0,255], and close to 255 score close to prospect, and 0 close to background.
The image repeat element dividing method, wherein it is described to be inputted prospect super-pixel colouring information as data, Using the color similarity between super-pixel as similar matrix, being filtered out in all samples by way of continuous iteration can be at For representative sample data the step of include:
The sample point for being best able to represent itself is found from all data, is weighed by Attraction Degree information and degree of membership information The matching degree between them is measured, and at the same time selecting representative sample;
The Attraction Degree information r (i, k) and degree of membership information a (i, k) between each sample are iterated to calculate each time, are calculated public Formula is as follows:
A (i, k) ← min [0, r (k, k)+∑I ' ∈ { i, k } max[0, r (i ', k)]];
Wherein, i indicates that sample, i ' indicate that other samples, k indicate candidate samples center, and k ' is indicated in other candidate samples The heart, s (i, k) and r (i, k ') indicate the similarity matrix at different candidate samples centers, and r (k, k) reflection is that node k has mostly not It is suitble to be divided into other cluster centres, r (i ', k) indicates the value other than r (i, k) and r (k, k), represents node k to it The Attraction Degree of his node;
After calculating by each round, damped coefficient is added, by result and last result linear combination each time, It is replaced by the new value of information.
A kind of smart machine, wherein the smart machine includes: memory, processor and is stored on the memory And the image repeat element segmentation procedure that can be run on the processor, described image repeat element segmentation procedure is by the place The step of reason device realizes image repeat element dividing method as described above when executing.
A kind of storage medium, wherein the storage medium is stored with image repeat element segmentation procedure, and described image repeats Element segments program realizes the step of image repeat element dividing method as described above when being executed by processor.
The present invention goes out the repeat element in image by simply interactive Fast Segmentation, and giving a width includes repeat element Color image, the simple rough dragging brush of user is therefrom partitioned into rapidly the desired repeat element of user, of the invention The general estimation and the detection of repeat element for focusing on foreground area, with image segmentation algorithm by the repetition of foreground part Element is distinguished with background.
Detailed description of the invention
Fig. 1 is that the piece image chosen in image repeat element dividing method of the present invention indicates the repeat element in image Schematic diagram;
Fig. 2 is the flow chart of the preferred embodiment of image repeat element dividing method of the present invention;
Fig. 3 is user's interaction schematic diagram and foreground extraction figure in image repeat element dividing method of the present invention;
Fig. 4 is that super-pixel cluster process (clustering tree) component shows in image repeat element dividing method of the present invention;
Fig. 5 is brush relation schematic diagram in image repeat element dividing method of the present invention;
Fig. 6 is Potential Prediction figure in image repeat element dividing method of the present invention;
Fig. 7 is multiple groups repeat element foreground picture in image repeat element dividing method of the present invention;
Fig. 8 is information dissemination mechanism schematic diagram in image repeat element dividing method of the present invention;
Fig. 9 is lab diagram and binaryzation true value figure in image repeat element dividing method of the present invention;
Figure 10 is that repeat element extracts time-consuming schematic diagram relatively in image repeat element dividing method of the present invention;
Figure 11 is the schematic diagram of the accuracy rate comparison of algorithms of different in image repeat element dividing method of the present invention;
Figure 12 is the schematic diagram that the user's operation number of algorithms of different in image repeat element dividing method of the present invention compares;
Figure 13 is the picture schematic diagram that repeat element is quickly edited in image repeat element dividing method of the present invention;
Figure 14 is the running environment schematic diagram of the preferred embodiment of smart machine of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer and more explicit, right as follows in conjunction with drawings and embodiments The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to It is of the invention in limiting.
The invention proposes the frames that repeat element is extracted in a kind of more automation, can be used for quickly searching repeat element, The invention mainly includes by the repeat element in simply interactive rapidly extracting image, a given web has repeat element Color image, the region where the rough selection repeat element of user, just can therefrom obtain accurate repeat element, as shown in figure 1 The highlighted part of left figure (indicates the part of two lemons) in Fig. 1, and largely meets the expectation of user.
Acceleration is provided for algorithm with super-pixel, and clusters all super-pixel again along this thinking, this is In order to obtain the Pixel Information of coarse prospect from the super-pixel for have no semantic information.It is handed over according to the property of repeat element and user Mutual brush information, measures similarity distance/similarity of two super-pixel in terms of three, the color difference between super-pixel, The distance between space length and the lines drawn with user relationship codetermine the similarity between two super-pixel, then right Each step cluster result is evaluated, and the standard of judge is whether the cluster after these clusters matches with interactive information, i.e., these are poly- Whether result made of conjunction meets the interaction prompts of user's input.
According to these final determining foreground parts containing repeat element, in the case of more complicated, sometimes in user When drafting, another a group or more groups of repeat elements inevitably occur, which right figure, algorithm originally can not tell as shown in figure 1 One group to be only user desired, then can fall into chaos.So accordingly, using the similitude propagation algorithm of information dissemination mechanism Again to complicated foreground classification, every group of repeat element independent is obtained.Based on simply interactive process, user can be experienced Disposable segmentation repeat element as a result, saving a large amount of time and efforts.
The related priori knowledge for focusing on being inferred to from these simple interactions foreground content of the invention.In image There are a kind of particularly important visual information, i.e. repeat element, the repeat element in image is defined as in the present invention, has similar Texture, color, the pixel set of brightness and other geometrical characteristics.Repeat element is very universal in life, this type of object Detection be computer vision, an important subject of geometric manipulations and computer symmetrical analysis.
Common image Segmentation Technology is extracted just for some interesting target object in image, isolates one A connected region forms prospect, and repeat element exists as independent individual, simply very with original foreground dividing method Difficulty extracts complete repeat element.What the present invention studied is then multiple interesting targets, is to have similitude in appearance Repeat element.Since vision is still the main source of resolution information of the present invention, the world from the point of view of machine simulation people how is allowed So that research more has practical significance.Due to overlapping each other, illumination variation, object deformation etc. factors influence, recognize it is this kind of For repeat element in image itself is a the task of great challenge, computer, which has, more objectively analyzes energy than human eye Power ignores the error that human eye is seen the present invention is desired to explore really be partitioned into complete repetition object.
These repeat elements occupy an important position in high vision editor, greatly improve the efficiency of picture editting. It is different from the salient region of image, is not always to be distributed position most obvious in the picture, can not be captured at a glance by people It arrives.Repeat element, which may be scattered, is distributed in the different location even corner of whole image, is formed irregular disconnected Multiple regions, therefore psychology is had exceeded, the research category in the fields such as Neuscience can not be from the location information handle of entire image Hold the regularity of distribution of repeat element.
Therefore, the invention proposes a kind of frame for more easily extracting repeat element, can be used for quickly searching repetition Element, the invention mainly includes by the repeat element in simply interactive rapidly extracting image, a given web has repetition The color image of element, the region where the rough selection repeat element of user, the present invention just can therefrom obtain accurate one group Repeat element, and largely meet the expectation of user.
Specifically, image repeat element dividing method described in present pre-ferred embodiments, as shown in Fig. 2, described image Repeat element dividing method the following steps are included:
Step S10, image is read in, pretreatment grouping is carried out to image by linear iteraction cluster, between adjacent pixels Form the block of pixels with similar grain, color and brightness.
Cluster and sorting algorithm is used in the present invention, the former is to mention from the super-pixel for have no semantic information Take coarse prospect, the latter is to carry out micronization processes to complicated and diversified prospect to obtain complete repeat element individual even a variety of Different types of repeat element.As shown in Fig. 3 left figure, user passes through the region where the coarse drafting repeat element of brush, this hair The bright color appearance from these repeat elements, location distribution information extract foreground information (such as Fig. 3 right figure comprising repeat element It is shown).
The invention mainly includes by the repeat element in simply interactive rapidly extracting image, a given web has weight The color image of complex element, these regions of the rough selection of user just can therefrom obtain accurate repeat element, and very big Meet the expectation of user in degree.
Go out repeat element by simply interactive Fast Segmentation, firstly, image is pre-processed for accelerating algorithm, Single pixel is replaced using super-pixel, being formed has similar grain, and what the adjacent pixel of the features such as color and brightness was constituted has The irregular block of pixels of certain visual meaningaaa.In order to match different images, generated for different brush input adjustment super Pixel Dimensions do so maximization and present the advantage of super-pixel.
Super-pixel is a kind of performance of image over-segmentation, firstly, by the spatial position feature and color characteristic of each pixel In conjunction with the feature vector Fk { lk, ak, bk, xk, yk } of one five dimension of formation, wherein first three l, a, b attribute respectively correspond pixel In the value of LAB (color model) spatially, x, y represent the coordinate position of pixel in the picture, and k indicates each pixel.First Therefrom randomly choose N number of seed point, N is determined by the size or number of super-pixel, within the specified range search and seed point away from From immediate pixel, distance here is not L1, L2 distance, but the similarity distance D (see following formula) between pixel, by The feature of pixel determines.These similar pixels are classified as one kind, its classification is found for each pixel in image, The average cluster center looked for novelty again to all pixels point in each class, iteration obtains new N number of super-pixel until receiving again Until holding back.
Wherein, dsAnd dcIt respectively represents the space length between pixel and the color distance on the space CIELAB is poor, use M and s coordinates the relationship between the two attributes.Parameter s is got by the maximum probable value calculating in the space XY, and parameter m represents LAB The spatially maximum value possible of distance, the smaller super-pixel shape of m more irregularly, be bonded with image boundary it is even closer, it is desirable Range is [Isosorbide-5-Nitrae 0], selects m parameter for 10 in the present invention.
Step S20, after image forms super-pixel, foreground area is generated, during cluster, according to covering super-pixel Color distance, the distance of the path center that space length and super-pixel to user input carries out super-pixel merging, formed Connected region.
Based on interactive image segmentation, prospect or background information all more or less are obtained from the region that user inputs.It is swearing On spirogram, analysis user scribble part cover each Shape Element at grouping error, extract and be best suitable for user desired one Group Shape Element.It is used as input from the Shape Element for partly or completely all standing of scribbling, recombination is carried out to element and establishes element candidate Collection, selects the best subset of recombination out of covering all elements.To the proximity in visual perception, the similitude of shape with And the interaction between common region is modeled, define between two elements at grouping error, use is bottom-up Method is iteratively to having minimum to be combined at the element of grouping error, until all elements are all included in same group.
After image forms super-pixel, needs further to be condensed into significant region, therefrom generate foreground area.Poly- During class, first in view of the color distance between super-pixel, space length, it is desirable to preferentially that space length is close when clustering Similar super-pixel merge, formed connected region.The similarity measurement that super-pixel merges is by color distance difference dc, space length ds It codetermines, the similarity between two super-pixel being merged is measured with this.Further consider, based on observation display, uses Family is partial to draw the curved path (hereinafter collectively referred to as brush) close to element, therefore again by super-pixel to most short distance between brush From the measurement for being included in super-pixel merging again.
First by all super-pixel bottom-up mergings, until all super-pixel are all classified as one kind, merging regulation compliance Minimum distance preferentially merges.Above-mentioned distance refers to covering the color distance of super-pixel, space length and super-pixel to use The distance of the path center of family input.The distance metric can also be referred to as dissimilarity, and distance is bigger, and similarity degree is smaller, In appearance, determine that the whether similar direct reaction of two super-pixel is exactly color, therefore color distance is to judge similitude Most fundamental factor.Assuming that the adjacent super-pixel of space length is more likely classified as the same cluster than remote super-pixel, this is It is determined by the coherence of image.In addition to this with greater need for the brush for combining user's input, the super-pixel closer to brush center is answered This is prioritized.Fig. 4 is that super-pixel cluster process component shows.
Since each super-pixel of the bottom, selects immediate two super-pixel of similarity to polymerize cluster, removed in Fig. 4 A-G is the cluster for containing only single super-pixel, other H-M are the cluster that multiple super-pixel are polymerized, and is the production that cluster generates Object, following formula are to calculate two cluster similarities:
GI, j=dc·σ(dp)·σ(ds);
Wherein, GI, jIt measures the similarity between two clusters and represents the distance between two clusters, dcIt is in RGB color Euclidean distance, it is normalized to [0,1].dPIt indicates the distance of two clusters spatially, is defined as between two clusters Central point distance.dsThen represent two clusters to brush average distance.D hereinsAnd dcWith it is indicated above be same contain Justice, only different stage, before when be as unit of each super-pixel, that distance is exactly conjunction between super-pixel As soon as had evolved into the cluster being composed of super-pixel and after wheel, behind namely ask between every two cluster away from From.
In order to allow super-pixel that there is more Gao Quanchong in the width of brush, by dsValue replaces with ds/wi(wiIt is that brush is wide Degree).σ () refers to Sigmoid function, it limits the space length of cluster to overall influence.If dPAnd dsTend to be just infinite Greatly, then the value of σ () mapping tends to 1.In these three different distances, the similarity measurements between two clusters are fundamentally taken Certainly in color distance.If Fig. 5 indicates the relational graph between cluster and green brush (curve in Fig. 5), the circle of grey (such as actually Indicated with blue, such as A, B, C, F) indicate a cluster, the dark circles (practical to be indicated with red) in grey circle are then each clusters Center, therefore the line segment (practical to be shown with yellow line segment form) of the line segment of A to F and B to C indicate the space between two clusters away from From grey line segment (line segment of the line segment and C of A to brush to brush) is then minimum distance (d of each cluster to brushs)。
From the matching degree of the angle analysis of spatial distribution and distance each cluster and brush region.
R=β (μp→ss→p)+(1-β)(σp→ss→p);
First item μ (including μp→sAnd μs→p)) measure brush and the matching degree of each cluster in position, Section 2 (packet Include σp→sWith and σs→p) indicate the matching capacity of each cluster and brush in distribution, β parameter is introduced to balance both abilities. μp→sIndicate the average minimum distance of the brush in from sampled point to candidate, μs→pIndicate brush from candidate to sampled point Average minimum distance, σp→sIndicate the standard deviation of the minimum distance from sampled point to brush, σs→pIt indicates from brush to sampled point Minimum distance standard deviation.Practice in, the value of β is adjusted to 0.5, achieves good effect.
For each cluster of Fig. 4, the present invention carries out error matching to it, these times are reflected from difference scores The matching degree between cluster and brush is selected, but in these results, most of is not the element for having integrity profile, therefore The standard of which candidate cluster can not be selected in this, as user.
Step S30, cluster result is diffused into from top to bottom in each super-pixel, is distributed for each cluster result different Weight information obtains the matching error i.e. prospect probability of each super-pixel.
Due to the relationship between these block of pixels be it is unknown, each block of pixels will finally belong to prospect or background. On the basis of super-pixel, more it is even more important about the information of prospect by how simple interaction acquires, and and Background distinguishes as far as possible, and the prospect of above-mentioned meaning is the repetition object comprising multiple analog informations.It is desirable that before having The target of scape feature, and target is the set of super-pixel.These set have some colors, and the general character on texture has similar face The super-pixel of color should flock together, and be formed with the repeat element of semantic information.It is single with super-pixel as shown in Fig. 6 right figure Position, predicts that they belong to the probability of prospect.
Assuming that each super-pixel has the expressive ability of prospect, this ability is stronger, then represents the probability for becoming prospect It is bigger.The appraisement system of a measurement prospect expressive force based on super-pixel is proposed accordingly, predicts to wrap according to the assessment result Prospect containing repeat element.According to the brush region that user inputs, analyzing which region is possible foreground target.According to super picture Relationship between element merges, and considers that the stroke information of user's input is to be not enough to obtain that be best suitable for user desired heavy Complex element.Think that the stroke of user's input has its specific purpose, thus to the result of cluster (cluster) combine the input of user into Row analysis, thus preliminary foreground target required for obtaining.The present invention has done matching error calculating to each cluster and brush, by this Cluster as a result, be diffused into each super-pixel from top to bottom, obtain the matching error of original each super-pixel.
These cluster results are further analyzed, discovery cluster process proceeds at the end of, the knot The reference value of fruit is higher, therefore distributes different weight informations for each cluster result.If only combining two super-pixel, answer Their reference weight is adjusted to lower value.Use the sum of all pixels that includes in each result as weighted value.Based on super picture Element segmentation on the basis of, from each super-pixel some fixed quantities of uniform sampling point as represent, the cluster newly formed just by Its internal all sampled point for being included is constituted.Finally by all super-pixel score normalizations to [0,255], score is close 255 just closer to prospect.
For each super-pixel in image, the input whether it matches user determines its prospect expressive force, that is, belongs to In the probability of prospect.The prospect expressive force for calculating the super-pixel in each cluster, in the initial stage substantially without too many differences, it is subsequent can It can be there are two types of situation:
A, there are super-pixel in merging process gradually with background area merger, and matching error is gradually increased;
B, in merging process there are super-pixel gradually with foreground area merger, matching error present reduction trend;
The prospect reference value R of i-th of cluster is obtained by the formula of fronti, i.e. RiThe prospect reference value of i-th of cluster, wikIt is Refer to the weight of i-th of cluster comprising k-th of super-pixel, weight value is the sum of all pixels of i-th of cluster here.The value of n is for every A super-pixel is not fixed.Finally, be [0,255] by all super-pixel expressive force score normalizations for unified result, and And close to 255 score close to prospect, and 0 close to background.
Step S40, using prospect super-pixel colouring information as data input, using the color similarity between super-pixel as Similar matrix filters out the data that can become representative sample in all samples by way of continuous iteration.
Algorithm of the invention considers the position of user's brush to the influence factor of final repeat element, streaks in brush When only existing one group of repeat element in range, have been able to extract the repeat element for being distributed in different location well, but such as The case where fruit is more than two groups of repeat elements is as shown in fig. 7, algorithm robust not enough, and in computer, these filtered out are heavy Complex element is all that user is desired.These repeat elements must be sorted out again, could therefrom obtain corresponding repeat element, Rather than computer is enabled to fall into fuzzy state.
Most of foreground area has been obtained herein, it is also necessary to which finer division prospect is to be based on drawing on the whole The clustering problem divided.First it is envisioned that classical k means clustering algorithm, but the algorithm needs to be arranged in advance cluster number, this This part is a unknown number in invention, and nobody knows the kind of how many final repeat element before user interacts Class is more applicable for simple feature point in addition, the algorithm is easily trapped into the predicament of local optimum on huge data set Class, and the feature situation of not applicable various dimensions.New affine propagation clustering algorithm has higher Shandong compared with k mean cluster Stick, there has also been raisings for accuracy.
Based on the mechanism that information is propagated, the sample point for being best able to represent itself is found from all data, can be seen at this At be with itself the most similar sample, the matching degree between them is measured by two aspects, and at the same time selection is provided Representational sample.
First, Attraction Degree information (r matrix) expresses some data if appropriate for as other data as shown in Fig. 8 left figure The sample point of object, that is, other data points can be represented;Second, degree of membership information (a matrix), as shown in Fig. 8 right figure, Other all samples of each samples selection are represented as oneself cluster centre sample point and agree with degree.
As shown in figure 8, iterate to calculate each time Attraction Degree between each sample and degree of membership information r (i, k) and a (i, K), calculation formula is as follows:
A (i, k) ← min [0, r (k, k)+∑I ' ∈ { i, k }Max [0, r (i ', k)]];
Wherein, i indicates that sample, i ' indicate that other samples, k indicate candidate samples center, and k ' is indicated in other candidate samples The heart, s (i, k) and s (i, k ') indicate the similarity matrix at different candidate samples centers, and r (k, k) reflection is that node k has mostly not It is suitble to be divided into other cluster centres, r (i ', k) indicates the value other than r (i, k) and r (k, k), represents node k to it The Attraction Degree of his node.
After being calculated by each round, in order to avoid numerical value concussion, addition resistance occur for degree of membership information and Attraction Degree information Result and last result linear combination each time is replaced by the new value of information by Buddhist nun's coefficient, it can thus be seen that Constantly iterate to calculate after, both values of information be by first time calculate be accumulated to last time as a result, without It determines to finally obtain convergent center of a sample by certain primary result.The time complexity of the algorithm is O (K2T), K representative sample Number since the algorithm is without being configured cluster number in advance, but is filtered out in all samples by way of continuous iteration The data that representative sample can be become input in algorithm of the invention using prospect super-pixel colouring information as data, with super Color similarity between pixel is as similar matrix, using T as maximum number of iterations.
Further, foreground extraction method of the invention and famous iteration diagram cut by using user's assessment Algorithm and lazyboot's partitioning algorithm compare, the friendliness of the interaction for assessing method of the invention.
Firstly, it is necessary to which the evaluation index of selected user's assessment, uses accuracy and expends time two indices as assessment Index, accuracy are the results after given correct extraction result and repeat element extracting method extract certain figure Intersection and the result ratio, the index measure is extract result levels of precision.Expending the time is that user starts carry out the Once-through operation is to the time interval for having carried out last time operation, because carrying out the runing time of three algorithms of user's assessment only The overall very small part for expending time user is accounted for, therefore can be considered operating time and the thinking of user the consuming time The sum of time, what which measured is the friendliness of algorithm interaction.
Then, it is assumed that method of the invention is suitable with other two method in accuracy, while expending on the time less than another Outer two methods.It is artificial using Photoshop first in order to prove that this assesses experiment it is assumed that needing to devise following user The repeat element of given picture is accurately partitioned into as correctly extraction as a result, then user is allowed to operate, works as algorithm Result accuracy be more than given threshold value when, stop experiment, record expend the time.
Then, the present invention needs selected experiment picture, and according to above-mentioned brief experimental program, needing selection, consuming time is long Picture, i.e., the more and complicated picture of repeat element in picture, because if repeat element in picture it is excessively obvious and Simply, then expending the time can be very short, causes the difference that can not embody these algorithms.
Finally, having devised detailed user's evaluation scheme according to above content: select four pictures as experimental duties, And second the corresponding binary map of row as correctly extracting as a result, as shown in Figure 9.By above three algorithm integration to one In a program, each user needs to carry out three groups of operations, respectively using above three algorithm respectively to four groups of sons in Fig. 9 Figure carries out repeat element extraction, and during the experiment, the sequence of algorithm is random.Method of the invention has the operation of two steps, point Paintbrush size Wei not adjusted and drawn lines on the diagram with paintbrush, iteration diagram cuts algorithm, and there are three types of operations, respectively use left mouse button Click and pull out a green rectangle frame and shift key+left mouse button setting-out and Ctrl+left mouse button setting-out, Lan Renfen It cuts there are two types of interactive operation, respectively left mouse button setting-out and right mouse button draws lines.20 participants are recruited in total to carry out User's assessment, everyone needs to complete 3 groups of operations × 4 pictures, a total of 240 experiments.In entire experiment, have recorded with Lower information is used for quantitative analysis, every image repeat element extraction time, the operand of user's interaction, or is stroke number, with And the accuracy rate of segmentation.
Task one: the repeat element standard drawing for showing image to be split first and manually demarcating, user are utilized respectively Three kinds of different interactive modes carry out repeat element extraction.Until reaching fixed accuracy, each user's the time it takes As record index.As shown in Figure 10, be respectively the specified repeat element in Fig. 9 in four images is extracted statistics when Between content.First group of data in Figure 10 are the mean consumption time of three kinds of methods obtained by comprehensive all experiments.This hair of the task It is bright to carry out specified operation from volunteer from the number for extracting half, ignore extreme case data, it records representative data and draws Comparison table in Figure 10.
The interaction time difference having in three kinds of methods is larger, and as a whole, synthesis of the invention averagely expends the time most It is short.It in a and b especially in Fig. 9, is found by duplicate measurements variance analysis (ANOVA), the present invention completes to extract work Time, (F=97.735, p < 3.74E-08) was substantially better than other methods, and later in two groups of images, difference slightly shorten (p < 0.019)。
It is not difficult to find out that, in more complicated background, inventive algorithm has more advantage in the image to be split from these.From upper From the point of view of stating result, the algorithm that iteration diagram is cut is time-consuming at most, method far behind of the invention and lazyboot's partitioning algorithm.Use this The rectangle frame calibration repeat element of algorithm most original is unsuitable, although they are before being given according to user in this stage Scape and background pixel are modeled, and repeat element possesses identical pixel property, but the prospect and back given only according to user Scape image still can not disposably be partitioned into repeat element.This also reflects from another point of view, only according to it is specific it is some before Scene element is characterized in that repeat element can not be extracted, although this algorithm in the case where very simple, can also obtain not Wrong result.For the method for the present invention compared with lazyboot's segmentation result, the maximum value and median of the method for the present invention are respectively less than lazyboot point It cuts, illustrates that the average consuming time of the method for the present invention will be divided less than lazyboot.From the point of view of the data result of statistics and error line, this Inventive method outclass the algorithm that iteration diagram is cut, and compared with lazyboot's segmentation, median is smaller, and data are presented on small range Interior fluctuation illustrates that the time of not only averagely expending of the method for the present invention will be divided less than lazyboot, but also more than the performance of lazyboot's segmentation For stabilization.
Task two: within a limited period of time, according to the image of prompt and the repeat element standard drawing demarcated, Fast Segmentation Repeat element in image then compares segmentation figure and standard drawing, statistics segmentation accuracy rate.As shown in figure 11, some aspirations are asked The accuracy rate result that person is split four groups of images.
Observe variance analysis as a result, the Average Accuracy of these three algorithms is found, algorithm of the invention is in above-mentioned experiment In cut algorithm (F=22.04, p < 0.0002) better than iteration diagram, do not distinguish with lazyboot's partitioning algorithm.In b especially in Fig. 9 Can rapidly extracting go out blue pill or white tablet (actually indicating pill with blue, white indicates tablet), than other Method is time-consuming less (F=35.86, p < 8.66E-06), and accuracy rate is higher (F=574.6962, p < 4.77E-11).
The present invention and indirect statistical cut correct pixel ratio shared in standard drawing, this is because considering It arrives, segmentation result is likely to occur the case where even completely covering standard drawing beyond standard drawing.Therefore first with the knot finally divided Fruit figure is compared with standard drawing, overlay area area between the two is obtained, by this region area ratio shared by segmentation result figure Example is used as accuracy rate.Due to complicated interaction, iteration diagram cuts algorithm and has had no advantage, accuracy rate in the case where limiting time For average value 60% hereinafter, image is more complicated, the accuracy rate of the algorithm is lower.And lazyboot's partitioning algorithm, it is overall and of the invention The high-accuracy that method is consistent, in first group of experiment, the method for the present invention conspicuousness be slightly below other a few group pictures (p < 0.00056), though the interspersed distribution of the figure repeat element, careful user are drawn in prospect using other methods individual element Also can achieve the effect that good.It is significantly excellent by algorithm of the invention known to significance test in the lab diagram of other groups Different, accuracy rate is higher (p < 0.0002), and on the whole, algorithm difference of the invention is embodied in two reasons, firstly, the first component It is low to cut difficulty, and second, three, the image segmentation difficulty in four groups of data is big;Secondly, limiting time has been done in the experiment, the present invention Algorithm only need a continuous lines that segmentation can be completed, when having plenty of time, even if user repeatedly does repeat element extraction Work, accuracy rate also substantially maintain a level.And lazyboot's partitioning algorithm, it is the process gradually optimized, the time is more, instead It is able to ascend accuracy rate.
While completing above-mentioned two task, also the stroke number of each step user input is counted, as a result such as Shown in Figure 12, it can be recognized from fig. 12 that the requirement that inventive algorithm inputs user is minimum, from the point of view of accuracy rate, the present invention Algorithm be better than other two methods.Whether the present invention has significance difference on operand by F check analysis inventive algorithm Different, the average operation number that discovery participates in the volunteer of investigation is less (F=27.6477, p < 3.249E-06).Firstly, iteration diagram is cut The interaction of algorithm and the method for the present invention is all more succinct than lazyboot partitioning algorithm, and the stroke number of input is less, but iteration diagram is cut Higher accuracy rate is but not achieved in algorithm under square one;Secondly, lazyboot's segmentation and inventive algorithm are all from accuracy rate Accurate it can be partitioned into repeat element, but in comparison, lazyboot divides input information or the user for needing more users It needs to contemplate and how to extract repeat element from complex background, waste the regular hour.To sum up, three kinds of methods are compared, It is proposed by the present invention to be extracted advantageously based on simply interactive repeat element.
Further, the present invention can quickly edit these repeat elements, from color, their category of brightness etc. modification Property, new object is formed, is edited without repeating object to each, such as repeat element (such as chair, bowl in Figure 13 Dish, balloon, lemon etc.).Further, the geometrical characteristic for obtaining these repeat elements carries out customized such as shape contour information Deformation, and then geometric editor is carried out to all repeat elements.
The method of repeat element in rapidly extracting image proposed by the present invention, compared with other repeat element detection methods Have the advantages that following have:
(1) unit from other methods based on single pixel is different, the present invention selected the faster super-pixel of speed as Minimum unit when whole detection carries out the classification of foreground and background to each super-pixel;
(2) it in the prior art for the detection of repeat element, generally requires to draw foreground and background area stroke by stroke by hand Domain, input is excessively cumbersome, and in the present invention, user only needs primary rough selection repeat element region, can obtain corresponding Repeat element prospect;
(3) present invention is able to solve the case where there are multiple groups repeat elements for brush overlay area, still according to repeat element Principle of similarity classification, be only partitioned into one group of repeat element every time, such as there are multiple groups, then be used as candidate result, for user Selection.
It is proposed by the present invention that template is specified without user based on interactive repeat element extractive technique, it does not need pre- in advance Any information for knowing these objects, can be partitioned into repeat element.By user similar to the mouse action of paintbrush, user is extracted One group of desired repeat element.Work of the invention is the extraction by interactive mode to repeat element in image, without logical User is crossed to specify repeat element template, is had several advantages that
(1) one is proposed from local selection, the interactive operation method of integral extension.Brush is similar to by one Mouse action, rather than repeat element is detected or matched from entire scene, it can therefrom determine one group of similar element, relate to And interaction it is few, calculation amount is small, but more efficient
(2) a kind of repeat element dividing method is proposed.The repeat element that this method is divided is fully considered and is excavated Similitude in appearance, the result for extracting the selection of result and human eye subjectivity is very close, and algorithm is more intelligent.
(3) a kind of real-time selection feedback mechanism is proposed, which is divided into two steps, that is, selects and feed back, when user carries out When selection, which provides Real-time Feedback, reduces period of reservation of number, the use for promoting user more friendly.
(4) a kind of trans-regional repetition method for segmenting objects across semantic objects is proposed, this method can contain multiple groups Under the complex situations for repeating object, it still can be therefrom partitioned into specific repeat element, and other methods are not all considered The case where existing simultaneously multiple groups repeat element in same image.
Further, as shown in figure 14, it is based on above-mentioned image repeat element dividing method, the present invention further correspondingly provides one Kind smart machine, the smart machine includes processor 10, memory 20 and display 30.Figure 14 illustrates only smart machine Members, it should be understood that being not required for implementing all components shown, the implementation that can be substituted is more or less Component.
The memory 20 can be the internal storage unit of the smart machine in some embodiments, such as intelligence is set Standby hard disk or memory.The external storage that the memory 20 is also possible to the smart machine in further embodiments is set Plug-in type hard disk that is standby, such as being equipped on the smart machine, intelligent memory card (Smart Media Card, SMC), safe number Word (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 20 can also be wrapped both The internal storage unit for including the smart machine also includes External memory equipment.The memory 20 is installed on described for storage The application software and Various types of data of smart machine, such as the program code etc. of the installation smart machine.The memory 20 is also It can be used for temporarily storing the data that has exported or will export.In one embodiment, figure is stored on memory 20 As repeat element segmentation procedure 40, which can be performed by processor 10, to realize this Shen It please middle image repeat element dividing method.
The processor 10 can be in some embodiments a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chips, for running the program code stored in the memory 20 or processing number According to, such as execute described image repeat element dividing method etc..
The display 30 can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display in some embodiments And OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..The display 30 is used In the information for being shown in the smart machine and for showing visual user interface.The component 10- of the smart machine 30 are in communication with each other by system bus.
In one embodiment, the realization when processor 10 executes image repeat element segmentation procedure 40 in the memory 20 Following steps:
Image is read in, pretreatment grouping is carried out to image by linear iteraction cluster, formed has between adjacent pixels The block of pixels of similar grain, color and brightness;
After image forms super-pixel, generate foreground area, during cluster, according to cover the color of super-pixel away from The distance of the path center inputted from, space length and super-pixel to user carries out super-pixel merging, forms connected region;
Cluster result is diffused into from top to bottom in each super-pixel, different weight letters is distributed for each cluster result Breath, obtains the matching error i.e. prospect probability of each super-pixel;
It is inputted prospect super-pixel colouring information as data, using the color similarity between super-pixel as similar square Battle array filters out the data that can become representative sample in all samples by way of continuous iteration.
The present invention also provides a kind of storage mediums, wherein and the storage medium is stored with image repeat element segmentation procedure, Described image repeat element segmentation procedure realizes the step of image repeat element dividing method as described above when being executed by processor Suddenly.
In conclusion the present invention provides a kind of image repeat element dividing method, smart machine and storage medium, the side Method includes: reading image, carries out pretreatment grouping to image by linear iteraction cluster, formed has phase between adjacent pixels Like texture, the block of pixels of color and brightness;After image forms super-pixel, foreground area is generated, during cluster, according to The distance for the path center that the color distance of super-pixel, space length and super-pixel are inputted to user is covered to carry out super picture Element merges, and forms connected region;Cluster result is diffused into from top to bottom in each super-pixel, not for the distribution of each cluster result Same weight information, obtains the matching error i.e. prospect probability of each super-pixel;Using prospect super-pixel colouring information as data Input, using the color similarity between super-pixel as similar matrix, is filtered out in all samples by way of continuous iteration The data of representative sample can be become.The present invention goes out the repeat element in image by simply interactive Fast Segmentation, gives one Width includes the color image of repeat element, and it is desired to be therefrom partitioned into rapidly user for the simple rough dragging brush of user Repeat element.
Certainly, those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, It is that related hardware (such as processor, controller etc.) can be instructed to complete by computer program, the program can store In a computer-readable storage medium, described program may include the process such as above-mentioned each method embodiment when being executed. Wherein the storage medium can be memory, magnetic disk, CD etc..
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention Protect range.

Claims (10)

1. a kind of image repeat element dividing method, which is characterized in that described image repeat element dividing method includes:
Image is read in, pretreatment grouping is carried out to image by linear iteraction cluster, is formed between adjacent pixels with similar The block of pixels of texture, color and brightness;
After image forms super-pixel, foreground area is generated, during cluster, according to the color distance for covering super-pixel, The distance for the path center that space length and super-pixel are inputted to user carries out super-pixel merging, forms connected region;
Cluster result is diffused into from top to bottom in each super-pixel, different weight informations is distributed for each cluster result, obtains To matching error, that is, prospect probability of each super-pixel;
It inputs prospect super-pixel colouring information as data, using the color similarity between super-pixel as similar matrix, leads to The mode for crossing continuous iteration filters out the data that can become representative sample in all samples.
2. image repeat element dividing method according to claim 1, which is characterized in that the reading image, by line Property iteration cluster pretreatment grouping is carried out to image, formed has similar grain between adjacent pixels, color and brightness The step of block of pixels, comprising:
The spatial position feature and color characteristic of each pixel are combined, formed one five dimension feature vector Fk lk, ak, bk, xk,yk};
Wherein l, a, b attribute respectively correspond value of the pixel on the space LAB, and x, y represent the coordinate position of pixel in the picture, K indicates each pixel;
Randomly choose N number of seed point, N is determined by the size or number of super-pixel, within the specified range search and seed point away from From immediate pixel, the distance is the similarity distance D between pixel:
Wherein, dsAnd dcIt respectively represents the space length between pixel and the color distance on the space CIELAB is poor, with m and s Coordinate the relationship between the two attributes;Parameter s is got by the maximum probable value calculating in the space XY, and parameter m represents the space LAB The maximum value possible of upper distance;
The distance is determined by the feature of pixel;
Similar pixel is classified as one kind, finds corresponding classification for each pixel in image, then to each class in The average cluster center looked for novelty of all pixels point, iteration obtains new N number of super-pixel until convergence again.
3. image repeat element dividing method according to claim 2, which is characterized in that the m value range be [1, 40]。
4. image repeat element dividing method according to claim 2, which is characterized in that described image forms super-pixel Afterwards, foreground area is generated, during cluster, according to the color distance for covering super-pixel, space length and super-pixel The distance of the path center inputted to user is come the step of carrying out super-pixel merging, form connected region, comprising:
By all super-pixel bottom-up mergings, until all super-pixel are all classified as one kind, merging regulation compliance most low coverage Merge from preferential;
The minimum distance refers to covering the path that the color distance of super-pixel, space length and super-pixel are inputted to user The distance at center;
Since each super-pixel of the bottom, selects immediate two super-pixel of similarity to polymerize cluster, calculate two clusters Similarity:
GI, j=dc·σ(dP)·σ(ds);
Wherein, GI, jFor measuring the similarity between two clusters, the distance between two clusters, d are representedcIt is in RGB color Euclidean distance, dPIndicate the distance of two clusters spatially, the central point distance being defined as between two clusters, dsThen generation Average distance of two clusters of table to brush.
5. image repeat element dividing method according to claim 4, which is characterized in that width of the control super-pixel in brush There is more Gao Quanchong, by d in degreesValue replaces with ds/wi, wiIt is brush width, σ () refers to Sigmoid function, for limiting The space length of cluster is to overall influence;
If dPAnd dsTend to positive infinity, then the value of σ () mapping tends to 1.
6. image repeat element dividing method according to claim 5, which is characterized in that from the angle of spatial distribution and distance Degree analyzes the matching degree of each cluster and brush region:
R=β (μp→ss→p)+(1-β)(σp→ss→p);
Wherein, μp→sAnd μs→pIndicate measurement brush and the matching degree of each cluster in position, σp→sAnd σs→pIndicate each cluster with Matching capacity of the brush in distribution introduces β parameter to balance both abilities;μs→pIndicate the pen in from sampled point to candidate The average minimum distance of brush, μs→pIndicate average minimum distance of the brush to sampled point from candidate, σp→sIt indicates from sampled point To the standard deviation of the minimum distance of brush, σs→pIndicate the standard deviation of the minimum distance from brush to sampled point, the value of β It is 0.5.
7. image repeat element dividing method according to claim 6, which is characterized in that it is described by cluster result from upper and Under be diffused into each super-pixel, distribute different weight informations for each cluster result, the matching for obtaining each super-pixel misses The step of difference is prospect probability, comprising:
Basis based on super-pixel segmentation, the point of some fixed quantities of uniform sampling, which is used as, from each super-pixel represents, and new group At cluster just by it, internal all sampled points for being included are constituted;
By all super-pixel score normalizations to [0,255], score is close to 255 just closer to prospect;
Calculate the prospect expressive force of the super-pixel in each cluster:
There are super-pixel in merging process gradually with background area merger, and matching error is gradually increased;
In merging process there are super-pixel gradually with foreground area merger, matching error present reduction trend;
Wherein, RiThe prospect reference value of i-th of cluster, wikRefer to the weight of i-th of cluster comprising k-th of super-pixel, weight value For the sum of all pixels of i-th of cluster, the value of n is not fixed for each super-pixel;By all super-pixel expressive force score normalizings It turns to [0,255], and close to 255 score close to prospect, and 0 close to background.
8. image repeat element dividing method according to claim 7, which is characterized in that described by prospect super-pixel color Information is inputted as data, using the color similarity between super-pixel as similar matrix, is screened by way of continuous iteration Can include: as the step of data of representative sample in all samples out
The sample point for being best able to represent itself is found from all data, it is measured by Attraction Degree information and degree of membership information Between matching degree, and at the same time selecting representative sample;
The Attraction Degree information r (i, k) and degree of membership information a (i, k) between each sample are iterated to calculate each time, and calculation formula is such as Under:
Wherein, i indicates that sample, i ' indicate that other samples, k indicate candidate samples center, and k ' indicates other candidate samples centers, s (i, k) and s (i, k ') indicate the similarity matrix at different candidate samples centers, and r (k, k) reflection is that node k has and is not suitable for more Other cluster centres are divided into, r (i ', k) indicates the value other than r (i, k) and r (k, k), represents node k to other sections The Attraction Degree of point;
After calculating by each round, damped coefficient is added, by result and last result linear combination each time, substitution For the new value of information.
9. a kind of smart machine, which is characterized in that the smart machine includes: memory, processor and is stored in the storage On device and the image repeat element segmentation procedure that can run on the processor, described image repeat element segmentation procedure is by institute State the step of image repeat element dividing methods as described in any item such as claim 1-8 are realized when processor executes.
10. a kind of storage medium, which is characterized in that the storage medium is stored with image repeat element segmentation procedure, the figure It is realized when being executed by processor as repeat element segmentation procedure such as the described in any item image repeat element segmentations of claim 1-8 The step of method.
CN201910313823.2A 2019-04-18 2019-04-18 Image repetitive element segmentation method, intelligent device and storage medium Active CN110163869B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910313823.2A CN110163869B (en) 2019-04-18 2019-04-18 Image repetitive element segmentation method, intelligent device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910313823.2A CN110163869B (en) 2019-04-18 2019-04-18 Image repetitive element segmentation method, intelligent device and storage medium

Publications (2)

Publication Number Publication Date
CN110163869A true CN110163869A (en) 2019-08-23
CN110163869B CN110163869B (en) 2023-01-03

Family

ID=67639603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910313823.2A Active CN110163869B (en) 2019-04-18 2019-04-18 Image repetitive element segmentation method, intelligent device and storage medium

Country Status (1)

Country Link
CN (1) CN110163869B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110675431A (en) * 2019-10-08 2020-01-10 中国人民解放军军事科学院国防科技创新研究院 Three-dimensional multi-target tracking method fusing image and laser point cloud
CN110853077A (en) * 2019-10-17 2020-02-28 广西电网有限责任公司电力科学研究院 Self-adaptive infrared dynamic frame feature extraction method based on morphological change estimation
CN116090163A (en) * 2022-11-14 2023-05-09 深圳大学 Mosaic tile color selection method and related equipment
CN117892231A (en) * 2024-03-18 2024-04-16 天津戎军航空科技发展有限公司 Intelligent management method for production data of carbon fiber magazine

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120275703A1 (en) * 2011-04-27 2012-11-01 Xutao Lv Superpixel segmentation methods and systems
CN105118049A (en) * 2015-07-22 2015-12-02 东南大学 Image segmentation method based on super pixel clustering
CN106981068A (en) * 2017-04-05 2017-07-25 重庆理工大学 A kind of interactive image segmentation method of joint pixel pait and super-pixel
US20170243345A1 (en) * 2016-02-19 2017-08-24 International Business Machines Corporation Structure-preserving composite model for skin lesion segmentation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120275703A1 (en) * 2011-04-27 2012-11-01 Xutao Lv Superpixel segmentation methods and systems
CN105118049A (en) * 2015-07-22 2015-12-02 东南大学 Image segmentation method based on super pixel clustering
US20170243345A1 (en) * 2016-02-19 2017-08-24 International Business Machines Corporation Structure-preserving composite model for skin lesion segmentation
CN106981068A (en) * 2017-04-05 2017-07-25 重庆理工大学 A kind of interactive image segmentation method of joint pixel pait and super-pixel

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
何豪杰: "具有重复场景元素的复杂自然图像颜色编辑", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
於敏等: "基于相似性和统计性的超像素的图像分割", 《计算机工程与应用》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110675431A (en) * 2019-10-08 2020-01-10 中国人民解放军军事科学院国防科技创新研究院 Three-dimensional multi-target tracking method fusing image and laser point cloud
CN110853077A (en) * 2019-10-17 2020-02-28 广西电网有限责任公司电力科学研究院 Self-adaptive infrared dynamic frame feature extraction method based on morphological change estimation
CN116090163A (en) * 2022-11-14 2023-05-09 深圳大学 Mosaic tile color selection method and related equipment
CN116090163B (en) * 2022-11-14 2023-09-22 深圳大学 Mosaic tile color selection method and related equipment
CN117892231A (en) * 2024-03-18 2024-04-16 天津戎军航空科技发展有限公司 Intelligent management method for production data of carbon fiber magazine
CN117892231B (en) * 2024-03-18 2024-05-28 天津戎军航空科技发展有限公司 Intelligent management method for production data of carbon fiber magazine

Also Published As

Publication number Publication date
CN110163869B (en) 2023-01-03

Similar Documents

Publication Publication Date Title
Shetty et al. Not Using the Car to See the Sidewalk--Quantifying and Controlling the Effects of Context in Classification and Segmentation
CN110163869A (en) A kind of image repeat element dividing method, smart machine and storage medium
Valentin et al. Semanticpaint: Interactive 3d labeling and learning at your fingertips
Zhang et al. A multilevel point-cluster-based discriminative feature for ALS point cloud classification
Tan et al. Color image segmentation using histogram thresholding–Fuzzy C-means hybrid approach
Grilli et al. Application of machine and deep learning strategies for the classification of heritage point clouds
CN102073748B (en) Visual keyword based remote sensing image semantic searching method
CN104200240B (en) A kind of Sketch Searching method based on content-adaptive Hash coding
CN103577475B (en) A kind of picture mechanized classification method, image processing method and its device
Zhang et al. Detecting densely distributed graph patterns for fine-grained image categorization
Poux et al. Unsupervised segmentation of indoor 3D point cloud: Application to object-based classification
CN106096542B (en) Image video scene recognition method based on distance prediction information
Behrisch et al. Magnostics: Image-based search of interesting matrix views for guided network exploration
Lalitha et al. A survey on image segmentation through clustering algorithm
CN108764138A (en) A kind of highlands cloud snow sorting technique cascading forest based on the more granularities of multidimensional
CN106228554A (en) Fuzzy coarse central coal dust image partition methods based on many attribute reductions
CN110348478B (en) Method for extracting trees in outdoor point cloud scene based on shape classification and combination
Liu et al. Novel features for art movement classification of portrait paintings
CN101339556B (en) Method for implementing image color similarity contrast by taper cone coordinate
CN110737805A (en) Method and device for processing graph model data and terminal equipment
Prokott et al. Gloss perception: Searching for a deep neural network that behaves like humans
Hao et al. Structure-based object detection from scene point clouds
Andreetto et al. Unsupervised learning of categorical segments in image collections
Song et al. Abstract art by shape classification
Sun et al. Automatic building age prediction from street view images

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