CN107452010A - A kind of automatically stingy nomography and device - Google Patents
A kind of automatically stingy nomography and device Download PDFInfo
- Publication number
- CN107452010A CN107452010A CN201710638979.9A CN201710638979A CN107452010A CN 107452010 A CN107452010 A CN 107452010A CN 201710638979 A CN201710638979 A CN 201710638979A CN 107452010 A CN107452010 A CN 107452010A
- Authority
- CN
- China
- Prior art keywords
- mrow
- msub
- msubsup
- image
- matting
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Cosmetics (AREA)
Abstract
Description
技术领域technical field
本发明涉及数字图像处理领域,具体涉及一种自动抠图算法和装置。The invention relates to the field of digital image processing, in particular to an automatic image cutout algorithm and device.
背景技术Background technique
现实生活中,把感兴趣的目标从一幅背景图像中抠取出来,作为独立素材或者与新的背景图像合成,以期得到完整、逼真的背景替换效果,这种技术已普遍应用于影像编辑、影视特效等领域,广泛渗透入人们的日常生活中。数字图像抠图技术以其良好的应用前景和商业价值,近年来成为计算机视觉研究领域中的热点。In real life, the object of interest is extracted from a background image and used as an independent material or synthesized with a new background image in order to obtain a complete and realistic background replacement effect. This technology has been widely used in image editing, Fields such as film and television special effects have widely penetrated into people's daily lives. Due to its good application prospect and commercial value, digital image matting technology has become a hot spot in the field of computer vision research in recent years.
数字抠图算法将自然图像中的每个像素建模为前景和背景颜色的线性模型,即:Digital matting algorithms model each pixel in a natural image as a linear model of foreground and background colors, namely:
I=αF+(1-α)B (1)I=αF+(1-α)B (1)
其中,I表示实际图像中的颜色值,F表示前景颜色值,B表示背景颜色值,α称为前景不透明度,取值范围为[0,1],其中前景区域的不透明度α=1,背景区域的不透明度α=0,而在未知区域即前景目标的边缘区域,α取(0,1)之间的值。所谓抠图,就是在已知实际图像I的情况下,求取前景F、背景B和不透明度α的过程。I、F、B均为三维向量,方程需要根据3个已知量求取其余7个未知量,因此是一个高度欠约束问题。Among them, I represents the color value in the actual image, F represents the foreground color value, B represents the background color value, α is called the foreground opacity, and the value range is [0,1], wherein the opacity of the foreground area α=1, The opacity of the background area is α=0, and in the unknown area, that is, the edge area of the foreground object, α takes a value between (0,1). The so-called matting is the process of finding the foreground F, the background B and the opacity α when the actual image I is known. I, F, and B are all three-dimensional vectors, and the equation needs to obtain the remaining 7 unknown quantities based on 3 known quantities, so it is a highly underconstrained problem.
目前已经广泛应用于影视和传媒制作公司的抠图技术是蓝屏抠图,其原理是:将背景限制为单一的蓝色,从而将方程中的未知量压缩为4个。蓝屏抠图操作简单,但对背景限制较大,并且当前景出现蓝色时,将无法完整抠出目标。At present, the matting technology that has been widely used in film and television and media production companies is blue screen matting. Its principle is to limit the background to a single blue color, thereby compressing the unknown quantities in the equation into four. The blue screen cutout is easy to operate, but it has great restrictions on the background, and when the foreground appears blue, the target cannot be completely cut out.
目前学者们主要研究的自然图像抠图算法可大致分为二类,即:At present, the natural image matting algorithms mainly studied by scholars can be roughly divided into two categories, namely:
(一)基于采样的算法。该方法假设图像局部连续,用未知区域附近的已知样本点对当前像素的前景和背景分量进行估计。例如发明CN105225245提出基于纹理分布假设和正则化策略的自然图像抠图方法,改进了贝叶斯抠图方法,但基于采样的方法缺陷在于获得的alpha图连通性较差,且往往需要图像先验知识和大量的用户标记;(1) Sampling-based algorithm. This method assumes that the image is locally continuous, and estimates the foreground and background components of the current pixel with known sample points near the unknown area. For example, the invention CN105225245 proposes a natural image matting method based on texture distribution assumptions and regularization strategies, which improves the Bayesian matting method, but the defect of the sampling-based method is that the obtained alpha map has poor connectivity and often requires image priors Knowledge and a large number of user tokens;
(二)基于传播的算法。该方法需要用户首先进行标记(如点、线等),标识出前景、背景,随后将未知区域视为场,场的边缘对应于已知区域,通过建立Laplace矩阵用以描述alpha值的关系,将抠图过程转化为Laplace矩阵的求解过程,缺陷在于计算量大,对于非连通区域效果不佳。(2) Algorithms based on propagation. This method requires the user to first mark (such as points, lines, etc.), identify the foreground and background, and then treat the unknown area as a field, and the edge of the field corresponds to the known area. By establishing a Laplace matrix to describe the relationship between alpha values, The disadvantage of transforming the matting process into the solution process of Laplace matrix is the large amount of calculation, and the effect is not good for non-connected regions.
此外,还有将采样和传播相结合的算法,以期发挥二者的优势,例如鲁棒抠图算法等,但算法仍普遍存在用户交互复杂、图像的先验假设过多、计算量大的缺陷,从而限制了应用范围,增加了使用难度。In addition, there are algorithms that combine sampling and propagation in order to take advantage of the two, such as robust matting algorithms, etc., but the algorithms still generally have defects such as complex user interaction, too many prior assumptions about images, and large amounts of calculations. , thereby limiting the scope of application and increasing the difficulty of use.
发明内容Contents of the invention
为了解决现有技术中存在的问题,本发明提供了一种自动抠图算法和装置,根据输入图像计算抠图视觉显著度,在不限制背景和图像先验知识的情况下,从自然场景图像中完成全自动抠图,无需用户交互,同时能保证较高的抠图精度和成功率。In order to solve the problems existing in the prior art, the present invention provides an automatic image matting algorithm and device, which calculates the visual saliency of matting based on the input image, without limiting the background and prior knowledge of the image, from the natural scene image Fully automatic matting can be completed without user interaction, while ensuring high matting accuracy and success rate.
本发明解决技术问题所采用的技术方案如下:The technical solution adopted by the present invention to solve technical problems is as follows:
一种自动抠图算法,该方法包括如下步骤:An automatic image matting algorithm, the method comprising the steps of:
步骤一:获取待抠图的原始图像,计算其抠图视觉显著度;Step 1: Obtain the original image to be matted, and calculate its matting visual salience;
步骤二:根据抠图视觉显著度图,使用空间域滤波和阈值分割算法,分离出前景区域、背景区域,结合形态学运算得到三分图;Step 2: According to the matting visual saliency map, use spatial domain filtering and threshold segmentation algorithm to separate the foreground area and background area, and combine the morphological operation to obtain the three-part map;
步骤三:根据三分图,对未知区域的每个像素进行梯度计算,根据梯度方向和显著性大小采样得到当前未知区域像素的前景、背景样本点集;Step 3: Calculate the gradient of each pixel in the unknown area according to the tripartite map, and obtain the foreground and background sample point sets of the pixels in the current unknown area by sampling according to the gradient direction and saliency;
步骤四:根据当前未知区域像素的前景、背景样本点集,计算每个样本点的不透明度和置信度,取置信度最高的样本对作为最终抠图用的最佳样本对。然后平滑不透明度的局部区域,得到最终估计的不透明度;Step 4: Calculate the opacity and confidence of each sample point according to the foreground and background sample point sets of pixels in the current unknown area, and take the sample pair with the highest confidence as the best sample pair for the final image matting. Then smooth the local area of opacity to get the final estimated opacity;
步骤五:根据最终估计的不透明度和最佳样本对的颜色值,在原始图像中进行抠图操作,提取出前景目标。Step 5: According to the final estimated opacity and the color value of the best sample pair, a matting operation is performed in the original image to extract the foreground target.
一种自动抠图装置,所述装置包括:An automatic drawing device, said device comprising:
图像获取模块,用于采集单幅图像的颜色值;Image acquisition module, used to collect the color value of a single image;
抠图视觉显著度计算模块,用于根据所述图像获取模块获取的图像颜色值,计算图像的抠图视觉显著度;The matting visual salience calculation module is used to calculate the matting visual salience of the image according to the image color value acquired by the image acquisition module;
三分图计算模块,用于根据所述抠图视觉显著度计算模块获取的抠图视觉显著度图,使用空间域滤波和阈值分割算法,分离出前景区域、背景区域,结合形态学运算,计算得到三分图;The tripartite graph calculation module is used to separate the foreground area and the background area according to the matting visual saliency map obtained by the matting visual saliency calculation module, using spatial domain filtering and threshold segmentation algorithm, and to calculate in combination with morphological operations Get the three-point map;
样本点集获取模块,根据所述三分图计算模块获取的三分图,对未知区域的每个像素进行梯度计算,根据梯度方向和显著性大小采样得到当前未知区域像素的前景、背景样本点集;The sample point set acquisition module performs gradient calculation on each pixel in the unknown area according to the tripartite map acquired by the tripartite map calculation module, and obtains the foreground and background sample points of the pixels in the current unknown area by sampling according to the gradient direction and significance set;
不透明度计算模块,根据所述样本点集获取模块获取的前景、背景样本点集,计算每个样本点的不透明度和置信度,取置信度最高的样本对作为最终抠图用的最佳样本对。然后对不透明度的局部区域进行平滑,得到最终估计的不透明度;The opacity calculation module calculates the opacity and confidence of each sample point according to the foreground and background sample point sets obtained by the sample point set acquisition module, and takes the sample pair with the highest confidence as the best sample for final matting right. The local area of opacity is then smoothed to obtain the final estimated opacity;
前景抠出模块,用于根据最终估计的不透明度和最佳样本对的颜色值,在原始图像中进行抠图操作,提取出前景目标。The foreground cutout module is used to perform a cutout operation in the original image to extract the foreground target according to the final estimated opacity and the color value of the best sample pair.
本发明的有益效果是:本发明提出的抠图视觉显著性计算方法模拟人眼的视觉注意机制,可自动提取前景目标,免去了复杂的用户交互操作,完成全自动抠图过程,操作简单方便;通过限制样本点对的数量,缩短了抠图时间;对显著性图和不透明度均进行了平滑,提高了抠图精度。The beneficial effects of the present invention are: the method for calculating the visual salience of matting proposed by the present invention simulates the visual attention mechanism of the human eye, can automatically extract foreground objects, eliminates complicated user interaction operations, completes the automatic matting process, and is easy to operate Convenient; by limiting the number of sample point pairs, the matting time is shortened; both the saliency map and the opacity are smoothed, and the matting accuracy is improved.
附图说明Description of drawings
图1为本发明一种自动抠图算法的流程示意图Fig. 1 is a schematic flow chart of an automatic map-cutting algorithm of the present invention
图2为本发明计算区域显著度的流程示意图Fig. 2 is a schematic flow chart of calculating regional saliency in the present invention
图3为本发明一种自动抠图装置的结构示意图Fig. 3 is a schematic structural view of an automatic image-cutting device of the present invention
具体实施方式detailed description
下面结合附图和实施例对本发明做进一步详细说明。The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.
图1为本发明一种自动抠图算法实施例的流程示意图,本发明实施例提供了一种自动抠图方法,该方法可以由任意具有图像存储和显示功能的抠图装置来执行,该装置可以是各种终端设备,例如:个人电脑,手机,平板电脑等,也可以是数码相机、摄像机等,具体可以通过软件和/或硬件来实现。如图1所示,本实施例的方法包括:Fig. 1 is a schematic flow chart of an embodiment of an automatic map-cutting algorithm of the present invention. The embodiment of the present invention provides an automatic map-cutting method, which can be performed by any map-cutting device with image storage and display functions. It can be various terminal devices, such as personal computers, mobile phones, tablet computers, etc., or digital cameras, video cameras, etc., and can be specifically implemented by software and/or hardware. As shown in Figure 1, the method of the present embodiment includes:
步骤一:获取待抠图的原始图像,计算原始图像的抠图视觉显著度。Step 1: Obtain the original image to be matted, and calculate the matting visual saliency of the original image.
考虑到通常需要提取的前景目标具有以下特征:前景目标具有完整的目标区域,且与周围背景对比度较明显;颜色分布较均匀;大部分区域亮度较大;与背景有较明显的边缘区分。因此本发明实施例提出的视觉抠图显著度计算方法考虑了前景目标的颜色、亮度和区域完整性等特性,假设获取图像为rgb格式,首先需根据r、g、b颜色通道计算灰度图Igray,具体公式为:Considering that the foreground target that usually needs to be extracted has the following characteristics: the foreground target has a complete target area, and the contrast with the surrounding background is obvious; the color distribution is relatively uniform; most areas are brighter; there is a more obvious edge distinction from the background. Therefore, the visual matting saliency calculation method proposed by the embodiment of the present invention takes into account the characteristics of the foreground object's color, brightness, and regional integrity. Assuming that the acquired image is in rgb format, firstly, the grayscale image needs to be calculated according to the r, g, and b color channels I gray , the specific formula is:
Igray=(r+g+b)/3 (2)I gray = (r+g+b)/3 (2)
原始图像也可以是YUV等任意格式,本发明实施例对摄像机的输出图像格式不作限定,相应彩色转灰度的公式也需作调整。The original image can also be in any format such as YUV. The embodiment of the present invention does not limit the output image format of the camera, and the corresponding color-to-grayscale conversion formula also needs to be adjusted.
接着对Igray进行低通滤波和降采样,也即:将原始灰度图像Igray作为金字塔的第0尺度层。第1尺度层为第0尺度层与低通滤波器进行卷积,然后在x和y方向上分别1/2采样得到,其余层以此类推,每一层的分辨率为上一层的一半。此处的低通滤波器可以是高斯滤波、拉普拉斯滤波和Gabor滤波器,本发明实施例对生成尺度金字塔的低通滤波器的形式不作具体限制。Then low-pass filtering and downsampling are performed on I gray , that is, the original grayscale image I gray is used as the 0th scale layer of the pyramid. The 1st scale layer is convolved with the 0th scale layer and the low-pass filter, and then obtained by 1/2 sampling in the x and y directions, and the rest of the layers are analogous, and the resolution of each layer is half of the previous layer. . The low-pass filter here may be a Gaussian filter, a Laplacian filter, or a Gabor filter, and the embodiment of the present invention does not specifically limit the form of the low-pass filter for generating the scale pyramid.
与人眼视觉特性相对应,在图像亮度很低的地方,很难引起人眼注意,因此需要对尺度金字塔的亮度分量进行阈值抑制,即低于最大亮度值Igray_max的5%的区域,亮度分量置为0,这样可以有效抑制暗弱背景干扰。而目标边缘上局部亮度较小的点,虽然也有被剔除的可能,但一方面这些部位在区域显著图中将得到保留,另一方面边缘区域将划分为未知区域,因此对最后的抠图完整性不会造成影响。Corresponding to the visual characteristics of the human eye, where the brightness of the image is very low, it is difficult to attract the attention of the human eye, so it is necessary to suppress the threshold value of the brightness component of the scale pyramid, that is, the area below 5% of the maximum brightness value I gray_max , the brightness The component is set to 0, which can effectively suppress the interference of the dark background. The points with low local brightness on the edge of the target may also be eliminated, but on the one hand, these parts will be preserved in the regional saliency map, and on the other hand, the edge area will be divided into unknown areas, so the final matting is complete. Sex doesn't matter.
建立尺度金字塔后,接着计算亮度显著性图。具体计算方法为:以细尺度c上的图像为视觉的中央区域,粗尺度s上的图像为视觉的周边区域,令中央尺度c∈{2,3,4},周边尺度s=c+δ,δ∈{3,4},可得到6种中央-周边组合分别为{2-5,2-6,3-6,3-7,4-7,4-8}。将s尺度上的图像插值到c的尺度,并根据公式I(c,s)=|I(c)ΘI(s)(3),用c尺度上的图像减去插值后的图像,得到亮度差异图。其中I(σ)为图像金字塔,σ=0,1,...,8表示不同的尺度,Θ表示中央-周边差算子。这些特征图表示图像中的某个位置与其局部邻域在亮度上的差异性,这种差异性越大,表示在局部范围内亮度显著性越高,越容易引起人眼的注意。依此计算6组亮度差异图之后,对这些差异图进行融合,摒弃冗余特征,生成最后的亮度显著性图。由于在不同尺度上,差异图的绝对值大小并不能反映显著性信息,因此不能将不同尺度的差异图进行简单相加。本发明实施例中,对差异图进行归一化,归一化函数具体步骤为:After building the scale pyramid, the brightness saliency map is then calculated. The specific calculation method is: take the image on the fine scale c as the central area of vision, and the image on the coarse scale s as the peripheral area of vision, let the central scale c∈{2,3,4}, the peripheral scale s=c+δ , δ∈{3,4}, six central-peripheral combinations can be obtained, respectively {2-5,2-6,3-6,3-7,4-7,4-8}. Interpolate the image on the scale of s to the scale of c, and according to the formula I(c, s)=|I(c)ΘI(s)(3), subtract the interpolated image from the image on the scale of c to obtain the brightness Difference map. where I(σ) is the image pyramid, σ=0,1,...,8 represent different scales, and Θ represents the central-peripheral difference operator. These feature maps represent the difference in brightness between a certain position in the image and its local neighborhood. The larger the difference, the higher the brightness significance in the local range, and the easier it is to attract the attention of the human eye. After calculating 6 groups of luminance difference maps according to this, these difference maps are fused, redundant features are discarded, and the final luminance saliency map is generated. Since the absolute value of the difference map does not reflect the significance information on different scales, it is not possible to simply add the difference maps of different scales. In the embodiment of the present invention, the difference map is normalized, and the normalization function The specific steps are:
(1)对所有6幅差异图归一化至区间[0,1];(1) Normalize all 6 difference maps to the interval [0,1];
(2)分别计算每个差异图的局部方差;(2) Calculate the local variance of each difference map separately;
(3)融合权值取与局部方差成正相关,即局部方差越大,表示该差异性图包含的信息量越大,则该幅差异性图在加权组合时应该赋予较大的权值。(3) The fusion weight is positively correlated with the local variance, that is, the larger the local variance, the greater the amount of information contained in the difference map, and the difference map should be given a larger weight in the weighted combination.
然后,根据公式(4)加权组合亮度差异图,得到亮度显著性图。其中表示跨尺度相加因子。Then, according to the formula (4) Weighting and combining the luminance difference map to obtain the luminance saliency map. in Represents additive factors across scales.
接着计算颜色显著性图。根据Ewald的“颜色对”模型,在人眼视觉感受野的中心,神经元若被R颜色激活则被G颜色抑制,若被B颜色激活则被Y颜色抑制,因此根据公式(21~24)将图像从rgb三个通道转化为RGBY四个通道:Then calculate the color saliency map. According to Ewald's "color pair" model, in the center of the human visual receptive field, if a neuron is activated by R color, it will be inhibited by G color, and if it is activated by B color, it will be inhibited by Y color. Therefore, according to the formula (21~24) Convert the image from three channels of rgb to four channels of RGBY:
R=r-(g+b)/2 (5)R=r-(g+b)/2 (5)
G=g-(r+b)/2 (6)G=g-(r+b)/2 (6)
B=b-(g+r)/2 (7)B=b-(g+r)/2 (7)
Y=(r+g)/2-|r-g|/2-b (8)Y=(r+g)/2-|r-g|/2-b (8)
随后根据人眼视觉细胞的特性,计算红绿和蓝黄对抗色组RG和BY,也即:求取RG的具体过程为:分别在尺度c和尺度s上,逐像素对图像的R、G通道相减求绝对值,然后将s尺度上的计算结果插值到c尺度上,最后与c尺度上的原结果逐像素作差。BY的求取过程类似。这样多次相减,可分别得到6幅RG和BY上的颜色差异显著性图。Then, according to the characteristics of human visual cells, calculate the red-green and blue-yellow anti-color groups RG and BY, that is: The specific process of calculating RG is: on the scale c and scale s respectively, subtract the R and G channels of the image pixel by pixel to obtain the absolute value, then interpolate the calculation results on the s scale to the c scale, and finally compare it with the c scale The original result above is differenced pixel by pixel. The process of obtaining BY is similar. Such multiple subtractions can obtain 6 color difference significance maps on RG and BY respectively.
然后,根据公式加权组合颜色差异图,得到颜色显著性图。Then, according to the formula Color difference maps are weighted and combined to obtain color saliency maps.
接着计算区域显著性图。对前景目标进行超像素分割,接着统计每个超像素的归一化颜色直方图,并根据颜色直方图对超像素进行聚类,将图像分割为几个区域{r1,r2,...,rk},每个区域的聚类中心为cei,i=1,...,k。则区域ri的区域显著性图VAr可以计算如下:Then calculate the regional saliency map. Perform superpixel segmentation on the foreground target, then count the normalized color histogram of each superpixel, and cluster the superpixels according to the color histogram, and divide the image into several regions {r 1 ,r 2 ,.. .,r k }, the cluster center of each region is ce i , i=1,...,k. Then the region saliency map VA r of region r i can be calculated as follows:
其中,w(ri)表示ri区域面积的权重,计算方法为:Among them, w(r i ) represents the weight of the area of r i area, and the calculation method is:
其中,PN(ri)表示区域ri的像素个数。上式表示区域面积越大,权重越大,即区域ri周围面积大的区域对其显著性的影响要大于面积小的区域。Wherein, PN(r i ) represents the number of pixels in the region r i . The above formula indicates that the larger the area of the region, the greater the weight, that is, the area with a large area around the area r i has a greater impact on its significance than the area with a small area.
Dr(rj,ri)表示的是区域rj和区域ri的聚类中心的距离,即:Dr(r j ,r i ) represents the distance between the cluster center of region r j and region r i , namely:
其中,cei(m)、cej(n)表示的是颜色直方图cei、cej的第m、n个颜色分量,Dc(m,n)表示的是第m、n种颜色在LAB颜色空间的欧氏距离。Among them, ce i (m) and ce j (n) represent the m and n color components of the color histogram ce i and ce j , and Dc(m, n) represents the m and n colors in the LAB The Euclidean distance of the color space.
本发明实施例提出一种超像素分割和聚类相结合的区域显著性提取方法,具体实施步骤将在下文图2进行说明。The embodiment of the present invention proposes a region saliency extraction method combining superpixel segmentation and clustering. The specific implementation steps will be described in FIG. 2 below.
步骤A)对输入图像作超像素分割。可选用的超像素分割方法包括归一化分割(NC)算法、图割(GS)算法、快速漂移(QS)算法、简单线性迭代聚类(SLIC)算法等。考虑到算法的快速性和实用性,本发明实施例选择SLIC算法,具体步骤为:Step A) Perform superpixel segmentation on the input image. The available superpixel segmentation methods include Normalized Segmentation (NC) algorithm, Graph Cut (GS) algorithm, Quick Shift (QS) algorithm, Simple Linear Iterative Clustering (SLIC) algorithm, etc. Considering the rapidity and practicability of the algorithm, the embodiment of the present invention selects the SLIC algorithm, and the specific steps are:
1)假设图像的总像素数为N,预将其分割为K*K个超像素。首先将整幅图像均匀分割为K*K个小块,取每个小块的中心作为初始点。在每个初始点的3*3邻域计算像素梯度,梯度最小的点为超像素分割算法的初始中心Oi,i=0,1,...K*K-1,赋予每个初始中心一个单独的标签;1) Assuming that the total number of pixels of the image is N, pre-segment it into K*K superpixels. First, the entire image is evenly divided into K*K small blocks, and the center of each small block is taken as the initial point. Calculate the pixel gradient in the 3*3 neighborhood of each initial point, the point with the smallest gradient is the initial center O i of the superpixel segmentation algorithm, i=0,1,...K*K-1, and assign each initial center a single label;
2)将每个像素点表示为CIELAB颜色空间和XY坐标的五维向量{l,a,b,x,y},计算每个像素点与其最接近的中心的距离,距离计算公式为:2) Express each pixel as a five-dimensional vector {l, a, b, x, y} of CIELAB color space and XY coordinates, and calculate the distance between each pixel and its closest center. The distance calculation formula is:
其中,dlab为颜色差异值,dxy为位置差异值,S为中心间距,m为平衡参数,Dis为像素之间的距离。对每个像素,赋予与之最接近的中心的标签;Among them, dlab is the color difference value, dxy is the position difference value, S is the center distance, m is the balance parameter, and Dis is the distance between pixels. For each pixel, assign the label of the closest center to it;
3)重新计算不同标签的像素的中心,更新Oi,并计算新旧中心的差值,若差值小于阈值则算法结束,否则返回步骤2)。3) Recalculate the centers of pixels with different labels, update O i , and calculate the difference between the old and new centers, if the difference is less than the threshold, the algorithm ends, otherwise return to step 2).
步骤B:统计每个超像素的归一化颜色直方图。即将Lab颜色空间的每个维度分为若干个bin,统计超像素中的像素颜色落在每个bin中的概率,最后将统计的直方图归一化。Step B: Count the normalized color histogram of each superpixel. That is, each dimension of the Lab color space is divided into several bins, and the probability of the pixel color in the superpixel falling in each bin is counted, and finally the statistical histogram is normalized.
步骤C:对超像素进行聚类,将图像分为若干个连续区域。可选用的聚类方法包括基于划分、模型、层次、网格、密度聚类的任意一种,本实施例中使用基于密度的DBSCAN聚类算法。具体步骤为:从超像素中选取一个作为种子点,用给定的误差阈值Eps和MinPts搜索所有它的密度可达超像素并判断该点是否为核心点。如果是核心点,则与其密度可达点形成一个聚类区域;如果不是核心点也不是边界点,则重新选择其他点作为种子点并重复以上步骤;如果不是核心点而是边界点,则认为是噪声点并丢弃。重复以上步骤直至所有点均被检索,最后形成若干个划分区域。DBSCAN能有效应对噪声点,能划分任意形状的类簇,因此适用于本实施例。Step C: cluster the superpixels, and divide the image into several continuous regions. Optional clustering methods include any one based on division, model, hierarchy, grid, and density clustering. In this embodiment, the density-based DBSCAN clustering algorithm is used. The specific steps are: select one of the superpixels as a seed point, use the given error threshold Eps and MinPts to search all its density-reachable superpixels and judge whether the point is a core point. If it is a core point, form a cluster area with its density-reachable points; if it is not a core point or a boundary point, select another point as a seed point and repeat the above steps; if it is not a core point but a boundary point, consider is the noise point and discarded. Repeat the above steps until all points are retrieved, and finally form several divided regions. DBSCAN can effectively deal with noise points and can divide clusters of any shape, so it is suitable for this embodiment.
步骤D:计算区域显著度。根据超像素聚类结果和公式(12)(13)(14),计算每个区域的区域显著度。Step D: Calculate the regional saliency. According to the superpixel clustering results and formulas (12)(13)(14), the regional saliency of each region is calculated.
最后,根据颜色信息、区域信息和亮度信息的重要程度,使用公式VA=αgVAg+αcVAc+αrVAr(18)和αg+αc+αr=1(19)融合三类显著性图,得到最后的抠图视觉显著图。在本实施例中,取αc=0.5,αr=0.3,αg=0.2。Finally, according to the importance of color information, area information and brightness information, use the formula VA = α g VA g + α c VA c + α r VA r (18) and α g + α c + α r = 1 (19) The three types of saliency maps are fused to obtain the final matting visual saliency map. In this embodiment, α c =0.5, α r =0.3, and α g =0.2 are taken.
步骤二:根据抠图视觉显著度图,使用空间域滤波和阈值分割算法,分离出前景区域、背景区域,结合形态学运算得到三分图。Step 2: According to the matting visual saliency map, use spatial domain filtering and threshold segmentation algorithm to separate the foreground area and background area, and combine the morphological operation to obtain the three-part map.
首先使用空间域滤波器对抠图视觉显著图进行平滑以去除噪点,随后选用阈值分割算法(如Otsu方法)计算得到阈值Tva,则在显著图中,显著性值大于Tva的像素对应为前景区域,小于Tva的像素对应为背景区域,从而得到粗分三分图Itc。First, the spatial domain filter is used to smooth the matting visual saliency map to remove noise, and then the threshold value segmentation algorithm (such as Otsu method) is used to calculate the threshold T va , then in the saliency map, the pixels with a saliency value greater than T va correspond to In the foreground area, the pixels smaller than T va correspond to the background area, so that the rough tripartite map I tc is obtained.
空间域滤波是为了保证局部区域不出现显著度的奇点,同时对显著度值进行平滑,可选择中值滤波、双边滤波或者高斯滤波器。为了保证算法的计算效率,本实施例中选择高斯滤波器作为抠图视觉显著度图的平滑滤波器,滤波器窗口为3*3。Spatial domain filtering is to ensure that there are no singularities of saliency in the local area, and at the same time smooth the saliency value. Median filtering, bilateral filtering or Gaussian filtering can be selected. In order to ensure the calculation efficiency of the algorithm, in this embodiment, a Gaussian filter is selected as the smoothing filter of the matting visual saliency map, and the filter window is 3*3.
由于在抠图视觉显著度图中,综合考虑了亮度显著性、颜色显著性和区域显著性,保证前景区域的显著度远大于背景区域的显著度,因此对于阈值分割算法的性能并没有苛刻要求,阈值Tva可以在一个较宽的范围内取值而不会影响前景分割的结果。在本实施例中,我们选取Otsu阈值算法,具体步骤为:Since in the matting visual saliency map, the saliency of brightness, color saliency and regional saliency are comprehensively considered to ensure that the saliency of the foreground area is much greater than that of the background area, so there are no strict requirements for the performance of the threshold segmentation algorithm. , the threshold T va can take a value in a wide range without affecting the result of foreground segmentation. In this embodiment, we select the Otsu threshold algorithm, and the specific steps are:
(1)假设抠图视觉显著度图VA的灰度级为0,1,...,L-1,图像总像素数为N,统计其灰度直方图,即:假设VA中灰度为i,i=0,1,...,L-1的像素个数为Ni,则灰度直方图中对应灰度级i的值为Ni/N;(1) Assume that the gray level of the matting visual saliency map VA is 0, 1, ..., L-1, and the total number of pixels in the image is N, and count its gray level histogram, that is, assuming that the gray level in VA is i, the number of pixels of i=0,1,...,L-1 is N i , then the value corresponding to gray level i in the gray histogram is N i /N;
(2)将阈值Tva从0到L-1遍历,将像素分为小于Tva和大于等于Tva两类,统计这两类之间的类间差:(2) Traverse the threshold T va from 0 to L-1, divide the pixels into two categories smaller than T va and greater than or equal to T va , and count the inter-class differences between these two categories:
g=ω0(μ0-μ)2+ω1(μ1-μ)2 (20)g=ω 0 (μ 0 -μ) 2 +ω 1 (μ 1 -μ) 2 (20)
其中,ω0、ω1分别是小于Tva和大于等于Tva的像素个数所占的比重,μ0、μ1分别是小于Tva和大于等于Tva的像素均值。Among them, ω 0 and ω 1 are the proportions of the number of pixels less than T va and greater than or equal to T va respectively, and μ 0 and μ 1 are the mean values of pixels less than T va and greater than or equal to T va respectively.
(3)遍历之后,找到类间差g取最大值时对应的Tva作为最终的分割阈值。(3) After traversal, find the corresponding T va when the inter-class difference g takes the maximum value as the final segmentation threshold.
形态学算子的形状、尺寸应该根据图像内容如图像分辨率、前景区域的尺寸、形状进行选取,本实施例中默认为圆形以保证各个方向的均匀性。进行形态学操作时,为避免阈值分割后出现小的孔洞和毛边,对Itc作如下的形态学操作:首先作一次开运算,以连接局部不连续的区域,去除孔洞;随后作尺寸为re的腐蚀操作,得到三分图的前景区域Fg;作尺寸为rd的膨胀操作,得到三分图的背景部分Bg,前景和背景之间的区域为未知区域,这样就得到待抠图像I的细分三分图It。The shape and size of the morphological operator should be selected according to the image content such as image resolution, size and shape of the foreground area. In this embodiment, the default is a circle to ensure uniformity in all directions. When performing morphological operations, in order to avoid small holes and burrs after threshold segmentation, the following morphological operations are performed on I tc : firstly, an opening operation is performed to connect local discontinuous regions and remove holes; The corrosion operation of e can obtain the foreground area F g of the trimap; the expansion operation of size r d can obtain the background part B g of the trimap, and the area between the foreground and the background is an unknown area, so that we can obtain The subdivided trimap It of image I.
假设前景区域的灰度值为1,背景区域的灰度值为0,使用形态学核算子与二值图进行卷积,对于白色的前景区域,腐蚀能缩小其边界,而对于黑色的背景区域,膨胀能缩小其边界,最后前景和背景之间即为未知区域。Assuming that the gray value of the foreground area is 1 and the gray value of the background area is 0, the morphological kernel operator is used to convolve with the binary image. For the white foreground area, corrosion can reduce its boundary, while for the black background area , the expansion can shrink its boundary, and finally the unknown area is between the foreground and the background.
步骤三:根据三分图,对未知区域的每个像素进行梯度计算,根据梯度方向和显著性大小采样得到当前未知区域像素的前景、背景样本点集。Step 3: Calculate the gradient of each pixel in the unknown area according to the tripartite map, and obtain the foreground and background sample point sets of the pixels in the current unknown area by sampling according to the gradient direction and saliency.
对未知区域的每个像素I(xi,yi),计算其梯度值Grai,梯度的方向记为θ,θ的计算公式为For each pixel I(x i , y i ) in the unknown area, calculate its gradient value Gra i , the direction of the gradient is denoted as θ, and the calculation formula of θ is
在本实施例中,在梯度方向的直线上搜索到参考的前景、背景样本点对,在该样本点对的周围,根据当前位置像素点的抠图视觉显著度值确定搜索区域的大小,显著性越大,搜索范围越小,表示在显著性大的像素周围,真实的前景、背景点更靠近该像素。接着,根据空间距离和视觉显著度分别搜索出5个前景和背景样本对,具体过程为:In this embodiment, a reference foreground and background sample point pair is searched on the straight line in the gradient direction, and around the sample point pair, the size of the search area is determined according to the matting visual saliency value of the pixel at the current position. The larger the , the smaller the search range, which means that the real foreground and background points are closer to the pixel around the pixel with high salience. Then, according to the spatial distance and visual salience, five foreground and background sample pairs are searched out respectively. The specific process is as follows:
1)令搜索半径rs的初始值为1,计数count=0;1) Let the initial value of search radius r s be 1, count count=0;
2)在以参考的前景/背景样本点为中心,rs为半径为的圆上,对所有像素点p计算是否满足条件:|VA(p)-VA(p0)|<Tvap,其中p0为搜索区域的中心即参考的前景或背景样本点,p为搜索圆上的点,若满足条件则count+1;2) On a circle with the reference foreground/background sample point as the center and r s as the radius, calculate whether the condition is met for all pixel points p: |VA(p)-VA(p 0 )|<T vap , where p 0 is the center of the search area, that is, the reference foreground or background sample point, p is the point on the search circle, and count+1 if the condition is met;
3)判断是否count>5,若是则搜索停止;若否则rs++并返回步骤2)。3) Determine whether count>5, if yes, stop the search; otherwise, execute r s ++ and return to step 2).
这样的采样策略,一方面可生成较少的采样点对,降低后续抠图计算的复杂度,另一方面沿着梯度方向进行采样,能较大概率保证前景和背景点分别位于不同的纹理区域,同时根据邻域显著性值的采样又能保证采样点之间具有一定的空间和显著性相似度,因此该采样方法能较大概率的保证包含真实采样点对,从而提高抠图的准确性Such a sampling strategy, on the one hand, can generate fewer sampling point pairs, reducing the complexity of subsequent matting calculations. On the other hand, sampling along the gradient direction can ensure that the foreground and background points are located in different texture regions with a high probability. , and at the same time, the sampling according to the neighborhood saliency value can ensure a certain degree of spatial and saliency similarity between the sampling points, so this sampling method can ensure a high probability of including real sampling point pairs, thereby improving the accuracy of the matting
步骤四:根据当前未知区域像素的前景、背景样本点集,计算每个样本点的不透明度和置信度,取置信度最高的样本对作为最终抠图用的最佳样本对。然后平滑不透明度的局部区域,得到最终估计的不透明度;Step 4: Calculate the opacity and confidence of each sample point according to the foreground and background sample point sets of pixels in the current unknown area, and take the sample pair with the highest confidence as the best sample pair for the final image matting. Then smooth the local area of opacity to get the final estimated opacity;
从前景样本点集和背景样本点集中任选一点,根据成像线性模型,估计不透明度为Choose a point from the foreground sample point set and the background sample point set, according to the imaging linear model, the estimated opacity is
其中和分别表示第m个前景样本点和第n个背景样本点的颜色值。这样对于每个未知区域像素,一共获得25个不同的不透明度估计,随后需要从中选出置信度最高的不透明度用于抠出前景目标。in with Represent the color values of the mth foreground sample point and the nth background sample point, respectively. In this way, for each unknown area pixel, a total of 25 different opacity estimates are obtained, and then it is necessary to select the opacity with the highest confidence for the foreground target.
最优的前景背景点对的要求为:1)对于式(1)的线性模型具有最小的误差;2)前景样本点和背景样本点具有较大的颜色差;3)前景或者背景样本点与当前像素的颜色值较接近;4)前景和背景样本点与当前像素的空间距离较小。The requirements for the optimal foreground and background point pair are: 1) the linear model of formula (1) has the smallest error; 2) the foreground sample point and the background sample point have a large color difference; 3) the foreground or background sample point and The color value of the current pixel is relatively close; 4) The spatial distance between the foreground and background sample points and the current pixel is small.
根据准则1)和准则2),定义线性-色差相似度为According to criterion 1) and criterion 2), the linear-color difference similarity is defined as
根据准则3),定义颜色相似度为According to criterion 3), the color similarity is defined as
根据准则4),定义空间距离相似度为According to criterion 4), the spatial distance similarity is defined as
定义置信度函数为Define the confidence function as
其中,分别是线性-色差相似度、颜色相似度、空间距离相似度,Di是未知像素的前背景采样半径,由其抠图视觉显著度决定,视觉显著度越大则Di越小,σ1、σ2和σ3用于调整不同相似度之间的权值。选取置信度最高的α作为当前未知像素的不透明度的估计,而对应的前景、背景样本对则作为最终抠图使用的最佳前景、背景样本对。in, They are the linear-color difference similarity, color similarity, and spatial distance similarity. D i is the front-background sampling radius of the unknown pixel, which is determined by the visual saliency of the image matting. The larger the visual salience, the smaller the D i , σ 1 , σ 2 and σ 3 are used to adjust the weights between different similarities. The α with the highest confidence is selected as the estimation of the opacity of the current unknown pixel, and the corresponding foreground and background sample pair is used as the best foreground and background sample pair for the final matting.
针对未知区域的每个像素,逐点如前估计不透明度。最终,有可能某些像素点的置信度过低,导致估计出的不透明度误差较大,最后抠图出现色差。因此需要对未知区域不透明度做局部平滑。平滑时需要考虑的因素有:颜色值差异、空间位置差异、显著度差异,即局部颜色差异越大、局部空间位置越远、显著度越大的像素,权值越小。为此,为平衡空间域、颜色值域、显著度值域的影响,本发明中的不透明度平滑方法如下:For each pixel of the unknown region, opacity is estimated point-by-point as before. In the end, it is possible that the confidence of some pixels is too low, resulting in a large error in the estimated opacity, and finally there is chromatic aberration in the cutout. Therefore, it is necessary to locally smooth the opacity of the unknown area. The factors that need to be considered during smoothing are: color value difference, spatial position difference, and saliency difference, that is, pixels with greater local color difference, farther local spatial position, and greater saliency have smaller weights. For this reason, in order to balance the impact of space domain, color value range, and salience value range, the opacity smoothing method in the present invention is as follows:
其中,Pi、Pj表示i、j二点的坐标,Ii、Ij表示i、j二点的颜色,VAi、VAj表示i、j二点的抠图视觉显著度,σp、σc和σva用于调整三者之间的权重。这样计算出来的不透明度由于充分考虑了空间位置、颜色和显著度的影响,使得空间位置越近、颜色越相似、显著度越接近的像素之间不透明度越接近,与人眼的主观感受是一致的,从而有效排除了不透明度的奇异点,提高了抠图的精度。Among them, P i and P j represent the coordinates of points i and j, I i and I j represent the colors of points i and j, VA i and VA j represent the visual salience of points i and j in matting, σ p , σ c and σ va are used to adjust the weight among the three. The opacity calculated in this way fully considers the influence of spatial position, color, and saliency, so that the closer the spatial position, the more similar the color, and the closer the salience, the closer the opacity between pixels is, which is the same as the subjective feeling of the human eye. Consistent, thus effectively eliminating the singularity of opacity and improving the accuracy of matting.
根据最优的前景背景点对的4个准则,确定其度量函数如式(30)所示,其中综合考虑了线性模型符合度、前景背景颜色差、目标像素与前背景的颜色差、空间距离四个指标。通过设定σ1、σ2、σ3的值,用于调整不同相似度的权值。随后,根据公式(31),对不透明度进行平滑,得到最终抠图用的不透明度。在本实施例中,平滑操作综合考虑了颜色差异、空间位置差异和显著度差异,通过改变σp、σc和σva,可以调整这三者在加权系数中的比重。例如,如果注重显著度信息,即σva应该大于σp、σc。According to the four criteria of the optimal foreground-background point pair, the metric function is determined as shown in formula (30), in which the linear model conformity, the foreground-background color difference, the color difference between the target pixel and the foreground-background, and the spatial distance are comprehensively considered Four indicators. By setting the values of σ 1 , σ 2 , and σ 3 , it is used to adjust the weights of different similarities. Then, according to formula (31), the opacity is smoothed to obtain the final opacity for matting. In this embodiment, the smoothing operation comprehensively considers color differences, spatial position differences and salience differences, and by changing σ p , σ c and σ va , the proportions of these three in the weighting coefficients can be adjusted. For example, if attention is paid to the significance information, σ va should be greater than σ p and σ c .
步骤五:根据最终估计的不透明度和最佳样本对的颜色值,在原始图像中进行抠图操作,提取出前景目标。Step 5: According to the final estimated opacity and the color value of the best sample pair, a matting operation is performed in the original image to extract the foreground target.
具体的操作步骤为:新建一张与原图大小相同的图像作为背景,利用计算出的不透明度和前景像素值,根据公式(1)与新背景进行合成,得到最终的抠图结果。The specific operation steps are: create a new image with the same size as the original image as the background, and use the calculated opacity and foreground pixel value to synthesize it with the new background according to formula (1) to obtain the final matting result.
本发明实例中针对自然图像进行抠图,对于前景目标、背景的具体内容不作限定,只需要前景与背景有肉眼可辨的明显区分边界即可。In the example of the present invention, the matting is performed on natural images, and the specific content of foreground objects and backgrounds is not limited, as long as the foreground and the background have obvious distinguishing boundaries that can be distinguished by naked eyes.
本发明实施例提供了一种自动抠图算法,通过获取待抠图的原始图像,计算原始图像的抠图视觉显著度;接着根据抠图视觉显著度图,使用空间域滤波和阈值分割算法,分离出前景区域、背景区域,结合形态学运算得到三分图;根据三分图,对未知区域的每个像素进行梯度计算,根据梯度方向和显著性大小采样得到当前未知区域像素的前景、背景样本点集;根据当前未知区域像素的前景、背景样本点集,计算每个样本点的不透明度和置信度,取置信度最高的样本对作为最终抠图用的最佳样本对。然后平滑不透明度的局部区域,得到最终估计的不透明度;根据最终估计的不透明度和最佳样本对的颜色值,在原始图像中进行抠图操作,提取出前景目标。本发明提出的抠图视觉显著性计算方法模拟人眼的视觉注意机制,可自动提取前景目标,免去了复杂的用户交互操作,完成全自动抠图过程,操作简单方便;通过限制样本点对的数量,缩短了抠图时间;对显著性图和不透明度均进行了平滑,提高了抠图精度。An embodiment of the present invention provides an automatic image matting algorithm. By obtaining the original image to be matted, the matting visual saliency of the original image is calculated; then according to the matting visual saliency map, using spatial domain filtering and threshold segmentation algorithm, Separate the foreground area and the background area, and combine the morphological operations to obtain the three-part map; according to the three-part map, perform gradient calculation for each pixel in the unknown area, and obtain the foreground and background of the current unknown area pixel by sampling according to the gradient direction and significance Sample point set: Calculate the opacity and confidence of each sample point according to the foreground and background sample point sets of pixels in the current unknown area, and take the sample pair with the highest confidence as the best sample pair for the final matting. Then smooth the local area of opacity to obtain the final estimated opacity; according to the final estimated opacity and the color value of the best sample pair, a matting operation is performed in the original image to extract the foreground target. The matting visual saliency calculation method proposed by the present invention simulates the visual attention mechanism of the human eye, can automatically extract foreground objects, eliminates complicated user interaction operations, completes the automatic matting process, and is simple and convenient to operate; by limiting sample points to The amount of matting shortens the matting time; both the saliency map and the opacity are smoothed to improve the matting accuracy.
图3是本发明实施例提供的一种自动抠图装置的结构示意图,该装置包括:Fig. 3 is a schematic structural diagram of an automatic picture-cutting device provided by an embodiment of the present invention, the device comprising:
图像获取模块,用于采集单幅图像的颜色值;Image acquisition module, used to collect the color value of a single image;
抠图视觉显著度计算模块,用于根据所述图像获取模块获取的图像,计算其抠图视觉显著度;The matting visual salience calculation module is used to calculate the matting visual saliency according to the image obtained by the image acquisition module;
三分图计算模块,用于根据所述抠图视觉显著度计算模块获取的抠图视觉显著度图,使用空间域滤波和阈值分割算法,分离出前景区域、背景区域,结合形态学运算,计算得到三分图;The tripartite graph calculation module is used to separate the foreground area and the background area according to the matting visual saliency map obtained by the matting visual saliency calculation module, using spatial domain filtering and threshold segmentation algorithm, and to calculate in combination with morphological operations Get the three-point map;
样本点集获取模块,根据所述三分图计算模块获取的三分图,对未知区域的每个像素进行梯度计算,根据梯度方向和显著性大小采样得到当前未知区域像素的前景、背景样本点集;The sample point set acquisition module performs gradient calculation on each pixel in the unknown area according to the tripartite map acquired by the tripartite map calculation module, and obtains the foreground and background sample points of the pixels in the current unknown area by sampling according to the gradient direction and significance set;
不透明度计算模块,根据所述样本点集获取模块获取的前景、背景样本点集,计算每个样本点的不透明度和置信度,取置信度最高的样本对作为最终抠图用的最佳样本对。然后对不透明度的局部区域进行平滑,得到最终估计的不透明度;The opacity calculation module calculates the opacity and confidence of each sample point according to the foreground and background sample point sets obtained by the sample point set acquisition module, and takes the sample pair with the highest confidence as the best sample for final matting right. The local area of opacity is then smoothed to obtain the final estimated opacity;
前景抠出模块,用于根据最终估计的不透明度和最佳样本对的颜色值,在原始图像中进行抠图操作,提取出前景目标。The foreground cutout module is used to perform a cutout operation in the original image to extract the foreground target according to the final estimated opacity and the color value of the best sample pair.
具体地,所述抠图视觉显著度计算模块包括:Specifically, the matting visual salience calculation module includes:
尺度金字塔生成单元,用于根据获取的待抠图像,进行平滑和降采样,生成尺度金字塔;A scale pyramid generation unit is used to perform smoothing and downsampling according to the acquired image to be cut to generate a scale pyramid;
亮度显著性计算单元,用于根据尺度金字塔生成单元获得的尺度金字塔,以细尺度上的图像为视觉的中央区域,粗尺度上的图像为视觉的周边区域,计算亮度显著性图;The brightness saliency calculation unit is used to calculate the brightness saliency map according to the scale pyramid obtained by the scale pyramid generation unit, with the image on the fine scale as the central area of vision, and the image on the coarse scale as the peripheral area of vision;
颜色显著性计算单元,用于根据尺度金字塔生成单元获得的尺度金字塔,以细尺度上的图像为视觉的中央区域,粗尺度上的图像为视觉的周边区域,计算颜色显著性图;The color saliency calculation unit is used to calculate the color saliency map according to the scale pyramid obtained by the scale pyramid generation unit, with the image on the fine scale as the central area of vision and the image on the coarse scale as the peripheral area of vision;
区域显著性计算单元,用于根据图像获取模块获取的待抠图像,对前景目标进行超像素分割,并根据颜色直方图对超像素进行聚类,计算每个聚类区域的颜色显著性;The regional saliency calculation unit is used to perform superpixel segmentation on the foreground object according to the image to be cut obtained by the image acquisition module, and cluster the superpixels according to the color histogram, and calculate the color saliency of each cluster region;
显著性融合单元,用于根据亮度显著性计算单元获取的亮度显著性图、颜色显著性计算单元获取的颜色显著性图、区域显著性计算单元获取的区域显著性图,融合得到待抠图像的抠图视觉显著性图。The saliency fusion unit is used to fuse the saliency image obtained by the luminance saliency calculation unit, the color saliency image obtained by the color saliency calculation unit, and the regional saliency image obtained by the area saliency calculation unit to obtain the image to be matted. Matting visual saliency map.
所述三分图计算模块包括:The tripartite graph calculation module includes:
空间域滤波单元,用于选取合适的空间域滤波方法,对抠图视觉显著度图进行平滑;The spatial domain filtering unit is used to select an appropriate spatial domain filtering method to smooth the matting visual saliency map;
阈值分割单元,用于根据空间域滤波单元获得的平滑抠图视觉显著度图,选用阈值分割算法分割获取前景区域和背景区域,得到粗略的三分图;The threshold segmentation unit is used to segment and obtain the foreground area and the background area according to the smooth matting visual saliency map obtained by the spatial domain filter unit, and obtain a rough three-part map;
形态学运算单元:用于根据阈值分割单元获取的粗略三分图,进行形态学操作以填充孔洞,得到前景、背景和未知区域,即精确的三分图。Morphological operation unit: used to perform morphological operations on the rough tripartition map obtained by the threshold segmentation unit to fill holes, and obtain foreground, background and unknown regions, that is, precise tripartite maps.
所述样本点集获取模块包括:The sample point set acquisition module includes:
梯度计算单元,用于根据所述待抠图像的灰度值,获取每个未知像素的梯度;A gradient calculation unit, configured to obtain the gradient of each unknown pixel according to the gray value of the image to be cut;
采样单元,用于根据梯度计算单元得到的梯度方向作直线,取直线与前景区域和背景区域的第一个交点对作为初始搜索点,在该搜索点的邻域,由近到远搜索与未知像素显著性值差异小于阈值的样本点。The sampling unit is used to make a straight line according to the gradient direction obtained by the gradient calculation unit, and take the first intersection point pair between the straight line and the foreground area and the background area as the initial search point. In the neighborhood of the search point, search and unknown from near to far The sample points whose pixel significance value difference is less than the threshold.
所述不透明度计算模块包括:The opacity calculation module includes:
线性-色差相似度计算单元:用于根据样本点集获取模块得到的样本点集,逐对取出样本点,并计算其线性-颜色相似度;Linear-color difference similarity calculation unit: used to extract sample points pair by pair according to the sample point set obtained by the sample point set acquisition module, and calculate its linear-color similarity;
颜色相似度计算单元:用于根据样本点集获取模块得到的样本点集,逐对取出样本点,并计算其颜色相似度;Color similarity calculation unit: used to extract sample points pair by pair according to the sample point set obtained by the sample point set acquisition module, and calculate their color similarity;
空间距离相似度计算单元:用于根据样本点集获取模块得到的样本点集,逐对取出样本点,并计算其空间距离相似度;Spatial distance similarity calculation unit: used to take out sample points pair by pair according to the sample point set obtained by the sample point set acquisition module, and calculate their spatial distance similarity;
样本筛选单元:用于根据从线性-色差相似度计算单元、颜色相似度计算单元和空间距离相似度计算单元获取的相似度值,计算每一对样本点相对当前未知像素的置信度;选取置信度最高的不透明度作为当前位置像素的不透明度的估计。Sample screening unit: used to calculate the confidence of each pair of sample points relative to the current unknown pixel according to the similarity value obtained from the linear-color difference similarity calculation unit, color similarity calculation unit and spatial distance similarity calculation unit; select the confidence The highest opacity is used as an estimate of the opacity of the pixel at the current location.
平滑单元:用于根据样本筛选单元获取的不透明度,对其做局部平滑。Smoothing unit: It is used to filter the opacity obtained by the unit according to the sample, and perform local smoothing on it.
本发明实施例提供了一种自动抠图装置,通过获取待抠图的原始图像,计算原始图像的抠图视觉显著度;接着根据抠图视觉显著度图,使用空间域滤波和阈值分割算法,分离出前景区域、背景区域,结合形态学运算得到三分图;根据三分图,对未知区域的每个像素进行梯度计算,根据梯度方向和显著性大小采样得到当前未知区域像素的前景、背景样本点集;根据当前未知区域像素的前景、背景样本点集,计算每个样本点的不透明度和置信度,取置信度最高的样本对作为最终抠图用的最佳样本对。然后平滑不透明度的局部区域,得到最终估计的不透明度;根据最终估计的不透明度和最佳样本对的颜色值,在原始图像中进行抠图操作,提取出前景目标。本发明提出的抠图视觉显著性计算方法模拟人眼的视觉注意机制,可自动提取前景目标,免去了复杂的用户交互操作,完成全自动抠图过程,操作简单方便;通过限制样本点对的数量,缩短了抠图时间;对显著性图和不透明度均进行了平滑,提高了抠图精度。An embodiment of the present invention provides an automatic image matting device, which calculates the matting visual saliency of the original image by acquiring the original image to be matted; then uses the spatial domain filtering and threshold segmentation algorithm according to the matting visual saliency map, Separate the foreground area and the background area, and combine the morphological operations to obtain the three-part map; according to the three-part map, perform gradient calculation for each pixel in the unknown area, and obtain the foreground and background of the current unknown area pixel by sampling according to the gradient direction and significance Sample point set: Calculate the opacity and confidence of each sample point according to the foreground and background sample point sets of pixels in the current unknown area, and take the sample pair with the highest confidence as the best sample pair for the final matting. Then smooth the local area of opacity to obtain the final estimated opacity; according to the final estimated opacity and the color value of the best sample pair, a matting operation is performed in the original image to extract the foreground object. The matting visual saliency calculation method proposed by the present invention simulates the visual attention mechanism of the human eye, can automatically extract foreground objects, eliminates complicated user interaction operations, completes the automatic matting process, and is simple and convenient to operate; by limiting sample points to The amount of matting shortens the matting time; both the saliency map and the opacity are smoothed to improve the matting accuracy.
本发明实施例还提供了一种自动抠图的计算机程序产品。The embodiment of the present invention also provides a computer program product for automatic image cutout.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710638979.9A CN107452010B (en) | 2017-07-31 | 2017-07-31 | Automatic cutout algorithm and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710638979.9A CN107452010B (en) | 2017-07-31 | 2017-07-31 | Automatic cutout algorithm and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107452010A true CN107452010A (en) | 2017-12-08 |
CN107452010B CN107452010B (en) | 2021-01-05 |
Family
ID=60490577
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710638979.9A Active CN107452010B (en) | 2017-07-31 | 2017-07-31 | Automatic cutout algorithm and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107452010B (en) |
Cited By (47)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108134937A (en) * | 2017-12-21 | 2018-06-08 | 西北工业大学 | A kind of compression domain conspicuousness detection method based on HEVC |
CN108320294A (en) * | 2018-01-29 | 2018-07-24 | 袁非牛 | A kind of full-automatic replacement method of portrait background intelligent of China second-generation identity card photo |
CN108460383A (en) * | 2018-04-11 | 2018-08-28 | 四川大学 | Saliency refined method based on neural network and image segmentation |
CN108596913A (en) * | 2018-03-28 | 2018-09-28 | 众安信息技术服务有限公司 | A kind of stingy drawing method and device |
CN109461158A (en) * | 2018-11-19 | 2019-03-12 | 第四范式(北京)技术有限公司 | Color image segmentation method and system |
CN109493363A (en) * | 2018-09-11 | 2019-03-19 | 北京达佳互联信息技术有限公司 | A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance |
CN109540925A (en) * | 2019-01-23 | 2019-03-29 | 南昌航空大学 | Complicated ceramic tile surface defect inspection method based on difference shadow method and local variance measurement operator |
CN109785329A (en) * | 2018-10-29 | 2019-05-21 | 重庆师范大学 | Based on the purple soil image segmentation extracting method for improving SLIC algorithm |
CN110111342A (en) * | 2019-04-30 | 2019-08-09 | 贵州民族大学 | A kind of optimum option method and device of stingy nomography |
CN110288617A (en) * | 2019-07-04 | 2019-09-27 | 大连理工大学 | Automatic human body slice image segmentation method based on shared matting and ROI gradual change |
CN110298861A (en) * | 2019-07-04 | 2019-10-01 | 大连理工大学 | Rapid three-dimensional image segmentation method based on shared sampling |
CN110400323A (en) * | 2019-07-30 | 2019-11-01 | 上海艾麒信息科技有限公司 | It is a kind of to scratch drawing system, method and device automatically |
CN110415273A (en) * | 2019-07-29 | 2019-11-05 | 肇庆学院 | A method and system for efficient motion tracking of robots based on visual saliency |
CN110503704A (en) * | 2019-08-27 | 2019-11-26 | 北京迈格威科技有限公司 | Construction method, device and electronic device of tripartite graph |
CN110751655A (en) * | 2019-09-16 | 2020-02-04 | 南京工程学院 | Automatic cutout method based on semantic segmentation and significance analysis |
CN110751654A (en) * | 2019-08-30 | 2020-02-04 | 稿定(厦门)科技有限公司 | Image matting method, medium, equipment and device |
CN110956681A (en) * | 2019-11-08 | 2020-04-03 | 浙江工业大学 | A Portrait Background Automatic Replacement Method Combining Convolutional Networks and Neighborhood Similarity |
CN111028259A (en) * | 2019-11-15 | 2020-04-17 | 广州市五宫格信息科技有限责任公司 | Foreground extraction method for improving adaptability through image saliency |
CN111161286A (en) * | 2020-01-02 | 2020-05-15 | 大连理工大学 | An Interactive Natural Image Mapping Method |
CN111383232A (en) * | 2018-12-29 | 2020-07-07 | Tcl集团股份有限公司 | Matting method, matting device, terminal equipment and computer-readable storage medium |
CN111435282A (en) * | 2019-01-14 | 2020-07-21 | 阿里巴巴集团控股有限公司 | Image processing method and device and electronic equipment |
CN111462027A (en) * | 2020-03-12 | 2020-07-28 | 中国地质大学(武汉) | Multi-focus image fusion method based on multi-scale gradient and matting |
CN111563908A (en) * | 2020-05-08 | 2020-08-21 | 展讯通信(上海)有限公司 | Image processing method and related device |
CN111784726A (en) * | 2019-09-25 | 2020-10-16 | 北京沃东天骏信息技术有限公司 | Image matting method and device |
CN111862110A (en) * | 2020-06-30 | 2020-10-30 | 辽宁向日葵教育科技有限公司 | A green screen keying method, system, device and readable storage medium |
CN111931688A (en) * | 2020-08-27 | 2020-11-13 | 珠海大横琴科技发展有限公司 | Ship recognition method and device, computer equipment and storage medium |
CN111932447A (en) * | 2020-08-04 | 2020-11-13 | 中国建设银行股份有限公司 | Picture processing method, device, equipment and storage medium |
CN112101370A (en) * | 2020-11-11 | 2020-12-18 | 广州卓腾科技有限公司 | Automatic pure-color background image matting algorithm, computer-readable storage medium and equipment |
CN112149592A (en) * | 2020-09-28 | 2020-12-29 | 上海万面智能科技有限公司 | Image processing method, apparatus and computer equipment |
CN112183248A (en) * | 2020-09-14 | 2021-01-05 | 北京大学深圳研究生院 | A video salient object detection method based on channel-wise spatiotemporal representation learning |
CN112200826A (en) * | 2020-10-15 | 2021-01-08 | 北京科技大学 | Industrial weak defect segmentation method |
CN112396610A (en) * | 2019-08-12 | 2021-02-23 | 阿里巴巴集团控股有限公司 | Image processing method, computer equipment and storage medium |
CN112634312A (en) * | 2020-12-31 | 2021-04-09 | 上海商汤智能科技有限公司 | Image background processing method and device, electronic equipment and storage medium |
CN112634314A (en) * | 2021-01-19 | 2021-04-09 | 深圳市英威诺科技有限公司 | Target image acquisition method and device, electronic equipment and storage medium |
CN112801896A (en) * | 2021-01-19 | 2021-05-14 | 西安理工大学 | Backlight image enhancement method based on foreground extraction |
CN113052755A (en) * | 2019-12-27 | 2021-06-29 | 杭州深绘智能科技有限公司 | High-resolution image intelligent matting method based on deep learning |
CN113271394A (en) * | 2021-04-07 | 2021-08-17 | 福建大娱号信息科技股份有限公司 | AI intelligent image matting method and terminal without blue-green natural background |
CN113487630A (en) * | 2021-07-14 | 2021-10-08 | 辽宁向日葵教育科技有限公司 | Image matting method based on material analysis technology |
CN113724175A (en) * | 2021-04-15 | 2021-11-30 | 腾讯科技(深圳)有限公司 | Image processing method and device based on artificial intelligence and electronic equipment |
CN113870298A (en) * | 2021-09-07 | 2021-12-31 | 中国人民解放军海军航空大学 | Method and device for extracting water surface target shadow, electronic equipment and storage medium |
CN113902656A (en) * | 2021-08-17 | 2022-01-07 | 浙江大华技术股份有限公司 | A wide dynamic image fusion method, device and computer readable storage medium |
CN114078139A (en) * | 2021-11-25 | 2022-02-22 | 四川长虹电器股份有限公司 | Image post-processing method based on portrait segmentation model generation result |
CN114078099A (en) * | 2021-11-23 | 2022-02-22 | 中国银行股份有限公司 | Image significance detection method and device based on histogram gray feature pair |
CN114170263A (en) * | 2021-11-10 | 2022-03-11 | 贵州民族大学 | Image matting method and related device for pixel-level information transmission |
CN114299075A (en) * | 2021-09-08 | 2022-04-08 | 上海哔哩哔哩科技有限公司 | Image segmentation and pixel point pair selection method, device, equipment and storage medium |
CN114445384A (en) * | 2022-01-28 | 2022-05-06 | 德清斯年智驾科技有限公司 | Matting method based on sample pair screening and local optimization |
CN114677394A (en) * | 2022-05-27 | 2022-06-28 | 珠海视熙科技有限公司 | Matting method, matting device, image pickup apparatus, conference system, electronic apparatus, and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101945223A (en) * | 2010-09-06 | 2011-01-12 | 浙江大学 | Video consistent fusion processing method |
CN102651135A (en) * | 2012-04-10 | 2012-08-29 | 电子科技大学 | Optimized direction sampling-based natural image matting method |
CN104036517A (en) * | 2014-07-01 | 2014-09-10 | 成都品果科技有限公司 | Image matting method based on gradient sampling |
US9569855B2 (en) * | 2015-06-15 | 2017-02-14 | Electronics And Telecommunications Research Institute | Apparatus and method for extracting object of interest from image using image matting based on global contrast |
-
2017
- 2017-07-31 CN CN201710638979.9A patent/CN107452010B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101945223A (en) * | 2010-09-06 | 2011-01-12 | 浙江大学 | Video consistent fusion processing method |
CN102651135A (en) * | 2012-04-10 | 2012-08-29 | 电子科技大学 | Optimized direction sampling-based natural image matting method |
CN104036517A (en) * | 2014-07-01 | 2014-09-10 | 成都品果科技有限公司 | Image matting method based on gradient sampling |
US9569855B2 (en) * | 2015-06-15 | 2017-02-14 | Electronics And Telecommunications Research Institute | Apparatus and method for extracting object of interest from image using image matting based on global contrast |
Non-Patent Citations (3)
Title |
---|
孙巍: "视觉感知特性指导下的自然图像抠图算法研究", 《中国博士学位论文全文数据库 信息科技辑》 * |
罗娇: "一种自动抠像技术的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
郝凯: "图像及图像序列上的交互抠图技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (73)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108134937A (en) * | 2017-12-21 | 2018-06-08 | 西北工业大学 | A kind of compression domain conspicuousness detection method based on HEVC |
CN108134937B (en) * | 2017-12-21 | 2021-07-13 | 西北工业大学 | A saliency detection method in compressed domain based on HEVC |
CN108320294B (en) * | 2018-01-29 | 2021-11-05 | 袁非牛 | Intelligent full-automatic portrait background replacement method for second-generation identity card photos |
CN108320294A (en) * | 2018-01-29 | 2018-07-24 | 袁非牛 | A kind of full-automatic replacement method of portrait background intelligent of China second-generation identity card photo |
CN108596913A (en) * | 2018-03-28 | 2018-09-28 | 众安信息技术服务有限公司 | A kind of stingy drawing method and device |
CN108460383B (en) * | 2018-04-11 | 2021-10-01 | 四川大学 | Image saliency refinement method based on neural network and image segmentation |
CN108460383A (en) * | 2018-04-11 | 2018-08-28 | 四川大学 | Saliency refined method based on neural network and image segmentation |
CN109493363A (en) * | 2018-09-11 | 2019-03-19 | 北京达佳互联信息技术有限公司 | A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance |
CN109493363B (en) * | 2018-09-11 | 2019-09-27 | 北京达佳互联信息技术有限公司 | A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance |
CN109785329B (en) * | 2018-10-29 | 2023-05-26 | 重庆师范大学 | Purple soil image segmentation and extraction method based on improved SLIC algorithm |
CN109785329A (en) * | 2018-10-29 | 2019-05-21 | 重庆师范大学 | Based on the purple soil image segmentation extracting method for improving SLIC algorithm |
CN109461158A (en) * | 2018-11-19 | 2019-03-12 | 第四范式(北京)技术有限公司 | Color image segmentation method and system |
CN111383232B (en) * | 2018-12-29 | 2024-01-23 | Tcl科技集团股份有限公司 | Matting method, matting device, terminal equipment and computer readable storage medium |
CN111383232A (en) * | 2018-12-29 | 2020-07-07 | Tcl集团股份有限公司 | Matting method, matting device, terminal equipment and computer-readable storage medium |
CN111435282A (en) * | 2019-01-14 | 2020-07-21 | 阿里巴巴集团控股有限公司 | Image processing method and device and electronic equipment |
CN109540925B (en) * | 2019-01-23 | 2021-09-03 | 南昌航空大学 | Complex ceramic tile surface defect detection method based on difference method and local variance measurement operator |
CN109540925A (en) * | 2019-01-23 | 2019-03-29 | 南昌航空大学 | Complicated ceramic tile surface defect inspection method based on difference shadow method and local variance measurement operator |
CN110111342A (en) * | 2019-04-30 | 2019-08-09 | 贵州民族大学 | A kind of optimum option method and device of stingy nomography |
CN110111342B (en) * | 2019-04-30 | 2021-06-29 | 贵州民族大学 | A kind of optimal selection method and device for matting algorithm |
CN110288617A (en) * | 2019-07-04 | 2019-09-27 | 大连理工大学 | Automatic human body slice image segmentation method based on shared matting and ROI gradual change |
CN110288617B (en) * | 2019-07-04 | 2023-02-03 | 大连理工大学 | Automatic Segmentation Method of Human Body Slice Image Based on Shared Matting and ROI Gradient |
CN110298861A (en) * | 2019-07-04 | 2019-10-01 | 大连理工大学 | Rapid three-dimensional image segmentation method based on shared sampling |
CN110415273A (en) * | 2019-07-29 | 2019-11-05 | 肇庆学院 | A method and system for efficient motion tracking of robots based on visual saliency |
CN110400323A (en) * | 2019-07-30 | 2019-11-01 | 上海艾麒信息科技有限公司 | It is a kind of to scratch drawing system, method and device automatically |
CN112396610B (en) * | 2019-08-12 | 2025-01-07 | 阿里巴巴集团控股有限公司 | Image processing method, computer device, and storage medium |
CN112396610A (en) * | 2019-08-12 | 2021-02-23 | 阿里巴巴集团控股有限公司 | Image processing method, computer equipment and storage medium |
CN110503704B (en) * | 2019-08-27 | 2023-07-21 | 北京迈格威科技有限公司 | Construction method, device and electronic equipment of tripartite graph |
CN110503704A (en) * | 2019-08-27 | 2019-11-26 | 北京迈格威科技有限公司 | Construction method, device and electronic device of tripartite graph |
CN110751654A (en) * | 2019-08-30 | 2020-02-04 | 稿定(厦门)科技有限公司 | Image matting method, medium, equipment and device |
CN110751655B (en) * | 2019-09-16 | 2021-04-20 | 南京工程学院 | An automatic mapping method based on semantic segmentation and saliency analysis |
CN110751655A (en) * | 2019-09-16 | 2020-02-04 | 南京工程学院 | Automatic cutout method based on semantic segmentation and significance analysis |
CN111784726A (en) * | 2019-09-25 | 2020-10-16 | 北京沃东天骏信息技术有限公司 | Image matting method and device |
CN111784726B (en) * | 2019-09-25 | 2024-09-24 | 北京沃东天骏信息技术有限公司 | Portrait matting method and device |
CN110956681B (en) * | 2019-11-08 | 2023-06-30 | 浙江工业大学 | Portrait background automatic replacement method combining convolution network and neighborhood similarity |
CN110956681A (en) * | 2019-11-08 | 2020-04-03 | 浙江工业大学 | A Portrait Background Automatic Replacement Method Combining Convolutional Networks and Neighborhood Similarity |
CN111028259A (en) * | 2019-11-15 | 2020-04-17 | 广州市五宫格信息科技有限责任公司 | Foreground extraction method for improving adaptability through image saliency |
CN111028259B (en) * | 2019-11-15 | 2023-04-28 | 广州市五宫格信息科技有限责任公司 | Foreground extraction method adapted through image saliency improvement |
CN113052755A (en) * | 2019-12-27 | 2021-06-29 | 杭州深绘智能科技有限公司 | High-resolution image intelligent matting method based on deep learning |
CN111161286A (en) * | 2020-01-02 | 2020-05-15 | 大连理工大学 | An Interactive Natural Image Mapping Method |
CN111161286B (en) * | 2020-01-02 | 2023-06-20 | 大连理工大学 | Interactive natural image matting method |
CN111462027B (en) * | 2020-03-12 | 2023-04-18 | 中国地质大学(武汉) | Multi-focus image fusion method based on multi-scale gradient and matting |
CN111462027A (en) * | 2020-03-12 | 2020-07-28 | 中国地质大学(武汉) | Multi-focus image fusion method based on multi-scale gradient and matting |
CN111563908A (en) * | 2020-05-08 | 2020-08-21 | 展讯通信(上海)有限公司 | Image processing method and related device |
CN111862110A (en) * | 2020-06-30 | 2020-10-30 | 辽宁向日葵教育科技有限公司 | A green screen keying method, system, device and readable storage medium |
CN111932447B (en) * | 2020-08-04 | 2024-03-22 | 中国建设银行股份有限公司 | Picture processing method, device, equipment and storage medium |
CN111932447A (en) * | 2020-08-04 | 2020-11-13 | 中国建设银行股份有限公司 | Picture processing method, device, equipment and storage medium |
CN111931688A (en) * | 2020-08-27 | 2020-11-13 | 珠海大横琴科技发展有限公司 | Ship recognition method and device, computer equipment and storage medium |
CN112183248A (en) * | 2020-09-14 | 2021-01-05 | 北京大学深圳研究生院 | A video salient object detection method based on channel-wise spatiotemporal representation learning |
CN112149592A (en) * | 2020-09-28 | 2020-12-29 | 上海万面智能科技有限公司 | Image processing method, apparatus and computer equipment |
CN112200826B (en) * | 2020-10-15 | 2023-11-28 | 北京科技大学 | An industrial weak defect segmentation method |
CN112200826A (en) * | 2020-10-15 | 2021-01-08 | 北京科技大学 | Industrial weak defect segmentation method |
CN112101370B (en) * | 2020-11-11 | 2021-08-24 | 广州卓腾科技有限公司 | A kind of solid color background image automatic keying method, computer readable storage medium and device |
CN112101370A (en) * | 2020-11-11 | 2020-12-18 | 广州卓腾科技有限公司 | Automatic pure-color background image matting algorithm, computer-readable storage medium and equipment |
CN112634312A (en) * | 2020-12-31 | 2021-04-09 | 上海商汤智能科技有限公司 | Image background processing method and device, electronic equipment and storage medium |
CN112634312B (en) * | 2020-12-31 | 2023-02-24 | 上海商汤智能科技有限公司 | Image background processing method and device, electronic equipment and storage medium |
CN112801896A (en) * | 2021-01-19 | 2021-05-14 | 西安理工大学 | Backlight image enhancement method based on foreground extraction |
CN112634314A (en) * | 2021-01-19 | 2021-04-09 | 深圳市英威诺科技有限公司 | Target image acquisition method and device, electronic equipment and storage medium |
CN112801896B (en) * | 2021-01-19 | 2024-02-09 | 西安理工大学 | Backlight image enhancement method based on foreground extraction |
CN113271394A (en) * | 2021-04-07 | 2021-08-17 | 福建大娱号信息科技股份有限公司 | AI intelligent image matting method and terminal without blue-green natural background |
CN113724175A (en) * | 2021-04-15 | 2021-11-30 | 腾讯科技(深圳)有限公司 | Image processing method and device based on artificial intelligence and electronic equipment |
CN113487630A (en) * | 2021-07-14 | 2021-10-08 | 辽宁向日葵教育科技有限公司 | Image matting method based on material analysis technology |
CN113902656A (en) * | 2021-08-17 | 2022-01-07 | 浙江大华技术股份有限公司 | A wide dynamic image fusion method, device and computer readable storage medium |
CN113902656B (en) * | 2021-08-17 | 2024-11-29 | 浙江大华技术股份有限公司 | Wide dynamic image fusion method, device and computer readable storage medium |
CN113870298A (en) * | 2021-09-07 | 2021-12-31 | 中国人民解放军海军航空大学 | Method and device for extracting water surface target shadow, electronic equipment and storage medium |
CN114299075A (en) * | 2021-09-08 | 2022-04-08 | 上海哔哩哔哩科技有限公司 | Image segmentation and pixel point pair selection method, device, equipment and storage medium |
CN114170263A (en) * | 2021-11-10 | 2022-03-11 | 贵州民族大学 | Image matting method and related device for pixel-level information transmission |
CN114078099A (en) * | 2021-11-23 | 2022-02-22 | 中国银行股份有限公司 | Image significance detection method and device based on histogram gray feature pair |
CN114078139B (en) * | 2021-11-25 | 2024-04-16 | 四川长虹电器股份有限公司 | Image post-processing method based on human image segmentation model generation result |
CN114078139A (en) * | 2021-11-25 | 2022-02-22 | 四川长虹电器股份有限公司 | Image post-processing method based on portrait segmentation model generation result |
CN114445384A (en) * | 2022-01-28 | 2022-05-06 | 德清斯年智驾科技有限公司 | Matting method based on sample pair screening and local optimization |
CN114445384B (en) * | 2022-01-28 | 2025-03-28 | 德清斯年智驾科技有限公司 | Cutting method based on sample pair screening and local optimization |
CN114677394A (en) * | 2022-05-27 | 2022-06-28 | 珠海视熙科技有限公司 | Matting method, matting device, image pickup apparatus, conference system, electronic apparatus, and medium |
CN114677394B (en) * | 2022-05-27 | 2022-09-30 | 珠海视熙科技有限公司 | Matting method, matting device, image pickup apparatus, conference system, electronic apparatus, and medium |
Also Published As
Publication number | Publication date |
---|---|
CN107452010B (en) | 2021-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107452010A (en) | A kind of automatically stingy nomography and device | |
CN109961049B (en) | Cigarette brand identification method under complex scene | |
US10762608B2 (en) | Sky editing based on image composition | |
CN107516319B (en) | High-precision simple interactive matting method, storage device and terminal | |
WO2019024751A1 (en) | Facial expression synthesis method and apparatus, electronic device, and storage medium | |
Kim et al. | Low-light image enhancement based on maximal diffusion values | |
CN108537239A (en) | A kind of method of saliency target detection | |
TW202014984A (en) | Image processing method, electronic device, and storage medium | |
CN110738676A (en) | A GrabCut Automatic Segmentation Algorithm Combining RGBD Data | |
CN102449664A (en) | Method and device for generating gradual-change animation | |
CN108665463A (en) | A kind of cervical cell image partition method generating network based on confrontation type | |
CN108596923A (en) | Acquisition methods, device and the electronic equipment of three-dimensional data | |
CN112907595B (en) | Surface defect detection method and device | |
Wang et al. | Simultaneous matting and compositing | |
US20220222791A1 (en) | Generating image masks from digital images utilizing color density estimation and deep learning models | |
CN116580028B (en) | Object surface defect detection method, device, equipment and storage medium | |
CN116342519A (en) | Image processing method based on machine learning | |
CN107025672A (en) | A kind of conspicuousness detection method based on improvement convex closure | |
CN107886471A (en) | A kind of unnecessary object minimizing technology of photo based on super-pixel Voting Model | |
Liu | Two decades of colorization and decolorization for images and videos | |
CN111210447B (en) | A method and terminal for hierarchical segmentation of hematoxylin-eosin stained pathological images | |
CN111105350B (en) | Real-time video splicing method based on self homography transformation under large parallax scene | |
CN115601616A (en) | Sample data generation method and device, electronic equipment and storage medium | |
CN114677393A (en) | Depth image processing method, depth image processing device, image pickup apparatus, conference system, and medium | |
CN104298961B (en) | Video method of combination based on Mouth-Shape Recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220921 Address after: No. 333, Feiyue East Road, High-tech Industrial Development Zone, Changchun City, Jilin Province, 130012 Patentee after: Changchun Changguang Qiheng Sensing Technology Co.,Ltd. Address before: 130033, 3888 southeast Lake Road, Jilin, Changchun Patentee before: CHANGCHUN INSTITUTE OF OPTICS, FINE MECHANICS AND PHYSICS, CHINESE ACADEMY OF SCIENCE |
|
TR01 | Transfer of patent right |