WO2017206400A1 - 图像处理方法、装置及电子设备 - Google Patents
图像处理方法、装置及电子设备 Download PDFInfo
- Publication number
- WO2017206400A1 WO2017206400A1 PCT/CN2016/100435 CN2016100435W WO2017206400A1 WO 2017206400 A1 WO2017206400 A1 WO 2017206400A1 CN 2016100435 W CN2016100435 W CN 2016100435W WO 2017206400 A1 WO2017206400 A1 WO 2017206400A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- pixel
- category
- probability
- target image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/14—Transformations for image registration, e.g. adjusting or mapping for alignment of images
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Definitions
- the present application relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, and electronic device.
- Smart terminals such as smart phones, tablets, etc.
- Intelligent terminals Because of its convenient carrying and humanized operation, it is very popular among users.
- Intelligent terminals often contain many images, some are taken by users themselves, and some images are downloaded from the network. With the development of shooting technology and the increase of intelligent terminal users, more and more image processing functions are provided, which has become an urgent need of intelligent terminal users.
- the image processing functions provided by the smart terminals in the prior art are mostly limited to changing the color of the image, or providing a simple puzzle function (for example, splicing two images onto the same canvas).
- other image processing functions (such as the map function) cannot be provided. Therefore, in the prior art, the image processing function provided by the smart terminal is single.
- the embodiments of the present invention provide an image processing method, an apparatus, and an electronic device, which are used to solve the problem that the image processing function provided by the smart terminal is single.
- an embodiment of the present application provides an image processing method, where the method includes:
- the trajectory is a pixel in the second preset range of the reference to form a second set of pixel points; and according to the second set of pixel points, constructing a background model for calculating a probability that the pixel point in the specified image belongs to the background image;
- the image is segmented based on the determined probability of belonging to the target image and the probability of belonging to the background image, and the target image is obtained.
- an embodiment of the present application provides an image processing apparatus, where the apparatus includes:
- a first processing module configured to acquire a first operation trajectory of a first operation for selecting a pixel point of the target image; and acquire a pixel point in the first preset range based on the first operation trajectory to form a first pixel a set of points; constructing, according to the first set of pixel points, a foreground model for calculating a probability that a pixel point in the specified image belongs to the target image;
- a second processing module acquiring a second operation trajectory for selecting a second operation of the background image; and acquiring pixel points in the second preset range based on the second operation trajectory to form a second pixel point set; a set of two pixel points, constructing a background model for calculating a probability that a pixel point in the specified image belongs to the background image;
- a classification module configured to determine, according to the foreground model and the background model, a probability that each pixel in the specified image belongs to the target image, and a probability of belonging to the background image;
- the segmentation module is configured to perform image segmentation according to the determined probability of belonging to the target image and the probability of belonging to the background image, to obtain the target image.
- the embodiment of the present application further provides a non-volatile computer storage medium storing computer-executable instructions for performing the image processing method of any of the above-mentioned embodiments of the present application.
- an embodiment of the present application further provides an electronic device, including: at least one processor; and a memory; wherein the memory stores a program executable by the at least one processor, where the instruction is The at least one processor executes to enable the at least one processor to perform the image processing method of any of the above-described embodiments of the present application.
- the embodiment of the present application further provides a computer program product, where the computer program product comprises a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, wherein When the program instructions are executed by a computer, the computer is caused to perform any of the above image processing methods of the present application.
- the smart terminal acquires a first operation trajectory of the first operation for selecting a pixel point of the target image, and acquires a pixel point in the first preset range based on the first operation trajectory to form a first a set of pixel points; constructing, according to the first set of pixel points, a foreground model for calculating a probability that a pixel point in the specified image belongs to the target image; and acquiring a second operation track for selecting a second operation of the background image; and acquiring Pixels in a second preset range based on the second operation trajectory constitute a second set of pixel points; and according to the second set of pixel points, construct a background model for calculating a probability that the pixel points in the specified image belong to the background image Determining, according to the foreground model and the background model, the probability that each pixel in the specified image belongs to the target image, and the probability of belonging to the background image; and performing image segmentation according to the determined probability of belonging to the target image and the probability of
- the user specifies a pixel point representing the target image by performing the first operation, and performs a second operation to specify a pixel point representing the background image, and then the smart terminal can according to the pixel point of the representative target image specified by the user.
- the pixel representing the background image is analyzed to establish a foreground model and a background model, thereby determining a pixel point included in the target image in the specified image and a pixel point included in the background image, thereby segmenting the target image from the specified image, thereby realizing
- the map function solves the problem that the image processing function in the smart terminal in the prior art is single.
- FIG. 1 is a schematic flowchart of an image processing method in Embodiment 1 of the present application.
- FIG. 2 is a schematic view showing an apparent boundary after image fusion in the first embodiment of the present application
- FIG. 3 is a schematic diagram of boundary smoothing after image fusion in Embodiment 1 of the present application.
- FIG. 4 is a schematic flowchart of an image processing method in Embodiment 2 of the present application.
- FIG. 5 is a schematic diagram of a specified image and an operation track of an image processing method according to Embodiment 2 of the present application;
- FIG. 6 is a schematic diagram of a pre-selected image in the second embodiment of the present application.
- FIG. 8 is a schematic structural diagram of an image processing apparatus according to Embodiment 3 of the present application.
- FIG. 9 is a schematic diagram showing the hardware structure of an apparatus for performing an image processing method according to Embodiment 5 of the present application.
- the smart terminal is configured to provide an automatic mapping function. Specifically, the smart terminal acquires a first operation trajectory of the first operation for selecting a pixel point of the target image, and acquires the first operation trajectory as a reference. Pixels in the first preset range constitute a first set of pixel points; according to the first set of pixel points, constructing a foreground model for calculating a probability that the pixel points in the specified image belong to the target image; and acquiring the background for selecting the background a second operation trajectory of the second operation of the image; and acquiring pixel points in the second preset range based on the second operation trajectory to form a second pixel point set; and constructing the calculation designation according to the second pixel point set a background model in which the pixel points in the image belong to the probability of the background image; according to the foreground model and the background model, determining a probability that each pixel in the specified image belongs to the target image, and a probability belonging to the background image; according to the determined target image
- the user specifies a pixel point representing the target image by performing the first operation, and performs a second operation to specify a pixel point representing the background image, and then the smart terminal can according to the pixel point of the representative target image specified by the user.
- the pixel representing the background image is analyzed to establish a foreground model and a background model, thereby determining a pixel point included in the target image in the specified image and a pixel point included in the background image, thereby segmenting the target image from the specified image, thereby realizing
- the map function solves the problem that the image processing function in the smart terminal in the prior art is single.
- the embodiment of the present application can also fuse the target image obtained by the map into another image, thereby further increasing the image processing function of the smart terminal.
- FIG. 1 it is a schematic flowchart of an image processing method provided by an embodiment of the present application.
- the law includes:
- Step 101 Acquire a first operation trajectory of a first operation for selecting a pixel point of the target image, and acquire a pixel point in a first preset range based on the first operation trajectory to form a first pixel point set;
- the first set of pixel points constructs a foreground model for calculating a probability that a pixel point in the specified image belongs to the target image.
- the first preset range is, for example, a preset neighborhood of points on the first operation track, and the preset neighborhood is, for example, 4 neighborhoods, 8 neighborhoods, and the like.
- the second preset range is, for example, a preset neighborhood of points on the second operational trajectory.
- the first preset range may further be that the first operation track is a reference, and the first operation track is expanded by a preset number of pixels.
- the enlarged first operation trajectory obtained by boldly expanding the first operation trajectory by 5-10 pixels is the first preset range.
- the second preset range is processed in the same manner, and details are not described herein again.
- the first preset range and the second preset range may be the same or different.
- the smart terminal may perform step 101 after acquiring the map command indicating that the map is performed.
- Obtaining a map instruction indicating that the map is performed specifically including any one of the following methods:
- a preset operation for a specified image is detected, for example, drawing a preset graphic on a specified image, or moving the specified image up or down, and the like.
- the specific preset operation can be set according to actual needs, which is not limited in this application.
- Method 2 The selection operation of the setting map function key is detected. Specifically, when the smart terminal displays the specified image, the map function key can be simultaneously displayed, so that the user can select the function key to determine the user to perform the map operation. .
- the method of the present invention is not limited as long as the first operation and the second operation are detected.
- Step 102 Acquire a second operation track for selecting a second operation of the background image, and acquire pixel points in a second preset range based on the second operation track to form a second pixel point set; according to the second pixel A point set that constructs a background model for calculating the probability that a pixel in a specified image belongs to a background image.
- step 101 and step 102 is not limited.
- Step 103 Determine, according to the foreground model and the background model, each pixel in the specified image belongs to The probability of the target image and the probability of belonging to the background image.
- Step 104 Perform image segmentation according to the determined probability of belonging to the target image and the probability of belonging to the background image, and obtain the target image.
- whether a pixel point belongs to the target image may be determined according to one or a combination of the following methods:
- the pixel is regarded as a pixel belonging to the target image.
- the combination of the method 1) and the method 2) is 1). For any pixel point, if the probability that the pixel belongs to the target image is greater than the probability of belonging to the background image, And the probability that the pixel belongs to the target image is greater than the preset probability, and the pixel is regarded as a pixel belonging to the target image.
- the method of the combination may be set according to the actual situation, which is in the protection scope of the embodiment of the present application, which is not limited in this application.
- those points may be determined to belong to the target image according to actual needs, and the embodiment of the present application does not limit this.
- a foreground model for calculating a probability that a pixel point in the specified image belongs to the target image is constructed according to the first set of pixel points, and specifically includes:
- Step A1 Perform cluster analysis according to color values of each pixel in the first pixel set to obtain at least one first category.
- the pixel points whose color difference is smaller than the preset color difference may be classified into one class, or the first pixel point set may be divided into the first category of the preset number.
- the clustering analysis method can also be determined according to the prior art, which is not limited in this application.
- Step A2 For each first category, obtain a first weight corresponding to the first category, and determine a first Gaussian distribution model according to a color value of each pixel in the first category.
- the first weight may be determined according to one of the following methods:
- Method 1 the ratio of the number of pixels included in the first category to the number of pixel points in the first set of pixel points is taken as the first weight corresponding to the first category.
- the first category A corresponds to a first weight of 0.1 (ie, 10/100).
- Method 2 calculating an average color difference including pixel points in each first category, and calculating a sum value of average color differences of all the first categories; for each first category, subtracting the sum value from the average of the first category The color difference is obtained as a difference, and the ratio of the difference to the sum value is taken as the first weight corresponding to the first category.
- a total of three first categories are obtained, which are numbered as category 1, category 2, and category 3.
- the average color difference of the pixel points included in category 1 is a
- the average color difference of the pixel points included in category 2 is b
- the average color difference of the pixel points included in category 3 is c
- the sum value is (a+b+c) (denoted as H)
- the corresponding first weight is (Ha) / H.
- its corresponding first weight is (H-b)/H
- for category 3 its corresponding first weight is (H-c)/H.
- the first weight corresponding to each first category (that is, the weight corresponding to each Gaussian distribution model) may be set according to other methods in the prior art, which is not limited in this embodiment of the present application.
- the Gaussian distribution model is determined, that is, the mean and variance of the Gaussian distribution are determined.
- the maximum likelihood estimation method may be used to determine the mean and variance of the Gaussian distribution model, and may also be determined according to the prior art method. This application does not limit this.
- Step A3 Determine the foreground model by weighted summation according to the determined first Gaussian distribution models and the acquired first weights.
- f represents a foreground model
- i represents an i-th first category
- ⁇ represents a first weight corresponding to the i-th first category
- the background model is constructed according to the same method. Specifically, the background model for calculating the probability that the pixel points in the specified image belong to the background image is constructed in step 102, and specifically includes the following steps:
- Step B1 Perform cluster analysis according to color values of each pixel in the second pixel set to obtain at least one second category.
- Step B2 For each second category, obtain a second weight corresponding to the second category, and determine a second Gaussian distribution model according to the color value of each pixel in the second category.
- the ratio of the number of pixels included in the second category to the number of pixels in the second set of pixels is used as the second weight corresponding to the second category.
- the second weight can also be determined by reference to the method in method step A1 above.
- Step B3 Determine the background model by weighted summation according to the determined second Gaussian distribution models and the acquired second weights.
- Step A1 to Step A3 For details, refer to Step A1 to Step A3 above for the description of each step, and details are not described herein again.
- the foreground model and the background model are determined by constructing a method including multiple Gaussian distribution models, and the foreground model and the background model obtained are not only applicable to images with a single color distribution (for example, only included)
- the image of the ocean and the sun) is also suitable for images with complex color distributions (for example, images of flowers and plants with many different colors and shapes). Therefore, the foreground model and the background model determined by constructing multiple Gaussian distribution models can better analyze which pixel points belong to the target image and which pixel points belong to the background image, thereby improving the accuracy of determining the target image.
- the foreground model and the background model may also be determined by using a prior art modeling method, which is not limited in this application.
- the target image is determined only according to the foreground model and the background model, since the foreground model and the background model give only one probability, the probability that some pixels belong to the target image and the probability of belonging to the background image Similar. At this time, it is easy to cause a misjudation whether the pixels belong to the target image or the background image, thereby causing the target image obtained by the image segmentation to be inaccurate only based on the determined pixel points belonging to the target image and the pixel points belonging to the background image.
- the step 104 (ie, the image segmentation is performed according to the determined probability of belonging to the target image and the probability of belonging to the background image to obtain the target image) may specifically include the following steps:
- Step C1 treating each pixel in the specified image as a vertex of the graph; and connecting pixels adjacent to each other in the specified image to form one side of the graph, and two pixels on the edge of the strip The color similarity is used as the weight corresponding to the edge of the strip.
- the color similarity can be calculated according to the following methods:
- the chromatic aberration of two pixel points is calculated, and the result obtained by subtracting the chromatic aberration from 100 and dividing by 100 is used as the color similarity.
- the color difference is 60
- 40 is subtracted from 100 to obtain 40
- 40 is divided by 100 to obtain 0.4
- the weight of the side is 0.4.
- other values may be used without using 100 in the specific implementation, which is not limited in this application.
- the color similarity is used to indicate the degree of similarity of the colors of the two pixels.
- the color similarity can be calculated by other methods, which is not limited in this application.
- Step C2 connecting, for each pixel point on the first operation track or a pixel point in the first preset range in which the first operation track is the reference, the pixel point and the designated source point to form an edge of the figure; And, the probability that the pixel belongs to the target image is used as the weight corresponding to the edge.
- Step C3 connecting, for each pixel point on the second operation track or a pixel point in the second preset range in which the second operation track is the reference, the pixel point to the designated end point to form an edge of the figure; And, the probability that the pixel belongs to the background image is used as the weight corresponding to the edge.
- step C1 - step C3 The execution order of step C1 - step C3 is not limited.
- Step C4 Determine the minimum cut of the graphic according to the maximum flow minimum cut algorithm and the weights corresponding to the sides.
- each path includes multiple edges. If some edges in the figure are removed, the specified source point and the specified end point are not connected. The set of these removed edges is called cut (that is, each cut includes at least one edge), and the minimum cut is the smallest cut of all cut weights.
- Step C6 The edge corresponding to the minimum cut is used as a boundary line between the target image and the background image, and the target image is segmented from the specified image.
- the boundary formed by the edge corresponding to the minimum cut is used as the boundary line between the target image and the background image, and the accuracy of determining the target image can be further improved, so that the target image obtained by the map is more accurate.
- the target image may be merged into the pre-selected image according to the image fusion algorithm. For example, if the target image obtained by the map is the sun, the sun can be fused into the image obtained by capturing the ocean to form an image including the ocean and the sun.
- the target image is fused to the pre-selected image, and sometimes the boundary between the target image and the pre-selected image is more obvious, and the human eye can recognize, It is unnatural to give people a feeling of fusion.
- the target image obtained by the map is the sun, and the sun is merged into the right image in FIG. 2, and there is a clear boundary between the sun and the background, resulting in poor fusion effect.
- image fusion in order to improve the image quality of the image obtained after the fusion, and to smoothly transition between the image obtained by the mapping and the pre-selected image, image fusion may be performed by using any of the following image fusion algorithms: Poisson fusion, random walk fusion, Bayesian fusion, etc.
- Fig. 3 the image obtained by Poisson fusion in Fig. 2 is shown in Fig. 3. It can be seen from Fig. 3 that in the final fusion image, the image transitions smoothly between the target image and the background, and the image appears natural. .
- the smart terminal can provide a map function, which enriches the image processing function of the smart terminal.
- the target image can be merged into another image after the target image is obtained, and the image fusion is realized, so that the image processing function provided by the smart terminal is more abundant.
- the first operation is a drawing curve
- the second operation is also an example of drawing a curve
- the image processing method provided by the embodiment of the present application is further described. Specifically, as shown in FIG. 4, the method includes the following steps:
- Step 401 After acquiring the mapping instruction indicating that the virtual drawing is performed, the smart phone acquires a first operation trajectory of the first operation for selecting a pixel point of the target image; and acquires a second operation for selecting the second operation of the background image. Operation track.
- FIG. 5 shows a specified image
- the polygon in FIG. 5 is a target image
- the user can draw a first curve (such as 501) in the polygon, and the track of the curve is the first operation track.
- the user can draw a second curve and a third curve (such as 502) in the background image, and the track of the two curves is the second operation track.
- Step 402 Acquire a pixel point in a first preset range based on the first operation trajectory to form a first pixel point set; and acquire a pixel point in a second preset range based on the second operation trajectory. Forming a second set of pixel points.
- Step 403 Perform cluster analysis according to the color value of each pixel in the first pixel set to obtain at least one first category. For each first category, obtain a first weight corresponding to the first category, and according to the first weight The color value of each pixel in the first category determines the first Gaussian distribution model; According to the determined first Gaussian distribution models and the obtained first weights, the foreground model is determined by weighted summation.
- Step 404 Perform cluster analysis according to the color value of each pixel in the second pixel set to obtain at least one second category. For each second category, obtain a second weight corresponding to the second category, and according to the second weight The color value of each pixel in the second category determines a second Gaussian distribution model; and the background model is determined by weighted summation according to the determined second Gaussian distribution models and the acquired second weights.
- step 403 and step 404 are not limited.
- Step 405 Determine, according to the foreground model and the background model, a probability that each pixel in the specified image belongs to the target image, and a probability of belonging to the background image.
- Step 406 Treat each pixel in the specified image as one vertex of the graph; and connect the pixels adjacent to each other in the specified image to form one edge of the graph, and place two pixels on the edge of the graph.
- the color similarity is used as the weight corresponding to the edge of the strip.
- Step 407 Connect, for each pixel point on the first operation track or a pixel point in the first preset range in which the first operation track is referenced, the pixel point and the designated source point to form an edge of the figure; And, the probability that the pixel belongs to the target image is used as the weight corresponding to the edge.
- Step 408 Connect, for each pixel point on the second operation track or a pixel point in the second preset range in which the second operation track is the reference, the pixel point to the designated end point to form an edge of the figure; And, the probability that the pixel belongs to the background image is used as the weight corresponding to the edge.
- step 406, step 407 and step 408 is not limited.
- Step 409 Determine the minimum cut of the graph according to the maximum flow minimum cut algorithm and the weights corresponding to the sides.
- Step 410 The edge corresponding to the minimum cut is used as a boundary line between the target image and the background image, and the target image is segmented from the specified image.
- Step 411 fused the target image into the pre-selected image according to the image fusion algorithm.
- the target image may be fused to a preset location in the pre-selected image.
- the polygon obtained from Fig. 5 is fused to the circle in Fig. 6 to obtain the image shown in Fig. 7.
- the smart phone can provide a function of mapping and merging images, and expands the image processing function of the smart phone. Easy to use to process images according to your preferences.
- the embodiment of the present application further provides an image processing apparatus.
- the apparatus includes:
- a first processing module 801 configured to acquire a first operation trajectory of a first operation for selecting a pixel point of the target image, and acquire a pixel point in a first preset range based on the first operation trajectory to form a first a set of pixel points; constructing, according to the first set of pixel points, a foreground model for calculating a probability that a pixel point in the specified image belongs to the target image;
- the second processing module 802 is configured to acquire a second operation trajectory for selecting a second operation of the background image, and acquire pixel points in the second preset range based on the second operation trajectory to form a second pixel point set; a second set of pixel points, constructing a background model for calculating a probability that a pixel point in the specified image belongs to the background image;
- a classification module 803 configured to determine, according to the foreground model and the background model, a probability that each pixel in the specified image belongs to the target image, and a probability of belonging to the background image;
- the segmentation module 804 is configured to perform image segmentation according to the determined probability of belonging to the target image and the probability of belonging to the background image, to obtain the target image.
- the first processing module specifically includes:
- a first clustering unit configured to perform cluster analysis according to color values of each pixel point in the first pixel point set, to acquire at least one first category
- a first Gaussian model determining unit configured to acquire, for each first category, a first weight corresponding to the first category, and determine a first Gaussian distribution model according to a color value of each pixel in the first category;
- a foreground model determining unit configured to determine a foreground model by weighted summation according to each of the determined first Gaussian distribution models and each of the obtained first weight values
- the second processing module specifically includes:
- a second clustering unit configured to perform cluster analysis according to color values of each pixel point in the second pixel point set, to acquire at least one second category
- a second Gaussian model determining unit for each second category, acquiring a second weight corresponding to the second category, and determining a second Gaussian distribution model according to a color value of each pixel in the second category;
- the background model determining unit is configured to determine the background model by weighted summation according to the determined second Gaussian distribution models and the acquired second weights.
- the first Gaussian model determining unit is specifically configured to: use, as the first category, a ratio of the number of pixels included in the first category to the number of pixels in the first set of pixel points. Corresponding first weight;
- the second Gaussian model determining unit is specifically configured to: use a ratio of the number of the pixels included in the second category to the number of the pixels in the second set of pixels as the second weight corresponding to the second category.
- the segmentation module specifically includes:
- a first side determining unit configured to treat each pixel in the specified image as one vertex of the graph; and connect the pixels adjacent to each other in the specified image to form an edge of the graph, and the edge of the strip The color similarity of two pixels is used as the weight corresponding to the edge;
- a second side determining unit configured to connect the pixel point to the specified source point for each pixel point on the first operation track or a pixel point within the first preset range in which the first operation track is referenced An edge of the graph; and the probability that the pixel belongs to the target image is the weight corresponding to the edge of the strip;
- a third side determining unit configured to connect the pixel point to the specified end point for each pixel point on the second operation track or the second preset range in the second operation track as a reference An edge of the graph; and the probability that the pixel belongs to the background image is the weight corresponding to the edge of the strip;
- a minimum cut determining unit configured to determine a minimum cut of the graph according to a maximum flow minimum cut algorithm and a weight corresponding to each edge;
- the dividing unit is configured to divide the edge corresponding to the minimum cut as a boundary line between the target image and the background image, and segment the target image from the specified image.
- the device further comprises:
- the fusion module is configured to perform image segmentation according to the determined probability of belonging to the target image and the probability of belonging to the background image, and after obtaining the target image, the target image is merged into the pre-selected image according to the image fusion algorithm.
- the image fusion algorithm comprises any one of the following: Poisson fusion, random walk fusion, Bayesian fusion.
- the image processing apparatus provided by the present application provides a map function and enriches the image processing function.
- Embodiment 4 of the present application provides a non-volatile computer storage medium storing computer-executable instructions, which can execute the image processing method in any of the foregoing method embodiments.
- the non-volatile computer storage medium provided by the embodiment of the present application stores computer executable instructions, and the computer executable instructions are set as:
- the image is segmented based on the determined probability of belonging to the target image and the probability of belonging to the background image, and the target image is obtained.
- embodiments of the present application provide a non-volatile computer storage medium, wherein, according to a first set of pixel points, a foreground model for calculating a probability that a pixel point in a specified image belongs to a target image is constructed, Specifically include:
- Constructing a background model for calculating a probability that a pixel in a specified image belongs to a background image specifically comprising:
- the background model is determined by weighted summation according to the determined second Gaussian distribution models and the acquired second weights.
- the embodiment of the present application provides a non-volatile computer storage medium, where the first weight corresponding to the first category is obtained for each first category, which specifically includes:
- the ratio of the number of pixels included in the second category to the number of pixels in the second set of pixels is used as the second weight corresponding to the second category.
- the embodiment of the present application provides a non-volatile computer storage medium, wherein image segmentation is performed according to the determined probability of belonging to the target image and the probability of belonging to the background image, and the target image is obtained, specifically including :
- the pixel point For each pixel point on the first operation track or a pixel point within the first preset range in which the first operation track is referenced, the pixel point is connected with the specified source point to form an edge of the figure; and The probability that the pixel belongs to the target image is the weight corresponding to the edge of the strip;
- the pixel point For each pixel point on the second operation track or a pixel point in the second preset range in which the second operation track is referenced, the pixel point is connected to the specified end point to form an edge of the figure; and The probability that the pixel belongs to the background image is the weight corresponding to the edge of the strip;
- the edge corresponding to the minimum cut is used as the boundary line between the target image and the background image, from the specified image Split the target image.
- the embodiment of the present application provides a non-volatile computer storage medium, wherein image segmentation is performed according to the determined probability of belonging to a target image and a probability of belonging to a background image, and after obtaining the target image,
- the computer executable instructions are also used to:
- the target image is fused to the pre-selected image according to an image fusion algorithm.
- the embodiment of the present application provides a non-volatile computer storage medium, wherein the image fusion algorithm includes any one of the following: Poisson fusion, random walk fusion, and Bayesian fusion.
- FIG. 9 is a schematic diagram showing the hardware structure of an electronic device for performing an image processing method according to Embodiment 5 of the present application. As shown in FIG. 9, the device includes:
- processors 910 and memory 920 one processor 910 is taken as an example in FIG.
- the apparatus that performs the image processing method may further include an input device 930 and an output device 940.
- the processor 910, the memory 920, the input device 930, and the output device 940 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
- the memory 920 is a non-volatile computer readable storage medium and can be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions corresponding to the image processing methods in the embodiments of the present application. / Module (for example, the first processing module 801, the second processing module 802, and the classification module 803 and the segmentation module 804 shown in FIG. 8).
- the processor 910 executes various functional applications of the server and data processing by executing non-volatile software programs, instructions, and modules stored in the memory 920, that is, implementing the image processing method of the above method embodiments.
- the memory 920 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the image processing apparatus, and the like.
- memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
- memory 920 can optionally include memory remotely located relative to processor 910, which can be connected to the image processing device over a network. Examples of the above networks include, but are not limited to, the Internet, an intranet, a local area network, Mobile communication networks and combinations thereof.
- Input device 930 can receive input numeric or character information and generate key signal inputs related to user settings and function control of the image processing device.
- Output device 940 can include a display device such as a display screen.
- the one or more modules are stored in the memory 920, and when executed by the one or more processors 910, perform an image processing method in any of the above method embodiments.
- the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
- Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
- Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
- Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
- Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
- Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
- the server consists of a processor, a hard disk, a memory, a system bus, etc.
- the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
- the electronic device provided by the embodiment of the present application, wherein a first operation trajectory of a first operation for selecting a pixel point of the target image is acquired; and the first operation trajectory is used as a reference a pixel point within a predetermined range to form a first pixel point set; and, according to the first pixel point set, construct a foreground model for calculating a probability that the pixel point in the specified image belongs to the target image; and
- the image is segmented based on the determined probability of belonging to the target image and the probability of belonging to the background image, and the target image is obtained.
- the electronic device provided by the embodiment of the present application, wherein, according to the first set of pixel points, constructing a foreground model for calculating a probability that a pixel point in the specified image belongs to the target image, specifically includes:
- Constructing a background model for calculating a probability that a pixel in a specified image belongs to a background image specifically comprising:
- the background model is determined by weighted summation according to the determined second Gaussian distribution models and the acquired second weights.
- the electronic device provided by the embodiment of the present application where the first weight corresponding to the first category is obtained for each first category, specifically includes:
- the number of pixels included in the second category and the number of pixels in the second set of pixels The ratio is the second weight corresponding to the second category.
- the electronic device provided by the embodiment of the present application wherein the image segmentation is performed according to the determined probability of belonging to the target image and the probability of belonging to the background image, and the target image is obtained, which specifically includes:
- the pixel point For each pixel point on the first operation track or a pixel point within the first preset range in which the first operation track is referenced, the pixel point is connected with the specified source point to form an edge of the figure; and The probability that the pixel belongs to the target image is the weight corresponding to the edge of the strip;
- the pixel point For each pixel point on the second operation track or a pixel point in the second preset range in which the second operation track is referenced, the pixel point is connected to the specified end point to form an edge of the figure; and The probability that the pixel belongs to the background image is the weight corresponding to the edge of the strip;
- the edge corresponding to the minimum cut is used as a boundary line between the target image and the background image, and the target image is segmented from the specified image.
- the electronic device provided by the embodiment of the present application, wherein the image segmentation is performed according to the determined probability of belonging to the target image and the probability of belonging to the background image, and after the target image is obtained, the at least one process
- the device can also:
- the target image is fused to the pre-selected image according to an image fusion algorithm.
- the image fusion algorithm includes any one of the following: Poisson fusion, random walk fusion, and Bayesian fusion.
- the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
提供图像处理方法、装置及电子设备。用户通过执行第一操作指定代表目标图像的像素点,并执行第二操作指定代表背景图像的像素点,然后智能终端便可以根据用户指定的代表目标图像的像素点和代表背景图像的像素点,进行分析建立前景模型和背景模型,从而确定出指定图像中的目标图像包括的像素点和背景图像包括的像素点,从而将目标图像从指定图像中分割出来,实现了抠图功能,解决了现有技术中智能终端中图像处理功能单一的问题。
Description
本申请要求在2016年05月30日提交中国专利局、申请号为201610371304.8、发明名称为“图像处理方法及装置”的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
本申请涉及图像处理技术领域,尤其涉及图像处理方法、装置及电子设备。
智能终端(例如智能手机、平板电脑等)成为人们生活中不可或缺的电子设备。由于其携带方便,操作人性化所以深受广大用户的喜爱。智能终端中往往会包含很多图像,有些是用户自己拍摄的,有些图像是用户从网络下载的。随着拍摄技术的发展和智能终端用户的增多,提供越来越多的图像处理功能,成为智能终端用户的迫切需求。
现有技术中智能终端提供的图像处理功能,大多局限于改变图像的色彩,或者,提供简单的拼图功能(例如将两幅图像拼接到同一画布上)。除此之外,无法提供其他的图像处理功能(例如抠图功能)。故此,现有技术中,智能终端提供的图像处理功能单一。
发明内容
本申请实施例提供图像处理方法、装置及电子设备,用以解决目前智能终端提供的图像处理功能单一的问题。
本申请实施例提供的具体技术方案如下:
第一方面,本申请实施例提供一种图像处理方法,所述方法包括:
获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;以及,
获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作
轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;
根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;
根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
第二方面,本申请实施例提供一种图像处理装置,该装置包括:
第一处理模块,用于获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;
第二处理模块,获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;
分类模块,用于根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;
分割模块,用于根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
第三方面,本申请实施例还提供了一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行本申请上述任一项图像处理方法。
第四方面,本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及存储器;其中,所述存储器存储有可被所述至少一个处理器执行的程序,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请上述任一项图像处理方法。
第五方面,本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其特征在于,当所述程序指令被计算机执行时,使所述计算机执行本申请上述任一项图像处理方法。
本申请实施例中,智能终端获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;以及,获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。这样,本申请实施例中,用户通过执行第一操作指定代表目标图像的像素点,并执行第二操作指定代表背景图像的像素点,然后智能终端便可以根据用户指定的代表目标图像的像素点和代表背景图像的像素点,进行分析建立前景模型和背景模型,从而确定出指定图像中的目标图像包括的像素点和背景图像包括的像素点,从而将目标图像从指定图像中分割出来,实现了抠图功能,解决了现有技术中智能终端中图像处理功能单一的问题。
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1为本申请实施例一中的图像处理方法的流程示意图;
图2为本申请实施例一中的图像融合后边界明显的示意图;
图3为本申请实施例一中的图像融合后边界平滑的示意图;
图4为本申请实施例二中的图像处理方法的流程示意图;
图5为本申请实施例二中的图像处理方法的指定图像及操作轨迹的示意图;
图6为本申请实施例二中的预先选定的图像的示意图;
图7为本申请实施例二中的图像融合后的效果图;
图8为本申请实施例三中的图像处理装置的结构示意图;
图9是本申请实施例五提供的执行图像处理方法的设备的硬件结构示意图。
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例中,使得智能终端能够提供自动抠图功能,具体的:智能终端获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;以及,获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。这样,本申请实施例中,用户通过执行第一操作指定代表目标图像的像素点,并执行第二操作指定代表背景图像的像素点,然后智能终端便可以根据用户指定的代表目标图像的像素点和代表背景图像的像素点,进行分析建立前景模型和背景模型,从而确定出指定图像中的目标图像包括的像素点和背景图像包括的像素点,从而将目标图像从指定图像中分割出来,实现了抠图功能,解决了现有技术中智能终端中图像处理功能单一的问题。
此外,本申请实施例还可以将抠图获得的目标图像融合到另一图像中,从而进一步增加了智能终端的图像处理功能。
为便于进一步理解,下面对本申请实施例提供的图像处理功能作进一步说明。
实施例一
如图1所示,为本申请实施例提供的图像处理方法的流程示意图,该方
法包括:
步骤101:获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型。
其中,在一个实施例中,第一预设范围例如是第一操作轨迹上的点的预设邻域,该预设邻域例如是4邻域、8邻域等。同理,第二预设范围例如是第二操作轨迹上的点的预设邻域。
其中,在一个实施例中,第一预设范围还可以是第一操作轨迹为基准,将第一操作轨迹扩大预设像素个数的距离。例如,将第一操作轨迹加粗扩大5-10个像素后得到的扩大后的第一操作轨迹为第一预设范围。第二预设范围依照同样的方法处理,本申请实施例在此不再赘述。
需要说明的是,具体实施时,第一预设范围和第二预设范围可以相同也可以不同。
其中,在一个实施例中,智能终端可以在获取到表示进行抠图的抠图指令后,再执行步骤101。获取到表示进行抠图的抠图指令,具体包括以下中的任一种方法:
方法1、检测到对指定图像的预设操作,该预设操作例如是在指定图像上绘制预设图形、或者是将指定图像向上或向下移动等。具体的预设操作可以根据实际需要设定,本申请对此不做限定。
方法2、检测到对设定抠图功能键的选择操作,具体的,智能终端显示指定图像时,可以同时显示抠图功能键,这样,便于用户选择该功能键后,确定用户进行抠图操作。
当然,具体实施时,也可以没有抠图指令,只要检测到第一操作和第二操作便执行本申请提供的方案即可,本申请对此不做限定。
步骤102:获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型。
其中,在一个实施例中,步骤101和步骤102的执行顺序不受限。
步骤103:根据前景模型和背景模型,确定指定图像中每个像素点属于
目标图像的概率,以及属于背景图像的概率。
步骤104:根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
其中,在一个实施例中,可以根据以下方法之一或组合确定一像素点是否属于目标图像:
1)、针对任一像素点,若该像素点属于目标图像的概率大于属于背景图像的概率,则将该像素点视为属于目标图像的像素点。
2)、针对任一像素点,若该像素点属于目标图像的概率大于预设概率,则将该像素点视为属于目标图像的像素点。
3)、针对任一像素点,若该像素点属于目标图像的概率与属于背景图像的概率的比值大于预设比值,则将该像素点视为属于目标图像的像素点。
4)、针对任一像素点,若该像素点属于目标图像的概率减去属于背景图像的概率的差值大于预设差值,则将该像素点视为属于目标图像的像素点。
这里以一个例子对上述方法组合的情况进行说明,例如,方法1)和方法2)的组合为1)、针对任一像素点,若该像素点属于目标图像的概率大于属于背景图像的概率,且该像素点属于目标图像的概率大于预设概率,则将该像素点视为属于目标图像的像素点。具体实施时,可以根据实际情况设置组合的方法,均在本申请实施例的保护范围中,本申请对此不作限定。
当然,具体实施时,可以根据实际需要确定那些点属于目标图像,本申请实施例对此也不做限定。
为便于进一步理解,下面对本申请实施例提供的图像处理方法做进一步说明,包括以下内容:
其中,在一个实施例中,步骤101中根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型,具体包括:
步骤A1:根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别。
其中,在一个实施例中,具体实施时,可以将色差小于预设色差的像素点归为一类,或者将第一像素点集合划分为预设个数的第一类别。聚类分析方法也可以根据现有技术确定,本申请对此不做限定。
步骤A2:针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型。
其中,在一个实施例中,可以根据以下方法之一确定第一权值:
方法1)、将该第一类别中包括的像素点的数量与第一像素点集合中像素点的数量的比值,作为该第一类别对应的第一权值。
例如,第一类别A中包括10个像素点,第一像素点集合中包括100个像素点,则第一类别A对应的第一权值为0.1(即10/100)。
方法2)、计算每个第一类别中包括像素点的平均色差,并计算所有第一类别的平均色差的和值;针对每个第一类别,将该和值减去该第一类别的平均色差得到差值,将该差值与该和值的比值作为该第一类别对应的第一权值。
例如,第一像素点集合进行聚类分析后共获得3个第一类别,分别编号为类别1、类别2和类别3。类别1包括的像素点的平均色差为a、类别2包括的像素点的平均色差为b、类别3包括的像素点的平均色差为c、则和值为(a+b+c)(记为H),对于类别1,其对应的第一权值为(H-a)/H。同理,对于类别2,其对应的第一权值为(H-b)/H;对于类别3,其对应的第一权值为(H-c)/H。
当然,具体实施时,可以根据现有技术中其他方法设置每个第一类别对应的第一权值(即确定每个高斯分布模型对应的权值),本申请实施例对此不做限定。
其中,在一个实施例中,确定高斯分布模型即确定高斯分布的均值和方差,具体实施时可以采用最大似然估计方法,确定高斯分布模型的均值和方差,也可以根据现有技术方法确定,本申请对此不做限定。
步骤A3:根据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型。
根据以下公式(1)确定前景模块:
同理,根据相同的方法构建背景模型,具体的,步骤102中构建用于计算指定图像中的像素点属于背景图像的概率的背景模型,具体包括以下步骤:
步骤B1:根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别。
步骤B2:针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型。
其中,在一个实施例中,将该第二类别中包括的像素点的数量与第二像素点集合中像素点的数量的比值,作为该第二类别对应的第二权值。也可以参照上述方法步骤A1中的方法确定第二权值。
步骤B3:根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
具体的,各步骤的说明参见上述步骤A1-步骤A3,在此不再赘述。
这样,本申请实施例中,是通过构建包括多个高斯分布模型的方法,来确定前景模型和背景模型,这样获得的前景模型和背景模型,不仅适用于颜色分布比较单一的图像(例如仅包括海洋和太阳的图像),也适用于颜色分布比较复杂的图像(例如,有很多颜色不同且形状各异的花草的图像)。故此,通过构建多个高斯分布模型确定的前景模型和背景模型能够更好的分析出哪些像素点属于目标图像,哪些像素点属于背景图像,从而能够提高确定目标图像的准确性。
其中,在一个实施例中,也可以采用现有技术的建模方法确定前景模型和背景模型,本申请对此不做限定。
其中,在一个实施例中,若仅根据前景模型和背景模型确定出目标图像,则由于前景模型和背景模型给出的仅是一个概率,有些像素点属于目标图像的概率和属于背景图像的概率相差不多。这时候,很容易导致误判这些像素点到底属于目标图像还是背景图像,从而导致仅根据确定出的属于目标图像的像素点以及属于背景图像的像素点,进行图像分割得到的目标图像不够准确。本申请实施例中,为了提高分割目标图像的准确性,步骤104(即根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像),具体可以包括以下步骤:
步骤C1:将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重。
其中,颜色相似度可以根据以下方法计算:
首先,计算两个像素点的色差,用100减去该色差得到的结果再除以100所得到的比值作为颜色相似度。例如色差为60,用100减去60得到40,用40除以100得到0.4,则该边的权重为0.4。当然,具体实施时也可以不用100而用其他数值,本申请对此不做限定。
颜色相似度用于表示两个像素点的颜色的相似程度,可以采用其他方法计算颜色相似度,本申请对此不做限定。
步骤C2:针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重。
步骤C3:针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重。
其中,步骤C1-步骤C3的执行顺序不受限。
步骤C4:根据最大流最小割算法以及各边对应的权重,求所述图形的最小割。
其中,在一个实施例中,指定源点和指定终点之间有多条路径,每条路径包括多条边,如果把图中的一些边去掉,刚好让指定源点和指定终点之间无法连通的话,这些被去掉的边组成的集合就叫做割(即每个割中包括至少一条边),最小割就是指所有割中权重之和最小的一个割。
步骤C6:将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中分割出目标图像。
这样,通过最大流最小割算法,由最小割对应的边构成的边界作为目标图像与背景图像的分界线,能够进一步提高确定目标图像的准确性,从而使得抠图得到的目标图像更加准确。
其中,在一个实施例中,执行步骤104得到目标图像之后,本申请实施例为了便于增加智能终端的图像处理功能,还可以根据图像融合算法,将目标图像融合到预先选定的图像中。例如,抠图得到的目标图像为太阳,则可以将该太阳融合到拍摄海洋得到的图像中,构成一幅包括海洋和太阳的图像。
其中,在一个实施例中,将目标图像融合到预先选定的图像中,有时候目标图像融合到预先选定的图像之间的边界会比较明显,人眼能够识别,这
就给人感觉融合的图像不自然。例如如图2所示,抠图得到的目标图像为太阳,将太阳融合到图2中的右图,会明显感觉太阳和背景之间有边界,导致融合效果差。故此,本申请实施例中,为了提高融合后得到图像的图像质量,使抠图得到的图像与预先选定的图像之间平滑过渡,可以采用以下中的任一种图像融合算法进行图像融合:泊松融合、随机游走融合、贝叶斯融合等。
例如,继续上面的例子,图2中通过泊松融合得到的图像如图3所示,由图3可以看出,最终融合得到的图像中,目标图像与背景之间平滑过渡,图像显得比较自然。
综上,本申请实施例中,使得智能终端能够提供抠图功能,丰富了智能终端的图像处理功能。
此外,本申请实施例中,还可以进行抠图得到目标图像后将目标图像融合到另一图像中,实现了图像融合,使得智能终端提供的图像处理功能更加丰富。
实施例二
这里以智能手机为例,第一操作为画曲线,第二操作也为画曲线为例,对本申请实施例提供的图像处理方法作进一步说明。具体的,如图4所示,该方法包括以下步骤:
步骤401:智能手机获取到表示进行抠图的抠图指令后,获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取用于选取背景图像的第二操作的第二操作轨迹。
例如,图5所示为指定图像,图5中的多边形为目标图像,用户可以在该多边形中画第一条曲线(如501),该曲线的轨迹即为第一操作轨迹。用户可以在背景图像中画第二条曲线和第三条曲线(如502),这两条曲线的轨迹即为第二操作轨迹。
步骤402:获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;并,获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合。
步骤403:根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别;针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型;根
据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型。
步骤404:根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别;针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型;根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
其中,步骤403与步骤404的执行顺序不受限。
步骤405:根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率。
步骤406:将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重。
步骤407:针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重。
步骤408:针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重。
其中,步骤406、步骤407与步骤408的执行顺序不受限。
步骤409:根据最大流最小割算法以及各边对应的权重,求所述图的最小割。
步骤410:将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中分割出目标图像。
步骤411:根据图像融合算法,将目标图像融合到预先选定的图像中。
其中,在一个实施例中可以将目标图像融合到预先选定的图像中的预设位置。
例如,将从图5得到的多边形,融合到图6中的圆形中得到图7所示的图像。
综上,本申请实施例中,使得智能手机能够提供抠图以及融合图像的功能,扩展了智能手机的图像处理功能。便于用于根据自己的喜好处理图像。
实施例三
基于相同的申请构思,本申请实施例还提供一种图像处理装置,如图8所示,所述装置包括:
第一处理模块801,用于获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;
第二处理模块802,获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;
分类模块803,用于根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;
分割模块804,用于根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
其中,在一个实施例中,第一处理模块,具体包括:
第一聚类单元,用于根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别;
第一高斯模型确定单元,用于针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型;
前景模型确定单元,用于根据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型;
第二处理模块,具体包括:
第二聚类单元,用于根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别;
第二高斯模型确定单元,针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型;
背景模型确定单元,用于根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
其中,在一个实施例中,第一高斯模型确定单元,具体用于:将该第一类别中包括的像素点的数量与第一像素点集合中像素点的数量的比值,作为该第一类别对应的第一权值;
第二高斯模型确定单元,具体用于:将该第二类别中包括的像素点的数量与第二像素点集合中像素点的数量的比值,作为该第二类别对应的第二权值。
其中,在一个实施例中,分割模块,具体包括:
第一边确定单元,用于将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重;
第二边确定单元,用于针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重;
第三边确定单元,用于针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重;
最小割确定单元,用于根据最大流最小割算法以及各边对应的权重,求所述图的最小割;
分割单元,用于将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中分割出目标图像。
其中,在一个实施例中,所述装置还包括:
融合模块,用于分割模块根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像之后,根据图像融合算法,将目标图像融合到预先选定的图像中。
其中,在一个实施例中,图像融合算法包括以下中的任一种:泊松融合、随机游走融合、贝叶斯融合。
综上,本申请提供的图像处理装置,提供抠图功能,丰富了图像处理功能。
实施例四
本申请实施例四提供了一种非易失性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的图像处理方法。
其中,本申请实施例提供的非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为:
获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;以及,
获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;
根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;
根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
在一种可能的实施方式中,本申请实施例提供非易失性计算机存储介质,其中,根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型,具体包括:
根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别;
针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型;
根据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型;
构建用于计算指定图像中的像素点属于背景图像的概率的背景模型,具体包括:
根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别;
针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型;
根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
在一种可能的实施方式中,本申请实施例提供非易失性计算机存储介质,其中,针对每个第一类别,获取该第一类别对应的第一权值,具体包括:
将该第一类别中包括的像素点的数量与第一像素点集合中像素点的数量的比值,作为该第一类别对应的第一权值;
针对每个第二类别,获取该第二类别对应的第二权值,具体包括:
将该第二类别中包括的像素点的数量与第二像素点集合中像素点的数量的比值,作为该第二类别对应的第二权值。
在一种可能的实施方式中,本申请实施例提供非易失性计算机存储介质,其中,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像,具体包括:
将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重;以及,
针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重;以及,
针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重;
根据最大流最小割算法以及各边对应的权重,求所述图的最小割;
将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中
分割出目标图像。
在一种可能的实施方式中,本申请实施例提供非易失性计算机存储介质,其中,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像之后,所述计算机可执行指令还用于:
根据图像融合算法,将目标图像融合到预先选定的图像中。
在一种可能的实施方式中,本申请实施例提供非易失性计算机存储介质,其中,图像融合算法包括以下中的任一种:泊松融合、随机游走融合、贝叶斯融合。
实施例五
图9是本申请实施例五提供的执行图像处理方法的电子设备的硬件结构示意图,如图9所示,该设备包括:
一个或多个处理器910以及存储器920,图9中以一个处理器910为例。
执行图像处理方法的设备还可以包括:输入装置930和输出装置940。
处理器910、存储器920、输入装置930和输出装置940可以通过总线或者其他方式连接,图9中以通过总线连接为例。
存储器920作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的图像处理方法对应的程序指令/模块(例如,附图8所示的第一处理模块801、第二处理模块802和分类模块803和分割模块804)。处理器910通过运行存储在存储器920中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的图像处理方法。
存储器920可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据图像处理装置的使用所创建的数据等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器920可选包括相对于处理器910远程设置的存储器,这些远程存储器可以通过网络连接至图像处理装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、
移动通信网及其组合。
输入装置930可接收输入的数字或字符信息,以及产生与图像处理装置的用户设置以及功能控制有关的键信号输入。输出装置940可包括显示屏等显示设备。
所述一个或者多个模块存储在所述存储器920中,当被所述一个或者多个处理器910执行时,执行上述任意方法实施例中的图像处理方法。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
本申请实施例的电子设备以多种形式存在,包括但不限于:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。
(5)其他具有数据交互功能的电子装置。
在一种可能的实施方式中,本申请实施例提供的电子设备,其中,获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;以及,
获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;
根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;
根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
在一种可能的实施方式中,本申请实施例提供的电子设备,其中,根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型,具体包括:
根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别;
针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型;
根据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型;
构建用于计算指定图像中的像素点属于背景图像的概率的背景模型,具体包括:
根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别;
针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型;
根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
在一种可能的实施方式中,本申请实施例提供的电子设备,其中,针对每个第一类别,获取该第一类别对应的第一权值,具体包括:
将该第一类别中包括的像素点的数量与第一像素点集合中像素点的数量的比值,作为该第一类别对应的第一权值;
针对每个第二类别,获取该第二类别对应的第二权值,具体包括:
将该第二类别中包括的像素点的数量与第二像素点集合中像素点的数量
的比值,作为该第二类别对应的第二权值。
在一种可能的实施方式中,本申请实施例提供的电子设备,其中,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像,具体包括:
将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重;以及,
针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重;以及,
针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重;
根据最大流最小割算法以及各边对应的权重,求所述图的最小割;
将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中分割出目标图像。
在一种可能的实施方式中,本申请实施例提供的电子设备,其中,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像之后,所述至少一个处理器还能够:
根据图像融合算法,将目标图像融合到预先选定的图像中。
在一种可能的实施方式中,本申请实施例提供的电子设备,其中,图像融合算法包括以下中的任一种:泊松融合、随机游走融合、贝叶斯融合。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储
介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (25)
- 一种图像处理方法,其特征在于,所述方法包括:获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;以及,获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
- 根据权利要求1所述的方法,其特征在于,根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型,具体包括:根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别;针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型;根据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型;构建用于计算指定图像中的像素点属于背景图像的概率的背景模型,具体包括:根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别;针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型;根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
- 根据权利要求2所述的方法,其特征在于,针对每个第一类别,获取该第一类别对应的第一权值,具体包括:将该第一类别中包括的像素点的数量与第一像素点集合中像素点的数量的比值,作为该第一类别对应的第一权值;针对每个第二类别,获取该第二类别对应的第二权值,具体包括:将该第二类别中包括的像素点的数量与第二像素点集合中像素点的数量的比值,作为该第二类别对应的第二权值。
- 根据权利要求1所述的方法,其特征在于,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像,具体包括:将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重;以及,针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重;以及,针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重;根据最大流最小割算法以及各边对应的权重,求所述图的最小割;将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中分割出目标图像。
- 根据权利要求1-4中任一所述的方法,其特征在于,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像之后,所述方法还包括:根据图像融合算法,将目标图像融合到预先选定的图像中。
- 根据权要求5所述的方法,其特征在于,图像融合算法包括以下中的任一种:泊松融合、随机游走融合、贝叶斯融合。
- 一种非易失性计算机存储介质,其特征在于,存储有计算机可执行指令,所述计算机可执行指令设置为:获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以 第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;以及,获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
- 根据权利要求7所述的非易失性计算机存储介质,其特征在于,根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型,具体包括:根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别;针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型;根据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型;构建用于计算指定图像中的像素点属于背景图像的概率的背景模型,具体包括:根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别;针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型;根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
- 根据权利要求8所述的非易失性计算机存储介质,其特征在于,针对每个第一类别,获取该第一类别对应的第一权值,具体包括:将该第一类别中包括的像素点的数量与第一像素点集合中像素点的数量 的比值,作为该第一类别对应的第一权值;针对每个第二类别,获取该第二类别对应的第二权值,具体包括:将该第二类别中包括的像素点的数量与第二像素点集合中像素点的数量的比值,作为该第二类别对应的第二权值。
- 根据权利要求7所述的非易失性计算机存储介质,其特征在于,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像,具体包括:将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重;以及,针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重;以及,针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重;根据最大流最小割算法以及各边对应的权重,求所述图的最小割;将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中分割出目标图像。
- 根据权利要求7-10所述的非易失性计算机存储介质,其特征在于,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像之后,所述计算机可执行指令还用于:根据图像融合算法,将目标图像融合到预先选定的图像中。
- 根据权利要求11所述的非易失性计算机存储介质,其特征在于,图像融合算法包括以下中的任一种:泊松融合、随机游走融合、贝叶斯融合。
- 一种电子设备,其特征在于,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;以及,获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
- 根据权利要求13所述的电子设备,其特征在于,根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型,具体包括:根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别;针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型;根据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型;构建用于计算指定图像中的像素点属于背景图像的概率的背景模型,具体包括:根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别;针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型;根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
- 根据权利要求14所述的电子设备,其特征在于,针对每个第一类别,获取该第一类别对应的第一权值,具体包括:将该第一类别中包括的像素点的数量与第一像素点集合中像素点的数量的比值,作为该第一类别对应的第一权值;针对每个第二类别,获取该第二类别对应的第二权值,具体包括:将该第二类别中包括的像素点的数量与第二像素点集合中像素点的数量的比值,作为该第二类别对应的第二权值。
- 根据权利要求13所述的电子设备,其特征在于,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像,具体包括:将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重;以及,针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重;以及,针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重;根据最大流最小割算法以及各边对应的权重,求所述图的最小割;将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中分割出目标图像。
- 根据权利要求13-16中任一所述的电子设备,其特征在于,根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像之后,所述至少一个处理器还能够:根据图像融合算法,将目标图像融合到预先选定的图像中。
- 根据权要求17所述的电子设备,其特征在于,图像融合算法包括以下中的任一种:泊松融合、随机游走融合、贝叶斯融合。
- 一种图像处理装置,其特征在于,所述装置包括:第一处理模块,用于获取用于选取目标图像的像素点的第一操作的第一操作轨迹;并获取以第一操作轨迹为基准的第一预设范围内的像素点,组成第一像素点集合;根据第一像素点集合,构建用于计算指定图像中的像素点属于目标图像的概率的前景模型;第二处理模块,获取用于选取背景图像的第二操作的第二操作轨迹;并获取以第二操作轨迹为基准的第二预设范围内的像素点,组成第二像素点集合;根据第二像素点集合,构建用于计算指定图像中的像素点属于背景图像的概率的背景模型;分类模块,用于根据前景模型和背景模型,确定指定图像中每个像素点属于目标图像的概率,以及属于背景图像的概率;分割模块,用于根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像。
- 根据权利要求19所述的装置,其特征在于,第一处理模块,具体包括:第一聚类单元,用于根据第一像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第一类别;第一高斯模型确定单元,用于针对每个第一类别,获取该第一类别对应的第一权值,并根据该第一类别中每个像素点的颜色值,确定第一高斯分布模型;前景模型确定单元,用于根据确定的各第一高斯分布模型以及获取的各第一权值,通过加权求和的方式确定前景模型;第二处理模块,具体包括:第二聚类单元,用于根据第二像素点集合中各像素点的颜色值进行聚类分析,获取至少一个第二类别;第二高斯模型确定单元,针对每个第二类别,获取该第二类别对应的第二权值,并根据该第二类别中每个像素点的颜色值,确定第二高斯分布模型;背景模型确定单元,用于根据确定的各第二高斯分布模型以及获取的各第二权值,通过加权求和的方式确定背景模型。
- 根据权利要求20所述的装置,其特征在于,第一高斯模型确定单元,具体用于:将该第一类别中包括的像素点的数量与第一像素点集合中像素点的数量的比值,作为该第一类别对应的第一权值;第二高斯模型确定单元,具体用于:将该第二类别中包括的像素点的数量与第二像素点集合中像素点的数量的比值,作为该第二类别对应的第二权值。
- 根据权利要求19所述的装置,其特征在于,分割模块,具体包括:第一边确定单元,用于将指定图像中每个像素点视为图的一个顶点;并将在指定图像中位置相邻的像素点连接,组成该图的一条边,并将该条边上两个像素点的颜色相似度作为该条边对应的权重;第二边确定单元,用于针对每个在第一操作轨迹上的像素点或在第一操作轨迹为基准的第一预设范围内的像素点,将该像素点与指定源点连接组成该图的一条边;并,将该像素点属于目标图像的概率作为该条边对应的权重;第三边确定单元,用于针对每个在第二操作轨迹上的像素点或在第二操作轨迹为基准的第二预设范围内的像素点,将该像素点与指定终点连接,组成该图的一条边;并,将该像素点属于背景图像的概率作为该条边对应的权重;最小割确定单元,用于根据最大流最小割算法以及各边对应的权重,求所述图的最小割;分割单元,用于将由最小割对应的边作为目标图像与背景图像的分界线,从指定图像中分割出目标图像。
- 根据权利要求19-22中任一所述的装置,其特征在于,所述装置还包括:融合模块,用于分割模块根据确定出的属于目标图像的概率以及属于背景图像的概率,进行图像分割,得到目标图像之后,根据图像融合算法,将目标图像融合到预先选定的图像中。
- 根据权要求23所述的装置,其特征在于,图像融合算法包括以下中的任一种:泊松融合、随机游走融合、贝叶斯融合。
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其特征在于,当所述程序指令被计算机执行时,使所述计算机执行如权利要求1-6所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610371304.8A CN106056606A (zh) | 2016-05-30 | 2016-05-30 | 图像处理方法及装置 |
| CN201610371304.8 | 2016-05-30 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017206400A1 true WO2017206400A1 (zh) | 2017-12-07 |
Family
ID=57171427
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/100435 Ceased WO2017206400A1 (zh) | 2016-05-30 | 2016-09-27 | 图像处理方法、装置及电子设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106056606A (zh) |
| WO (1) | WO2017206400A1 (zh) |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109636720A (zh) * | 2018-11-28 | 2019-04-16 | 维沃移动通信(杭州)有限公司 | 一种图像显示方法及终端设备 |
| CN110910334A (zh) * | 2018-09-15 | 2020-03-24 | 北京市商汤科技开发有限公司 | 一种实例分割方法、图像处理设备及计算机可读存储介质 |
| CN111311603A (zh) * | 2018-12-12 | 2020-06-19 | 北京京东尚科信息技术有限公司 | 用于输出目标物体数目信息的方法和装置 |
| CN111435282A (zh) * | 2019-01-14 | 2020-07-21 | 阿里巴巴集团控股有限公司 | 图像处理方法、装置及电子设备 |
| CN111714883A (zh) * | 2020-06-19 | 2020-09-29 | 网易(杭州)网络有限公司 | 贴图的处理方法、装置及电子设备 |
| CN112037291A (zh) * | 2020-08-31 | 2020-12-04 | 维沃移动通信有限公司 | 数据处理方法、装置和电子设备 |
| CN112435159A (zh) * | 2019-08-26 | 2021-03-02 | 珠海金山办公软件有限公司 | 一种图像处理的方法、装置、计算机存储介质及终端 |
| CN112446936A (zh) * | 2019-08-29 | 2021-03-05 | 北京京东尚科信息技术有限公司 | 图像处理方法和装置 |
| CN113012188A (zh) * | 2021-03-23 | 2021-06-22 | 影石创新科技股份有限公司 | 图像融合方法、装置、计算机设备和存储介质 |
| CN113627453A (zh) * | 2020-05-08 | 2021-11-09 | 珠海金山办公软件有限公司 | 一种纯色背景图像抠图方法、装置及电子设备 |
| CN114449243A (zh) * | 2022-01-28 | 2022-05-06 | 青岛海信移动通信技术股份有限公司 | 一种白平衡方法和终端设备 |
| CN115984488A (zh) * | 2023-03-16 | 2023-04-18 | 深圳市完美显示科技有限公司 | 一种基于5g网络的ai图像智能建模系统 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108764325B (zh) * | 2018-05-23 | 2022-07-08 | 腾讯科技(深圳)有限公司 | 图像识别方法、装置、计算机设备和存储介质 |
| CN111047604B (zh) * | 2019-11-29 | 2023-04-28 | 贵州民族大学 | 一种高清图像的透明度遮罩提取方法、装置及存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104166988A (zh) * | 2014-07-10 | 2014-11-26 | 北京工业大学 | 一种融入稀疏匹配信息的立体图像同步分割方法 |
| CN104820990A (zh) * | 2015-05-15 | 2015-08-05 | 北京理工大学 | 一种交互式图像抠图系统 |
| WO2015137358A1 (ja) * | 2014-03-12 | 2015-09-17 | 株式会社メガチップス | 画像処理方法、画像処理装置、及びプログラム |
| CN105321161A (zh) * | 2014-07-18 | 2016-02-10 | 腾讯科技(深圳)有限公司 | 一种图像处理方法和装置 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101710418B (zh) * | 2009-12-22 | 2012-06-27 | 上海大学 | 基于测地距离的交互方式图象分割方法 |
| CN102903093A (zh) * | 2012-09-28 | 2013-01-30 | 中国航天科工集团第三研究院第八三五八研究所 | 一种基于链码掩模的泊松图像融合方法 |
| CN103455990B (zh) * | 2013-03-04 | 2016-12-28 | 深圳信息职业技术学院 | 结合视觉注意机制和pcnn的图像融合方法 |
| CN103338143A (zh) * | 2013-05-27 | 2013-10-02 | 四川长虹电器股份有限公司 | 实现图像分享的方法、装置及系统 |
| CN103578107B (zh) * | 2013-11-07 | 2016-09-14 | 中科创达软件股份有限公司 | 一种交互式图像分割方法 |
| CN104036497A (zh) * | 2014-05-26 | 2014-09-10 | 西安电子科技大学 | 基于方差局部系数的图切交互式图像分割方法 |
-
2016
- 2016-05-30 CN CN201610371304.8A patent/CN106056606A/zh active Pending
- 2016-09-27 WO PCT/CN2016/100435 patent/WO2017206400A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015137358A1 (ja) * | 2014-03-12 | 2015-09-17 | 株式会社メガチップス | 画像処理方法、画像処理装置、及びプログラム |
| CN104166988A (zh) * | 2014-07-10 | 2014-11-26 | 北京工业大学 | 一种融入稀疏匹配信息的立体图像同步分割方法 |
| CN105321161A (zh) * | 2014-07-18 | 2016-02-10 | 腾讯科技(深圳)有限公司 | 一种图像处理方法和装置 |
| CN104820990A (zh) * | 2015-05-15 | 2015-08-05 | 北京理工大学 | 一种交互式图像抠图系统 |
Cited By (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110910334A (zh) * | 2018-09-15 | 2020-03-24 | 北京市商汤科技开发有限公司 | 一种实例分割方法、图像处理设备及计算机可读存储介质 |
| CN110910334B (zh) * | 2018-09-15 | 2023-03-21 | 北京市商汤科技开发有限公司 | 一种实例分割方法、图像处理设备及计算机可读存储介质 |
| CN109636720A (zh) * | 2018-11-28 | 2019-04-16 | 维沃移动通信(杭州)有限公司 | 一种图像显示方法及终端设备 |
| CN109636720B (zh) * | 2018-11-28 | 2023-03-21 | 维沃移动通信(杭州)有限公司 | 一种图像显示方法及终端设备 |
| CN111311603A (zh) * | 2018-12-12 | 2020-06-19 | 北京京东尚科信息技术有限公司 | 用于输出目标物体数目信息的方法和装置 |
| CN111435282A (zh) * | 2019-01-14 | 2020-07-21 | 阿里巴巴集团控股有限公司 | 图像处理方法、装置及电子设备 |
| CN112435159A (zh) * | 2019-08-26 | 2021-03-02 | 珠海金山办公软件有限公司 | 一种图像处理的方法、装置、计算机存储介质及终端 |
| CN112446936A (zh) * | 2019-08-29 | 2021-03-05 | 北京京东尚科信息技术有限公司 | 图像处理方法和装置 |
| CN113627453A (zh) * | 2020-05-08 | 2021-11-09 | 珠海金山办公软件有限公司 | 一种纯色背景图像抠图方法、装置及电子设备 |
| CN111714883A (zh) * | 2020-06-19 | 2020-09-29 | 网易(杭州)网络有限公司 | 贴图的处理方法、装置及电子设备 |
| CN111714883B (zh) * | 2020-06-19 | 2024-06-04 | 网易(杭州)网络有限公司 | 贴图的处理方法、装置及电子设备 |
| CN112037291A (zh) * | 2020-08-31 | 2020-12-04 | 维沃移动通信有限公司 | 数据处理方法、装置和电子设备 |
| CN112037291B (zh) * | 2020-08-31 | 2024-03-22 | 维沃移动通信有限公司 | 数据处理方法、装置和电子设备 |
| US12563153B2 (en) | 2020-08-31 | 2026-02-24 | Vivo Mobile Communication Co., Ltd. | Data processing method and apparatus, and electronic device |
| CN113012188A (zh) * | 2021-03-23 | 2021-06-22 | 影石创新科技股份有限公司 | 图像融合方法、装置、计算机设备和存储介质 |
| CN114449243A (zh) * | 2022-01-28 | 2022-05-06 | 青岛海信移动通信技术股份有限公司 | 一种白平衡方法和终端设备 |
| CN114449243B (zh) * | 2022-01-28 | 2023-12-12 | 青岛海信移动通信技术有限公司 | 一种白平衡方法和终端设备 |
| CN115984488A (zh) * | 2023-03-16 | 2023-04-18 | 深圳市完美显示科技有限公司 | 一种基于5g网络的ai图像智能建模系统 |
| CN115984488B (zh) * | 2023-03-16 | 2023-10-27 | 深圳市完美显示科技有限公司 | 一种基于5g网络的ai图像智能建模系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106056606A (zh) | 2016-10-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017206400A1 (zh) | 图像处理方法、装置及电子设备 | |
| CN112348828B (zh) | 基于神经网络的实例分割方法和装置以及存储介质 | |
| CN109214343B (zh) | 用于生成人脸关键点检测模型的方法和装置 | |
| US20190294860A1 (en) | Methods and apparatuses for detecting face, and electronic devices | |
| WO2020119527A1 (zh) | 人体动作识别方法、装置、终端设备及存储介质 | |
| CN109583509B (zh) | 数据生成方法、装置及电子设备 | |
| CN114187624B (zh) | 图像生成方法、装置、电子设备及存储介质 | |
| US20110292051A1 (en) | Automatic Avatar Creation | |
| CN113887498B (zh) | 人脸识别方法、装置、设备和存储介质 | |
| CN114092678A (zh) | 图像处理方法、装置、电子设备及存储介质 | |
| CN111062854A (zh) | 检测水印的方法、装置、终端及存储介质 | |
| CN108229533A (zh) | 图像处理方法、模型剪枝方法、装置及设备 | |
| CN112381104A (zh) | 一种图像识别方法、装置、计算机设备及存储介质 | |
| CN112380929B (zh) | 一种高光片段的获取方法、装置、电子设备和存储介质 | |
| CN112016548B (zh) | 一种封面图展示方法及相关装置 | |
| CN108875931A (zh) | 神经网络训练及图像处理方法、装置、系统 | |
| CN113569809A (zh) | 一种图像处理方法、设备及计算机可读存储介质 | |
| CN115228092B (zh) | 游戏战力评估方法、装置以及计算机可读存储介质 | |
| CN108961314A (zh) | 运动图像生成方法、装置、电子设备及计算机可读存储介质 | |
| CN113408452A (zh) | 表情重定向训练方法、装置、电子设备和可读存储介质 | |
| CN113269280A (zh) | 文本检测方法、装置、电子设备及计算机可读存储介质 | |
| JP2025525721A (ja) | 機械学習を使用したプロンプト駆動型画像編集 | |
| CN111191553A (zh) | 人脸跟踪方法、装置及电子设备 | |
| CN104700384B (zh) | 基于增强现实技术的展示系统及展示方法 | |
| CN110197459B (zh) | 图像风格化生成方法、装置及电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16903782 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16903782 Country of ref document: EP Kind code of ref document: A1 |