WO2020062899A1 - 通过前景背景像素对和灰度信息获得透明度遮罩的方法 - Google Patents

通过前景背景像素对和灰度信息获得透明度遮罩的方法 Download PDF

Info

Publication number
WO2020062899A1
WO2020062899A1 PCT/CN2019/088279 CN2019088279W WO2020062899A1 WO 2020062899 A1 WO2020062899 A1 WO 2020062899A1 CN 2019088279 W CN2019088279 W CN 2019088279W WO 2020062899 A1 WO2020062899 A1 WO 2020062899A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
transparency
pixel
pixels
mask
Prior art date
Application number
PCT/CN2019/088279
Other languages
English (en)
French (fr)
Inventor
蔡昭权
蔡映雪
黄思博
陈伽
胡松
梁椅辉
黄翰
陈广财
Original Assignee
惠州学院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 惠州学院 filed Critical 惠州学院
Publication of WO2020062899A1 publication Critical patent/WO2020062899A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/174Facial expression recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20036Morphological image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory

Definitions

  • the present disclosure belongs to the field of image processing, and particularly relates to a method for obtaining a transparency mask of an image through a pair of foreground and background pixels and gray information.
  • matting technology is implemented based on the estimation of transparency masks. You can generate different transparency masks for an image by selecting a color range.
  • the present disclosure provides a method for obtaining a transparency mask of a first image through a pair of foreground and background pixels and gray information, including the following steps:
  • I k is the RGB color value of the unknown pixel Z k
  • the foreground pixel F i is the m foreground pixels closest to the unknown pixel Z k
  • the background pixel B j is also the m closest to the unknown pixel Z k Background pixels, the foreground and background pixel pairs (F i , B j ) totaling m 2 groups;
  • takes a value of 0.1, and the set of foreground and background pixel pairs corresponding to MAX (n ij ) with the highest reliability is selected as (F iMAX , B jMAX );
  • S600 Superimpose grayscale information on the first image to generate a second image, and divide the second image into all its foreground pixel sets, all background pixel sets, and all unknown pixel sets;
  • steps S200 to S500 For the second image, perform steps S200 to S500 to determine a first transparency mask of the second image, and use the first transparency mask of the second image as a second transparency mask of the first image. ;
  • the present disclosure can comprehensively utilize the credibility and grayscale information of the foreground and background pixel pairs, and provide a new scheme for obtaining a transparency mask.
  • FIG. 1 is a schematic diagram of a method according to an embodiment of the present disclosure.
  • an embodiment herein means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present disclosure.
  • the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they independent or alternative embodiments that are mutually exclusive with other embodiments. Those skilled in the art can understand that the embodiments described herein may be combined with other embodiments.
  • FIG. 1 is a schematic flowchart of a method for obtaining a transparency mask of a first image through a pair of foreground and background pixels and gray information according to an embodiment of the present disclosure. As shown, the method includes the following steps:
  • I k is the RGB color value of the unknown pixel Z k
  • the foreground pixel F i is the m foreground pixels closest to the unknown pixel Z k
  • the background pixel B j is also the m closest to the unknown pixel Z k Background pixels, the foreground and background pixel pairs (F i , B j ) totaling m 2 groups;
  • the selection of m can make the corresponding foreground and background pixel pairs be partial samples or exhaust the entire image; as for step S200, it is intended to pass the color of the unknown pixels and the foreground background
  • the color relationship of pixel pairs is used to estimate the transparency of unknown pixels.
  • the selection of m can further combine the characteristics of neighbor pixels and unknown pixels in terms of color, texture, grayscale, brightness, and spatial distance;
  • takes a value of 0.1, and the set of foreground and background pixel pairs corresponding to MAX (n ij ) with the highest reliability is selected as (F iMAX , B jMAX );
  • Step S300 uses the credibility to further filter the foreground and background pixel pairs, and is used in the subsequent steps to estimate the unknown pixel transparency by further filtering the foreground and background pixel pairs;
  • this embodiment naturally determines the first transparency mask of the first image naturally; the reason why it is natural is that the transparency mask can be viewed On the grounds Those corresponding pixels selected according to a certain value (or value range);
  • S600 Superimpose grayscale information on the first image to generate a second image, and divide the second image into all its foreground pixel sets, all background pixel sets, and all unknown pixel sets;
  • each pixel in addition to the role of RGB color, each pixel should consider the effect of gray information on pixels; therefore, after superimposing gray information, use the following steps to modify the transparency mask.
  • steps S200 to S500 For the second image, perform steps S200 to S500 to determine a first transparency mask of the second image, and use the first transparency mask of the second image as a second transparency mask of the first image. ;
  • the present disclosure provides a new scheme for obtaining transparency masks by comprehensively using the reliability and grayscale information of the foreground and background pixel pairs. It can be understood that obtaining the transparency mask is an infinite approximation process. At present, it is difficult to say that the transparency mask obtained by a certain method is the only correct one.
  • step S600 the grayscale information is superimposed on the first image to generate a second image in the following manner:
  • the first image and the third image generate a second image by using the following formula:
  • IM 2 represents the gray value of the k-th pixel on the second image after superimposition
  • x r represents a neighborhood pixel of the k-th pixel x k on the first image
  • N k represents the neighborhood of the neighborhood centered on x k Number of pixels
  • is taken as 0.5.
  • step S800 further includes:
  • step S802 further includes:
  • pixels Z dp having different positions, including: located at the second transparency mask Pixels Z dp2 at the edges of the mask and pixels Z dp1 at the edges of the first transparency mask;
  • this embodiment additionally pays attention to pixels with different positions in the edges determined by the two transparency masks, and finds these pixels at different positions from each other;
  • the edge corresponding to each mask can be regarded as a connected or closed curve to a certain extent, no matter how the closed curves corresponding to the two masks overlap or not overlap: For those pixels on the edges corresponding to the two masks that do not correspond (that is, the positions are different, or the positions are not coincident), the closed area enclosed by the edges and edges of the two masks is jointly determined, and Positions of all closed pixels of the closed area;
  • step S8024 a first transparency mask for correcting the first image is used. That is, this embodiment is similar to the modified idea of the previous embodiment, except that this embodiment solves the area where the edges corresponding to the two masks are closed together.
  • each functional unit may be integrated into one processing unit, or each unit may exist alone, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit. When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present disclosure essentially or part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium Including instructions for causing a computer device (which may be a smart phone, a personal digital assistant, a wearable device, a notebook computer, or a tablet computer) to perform all or part of the steps of the method described in various embodiments of the present disclosure.
  • the foregoing storage media include: U disks, Read-Only Memory (ROM), Random Access Memory (RAM), mobile hard disks, magnetic disks, or optical disks, and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

一种通过前景背景像素对和灰度信息获得第一图像的透明度遮罩的方法,首先通过度量前景背景像素对的可信度重新计算透明度估计值以获得第一图像的第一透明度遮罩,然后通过叠加灰度信息来生成新图片并获得第一图像的第二透明度遮罩,并进一步修正第一图像的第一透明度遮罩。该方法能够综合利用前景背景像素对的可信度和灰度信息,提供一种新的获得透明度遮罩的方案。

Description

通过前景背景像素对和灰度信息获得透明度遮罩的方法 技术领域
本公开属于图像处理领域,特别涉及一种通过前景背景像素对和灰度信息获得图像的透明度遮罩的方法。
背景技术
在图像领域,抠图技术基于透明度遮罩的估计来实现。可以通过选择颜色范围来为图像生成不同的透明度遮罩。
然而,现有技术中,透明度遮罩的获得方法虽然足够多,但是关于如何利用前景背景像素对和灰度信息来获得透明度遮罩,尚未有相关新颖的实现方法。
发明内容
本公开提供了一种通过前景背景像素对和灰度信息获得第一图像的透明度遮罩的方法,包括如下步骤:
S100,划分第一图像中的所有前景像素集合F、所有背景像素集合B和所有未知像素集合Z;
S200,给定某些前景背景像素对(F i,B j),根据如下公式度量每个未知像素Z k的透明度
Figure PCTCN2019088279-appb-000001
Figure PCTCN2019088279-appb-000002
其中,I k为未知像素Z k的RGB颜色值,所述前景像素F i为距离未知像素Z k最近的m个前景像素、所述背景像素B j也为距离未知像 素Z k最近的m个背景像素,所述前景背景像素对(F i,B j)总计m 2组;
S300,对于所述m 2组中的每一组前景背景像素对(F i,B j)及其对应的
Figure PCTCN2019088279-appb-000003
根据如下公式度量前景背景像素对(F i,B j)的可信度n ij
Figure PCTCN2019088279-appb-000004
其中,σ取值0.1,并选取可信度最高的MAX(n ij)所对应的那一组前景背景像素对为(F iMAX,B jMAX);
S400,根据如下公式计算每个未知像素Z k的透明度估计值
Figure PCTCN2019088279-appb-000005
Figure PCTCN2019088279-appb-000006
S500,根据所述每个未知像素Z k的透明度估计值
Figure PCTCN2019088279-appb-000007
初步确定所述第一图像的第一透明度遮罩;
S600,对第一图像叠加灰度信息以生成第二图像,并对所述第二图像划分其所有前景像素集合、所有背景像素集合和所有未知像素集合;
S700,针对所述第二图像,执行步骤S200至S500,以确定第二图像的第一透明度遮罩,并将所述第二图像的第一透明度遮罩作为第一图像的第二透明度遮罩;
S800,利用所述第一图像的第二透明度遮罩,修正所述第一图像的第一透明度遮罩。
通过所述方法,本公开能够综合利用前景背景像素对的可信度和 灰度信息,提供一种新的获得透明度遮罩的方案。
附图说明
图1是本公开中一个实施例所述方法的示意图。
具体实施方式
为了使本领域技术人员理解本公开所披露的技术方案,下面将结合实施例及有关附图,对各个实施例的技术方案进行描述,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。本公开所采用的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,“包括”和“具有”以及它们的任何变形,意图在于覆盖且不排他的包含。例如包含了一系列步骤或单元的过程、或方法、或系统、或产品或设备没有限定于已列出的步骤或单元,而是可选的还包括没有列出的步骤或单元,或可选的还包括对于这些过程、方法、系统、产品或设备固有的其他步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本公开的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其他实施例互斥的独立的或备选的实施例。本领域技术人员可以理解的是,本文所描述的实施例可以与其他实施例相结合。
参见图1,图1是本公开中一个实施例提供的一种通过前景背景像素对和灰度信息获得第一图像的透明度遮罩的方法的流程示意图。如图所示,所述方法包括如下步骤:
S100,划分第一图像中的所有前景像素集合F、所有背景像素集 合B和所有未知像素集合Z;
能够理解,对图像划分前景像素、背景像素以及未知像素的手段很多,可以是人工标注,还可以通过机器学习或数据驱动的方式,还可以是根据相应的前景阈值、背景阈值来划分出所有前景和背景像素及其对应的集合;如果前景和背景像素划分后,未知像素、其对应集合也就自然被划分出来;
S200,给定某些前景背景像素对(F i,B j),根据如下公式度量每个未知像素Z k的透明度
Figure PCTCN2019088279-appb-000008
Figure PCTCN2019088279-appb-000009
其中,I k为未知像素Z k的RGB颜色值,所述前景像素F i为距离未知像素Z k最近的m个前景像素、所述背景像素B j也为距离未知像素Z k最近的m个背景像素,所述前景背景像素对(F i,B j)总计m 2组;
对于本领域技术人员而言,理论上,m的选取,可以使得对应的前景背景像素对是部分样本,也可以穷尽整个图像;就步骤S200而言,其意在通过未知像素的颜色和前景背景像素对的颜色关系来估计未知像素的透明度;另外,m的选取也可以进一步结合邻域像素与未知像素之间在颜色、纹理、灰度、亮度、空间距离等方面的特征;
S300,对于所述m 2组中的每一组前景背景像素对(F i,B j)及其对应的
Figure PCTCN2019088279-appb-000010
根据如下公式度量前景背景像素对(F i,B j)的可信度n ij
Figure PCTCN2019088279-appb-000011
其中,σ取值0.1,并选取可信度最高的MAX(n ij)所对应的那一组前景背景像素对为(F iMAX,B jMAX);
能够理解,σ的取值为经验值或统计值或仿真值,步骤S300利用可信度进一步筛选前景背景像素对,并用于后续步骤通过进一步筛选的前景背景像素对来估计未知像素透明度;
S400,根据如下公式计算每个未知像素Z k的透明度估计值
Figure PCTCN2019088279-appb-000012
Figure PCTCN2019088279-appb-000013
S500,根据所述每个未知像素Z k的透明度估计值
Figure PCTCN2019088279-appb-000014
初步确定所述第一图像的第一透明度遮罩;
这就是说,当每个未知像素的透明度估计值获得之后,本实施例就自然初步确定了所述第一图像的第一透明度遮罩;之所以说是自然的,是因为透明度遮罩可以视为由
Figure PCTCN2019088279-appb-000015
按一定取值(或取值范围)所选择的那些对应像素组成的;
S600,对第一图像叠加灰度信息以生成第二图像,并对所述第二图像划分其所有前景像素集合、所有背景像素集合和所有未知像素集合;
就该步骤而言,本实施例考虑到每个像素除RGB颜色的作用之外,应当考虑灰度信息对像素的影响;因此,叠加灰度信息后,利用 如下步骤对透明度遮罩进行修正。
S700,针对所述第二图像,执行步骤S200至S500,以确定第二图像的第一透明度遮罩,并将所述第二图像的第一透明度遮罩作为第一图像的第二透明度遮罩;
S800,利用所述第一图像的第二透明度遮罩,修正所述第一图像的第一透明度遮罩。
至此,本公开综合利用前景背景像素对的可信度和灰度信息,提供一种新的获得透明度遮罩的方案。能够理解,透明度遮罩的获得,是一个无限逼近的过程,目前很难说某种方法所获得的透明度遮罩是唯一正确的。
在另一个实施例中,步骤S600中,通过如下方式对第一图像叠加灰度信息以生成第二图像:
S601,对第一图像进行均值滤波得到第三图像;
S602,所述第一图像和第三图像通过如下公式生成第二图像:
Figure PCTCN2019088279-appb-000016
其中,IM 2表示叠加后第二图像上第k个像素的灰度值,x r表示第一图像上第k个像素x k的邻域像素,N k表示以x k为中心的邻域内的像素个数,
Figure PCTCN2019088279-appb-000017
表示对第一图像进行均值滤波所得的第三图像上第k个像素的像素值,β取0.5。
对于上述实施例,其通过经验值和有关公式,给出了具体叠加灰 度信息的方式。
在另一个实施例中,步骤S800还包括:
S801,根据第一图像的第二透明度遮罩和第一图像的第一透明度遮罩,分别寻找其第二透明度遮罩的边缘、第一透明度遮罩的边缘;
S802,获得第二透明度遮罩的边缘的所有像素的位置,和第一透明度遮罩的边缘的所有像素的位置,并判定第二透明度遮罩的边缘的所有像素的位置和第一透明度遮罩的边缘的所有像素的位置重合的区域,进而确定位置相同的像素Z sp
S803,分别查找像素Z sp对应于第一图像的第一透明度遮罩的透明度估计值,和对应于第一图像的第二透明度遮罩的透明度估计值,并以二者的平均值作为像素Z sp修正后的透明度估计值;
S804,以像素Z sp修正后的透明度估计值,修正所述第一图像的第一透明度遮罩。
就上述实施例而言,其意在寻找、对比两种透明度遮罩中位置相同的像素,并利用所述位置相同的像素在各自透明度遮罩中的透明度估计值,取平均值以修正第一图像的第一透明度遮罩。
在另一个实施例中,所述步骤S802进一步包括:
S8021,根据判定的第二透明度遮罩的边缘的所有像素的位置和第一透明度遮罩的边缘的所有像素的位置重合的区域,进一步确定位置不同的像素Z dp,包括:位于第二透明度遮罩的边缘的像素Z dp2和位于第一透明度遮罩的边缘的像素Z dp1
与前一个实施例不同的是,本实施例额外关注两个透明度遮罩所 确定出来的边缘中位置不同的像素,并找出彼此不同位置的这些像素;
S8022,利用所述位置不同的像素Z dp和位置相同的像素Z sp,获得第二透明度遮罩的边缘与第一透明度遮罩的边缘所确定的:边缘与边缘之间所封闭的闭合区域,以及所述闭合区域的所有封闭像素的位置;
就该步骤而言,由于每个遮罩所对应的边缘都可以一定程度视为一个连通或闭合的曲线,那么无论两个遮罩所对应的闭合曲线是怎样的重叠或不重叠的关系:对于两个遮罩所对应的边缘上的那些位置不对应(即位置不同,或称位置不重合)的像素而言,共同确定了两个遮罩的边缘与边缘之间所封闭的闭合区域,以及所述闭合区域的所有封闭像素的位置;
S8023,执行如下子步骤:
(1)查找像素Z dp1的位置所对应的像素于第一图像的第一透明度遮罩的透明度估计值,并查找该对应的像素于第二图像中的透明度值,并以二者的平均值作为像素Z dp1修正后的透明度估计值;
(2)查找像素Z dp2的位置所对应的像素于第一图像的第二透明度遮罩的透明度估计值,并查找该对应的像素于第一图像中第一透明度遮罩的透明度值,并以二者的平均值作为像素Z dp2修正后的透明度估计值;
对于该步骤而言,其意在寻找前述闭合区域内每个像素在两个不 同体系下的透明度估计值或透明度值,并以二者的平均值作为对应像素修正后的透明度估计值,然后在下一步骤S8024中用于修正第一图像的第一透明度遮罩。也就是说,本实施例类似于前一个实施例的修正思路那样,只不过本实施例解决的是两个遮罩对应的边缘共同封闭的区域。
S8024,结合像素Z dp1修正后的透明度估计值和像素Z dp2修正后的透明度估计值,修正所述第一图像的第一透明度遮罩。
本公开的实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作、模块、单元并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本公开所提供的几个实施例中,应该理解到,所揭露的方法,可实现为对应的功能单元、处理器乃至系统,其中所述系统的各部分既可以位于一个地方,也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。另外,各功能单元可以集成在一个处理单元中,也可以是各个单元单独 存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为智能手机、个人数字助理、可穿戴设备、笔记本电脑、平板电脑)执行本公开的各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述实施例对本公开进行了详细的说明,本领域技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开的各实施例技术方案的范围。

Claims (4)

  1. 一种通过前景背景像素对和灰度信息获得第一图像的透明度遮罩的方法,包括如下步骤:
    S100,划分第一图像中的所有前景像素集合F、所有背景像素集合B和所有未知像素集合Z;
    S200,给定某些前景背景像素对(F i,B j),根据如下公式度量每个未知像素Z k的透明度
    Figure PCTCN2019088279-appb-100001
    Figure PCTCN2019088279-appb-100002
    其中,I k为未知像素Z k的RGB颜色值,所述前景像素F i为距离未知像素Z k最近的m个前景像素、所述背景像素B j也为距离未知像素Z k最近的m个背景像素,所述前景背景像素对(F i,B j)总计m 2组;
    S300,对于所述m 2组中的每一组前景背景像素对(F i,B j)及其对应的
    Figure PCTCN2019088279-appb-100003
    根据如下公式度量前景背景像素对(F i,B j)的可信度n ij
    Figure PCTCN2019088279-appb-100004
    其中,σ取值0.1,并选取可信度最高的MAX(n ij)所对应的那一组前景背景像素对为(F iMAX,B jMAX);
    S400,根据如下公式计算每个未知像素Z k的透明度估计值
    Figure PCTCN2019088279-appb-100005
    Figure PCTCN2019088279-appb-100006
    S500,根据所述每个未知像素Z k的透明度估计值
    Figure PCTCN2019088279-appb-100007
    初步确定所述第一图像的第一透明度遮罩;
    S600,对第一图像叠加灰度信息以生成第二图像,并对所述第二图像划分其所有前景像素集合、所有背景像素集合和所有未知像素集合;
    S700,针对所述第二图像,执行步骤S200至S500,以确定第二图像的第一透明度遮罩,并将所述第二图像的第一透明度遮罩作为第一图像的第二透明度遮罩;
    S800,利用所述第一图像的第二透明度遮罩,修正所述第一图像的第一透明度遮罩。
  2. 根据权利要求1所述的方法,其中,步骤S600中,通过如下方式对第一图像叠加灰度信息以生成第二图像:
    S601,对第一图像进行均值滤波得到第三图像;
    S602,所述第一图像和第三图像通过如下公式生成第二图像:
    Figure PCTCN2019088279-appb-100008
    其中,IM 2表示叠加后第二图像上第k个像素的灰度值,x r表示第一图像上第k个像素x k的邻域像素,N k表示以x k为中心的邻域内的像素个数,
    Figure PCTCN2019088279-appb-100009
    表示对第一图像进行均值滤波所得的第三图像上第k个像素的像素值,β取0.5。
  3. 根据权利要求1所述的方法,其中,步骤S800还包括:
    S801,根据第一图像的第二透明度遮罩和第一图像的第一透明度遮罩,分别寻找其第二透明度遮罩的边缘、第一透明度遮罩的边缘;
    S802,获得第二透明度遮罩的边缘的所有像素的位置,和第一透明度遮罩的边缘的所有像素的位置,并判定第二透明度遮罩的边缘的所有像素的位置和第一透明度遮罩的边缘的所有像素的位置重合的区域,进而确定位置相同的像素Z sp
    S803,分别查找像素Z sp对应于第一图像的第一透明度遮罩的透明度估计值,和对应于第一图像的第二透明度遮罩的透明度估计值,并以二者的平均值作为像素Z sp修正后的透明度估计值;
    S804,以像素Z sp修正后的透明度估计值,修正所述第一图像的第一透明度遮罩。
  4. 根据权利要求3所述的方法,其中,所述步骤S802进一步包括:
    S8021,根据判定的第二透明度遮罩的边缘的所有像素的位置和第一透明度遮罩的边缘的所有像素的位置重合的区域,进一步确定位置不同的像素Z dp,包括:位于第二透明度遮罩的边缘的像素Z dp2和位于第一透明度遮罩的边缘的像素Z dp1
    S8022,利用所述位置不同的像素Z dp和位置相同的像素Z sp,获得第二透明度遮罩的边缘与第一透明度遮罩的边缘所确定的:边缘与边缘之间所封闭的闭合区域,以及所述闭合区域的所有封闭像素的位置;
    S8023,执行如下子步骤:
    (1)查找像素Z dp1的位置所对应的像素于第一图像的第一透明度遮罩的透明度估计值,并查找该对应的像素于第二图像中的透明度值,并以二者的平均值作为像素Z dp1修正后的透明度估计值;
    (2)查找像素Z dp2的位置所对应的像素于第一图像的第二透明度遮罩的透明度估计值,并查找该对应的像素于第一图像中第一透明度遮罩的透明度值,并以二者的平均值作为像素Z dp2修正后的透明度估计值;
    S8024,结合像素Z dp1修正后的透明度估计值和像素Z dp2修正后的透明度估计值,修正所述第一图像的第一透明度遮罩。
PCT/CN2019/088279 2018-09-26 2019-05-24 通过前景背景像素对和灰度信息获得透明度遮罩的方法 WO2020062899A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNPCT/CN2018/107514 2018-09-26
CN2018107514 2018-09-26

Publications (1)

Publication Number Publication Date
WO2020062899A1 true WO2020062899A1 (zh) 2020-04-02

Family

ID=68140393

Family Applications (5)

Application Number Title Priority Date Filing Date
PCT/CN2019/088278 WO2020062898A1 (zh) 2018-09-26 2019-05-24 一种视频前景目标提取方法及装置
PCT/CN2019/088279 WO2020062899A1 (zh) 2018-09-26 2019-05-24 通过前景背景像素对和灰度信息获得透明度遮罩的方法
PCT/CN2019/101273 WO2020063189A1 (zh) 2018-09-26 2019-08-19 一种视频目标轨迹提取方法及装置
PCT/CN2019/105028 WO2020063321A1 (zh) 2018-09-26 2019-09-10 一种基于语义分析的视频处理方法及装置
PCT/CN2019/106616 WO2020063436A1 (zh) 2018-09-26 2019-09-19 一种深度学习(dnn)的课堂学习行为分析方法及装置

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/088278 WO2020062898A1 (zh) 2018-09-26 2019-05-24 一种视频前景目标提取方法及装置

Family Applications After (3)

Application Number Title Priority Date Filing Date
PCT/CN2019/101273 WO2020063189A1 (zh) 2018-09-26 2019-08-19 一种视频目标轨迹提取方法及装置
PCT/CN2019/105028 WO2020063321A1 (zh) 2018-09-26 2019-09-10 一种基于语义分析的视频处理方法及装置
PCT/CN2019/106616 WO2020063436A1 (zh) 2018-09-26 2019-09-19 一种深度学习(dnn)的课堂学习行为分析方法及装置

Country Status (2)

Country Link
CN (5) CN110335288A (zh)
WO (5) WO2020062898A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989962B (zh) * 2021-02-24 2024-01-05 上海商汤智能科技有限公司 轨迹生成方法、装置、电子设备及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105590307A (zh) * 2014-10-22 2016-05-18 华为技术有限公司 基于透明度的抠图方法和装置
CN106952276A (zh) * 2017-03-20 2017-07-14 成都通甲优博科技有限责任公司 一种图像抠图方法及装置

Family Cites Families (46)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6361910B1 (en) * 2000-02-03 2002-03-26 Applied Materials, Inc Straight line defect detection
US6870945B2 (en) * 2001-06-04 2005-03-22 University Of Washington Video object tracking by estimating and subtracting background
US7466842B2 (en) * 2005-05-20 2008-12-16 Mitsubishi Electric Research Laboratories, Inc. Modeling low frame rate videos with bayesian estimation
US8508546B2 (en) * 2006-09-19 2013-08-13 Adobe Systems Incorporated Image mask generation
US8520972B2 (en) * 2008-09-12 2013-08-27 Adobe Systems Incorporated Image decomposition
CN101686338B (zh) * 2008-09-26 2013-12-25 索尼株式会社 分割视频中的前景和背景的系统和方法
CN101588459B (zh) * 2009-06-26 2011-01-05 北京交通大学 一种视频抠像处理方法
CN101621615A (zh) * 2009-07-24 2010-01-06 南京邮电大学 一种自适应背景建模及运动目标检测方法
US8386964B2 (en) * 2010-07-21 2013-02-26 Microsoft Corporation Interactive image matting
US8625888B2 (en) * 2010-07-21 2014-01-07 Microsoft Corporation Variable kernel size image matting
CN102456212A (zh) * 2010-10-19 2012-05-16 北大方正集团有限公司 一种数值图像中可见水印的分离方法及系统
CN102163216B (zh) * 2010-11-24 2013-02-13 广州市动景计算机科技有限公司 图片显示方法和装置
CN102236901B (zh) * 2011-06-30 2013-06-05 南京大学 基于图论聚类和色彩不变空间的目标跟踪方法
US8744123B2 (en) * 2011-08-29 2014-06-03 International Business Machines Corporation Modeling of temporarily static objects in surveillance video data
US8731315B2 (en) * 2011-09-12 2014-05-20 Canon Kabushiki Kaisha Image compression and decompression for image matting
US9305357B2 (en) * 2011-11-07 2016-04-05 General Electric Company Automatic surveillance video matting using a shape prior
CN102651135B (zh) * 2012-04-10 2015-06-17 电子科技大学 一种基于优化方向采样的自然图像抠图方法
US8792718B2 (en) * 2012-06-29 2014-07-29 Adobe Systems Incorporated Temporal matte filter for video matting
CN102999892B (zh) * 2012-12-03 2015-08-12 东华大学 基于区域遮罩的深度图像与rgb图像的智能融合方法
CN103366364B (zh) * 2013-06-07 2016-06-29 太仓中科信息技术研究院 一种基于颜色差异的抠图方法
AU2013206597A1 (en) * 2013-06-28 2015-01-22 Canon Kabushiki Kaisha Depth constrained superpixel-based depth map refinement
US9898856B2 (en) * 2013-09-27 2018-02-20 Fotonation Cayman Limited Systems and methods for depth-assisted perspective distortion correction
US20150091891A1 (en) * 2013-09-30 2015-04-02 Dumedia, Inc. System and method for non-holographic teleportation
CN104112144A (zh) * 2013-12-17 2014-10-22 深圳市华尊科技有限公司 人车识别方法及装置
US10089740B2 (en) * 2014-03-07 2018-10-02 Fotonation Limited System and methods for depth regularization and semiautomatic interactive matting using RGB-D images
CN104952089B (zh) * 2014-03-26 2019-02-15 腾讯科技(深圳)有限公司 一种图像处理方法及系统
CN103903230A (zh) * 2014-03-28 2014-07-02 哈尔滨工程大学 一种视频图像海雾去除清晰化方法
CN104573688B (zh) * 2015-01-19 2017-08-25 电子科技大学 基于深度学习的移动平台烟草激光码智能识别方法及装置
CN104680482A (zh) * 2015-03-09 2015-06-03 华为技术有限公司 一种图像处理的方法和装置
CN104935832B (zh) * 2015-03-31 2019-07-12 浙江工商大学 针对带深度信息的视频抠像方法
CN105100646B (zh) * 2015-08-31 2018-09-11 北京奇艺世纪科技有限公司 视频处理方法和装置
CN105243670B (zh) * 2015-10-23 2018-04-06 北京航空航天大学 一种稀疏和低秩联合表达的视频前景对象精准提取方法
CN105809679B (zh) * 2016-03-04 2019-06-18 李云栋 一种基于视觉分析的山区铁路边坡落石检测方法
US10275892B2 (en) * 2016-06-09 2019-04-30 Google Llc Multi-view scene segmentation and propagation
CN106204567B (zh) * 2016-07-05 2019-01-29 华南理工大学 一种自然背景视频抠图方法
CN117864918A (zh) * 2016-07-29 2024-04-12 奥的斯电梯公司 乘客运输装置的监测系统、乘客运输装置及其监测方法
CN107872644B (zh) * 2016-09-23 2020-10-09 亿阳信通股份有限公司 视频监控方法及装置
CN106778810A (zh) * 2016-11-23 2017-05-31 北京联合大学 基于rgb特征与深度特征的原始图像层融合方法及系统
US10198621B2 (en) * 2016-11-28 2019-02-05 Sony Corporation Image-Processing device and method for foreground mask correction for object segmentation
CN107194867A (zh) * 2017-05-14 2017-09-22 北京工业大学 一种基于cuda的抠像合成方法
CN107273905B (zh) * 2017-06-14 2020-05-08 电子科技大学 一种结合运动信息的目标主动轮廓跟踪方法
CN107230182B (zh) * 2017-08-03 2021-11-09 腾讯科技(深圳)有限公司 一种图像的处理方法、装置以及存储介质
CN107516319B (zh) * 2017-09-05 2020-03-10 中北大学 一种高精度简易交互式抠图方法、存储设备及终端
CN108399361A (zh) * 2018-01-23 2018-08-14 南京邮电大学 一种基于卷积神经网络cnn和语义分割的行人检测方法
CN108391118B (zh) * 2018-03-21 2020-11-06 惠州学院 一种基于投影方式实现3d图像的显示系统
CN108320298B (zh) * 2018-04-28 2022-01-28 亮风台(北京)信息科技有限公司 一种视觉目标跟踪方法与设备

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105590307A (zh) * 2014-10-22 2016-05-18 华为技术有限公司 基于透明度的抠图方法和装置
CN106952276A (zh) * 2017-03-20 2017-07-14 成都通甲优博科技有限责任公司 一种图像抠图方法及装置

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HUANG, RUI ET AL.: "A New Alpha Matting for Nature Image", 2011 SEVENTH INTERNATIONAL CONFERENCE ON NATURAL COMPUTATION, 19 September 2011 (2011-09-19) *
SUN, WEI: "Research on Natural Image Matting Guided by Visual Perceptual Characteristics", INFORMATION & TECHNOLOGY, 15 September 2015 (2015-09-15), pages 1 - 21, ISSN: 1674-022X *
WANG, GE ET AL.: "A Bayesian approach to clustering matting components in spectral matting", 2013 SEVENTH INTERNATIONAL CONFERENCE ON IMAGE AND GRAPHICS, 24 October 2013 (2013-10-24), pages 287 - 290, XP032515487 *

Also Published As

Publication number Publication date
CN110335288A (zh) 2019-10-15
CN110363788A (zh) 2019-10-22
WO2020062898A1 (zh) 2020-04-02
WO2020063436A1 (zh) 2020-04-02
WO2020063321A1 (zh) 2020-04-02
CN110516534A (zh) 2019-11-29
WO2020063189A1 (zh) 2020-04-02
CN110659562A (zh) 2020-01-07
CN110378867A (zh) 2019-10-25

Similar Documents

Publication Publication Date Title
US11610082B2 (en) Method and apparatus for training neural network model used for image processing, and storage medium
CN110008817B (zh) 模型训练、图像处理方法、装置、电子设备及计算机可读存储介质
Li et al. Deep retinex network for single image dehazing
JP6613605B2 (ja) 深度画像の深度値復元方法及びシステム
CN108564549B (zh) 一种基于多尺度稠密连接网络的图像去雾方法
JP6773061B2 (ja) 評価システム、評価装置、評価方法、評価プログラム、及び記録媒体
CN110910319B (zh) 一种基于大气散射模型的手术视频实时去雾增强方法
AU2020203790A1 (en) Transformed multi-source content aware fill
CN111383232A (zh) 抠图方法、装置、终端设备及计算机可读存储介质
JP2015060593A (ja) 画像をフィルタリングするための方法および装置
CN113284061A (zh) 一种基于梯度网络的水下图像增强方法
WO2023005818A1 (zh) 噪声图像生成方法、装置、电子设备及存储介质
Liu et al. PD-GAN: perceptual-details gan for extremely noisy low light image enhancement
US11763430B2 (en) Correcting dust and scratch artifacts in digital images
WO2020062899A1 (zh) 通过前景背景像素对和灰度信息获得透明度遮罩的方法
JP2021043874A (ja) 画像処理装置、画像処理方法、およびプログラム
JP2021087201A (ja) 画像処理装置、画像処理方法、学習装置、学習方法、撮像装置、及びプログラム
WO2024041108A1 (zh) 图像矫正模型训练及图像矫正方法、装置和计算机设备
Hua et al. Low-light image enhancement based on joint generative adversarial network and image quality assessment
JP7312026B2 (ja) 画像処理装置、画像処理方法およびプログラム
CN111292251B (zh) 图像偏色校正方法、装置以及计算机存储介质
CN109410143B (zh) 图像增强方法、装置、电子设备及计算机可读介质
Pan et al. ChebyLighter: Optimal Curve Estimation for Low-light Image Enhancement
JP2021082118A (ja) 学習方法、プログラム、学習装置、および、学習済みウエイトの製造方法
CN111754411B (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: 19864422

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: 19864422

Country of ref document: EP

Kind code of ref document: A1