WO2017181892A1 - Foreground segmentation method and device - Google Patents

Foreground segmentation method and device Download PDF

Info

Publication number
WO2017181892A1
WO2017181892A1 PCT/CN2017/080274 CN2017080274W WO2017181892A1 WO 2017181892 A1 WO2017181892 A1 WO 2017181892A1 CN 2017080274 W CN2017080274 W CN 2017080274W WO 2017181892 A1 WO2017181892 A1 WO 2017181892A1
Authority
WO
WIPO (PCT)
Prior art keywords
points
point
matching
image
foreground
Prior art date
Application number
PCT/CN2017/080274
Other languages
French (fr)
Chinese (zh)
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 WO2017181892A1 publication Critical patent/WO2017181892A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • 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

Definitions

  • This document relates to, but is not limited to, image processing technology, and in particular to a foreground segmentation method and apparatus.
  • Foreground Extraction refers to extracting foreground objects of arbitrary shape from a static image or a burst of video images.
  • the foreground extraction technique in the related art requires the user to mark foreground pixels or regions, and by analyzing the pixels of the region, Get a rough outline of the target in the image.
  • the saliency map model of the image By extracting the saliency map model of the image from the global features such as color, brightness, and direction of the image, it is possible to reflect the region of the image that is most likely to cause user interest and best represent the image content.
  • the problem of significant feature detection comes from computer simulation of human vision in order to achieve the ability of the human eye to select objects.
  • Low-level vision plays an important role in the saliency detection model, such as color, direction, brightness, texture, and edges.
  • the human eye is more sensitive to the color information of the image than other visual features, so the statistics of the color features are especially important in computer vision.
  • Two methods for color feature calculation are widely used in saliency detection: the first is to create a color histogram and then compare the difference between the histograms; the second is to block the image and put each image The internal color average is compared with other color patches to obtain color saliency; brightness is also the most basic visual feature in the image.
  • the luminance feature is calculated, the luminance component of the local feature region is extracted.
  • Statistical values are used to represent the overall brightness characteristics of the region, and then the brightness of the image is obtained by comparison with other regions; the directional features reflect the essential features of the surface of the object, and the directional feature calculation in the saliency detection of the image is mainly Gabor energy method. It can well simulate the multi-channel and multi-resolution features of the human visual system.
  • the salient feature is based on the global features of the image, which can well simulate the features of the human eye's region of interest, but has the following disadvantages: First, the selection of salient regions is very subjective, due to the needs of different users, the same image is of interest. The region may have greater differences; secondly, significant The global feature based on the image is less robust to local changes in the target. And in the application, the method needs to manually intervene to mark the global feature block of the target area. In the case of a simple image processing, the method has a practical space. However, with the development of search engines and networks, the capacity of data has exploded, and a small number of image processing methods are far from meeting the urgent needs of users, and it is difficult to show qualified results in a huge image database because of manual intervention.
  • the motion regions in the image are typically extracted using a difference between adjacent frame images in the sequence of images.
  • the image sequence of two adjacent frames is grayed out, and then corrected in the same coordinate system.
  • the difference operation is performed, the background portion where the gradation does not change will be clipped off. Since the region of interest is mostly a moving target, the contour of the region where the gradation changes, that is, the approximate contour of the region of interest, can be obtained through a difference operation. Thereby determining the foreground image.
  • the adjacent frame difference method can well solve the foreground extraction problem in the simple scene video sequence, but since the adjacent frame difference method requires input of consecutive video adjacent frame sequences, it is difficult to apply to the processing of still images. in. Secondly, for complex backgrounds or changing backgrounds, the frame difference method is less robust.
  • the method for acquiring the approximate foreground region based on the image salient features proposed for the still image utilizes the global feature of the image, and cannot take into account the local details of the image, and the robustness is poor. Due to the complexity of the background, the similarity of the image, etc., the foreground contour of the object may have small flaws, so it is necessary to improve the accuracy of the algorithm again.
  • the embodiment of the invention provides a foreground segmentation method and device, which can improve the accuracy of automatic foreground segmentation of image matching.
  • the embodiment of the invention discloses a foreground segmentation method, which comprises:
  • the image segmentation algorithm is used to obtain the foreground target in the image.
  • extracting local feature information of the two input images includes:
  • the two images input by the user are grayed out, and the local feature information of the image is extracted by using the accelerated robust feature SURF algorithm.
  • performing key point matching according to the extracted local feature information includes:
  • the incorrect matching points are filtered out from the matching points of the obtained key points, and all correct matching points are obtained:
  • the ratio of s n to s n ' is a scale ratio of a key point in the first input image to a matching point of the key point in the first input image in the second input image, and a logarithm is obtained to obtain a scale ratio; n and ⁇ n, the difference of the first input key image and key image point of the first input matching points in the second direction of the input image difference.
  • using cluster analysis to derive feature point groups on the foreground target from all the correct matching points includes:
  • the following algorithm is used to randomly select the cluster centroids of the k clusters as
  • the distance to the k seed points is calculated, and the point closest to the seed point ⁇ n belongs to the ⁇ n point group, wherein the Euclidean distance in the 128-dimensional SIFT feature space is calculated according to the following formula:
  • S i represents a one-dimensional feature of the SIFT feature
  • R n represents that the heart points of the selected K clusters belong to a set of n clusters randomly taken from the point set.
  • the embodiment of the invention further discloses a foreground segmentation device, comprising:
  • the first unit is configured to separately extract local feature information of the two input images, and perform matching of the key points according to the extracted local feature information;
  • the second unit is configured to filter out the wrong matching points from the matching points of the obtained key points to obtain all correct matching points;
  • the third unit is configured to use cluster analysis to derive feature point groups on the foreground target from all the correct matching points;
  • the fourth unit is configured to obtain a foreground target in the image by using an image segmentation algorithm according to the obtained feature point group.
  • the first unit is configured to extract local feature information of the two input images, including:
  • the two images input by the user are grayed out, and the local feature information of the image is extracted by using the accelerated robust feature SURF algorithm.
  • the first unit is configured to perform key point matching according to the extracted local feature information, including:
  • Determining the first input of the two input images using a neighbor algorithm based on the extracted local feature information The key points in the image are the corresponding matching points in the second input image.
  • the second unit is configured to filter out the wrong matching points from the matching points of the obtained key points, and obtain all correct matching points including:
  • the third unit is configured to use the cluster analysis to derive the feature point group on the foreground target from all the correct matching points, including:
  • the following algorithm is used to randomly select the cluster centroids of the k clusters as
  • the distance to the k seed points is calculated, and the point closest to the seed point ⁇ n belongs to the ⁇ n point group, wherein the Euclidean distance in the 128-dimensional SIFT feature space is calculated according to the following formula:
  • each ⁇ n seed point is repeatedly calculated until the center of each class is gradually stabilized, and the front spot group and the background seed point group are obtained, and the obtained front spot group and background seed point group are taken as the feature point group.
  • the technical solution provided by the embodiment of the present invention includes: separately extracting local feature information of two input images, performing key point matching according to the extracted local feature information; and screening from the matching points of the obtained key points. Get all the correct matching points except the wrong matching points; use poly
  • the class analysis derives the feature point group on the foreground target from all the correct matching points; according to the obtained feature point group, the image segmentation algorithm is used to obtain the foreground target in the image.
  • the embodiment of the invention improves the accuracy of the foreground object in the image, reduces the time of foreground processing, and improves the efficiency of image processing.
  • the technical solution of the embodiment of the invention can objectively obtain the foreground target in the image, so that the result is more accurate and intuitive, can replace the traditional human-computer interaction method, reduces the overall time, improves the efficiency, and can be obtained in the experimental data set. Good experimental results.
  • the problem of local feature information loss in the image is solved, and the robustness of the method is improved.
  • the accuracy of the foreground segmentation contour is improved.
  • FIG. 1 is a flowchart of a foreground segmentation method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of extracting local feature information of an image according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of an image obtained after cluster analysis processing according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram showing a separation of a foreground object and a background according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of test images and foreground segmentation results using an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a foreground segmentation apparatus according to an embodiment of the present invention.
  • the embodiment of the present invention proposes that the dual image joint automatic foreground extraction method can be adopted, that is, the local features of the image are extracted, the foreground region is obtained through feature point matching and cluster analysis, and then the image segmentation algorithm is used to implement the segmentation method for the foreground image.
  • the local features include: some features that appear locally, which can be stably present and have some points that are well distinguishable. Different from global features such as variance and color, local features can better summarize the information carried by the image and reduce the amount of calculation. Improve the anti-interference ability of the algorithm.
  • the embodiment provides a foreground segmentation method, as shown in FIG. 1 , including:
  • Step 100 Extract local feature information of two input images respectively, and perform matching of key points according to the extracted local feature information
  • extracting local feature information of the two input images includes:
  • the two images input by the user are grayed out, and the local feature information of the image is extracted using the accelerated robust feature (SURF) algorithm.
  • SURF accelerated robust feature
  • performing key point matching according to the extracted local feature information includes:
  • Step 200 Screen out the wrong matching points from the matching points of the obtained key points to obtain all correct matching points
  • the wrong matching points are filtered out from the matching points of the obtained key points, and all correct matching points are obtained:
  • the ratio of s n to s n ' is a scale ratio of a key point in the first input image to a matching point of the key point in the first input image in the second input image, and a logarithm is obtained to obtain a scale ratio; n and ⁇ n, the difference of the first input key image and key image point of the first input matching points in the second direction of the input image difference.
  • Step 300 using cluster analysis to derive features on the foreground target from all correct matching points Point group
  • using cluster analysis to derive the feature point groups on the foreground target from all the correct matching points includes:
  • S i represents a one-dimensional feature of the SIFT feature
  • R n represents that the heart points of the selected K clusters belong to a set of n clusters randomly taken from the point set. That is, R n indicates that the heart points of the K clusters are selected, and all belong to the clusters clustered by randomly taking n from a large point set.
  • the distance to the k seed points is calculated, and the point closest to the seed point ⁇ n belongs to the ⁇ n point group, wherein the Euclidean in the 128-dimensional scale-invariant feature transform SIFT feature space is calculated according to the following formula distance:
  • each ⁇ n seed point is repeatedly calculated until the center of each class is gradually stabilized, and the front spot group and the background seed point group are obtained, and the obtained front spot group and background seed point group are taken as the feature point group.
  • Step 400 Obtain a foreground target in the image by using an image segmentation algorithm according to the obtained feature point group.
  • step 100 can be summarized as feature matching; comprising two parts operation: 1. extracting local feature information of two input images respectively; and performing key point matching according to the extracted local features;
  • the local features of the image involved in this embodiment are different from the global features of the image, and are features that appear locally.
  • some feature points that are still stable can easily and accurately describe the features of the clothing image, such as Harris, SIFT, SURF, FAST (the image matching method existing in the related art).
  • Step 200 can be summarized as a matching point screening
  • the wrong matching point can be filtered according to the scale ratio of the matching point and the rotation direction ratio
  • Step 300 can be summarized as foreground image extraction.
  • cluster analysis is first used to obtain a group of feature points on the foreground target
  • the image segmentation algorithm is used to obtain the foreground target in the image.
  • the cluster analysis involved in the embodiment refers to a process of classifying data into different classes or clusters, and the data in the same cluster has a high similarity; and between different clusters, The data is very different. It is an unsupervised learning that does not rely on pre-defined classes or labeled training examples, such as k-means (already existing in the related art).
  • the image segmentation involved in the present embodiment is a technique and process for dividing an image into a plurality of specific regions having unique properties and proposing objects of interest. Such as based on threshold segmentation, region-based segmentation, edge-based segmentation, and segmentation based on specific theory.
  • the cluster analysis is used in this embodiment because the analysis can convert the abstract key point information into the foreground area, thereby providing support for the next image segmentation technology, and the joint application of the image matching technology and the segmentation technology to achieve the The traditional artificial interaction of image segmentation technology has improved.
  • a clustering algorithm is performed on the original features of the original input image to obtain a suggested region of the foreground object, and finally the overall foreground segmentation of the image is performed by the graph cut method.
  • Step 1 Enter image feature matching; includes:
  • FIG. 2 is a schematic diagram of extracting local feature information of the image according to an embodiment of the present invention. As shown in FIG. 2, the image input by the user is grayed out and used. SURF feature extraction obtains local feature information of the image.
  • KNN K-Nearest Neighbor
  • the second step screening of matching points
  • the embodiment of the present invention screens the results obtained in the first step to obtain better results.
  • the foreground target matches the point area.
  • the matching points are filtered by the constructed two-dimensional data.
  • the region with large distribution of the two-dimensional array can be obtained.
  • the interference point of the background is removed in this way.
  • the third step foreground image extraction
  • This step is a core step of the embodiment of the present invention.
  • the method of the embodiment of the present invention applies the method of data clustering analysis to the homogeneity analysis of the key points, and the image feature matching method and the image segmentation method can be well organic. Combination of.
  • the combination c (i) of matching key points in image A is obtained. Due to the complexity of the image background, it is highly probable that the matching key points contain interference matching points similar to the foreground target key points.
  • the embodiment of the present invention uses the K-means clustering analysis algorithm to group the key points obtained in the previous step to obtain the key points of the foreground target and improve the image segmentation. The degree of accuracy.
  • the clustering method of the embodiment of the present invention does not use the 128-dimensional sift feature of the key point according to the distance feature of the point, and analyzes the Euclidean distance of the key point in the SIFT feature space.
  • the method of the embodiment of the invention can better analyze the same attribute of the feature points, thereby obtaining a more accurate foreground suggestion area.
  • the K-means algorithm clusters the samples x (i) into k clusters, and the clusters belong to unsupervised learning. The user does not need to provide the category labeling of the samples.
  • the algorithm is described as follows:
  • the distance to the k seed points is calculated. If the point c (n) is closest to the seed point ⁇ n , then c (n) belongs to the ⁇ n point group. In the present invention, it is necessary to calculate the Euclidean distance in the 128-dimensional SIFT feature space:
  • Sn is the scale information of the matching point.
  • FIG. 3 is a schematic diagram of an image obtained after cluster analysis processing according to an embodiment of the present invention. As shown in FIG. 3, the front attraction group and the background seed point group are used to mark the foreground area and the background area in the image, respectively.
  • the embodiment of the present invention performs foreground extraction.
  • the image segmentation algorithm in the related art is used to cut and extract the target contour of the image with the foreground and background regions.
  • V and E are respectively a set of vertex and edge.
  • edges and vertices there are two types of edges and vertices: the first is a common fixed point for each pixel in the image. Fixed points for every two fields (corresponding to two neighborhood images in the figure) The connection of the prime is an edge, which is n-links.
  • S source: source point
  • T sink point
  • Such vertices have connections to each of the normal vertices, which are called t-links.
  • E(L) ⁇ R(L)+B(L), where R(L) is the region term, B( L) is the boundary term.
  • E(L) represents the weight, also called the energy function.
  • the goal of image segmentation is to optimize the energy function to reach the minimum value.
  • the weights of the regional items are as follows:
  • the item weight of the area represents the weight of the t-links edge. The higher the probability that the point belongs to S or T, the greater its weight, and vice versa.
  • the boundary term represents the weight of the n-links edge. When the similarity of two adjacent pixels is higher, the weights of the edges connected by the two points are higher.
  • FIG. 4 is a schematic diagram of the foreground target and the background separated according to an embodiment of the present invention. As shown in Figure 4, after assigning weights to each edge, the smallest edges are found, and the edges are broken so that the target and background are separated.
  • the paired images can be randomly selected from the dataset of CMU-Cornell as the test set of the method, and because the dataset of the target contained in the image is open sourced by CMU-Cornell, so as to provide The truth contour map is used as a test set for method accuracy.
  • Experimental Results Experimental Results As shown in FIG. 5, with the embodiment of the present invention, the foreground target and the background segmentation process are realized, and the embodiment of the present invention can obtain the approximate outline of the foreground image.
  • This embodiment provides a foreground segmentation device, as shown in FIG. 6, including:
  • the first unit is configured to separately extract local feature information of the two input images, and perform matching of the key points according to the extracted local feature information;
  • the first unit is configured to extract local feature information of the two input images, including:
  • the two images input by the user are grayed out, and the local feature information of the image is extracted by using the accelerated robust feature SURF algorithm.
  • the first unit is configured to perform key point matching according to the extracted local feature information, including:
  • the second unit is configured to filter out the wrong matching points from the matching points of the obtained key points to obtain all correct matching points;
  • the second unit is configured to filter out the wrong matching points from the matching points of the obtained key points, and obtaining all correct matching points includes:
  • the third unit is configured to use cluster analysis to derive feature point groups on the foreground target from all the correct matching points;
  • the third unit uses the cluster analysis to derive the feature point groups on the foreground target from all the correct matching points, including:
  • the following algorithm is used to randomly select the cluster centroids of the k clusters as
  • the distance to the k seed points is calculated, and the point closest to the seed point ⁇ n belongs to the ⁇ n point group, wherein the Euclidean distance in the 128-dimensional SIFT feature space is calculated according to the following formula:
  • each ⁇ n seed point is repeatedly calculated until the center of each class is gradually stabilized, and the front spot group and the background seed point group are obtained, and the obtained front spot group and background seed point group are taken as the feature point group.
  • the fourth unit is configured to obtain a foreground target in the image by using an image segmentation algorithm according to the obtained feature point group.
  • Embodiment 1 the method of the above-mentioned Embodiment 1 can be implemented.
  • the other operations of the device in the foregoing device refer to the corresponding content of Embodiment 1, and details are not described herein again.
  • the technical solution of the present application utilizes image features and is applied to the core problem of automatic foreground extraction of still images.
  • the feature points of the two images are proposed.
  • the contour of the region of interest is obtained through cluster analysis.
  • the image segmentation algorithm is used to automatically extract the foreground target of the still image. Especially suitable for still image data, with high accuracy.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores the meter
  • the computer executable instructions are used to execute the foreground segmentation method described above.
  • An embodiment of the present invention further provides a foreground segmentation apparatus, including: a memory and a processor; wherein
  • the processor is configured to execute program instructions in the memory
  • the image segmentation algorithm is used to obtain the foreground target in the image.
  • each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, being executed by a processor and stored in a memory. Programs/instructions to implement their respective functions.
  • the invention is not limited to any specific form of combination of hardware and software.
  • the above technical solution improves the accuracy of the foreground target in the image, reduces the time of foreground processing, and improves the efficiency of image processing.

Abstract

A foreground segmentation method and device, the method comprising: respectively extracting local characteristic information about two input images, and matching key points according to the extracted local characteristic information; screening a mismatching point from matching points among obtained key points to obtain all the correct matching points; performing cluster analysis to obtain, from all the correct matching points, a characteristic point group on a foreground object; and according to the obtained characteristic point group, using an image segmentation method to obtain the foreground object in the image. The embodiments of the present invention improve the accuracy of a foreground object in an image, reduce foreground processing time, and improve the efficiency of image processing.

Description

前景分割方法及装置Foreground segmentation method and device 技术领域Technical field
本文涉及但不限于图像处理技术,尤其涉及一种前景分割方法及装置。This document relates to, but is not limited to, image processing technology, and in particular to a foreground segmentation method and apparatus.
背景技术Background technique
前景提取(Foreground Extraction)指的是从一幅静态图像或者一阵视频图像中提取出任意形状的前景对象,相关技术中的前景提取技术需要用户标注前景像素点或区域,通过对区域的像素分析,得出图像中目标的大致轮廓。Foreground Extraction refers to extracting foreground objects of arbitrary shape from a static image or a burst of video images. The foreground extraction technique in the related art requires the user to mark foreground pixels or regions, and by analyzing the pixels of the region, Get a rough outline of the target in the image.
目前,最常用的前景提取方案包括如下几种:Currently, the most commonly used foreground extraction schemes include the following:
1)显著性检测1) Significance detection
通过对图像的颜色、亮度、方向等全局特征提取图像的显著图模型,可以反映图像中最能引起用户兴趣,最能表现图像内容的区域。显著性特征检测问题来源于计算机模拟人类视觉,以期达到人眼对物体选择的能力。在显著性检测模型中低级视觉起到了十分重要的作用,比如颜色、方向、亮度、纹理和边缘等等。By extracting the saliency map model of the image from the global features such as color, brightness, and direction of the image, it is possible to reflect the region of the image that is most likely to cause user interest and best represent the image content. The problem of significant feature detection comes from computer simulation of human vision in order to achieve the ability of the human eye to select objects. Low-level vision plays an important role in the saliency detection model, such as color, direction, brightness, texture, and edges.
相对于其他视觉特征,人眼对图像的颜色信息更加敏感,所以颜色特征的统计在计算机视觉中尤其重要。有两种颜色特征计算的方法被广泛的应用到显著性检测中:第一类是建立颜色直方图,然后对比直方图之间的差异;第二类是对图像进行分块,把每块图像内部的颜色平均值与其他色块进行比较,以此得到颜色显著度;亮度也是图像中最基本的视觉特征,在显著性检测模型中,计算亮度特征的时,通过提取局部特征区域亮度分量的统计值来表示该区域整体的亮度特征,然后通过与其他区域的对比得到图像的亮度显著度;方向特征反应物体表面的本质特征,在图像的显著性检测中的方向特征计算主要是Gabor能量法,可以很好地模拟人类视觉系统的多通道和多分辨率的特征。The human eye is more sensitive to the color information of the image than other visual features, so the statistics of the color features are especially important in computer vision. Two methods for color feature calculation are widely used in saliency detection: the first is to create a color histogram and then compare the difference between the histograms; the second is to block the image and put each image The internal color average is compared with other color patches to obtain color saliency; brightness is also the most basic visual feature in the image. In the saliency detection model, when the luminance feature is calculated, the luminance component of the local feature region is extracted. Statistical values are used to represent the overall brightness characteristics of the region, and then the brightness of the image is obtained by comparison with other regions; the directional features reflect the essential features of the surface of the object, and the directional feature calculation in the saliency detection of the image is mainly Gabor energy method. It can well simulate the multi-channel and multi-resolution features of the human visual system.
显著性特征基于图像的全局特征,能够很好的模拟人眼感兴趣区的特征,但是存在以下不足:首先,显著区域的选择是非常主观的,由于不同用户的需求,同一幅图像的感兴趣区域可能有较大的差异性;其次,显著性特 征基于图像的全局特征,对目标的局部变化鲁棒性较低。并且在应用中,该方法需要人工干预标记目标区域的全局特征块,在简单地少数图像处理的情况下,该方法还有实用空间。但是随着搜索引擎以及网络的发展,数据的容量以爆炸式增长,少数图像的处理方法已经远无法满足用户的急切需求,且因为人工干预很难在庞大的图像数据库中展现出合格的结果。The salient feature is based on the global features of the image, which can well simulate the features of the human eye's region of interest, but has the following disadvantages: First, the selection of salient regions is very subjective, due to the needs of different users, the same image is of interest. The region may have greater differences; secondly, significant The global feature based on the image is less robust to local changes in the target. And in the application, the method needs to manually intervene to mark the global feature block of the target area. In the case of a simple image processing, the method has a practical space. However, with the development of search engines and networks, the capacity of data has exploded, and a small number of image processing methods are far from meeting the urgent needs of users, and it is difficult to show qualified results in a huge image database because of manual intervention.
2)帧差分方法2) Frame difference method
通常利用图像序列中相邻的帧图像之间做差来提取出图像中的运动区域。将相邻两帧的图像序列进行灰度化处理,然后矫正在同一坐标系当中,在进行差分运算,灰度不发生变化的背景部分将被剪除掉。由于感兴趣区域大多为运动目标,所以经过差分运算可以得到灰度发生变化的区域轮廓,也就是感兴趣区域的大致轮廓。从而确定前景图像。The motion regions in the image are typically extracted using a difference between adjacent frame images in the sequence of images. The image sequence of two adjacent frames is grayed out, and then corrected in the same coordinate system. When the difference operation is performed, the background portion where the gradation does not change will be clipped off. Since the region of interest is mostly a moving target, the contour of the region where the gradation changes, that is, the approximate contour of the region of interest, can be obtained through a difference operation. Thereby determining the foreground image.
相邻的帧差分方法能够很好地解决在简单场景视频序列中的前景提取问题,但是由于相邻的帧差分方法需求输入连续的视频相邻的帧序列,因此很难应用到静态图像的处理中。其次对于复杂的背景或者变化的背景,帧差分方法的鲁棒性较低。The adjacent frame difference method can well solve the foreground extraction problem in the simple scene video sequence, but since the adjacent frame difference method requires input of consecutive video adjacent frame sequences, it is difficult to apply to the processing of still images. in. Secondly, for complex backgrounds or changing backgrounds, the frame difference method is less robust.
从上述内容可以看出,针对静态图像提出的基于图像显著特征来获取大致前景区域的方法利用图像的全局特征,无法考虑到图像的局部细节,鲁棒性较差。而由于背景的复杂程度,和图像的相似程度等原因,对象的前景轮廓可能会有细小的瑕疵,因此需要再次提高算法的精确程度。It can be seen from the above that the method for acquiring the approximate foreground region based on the image salient features proposed for the still image utilizes the global feature of the image, and cannot take into account the local details of the image, and the robustness is poor. Due to the complexity of the background, the similarity of the image, etc., the foreground contour of the object may have small flaws, so it is necessary to improve the accuracy of the algorithm again.
发明概述Summary of invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种前景分割方法及装置,能够提升图像匹配的自动前景分割的准确性。The embodiment of the invention provides a foreground segmentation method and device, which can improve the accuracy of automatic foreground segmentation of image matching.
本发明实施例公开了一种前景分割方法,包括:The embodiment of the invention discloses a foreground segmentation method, which comprises:
分别提取两幅输入图像的局部特征信息,根据提取的局部特征信息进行关键点的匹配;Extracting local feature information of two input images respectively, and matching key points according to the extracted local feature information;
从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点; Screen out the mismatched points from the matching points of the obtained key points to get all the correct matching points;
使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组;Use cluster analysis to derive feature point groups on foreground targets from all correct matching points;
根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。According to the obtained feature point group, the image segmentation algorithm is used to obtain the foreground target in the image.
可选地,上述前景分割方法中,提取两幅输入图像的局部特征信息包括:Optionally, in the foregoing foreground segmentation method, extracting local feature information of the two input images includes:
将用户输入的两幅图像进行灰度化处理,使用加速鲁棒特征SURF算法提取图像的局部特征信息。The two images input by the user are grayed out, and the local feature information of the image is extracted by using the accelerated robust feature SURF algorithm.
可选地,上述前景分割方法中,根据提取的局部特征信息进行关键点的匹配包括:Optionally, in the foregoing foreground segmentation method, performing key point matching according to the extracted local feature information includes:
根据提取的局部特征信息,使用近邻算法确定两幅输入图像中第一输入图像中的关键点在第二输入图像中对应的匹配点。And determining, according to the extracted local feature information, a matching point corresponding to a key point in the first input image in the second input image by using a neighbor algorithm.
可选地,上述前景分割方法中,从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点包括:Optionally, in the foregoing foreground segmentation method, the incorrect matching points are filtered out from the matching points of the obtained key points, and all correct matching points are obtained:
配置尺度比例SR和方向OA,根据所述关键点匹配所得到的结果,计算两幅输入图像中第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的尺度比例以及方向比例,并以此构建如下二维数组:Configuring a scale ratio SR and a direction OA, and calculating a match between a key point in the first input image and a key point in the first input image in the second input image according to the result obtained by the key point matching The scale ratio of the points and the direction scale, and construct the following two-dimensional array:
P={<SR1,OA1>,<SR2,OA2>…<SRn,OAn>}P={<SR 1 , OA 1 >, <SR 2 , OA 2 >...<SR n , OA n >}
其中,
Figure PCTCN2017080274-appb-000001
OAn=θnn
among them,
Figure PCTCN2017080274-appb-000001
OA nnn '
进行匹配点的筛选;Perform screening of matching points;
其中,sn与sn′的比值为第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的尺度比值,取对数后获得尺度比例;θn与θn ,的差为第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的方向差。Wherein the ratio of s n to s n ' is a scale ratio of a key point in the first input image to a matching point of the key point in the first input image in the second input image, and a logarithm is obtained to obtain a scale ratio; n and θ n, the difference of the first input key image and key image point of the first input matching points in the second direction of the input image difference.
可选地,上述前景分割方法中,使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组包括:Optionally, in the foregoing foreground segmentation method, using cluster analysis to derive feature point groups on the foreground target from all the correct matching points includes:
采用如下算法随机选取k个聚类之心点(cluster centroids)为The following algorithm is used to randomly select the cluster centroids of the k clusters as
μ12,…,μk∈Rn
Figure PCTCN2017080274-appb-000002
μ 1 , μ 2 ,...,μ k ∈R n ,
Figure PCTCN2017080274-appb-000002
对于每一个样例i,计算到k个种子点的距离,距离种子点μn最近的点属于μn点群,其中,按照如下公式计算128维SIFT特征空间中的欧氏距离:For each of the samples i, the distance to the k seed points is calculated, and the point closest to the seed point μ n belongs to the μ n point group, wherein the Euclidean distance in the 128-dimensional SIFT feature space is calculated according to the following formula:
Figure PCTCN2017080274-appb-000003
Figure PCTCN2017080274-appb-000003
将每一个点群的μn种子点移动到该μn点群的中心,Moving the μ n seed point of each point group to the center of the μ n point group,
Figure PCTCN2017080274-appb-000004
Figure PCTCN2017080274-appb-000004
重复计算每一个μn种子点的距离,直到每一个类的中心逐渐稳定,得到前景点群和背景种子点群,将得到的前景点群和背景种子点群作为所述特征点群组;Repeating the calculation of the distance of each μ n seed point until the center of each class is gradually stabilized, obtaining a pre-attraction group and a background seed point group, and obtaining the obtained pre-attraction group and background seed point group as the feature point group;
其中,Si代表是SIFT特征的一维,Rn表示选取K个聚类的心点均属于从点集中随机取n个聚类的集合。Wherein, S i represents a one-dimensional feature of the SIFT feature, and R n represents that the heart points of the selected K clusters belong to a set of n clusters randomly taken from the point set.
本发明实施例还公开了一种前景分割装置,包括:The embodiment of the invention further discloses a foreground segmentation device, comprising:
第一单元设置为,分别提取两幅输入图像的局部特征信息,根据提取的局部特征信息进行关键点的匹配;The first unit is configured to separately extract local feature information of the two input images, and perform matching of the key points according to the extracted local feature information;
第二单元设置为,从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点;The second unit is configured to filter out the wrong matching points from the matching points of the obtained key points to obtain all correct matching points;
第三单元设置为,使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组;The third unit is configured to use cluster analysis to derive feature point groups on the foreground target from all the correct matching points;
第四单元设置为,根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。The fourth unit is configured to obtain a foreground target in the image by using an image segmentation algorithm according to the obtained feature point group.
可选地,上述前景分割装置中,所述第一单元设置为提取两幅输入图像的局部特征信息包括:Optionally, in the foregoing foreground segmentation device, the first unit is configured to extract local feature information of the two input images, including:
将用户输入的两幅图像进行灰度化处理,使用加速鲁棒特征SURF算法提取图像的局部特征信息。The two images input by the user are grayed out, and the local feature information of the image is extracted by using the accelerated robust feature SURF algorithm.
可选地,上述前景分割装置中,所述第一单元设置为根据提取的局部特征信息进行关键点的匹配包括:Optionally, in the foregoing foreground segmentation device, the first unit is configured to perform key point matching according to the extracted local feature information, including:
根据提取的局部特征信息,使用近邻算法确定两幅输入图像中第一输入 图像中的关键点在第二输入图像中对应的匹配点。Determining the first input of the two input images using a neighbor algorithm based on the extracted local feature information The key points in the image are the corresponding matching points in the second input image.
可选地,上述前景分割装置中,所述第二单元设置为从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点包括:Optionally, in the foregoing foreground segmentation device, the second unit is configured to filter out the wrong matching points from the matching points of the obtained key points, and obtain all correct matching points including:
配置尺度比例SR和方向OA,根据所述关键点匹配所得到的结果,计算两幅输入图像中第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的尺度比例以及方向比例,并以此构建如下二维数组:Configuring a scale ratio SR and a direction OA, and calculating a match between a key point in the first input image and a key point in the first input image in the second input image according to the result obtained by the key point matching The scale ratio of the points and the direction scale, and construct the following two-dimensional array:
P={<SR1,OA1>,<SR2,OA2>…<SRn,OAn>}P={<SR 1 , OA 1 >, <SR 2 , OA 2 >...<SR n , OA n >}
其中,
Figure PCTCN2017080274-appb-000005
OAn=θnn
among them,
Figure PCTCN2017080274-appb-000005
OA nnn '
进行匹配点的筛选。Perform screening of matching points.
可选地,上述前景分割装置中,所述第三单元设置为使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组包括:Optionally, in the foregoing foreground segmentation device, the third unit is configured to use the cluster analysis to derive the feature point group on the foreground target from all the correct matching points, including:
采用如下算法随机选取k个聚类之心点(cluster centroids)为The following algorithm is used to randomly select the cluster centroids of the k clusters as
μ12,…,μk∈Rn
Figure PCTCN2017080274-appb-000006
μ 1 , μ 2 ,...,μ k ∈R n ,
Figure PCTCN2017080274-appb-000006
对于每一个样例i,计算到k个种子点的距离,距离种子点μn最近的点属于μn点群,其中,按照如下公式计算128维SIFT特征空间中的欧氏距离:For each of the samples i, the distance to the k seed points is calculated, and the point closest to the seed point μ n belongs to the μ n point group, wherein the Euclidean distance in the 128-dimensional SIFT feature space is calculated according to the following formula:
Figure PCTCN2017080274-appb-000007
Figure PCTCN2017080274-appb-000007
将每一个点群的μn种子点移动到该μn点群的中心,Moving the μ n seed point of each point group to the center of the μ n point group,
Figure PCTCN2017080274-appb-000008
Figure PCTCN2017080274-appb-000008
重复计算每一个μn种子点的距离,直到每一个类的中心逐渐稳定,得到前景点群和背景种子点群,将得到的前景点群和背景种子点群作为所述特征点群组。The distance of each μ n seed point is repeatedly calculated until the center of each class is gradually stabilized, and the front spot group and the background seed point group are obtained, and the obtained front spot group and background seed point group are taken as the feature point group.
与相关技术相比,本发明实施例提供的技术方案,包括:分别提取两幅输入图像的局部特征信息,根据提取的局部特征信息进行关键点的匹配;从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点;使用聚 类分析从所有正确的匹配点中得出前景目标上的特征点群组;根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。本发明实施例提升了得出图像中的前景目标的准确性,减少了前景处理的时间,提高了图像处理的效率。采用本发明实施例的技术方案可以客观的得出图像中的前景目标,使得结果更加准确直观,能够替代传统的人机交互方法,减少了整体时间,提高效率,并且在实验数据集中可以得到较好的实验结果。同时解决了图像中的局部特征信息丢失的问题,提高了方法的鲁棒性。相比相邻的帧差分方法,尤其适用静态图像,提高了前景分割轮廓的准确性。Compared with the related art, the technical solution provided by the embodiment of the present invention includes: separately extracting local feature information of two input images, performing key point matching according to the extracted local feature information; and screening from the matching points of the obtained key points. Get all the correct matching points except the wrong matching points; use poly The class analysis derives the feature point group on the foreground target from all the correct matching points; according to the obtained feature point group, the image segmentation algorithm is used to obtain the foreground target in the image. The embodiment of the invention improves the accuracy of the foreground object in the image, reduces the time of foreground processing, and improves the efficiency of image processing. The technical solution of the embodiment of the invention can objectively obtain the foreground target in the image, so that the result is more accurate and intuitive, can replace the traditional human-computer interaction method, reduces the overall time, improves the efficiency, and can be obtained in the experimental data set. Good experimental results. At the same time, the problem of local feature information loss in the image is solved, and the robustness of the method is improved. Compared with the adjacent frame difference method, especially for static images, the accuracy of the foreground segmentation contour is improved.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1是本发明实施例前景分割方法的流程图;1 is a flowchart of a foreground segmentation method according to an embodiment of the present invention;
图2为本发明实施例提取图像的局部特征信息的示意图;2 is a schematic diagram of extracting local feature information of an image according to an embodiment of the present invention;
图3为本发明实施例聚类分析处理后获得的图像示意图;3 is a schematic diagram of an image obtained after cluster analysis processing according to an embodiment of the present invention;
图4为本发明实施例前景目标和背景分开的示意图;4 is a schematic diagram showing a separation of a foreground object and a background according to an embodiment of the present invention;
图5是采用本发明实施例测试图像及前景分割结果示意图;5 is a schematic diagram of test images and foreground segmentation results using an embodiment of the present invention;
图6为本发明实施例前景分割装置的结构框图。FIG. 6 is a structural block diagram of a foreground segmentation apparatus according to an embodiment of the present invention.
详述Detailed
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
实施例1Example 1
本申请发明人发现相关技术中的自动前景分割方案主要着眼于视频连续帧的特征提取,又或者联合用户干预及全局特征的静态图像前景提取。而本发明实施例提出可以采用双图像联合自动前景提取手段,即提取图像的局部特征,通过特征点匹配、聚类分析得到前景区域,再使用图像分割算法,实现对前景图像的分割方法。其中,局部特征包括:一些局部才会出现的特征,其能够稳定出现并且具有良好的可区分性的一些点。与方差、颜色等全局特征不同,局部特征能够更好地总结图像所携带的信息,减少计算量并且 提升算法的抗干扰能力。The inventors of the present application have found that the automatic foreground segmentation scheme in the related art mainly focuses on feature extraction of video continuous frames, or combined with user intervention and global feature foreground image extraction. However, the embodiment of the present invention proposes that the dual image joint automatic foreground extraction method can be adopted, that is, the local features of the image are extracted, the foreground region is obtained through feature point matching and cluster analysis, and then the image segmentation algorithm is used to implement the segmentation method for the foreground image. Among them, the local features include: some features that appear locally, which can be stably present and have some points that are well distinguishable. Different from global features such as variance and color, local features can better summarize the information carried by the image and reduce the amount of calculation. Improve the anti-interference ability of the algorithm.
基于上述内容,本实施例提供一种前景分割方法,如图1所示,包括:Based on the foregoing, the embodiment provides a foreground segmentation method, as shown in FIG. 1 , including:
步骤100、分别提取两幅输入图像的局部特征信息,根据提取的局部特征信息进行关键点的匹配;Step 100: Extract local feature information of two input images respectively, and perform matching of key points according to the extracted local feature information;
可选的,提取两幅输入图像的局部特征信息包括:Optionally, extracting local feature information of the two input images includes:
将用户输入的两幅图像进行灰度化处理,使用加速鲁棒特征(SURF)算法提取图像的局部特征信息。The two images input by the user are grayed out, and the local feature information of the image is extracted using the accelerated robust feature (SURF) algorithm.
可选的,根据提取的局部特征信息进行关键点的匹配包括:Optionally, performing key point matching according to the extracted local feature information includes:
根据提取的局部特征信息,使用近邻算法确定两幅输入图像中第一输入图像中的关键点在第二输入图像中对应的匹配点。And determining, according to the extracted local feature information, a matching point corresponding to a key point in the first input image in the second input image by using a neighbor algorithm.
步骤200、从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点;Step 200: Screen out the wrong matching points from the matching points of the obtained key points to obtain all correct matching points;
可选的,从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点包括:Optionally, the wrong matching points are filtered out from the matching points of the obtained key points, and all correct matching points are obtained:
配置尺度比例SR和方向OA,根据所述关键点匹配所得到的结果,计算两幅输入图像中第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的尺度比例以及方向比例,并以此构建如下二维数组:Configuring a scale ratio SR and a direction OA, and calculating a match between a key point in the first input image and a key point in the first input image in the second input image according to the result obtained by the key point matching The scale ratio of the points and the direction scale, and construct the following two-dimensional array:
P={<SR1,OA1>,<SR2,OA2>…<SRn,OAn>}P={<SR 1 , OA 1 >, <SR 2 , OA 2 >...<SR n , OA n >}
其中,
Figure PCTCN2017080274-appb-000009
OAn=θnn
among them,
Figure PCTCN2017080274-appb-000009
OA nnn '
进行匹配点的筛选;Perform screening of matching points;
其中,sn与sn′的比值为第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的尺度比值,取对数后获得尺度比例;θn与θn ,的差为第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的方向差。Wherein the ratio of s n to s n ' is a scale ratio of a key point in the first input image to a matching point of the key point in the first input image in the second input image, and a logarithm is obtained to obtain a scale ratio; n and θ n, the difference of the first input key image and key image point of the first input matching points in the second direction of the input image difference.
步骤300、使用聚类分析从所有正确的匹配点中得出前景目标上的特征 点群组; Step 300, using cluster analysis to derive features on the foreground target from all correct matching points Point group
可选的,使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组包括:Optionally, using cluster analysis to derive the feature point groups on the foreground target from all the correct matching points includes:
采用如下算法随机选取k个聚类之心点为:The following algorithm is used to randomly select the heart points of k clusters as:
μ12,…,μk∈Rn
Figure PCTCN2017080274-appb-000010
μ 1 , μ 2 ,...,μ k ∈R n ,
Figure PCTCN2017080274-appb-000010
其中,Si代表是SIFT特征的一维,Rn表示选取K个聚类的心点均属于从点集中随机取n个聚类的集合。即Rn表示选取K个聚类的心点,都属于通过从大的点集中随机取n个来聚类的集合里Wherein, S i represents a one-dimensional feature of the SIFT feature, and R n represents that the heart points of the selected K clusters belong to a set of n clusters randomly taken from the point set. That is, R n indicates that the heart points of the K clusters are selected, and all belong to the clusters clustered by randomly taking n from a large point set.
对于每一个样例i,计算到k个种子点的距离,距离种子点μn最近的点属于μn点群,其中,按照如下公式计算128维尺度不变特征变换SIFT特征空间中的欧氏距离:For each of the samples i, the distance to the k seed points is calculated, and the point closest to the seed point μ n belongs to the μ n point group, wherein the Euclidean in the 128-dimensional scale-invariant feature transform SIFT feature space is calculated according to the following formula distance:
Figure PCTCN2017080274-appb-000011
Figure PCTCN2017080274-appb-000011
将每一个点群的μn种子点移动到该μn点群的中心,Moving the μ n seed point of each point group to the center of the μ n point group,
Figure PCTCN2017080274-appb-000012
Figure PCTCN2017080274-appb-000012
重复计算每一个μn种子点的距离,直到每一个类的中心逐渐稳定,得到前景点群和背景种子点群,将得到的前景点群和背景种子点群作为所述特征点群组。The distance of each μ n seed point is repeatedly calculated until the center of each class is gradually stabilized, and the front spot group and the background seed point group are obtained, and the obtained front spot group and background seed point group are taken as the feature point group.
步骤400、根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。Step 400: Obtain a foreground target in the image by using an image segmentation algorithm according to the obtained feature point group.
其中,步骤100可以概括为特征匹配;包括两部分操作:1、分别提取两幅输入图像的局部特征信息;2、根据提取的局部特征进行关键点的匹配;Wherein, step 100 can be summarized as feature matching; comprising two parts operation: 1. extracting local feature information of two input images respectively; and performing key point matching according to the extracted local features;
本实施例中所涉及的图像局部特征(local features),不同于图像的全局特征(global features),是一些局部才会出现的特征。在物体受到遮挡的情况下,仍然稳定存在的一些特征点,能够简单、准确的描述衣服图像的特征,如Harris、SIFT、SURF、FAST(相关技术中已有的图像匹配方法)。The local features of the image involved in this embodiment are different from the global features of the image, and are features that appear locally. In the case where the object is occluded, some feature points that are still stable can easily and accurately describe the features of the clothing image, such as Harris, SIFT, SURF, FAST (the image matching method existing in the related art).
步骤200可以概括为匹配点筛选; Step 200 can be summarized as a matching point screening;
其中,可以根据匹配点的尺度比例和旋转方向比例筛选掉错误匹配点;Wherein, the wrong matching point can be filtered according to the scale ratio of the matching point and the rotation direction ratio;
步骤300可以概括为前景图像提取。Step 300 can be summarized as foreground image extraction.
其中,先使用聚类分析得出前景目标上的特征点群组;Wherein, cluster analysis is first used to obtain a group of feature points on the foreground target;
再根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。Then, according to the obtained feature point group, the image segmentation algorithm is used to obtain the foreground target in the image.
要说明的是,本实施例所涉及的聚类分析:指将数据分类到不同的类或簇的一个过程,同一个簇中的数据具有很高的相似性;而在不同的簇之间,数据有很大的向异性。是一种无监督式学习,不依赖事先定义的类或带标记的训练实例,如k-means(相关技术中已有的算法)。It should be noted that the cluster analysis involved in the embodiment refers to a process of classifying data into different classes or clusters, and the data in the same cluster has a high similarity; and between different clusters, The data is very different. It is an unsupervised learning that does not rely on pre-defined classes or labeled training examples, such as k-means (already existing in the related art).
本实施例所涉及的图像分割:是将图像分割成若干个特定的、具有独特性质的区域并提出感兴趣目标的技术和过程。如基于阀值分割、基于区域分割、基于边缘分割以及基于特定的理论分割。The image segmentation involved in the present embodiment is a technique and process for dividing an image into a plurality of specific regions having unique properties and proposing objects of interest. Such as based on threshold segmentation, region-based segmentation, edge-based segmentation, and segmentation based on specific theory.
而本实施例采用聚类分析,是因为此分析可以将抽象的关键点信息转换成前景区域,从而给接下来的图像分割技术提供了支持,使得图像匹配技术与分割技术的联合应用,实现对传统的人工交互的图像分割技术的提升。The cluster analysis is used in this embodiment because the analysis can convert the abstract key point information into the foreground area, thereby providing support for the next image segmentation technology, and the joint application of the image matching technology and the segmentation technology to achieve the The traditional artificial interaction of image segmentation technology has improved.
本发明实施例通过对原有输入图像的原始特征进行聚类算法,得出前景物体的建议区域,最后通过图割方法对图像进行整体的前景分割。包括:In the embodiment of the present invention, a clustering algorithm is performed on the original features of the original input image to obtain a suggested region of the foreground object, and finally the overall foreground segmentation of the image is performed by the graph cut method. include:
第一步:输入图像特征匹配;包括:Step 1: Enter image feature matching; includes:
局部特征提取:将用户输入的图像进行灰度化处理。使用SURF(Speed Up Robust Feature)特征提取图像的局部特征信息,图2为本发明实施例提取图像的局部特征信息的示意图,如图2所示,将用户输入的图像进行灰度化处理,使用SURF特征提取获得了图像的局部特征信息。Local feature extraction: The image input by the user is grayed out. The local feature information of the image is extracted by using the SURF (Speed Up Robust Feature) feature. FIG. 2 is a schematic diagram of extracting local feature information of the image according to an embodiment of the present invention. As shown in FIG. 2, the image input by the user is grayed out and used. SURF feature extraction obtains local feature information of the image.
关键点的匹配:在关键点的匹配中,我们使用近邻算法来确定输入图像A中的关键点在图像B中对应的匹配点。以K最近邻(K-Nearest Neighbor,KNN)分类算法为例,首先设定一个参数K。计算图像A中的关键点特征与B中的欧氏距离,维持一个大小为K的按照距离由大到小排列的队列,用于存储最近邻训练元祖。遍历该训练元祖,计算当前元祖的关键点与A关键点的距离,将所得距离与最大距离Lmax进行比较。若L>=Lmax,则舍弃这 个元祖,遍历下一个元祖。若L<=Lmax,则删除最大距离的元祖,加入该元祖进入k队列。遍历完毕,可得到与A中关键点同一类别的B图中的匹配点。Matching of key points: In the matching of key points, we use the neighbor algorithm to determine the matching points of the key points in the input image A in the image B. Taking the K-Nearest Neighbor (KNN) classification algorithm as an example, first set a parameter K. Calculate the key point feature in image A and the Euclidean distance in B, and maintain a queue of size K in order of distance from largest to smallest for storing the nearest neighbor training element. The training element ancestor is traversed, the distance between the key point of the current element ancestor and the A key point is calculated, and the obtained distance is compared with the maximum distance Lmax. If L>=Lmax, discard this A ancestor, traversing the next ancestor. If L<=Lmax, the ancestor of the largest distance is deleted, and the ancestor is added to enter the k queue. After the traversal is completed, the matching points in the B picture of the same category as the key points in A can be obtained.
第二步:匹配点的筛选;The second step: screening of matching points;
经过初步匹配的关键点存在很多的误差,因为涉及到目标背景的复杂性、多样性以及和前景目标的相似性,本发明实施例对第一步所得的结果要进行筛选,以求得到更好的前景目标匹配点区域。There are many errors in the key points of the preliminary matching. Because of the complexity, diversity and similarity of the target background, the embodiment of the present invention screens the results obtained in the first step to obtain better results. The foreground target matches the point area.
在这一步中,我们提出了独有的关键点筛选方法,在该方法中我们设定两个衡量参数:尺度比例SR(Scale Rate)和方向OA(Orientation Rate)。根据所述关键点匹配所得到的结果,计算图A中的关键点与图A中的关键点在图B中的匹配点的尺度比例以及方向比例,并以此构建一个二维数组:In this step, we propose a unique key point screening method, in which we set two measurement parameters: scale ratio SR (Scale Rate) and direction OA (Orientation Rate). According to the result of the key point matching, the scale ratio and the direction ratio of the key points in the graph A and the key points in the graph A in the graph A are calculated, and a two-dimensional array is constructed:
P={<SR1,OA1>,<SR2,OA2>…<SRn,OAn>}P={<SR 1 , OA 1 >, <SR 2 , OA 2 >...<SR n , OA n >}
Figure PCTCN2017080274-appb-000013
OAn=θnn
Figure PCTCN2017080274-appb-000013
OA nnn '
通过构建的二维数据进行匹配点的筛选。在图像特征点的匹配过程中,经过分析发现:在同一物体上的特征点往往维持同一尺度变化及方向变化,因此,通过对P的处理,可得到该二维数组分布较大的区域,即为前景目标上的匹配点所在区域,以此方法来对背景的干扰点(错误的匹配点)进行去除。The matching points are filtered by the constructed two-dimensional data. In the matching process of image feature points, it is found that the feature points on the same object tend to maintain the same scale change and direction change. Therefore, by processing P, the region with large distribution of the two-dimensional array can be obtained. For the area of the matching point on the foreground target, the interference point of the background (wrong matching point) is removed in this way.
第三步:前景图像提取;The third step: foreground image extraction;
首先,进行匹配点的聚类分析。First, cluster analysis of matching points is performed.
此步骤是本发明实施例的核心步骤,本发明实施例方法将数据聚类分析的方法应用到关键点的同质性分析中去,可以很好地将图像特征匹配方法和图像分割的方法有机的结合。通过上一步的筛选,得到了图像A中的匹配关键点的组合c(i),由于图像背景的复杂性,匹配的关键点中极有可能含有与前景目标关键点相似的干扰匹配点,此外为了给下一步的图像分割提供前景像素种子,本发明实施例采用K-means聚类分析算法,对上一步所得到的关键点进行分组归类,以求得前景目标的关键点,提升图像分割的准确程度。 与原始的K-means分析算法不同的是,本发明实施例聚类方法并不是根据点的距离特征,而是采用的关键点128维sift特征,分析关键点在SIFT特征空间的欧氏距离。本发明实施例方法能够更好地分析特征点的同属性,从而得出更加精确的前景建议区域。以下介绍相关技术中K-means的分析步骤:This step is a core step of the embodiment of the present invention. The method of the embodiment of the present invention applies the method of data clustering analysis to the homogeneity analysis of the key points, and the image feature matching method and the image segmentation method can be well organic. Combination of. Through the screening of the previous step, the combination c (i) of matching key points in image A is obtained. Due to the complexity of the image background, it is highly probable that the matching key points contain interference matching points similar to the foreground target key points. In order to provide the foreground pixel seed for the next image segmentation, the embodiment of the present invention uses the K-means clustering analysis algorithm to group the key points obtained in the previous step to obtain the key points of the foreground target and improve the image segmentation. The degree of accuracy. Different from the original K-means analysis algorithm, the clustering method of the embodiment of the present invention does not use the 128-dimensional sift feature of the key point according to the distance feature of the point, and analyzes the Euclidean distance of the key point in the SIFT feature space. The method of the embodiment of the invention can better analyze the same attribute of the feature points, thereby obtaining a more accurate foreground suggestion area. The following describes the analysis steps of K-means in the related technology:
K-means算法是将样本x(i)聚类成k个簇(cluster),聚类属于无监督式学习,无需用户提供样本的类别标注,算法描述如下:The K-means algorithm clusters the samples x (i) into k clusters, and the clusters belong to unsupervised learning. The user does not need to provide the category labeling of the samples. The algorithm is described as follows:
随机选取k个聚类之心点(cluster centroids)为Randomly select the cluster centroids of the k clusters as
μ12,…,μk∈Rn
Figure PCTCN2017080274-appb-000014
μ 1 , μ 2 ,...,μ k ∈R n ,
Figure PCTCN2017080274-appb-000014
对于每一个样例i,计算到这k个种子点的距离,假如点c(n)距离种子点μn最近,那么c(n)属于μn点群。在本发明中需要计算128维SIFT特征空间中的欧氏距离:For each of the samples i, the distance to the k seed points is calculated. If the point c (n) is closest to the seed point μ n , then c (n) belongs to the μ n point group. In the present invention, it is necessary to calculate the Euclidean distance in the 128-dimensional SIFT feature space:
Figure PCTCN2017080274-appb-000015
Figure PCTCN2017080274-appb-000015
接下来将每一个点群的μn种子点移动到该点群的中心。Next, move the μ n seed point of each point group to the center of the point group.
Figure PCTCN2017080274-appb-000016
Figure PCTCN2017080274-appb-000016
Sn为匹配点的尺度信息。Sn is the scale information of the matching point.
重复第2、3步,直到每一个类的中心逐渐稳定。Repeat steps 2 and 3 until the center of each class is gradually stabilized.
经过聚类分析后,本发明实施例可以得到前景点群和背景种子点群,用来标记图像中的前景区域和背景区域,图3为本发明实施例聚类分析处理后获得的图像示意图,如图3所示,前景点群和背景种子点群分别用来标记图像中的前景区域和背景区域。After cluster analysis, the embodiment of the present invention can obtain a foreground group and a background seed point group for marking a foreground area and a background area in the image. FIG. 3 is a schematic diagram of an image obtained after cluster analysis processing according to an embodiment of the present invention. As shown in FIG. 3, the front attraction group and the background seed point group are used to mark the foreground area and the background area in the image, respectively.
中心逐渐稳定后,本发明实施例进行前景提取。After the center is gradually stabilized, the embodiment of the present invention performs foreground extraction.
本实施例使用相关技术中的图像分割的算法对有前景和背景区域标识的图像进行目标轮廓的切割及提取。In this embodiment, the image segmentation algorithm in the related art is used to cut and extract the target contour of the image with the foreground and background regions.
首先用一个无向图G=<V,E>表示要分割的图像A,V和E分别是顶点(vertex)和边(edge)的集合。在这个无向图中分为两类边和顶点:第一类是对应图像中每一个像素的普通定点。每两个领域定点(对应图中的两个邻域像 素)的连接就是一条边,即为n-links。除普通顶点外,还另外有两个终端顶点,叫做S(source:源点)和T(sink:汇点)。这类顶点与每一个普通顶点之间都有连接,这种边叫做t-links。First, an undirected graph G=<V, E> is used to represent the image A to be segmented, and V and E are respectively a set of vertex and edge. In this undirected graph, there are two types of edges and vertices: the first is a common fixed point for each pixel in the image. Fixed points for every two fields (corresponding to two neighborhood images in the figure) The connection of the prime is an edge, which is n-links. In addition to ordinary vertices, there are two additional terminal vertices called S (source: source point) and T (sink: sink point). Such vertices have connections to each of the normal vertices, which are called t-links.
接下来给每一条边分配权重,假设图像的分割为L时,图像的能量可以表示为:E(L)=αR(L)+B(L),其中R(L)为区域项,B(L)为边界项。E(L)表示的是权值,也叫能量函数,图像分割的目标就是优化能量函数使其达到最小值。Next, assign weights to each edge. If the image is segmented into L, the energy of the image can be expressed as: E(L)=αR(L)+B(L), where R(L) is the region term, B( L) is the boundary term. E(L) represents the weight, also called the energy function. The goal of image segmentation is to optimize the energy function to reach the minimum value.
区域项的权值如下:The weights of the regional items are as follows:
R(L)=Rx(lx)R(L)=R x (l x )
区域的项权值代表t-links边的权值。该点属于S或者T的可能性越高,那么它的权值就越大,反之则越小。The item weight of the area represents the weight of the t-links edge. The higher the probability that the point belongs to S or T, the greater its weight, and vice versa.
边界项的权值如下:The weights of the boundary terms are as follows:
B(L)=B<x,y>·δ(lx,ly)B(L)=B <x,y> ·δ(l x ,l y )
边界项代表n-links边的权值。当相邻的两个像素的相似度越高,这两点相连的边的权值也就越高。The boundary term represents the weight of the n-links edge. When the similarity of two adjacent pixels is higher, the weights of the edges connected by the two points are higher.
再对每一条边的权重进行赋值以后,使用min cut算法来找到最小的边,这些边的断开正好可以使得目标和背景被分开,图4为本发明实施例前景目标和背景分开的示意图,如图4所示,对每一条边的权重进行赋值以后,找到最小的边,这些边的断开正好可以使得目标和背景被分开。After assigning the weights of each edge, the min cut algorithm is used to find the smallest edges, and the breaks of the edges are just such that the target and the background are separated. FIG. 4 is a schematic diagram of the foreground target and the background separated according to an embodiment of the present invention. As shown in Figure 4, after assigning weights to each edge, the smallest edges are found, and the edges are broken so that the target and background are separated.
下面结合实验进行数据说明如下:The following data is combined with the experiment as follows:
1、数据集:在实验中可以随机从CMU-Cornell的数据集中选择成对的图像作为方法的测试集,同时因为CMU-Cornell的数据集中开源了图像所包含目标的真值图,所以以提供的真值轮廓图作为方法准确度的测试集。1. Data set: In the experiment, the paired images can be randomly selected from the dataset of CMU-Cornell as the test set of the method, and because the dataset of the target contained in the image is open sourced by CMU-Cornell, so as to provide The truth contour map is used as a test set for method accuracy.
2、实验设置:在实验中,以交并比作为实验结果的评价参数。交并比(Intersection Rate)如下:2. Experimental setup: In the experiment, the crossover ratio is used as the evaluation parameter of the experimental results. The Intersection Rate is as follows:
Figure PCTCN2017080274-appb-000017
Figure PCTCN2017080274-appb-000017
其中P′是本实施例取出的前景图像,P是该图像的真实轮廓,可通过将 实验得到的结果和开源数据集的同一对象的Truth_ground进行对比,求得正确像素点的比率,即可评价该方法的准确程度。Where P' is the foreground image taken out in this embodiment, and P is the true outline of the image, which can be passed The experimental results are compared with the Truth_ground of the same object in the open source dataset, and the correct pixel point ratio is obtained to evaluate the accuracy of the method.
3、实验结果:实验结果如图5所示,采用本发明实施例,实现了前景目标和背景的分割处理,本发明实施例可以得出前景图像的大致轮廓。3. Experimental Results: Experimental Results As shown in FIG. 5, with the embodiment of the present invention, the foreground target and the background segmentation process are realized, and the embodiment of the present invention can obtain the approximate outline of the foreground image.
4、结果分析:如图所示,大部分的前景轮廓可以得到保证,但是由于背景与目标的相似性,前景目标的轮廓含有细小的瑕疵,但整体的准确度可以达到约85%。4. Analysis of results: As shown in the figure, most of the foreground contours can be guaranteed, but due to the similarity between the background and the target, the outline of the foreground target contains small flaws, but the overall accuracy can reach about 85%.
实施例2Example 2
本实施例提供一种前景分割装置,如图6所示,包括:This embodiment provides a foreground segmentation device, as shown in FIG. 6, including:
第一单元设置为,分别提取两幅输入图像的局部特征信息,根据提取的局部特征信息进行关键点的匹配;The first unit is configured to separately extract local feature information of the two input images, and perform matching of the key points according to the extracted local feature information;
其中,第一单元设置为提取两幅输入图像的局部特征信息包括:The first unit is configured to extract local feature information of the two input images, including:
将用户输入的两幅图像进行灰度化处理,使用加速鲁棒特征SURF算法提取图像的局部特征信息。The two images input by the user are grayed out, and the local feature information of the image is extracted by using the accelerated robust feature SURF algorithm.
第一单元设置为根据提取的局部特征信息进行关键点的匹配包括:The first unit is configured to perform key point matching according to the extracted local feature information, including:
根据提取的局部特征信息,使用近邻算法确定两幅输入图像中第一输入图像中的关键点在第二输入图像中对应的匹配点。And determining, according to the extracted local feature information, a matching point corresponding to a key point in the first input image in the second input image by using a neighbor algorithm.
第二单元设置为,从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点;The second unit is configured to filter out the wrong matching points from the matching points of the obtained key points to obtain all correct matching points;
可选地,第二单元设置为从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点包括:Optionally, the second unit is configured to filter out the wrong matching points from the matching points of the obtained key points, and obtaining all correct matching points includes:
配置尺度比例SR和方向OA,根据所述关键点匹配所得到的结果,计算两幅输入图像中第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的尺度比例以及方向比例,并以此构建一个如下二维数组:Configuring a scale ratio SR and a direction OA, and calculating a match between a key point in the first input image and a key point in the first input image in the second input image according to the result obtained by the key point matching The scale ratio of the points and the direction scale, and construct a two-dimensional array as follows:
P={<SR1,OA1>,<SR2,OA2>…<SRn,OAn>}P={<SR 1 , OA 1 >, <SR 2 , OA 2 >...<SR n , OA n >}
其中,
Figure PCTCN2017080274-appb-000018
OAn=θnn
among them,
Figure PCTCN2017080274-appb-000018
OA nnn '
进行匹配点的筛选。Perform screening of matching points.
第三单元设置为,使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组;The third unit is configured to use cluster analysis to derive feature point groups on the foreground target from all the correct matching points;
可选地,第三单元使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组包括:Optionally, the third unit uses the cluster analysis to derive the feature point groups on the foreground target from all the correct matching points, including:
采用如下算法随机选取k个聚类之心点(cluster centroids)为The following algorithm is used to randomly select the cluster centroids of the k clusters as
μ12,…,μk∈Rn
Figure PCTCN2017080274-appb-000019
μ 1 , μ 2 ,...,μ k ∈R n ,
Figure PCTCN2017080274-appb-000019
对于每一个样例i,计算到k个种子点的距离,距离种子点μn最近的点属于μn点群,其中,按照如下公式计算128维SIFT特征空间中的欧氏距离:For each of the samples i, the distance to the k seed points is calculated, and the point closest to the seed point μ n belongs to the μ n point group, wherein the Euclidean distance in the 128-dimensional SIFT feature space is calculated according to the following formula:
Figure PCTCN2017080274-appb-000020
Figure PCTCN2017080274-appb-000020
将每一个点群的μn种子点移动到该μn点群的中心,Moving the μ n seed point of each point group to the center of the μ n point group,
Figure PCTCN2017080274-appb-000021
Figure PCTCN2017080274-appb-000021
重复计算每一个μn种子点的距离,直到每一个类的中心逐渐稳定,得到前景点群和背景种子点群,将得到的前景点群和背景种子点群作为所述特征点群组。The distance of each μ n seed point is repeatedly calculated until the center of each class is gradually stabilized, and the front spot group and the background seed point group are obtained, and the obtained front spot group and background seed point group are taken as the feature point group.
第四单元设置为,根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。The fourth unit is configured to obtain a foreground target in the image by using an image segmentation algorithm according to the obtained feature point group.
由于上述装置可实现上述实施例1的方法,故上述装置中单元的其他操作可参见实施例1的相应内容,在此不再赘述。For the above-mentioned device, the method of the above-mentioned Embodiment 1 can be implemented. For the other operations of the device in the foregoing device, refer to the corresponding content of Embodiment 1, and details are not described herein again.
从上述实施例可以看出,本申请技术方案利用图像特征,并应用于静态图像的自动前景提取的核心问题。相比相关技术,提出了利用两幅图像的特征点,通过特征点的匹配,经过聚类分析得出感兴趣区域的轮廓,最后使用图像分割算法自动提取出静态图像的前景目标。尤其适用于静态图像数据,具有较高的准确性。As can be seen from the above embodiments, the technical solution of the present application utilizes image features and is applied to the core problem of automatic foreground extraction of still images. Compared with the related technology, the feature points of the two images are proposed. Through the matching of the feature points, the contour of the region of interest is obtained through cluster analysis. Finally, the image segmentation algorithm is used to automatically extract the foreground target of the still image. Especially suitable for still image data, with high accuracy.
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计 算机可执行指令,计算机可执行指令用于执行上述前景分割方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores the meter The computer executable instructions are used to execute the foreground segmentation method described above.
本发明实施例还提供一种前景分割装置,包括:存储器和处理器;其中,An embodiment of the present invention further provides a foreground segmentation apparatus, including: a memory and a processor; wherein
处理器被配置为执行存储器中的程序指令;The processor is configured to execute program instructions in the memory;
程序指令在处理器读取执行以下操作:Program instructions perform the following operations on the processor read:
分别提取两幅输入图像的局部特征信息,根据提取的局部特征信息进行关键点的匹配;Extracting local feature information of two input images respectively, and matching key points according to the extracted local feature information;
从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点;Screen out the mismatched points from the matching points of the obtained key points to get all the correct matching points;
使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组;Use cluster analysis to derive feature point groups on foreground targets from all correct matching points;
根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。According to the obtained feature point group, the image segmentation algorithm is used to obtain the foreground target in the image.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的每个模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明不限制于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, being executed by a processor and stored in a memory. Programs/instructions to implement their respective functions. The invention is not limited to any specific form of combination of hardware and software.
虽然本申请所揭露的实施方式如上,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请,如本发明实施方式中的具体的实现方法。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。The embodiments disclosed in the present application are as described above, but the descriptions are only for the purpose of understanding the present application, and are not intended to limit the present application, such as the specific implementation method in the embodiments of the present invention. Any modifications and changes in the form and details of the embodiments may be made by those skilled in the art without departing from the spirit and scope of the disclosure. The scope defined by the appended claims shall prevail.
工业实用性Industrial applicability
上述技术方案提升了得出图像中的前景目标的准确性,减少了前景处理的时间,提高了图像处理的效率。 The above technical solution improves the accuracy of the foreground target in the image, reduces the time of foreground processing, and improves the efficiency of image processing.

Claims (10)

  1. 一种前景分割方法,包括:A method of foreground segmentation, including:
    分别提取两幅输入图像的局部特征信息,根据提取的局部特征信息进行关键点的匹配;Extracting local feature information of two input images respectively, and matching key points according to the extracted local feature information;
    从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点;Screen out the mismatched points from the matching points of the obtained key points to get all the correct matching points;
    使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组;Use cluster analysis to derive feature point groups on foreground targets from all correct matching points;
    根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。According to the obtained feature point group, the image segmentation algorithm is used to obtain the foreground target in the image.
  2. 如权利要求1所述的前景分割方法,其中,所述提取两幅输入图像的局部特征信息包括:The foreground segmentation method according to claim 1, wherein the extracting the local feature information of the two input images comprises:
    将用户输入的两幅图像进行灰度化处理,使用加速鲁棒特征SURF算法提取图像的局部特征信息。The two images input by the user are grayed out, and the local feature information of the image is extracted by using the accelerated robust feature SURF algorithm.
  3. 如权利要求2所述的前景分割方法,其中,根据提取的局部特征信息进行关键点的匹配包括:The foreground segmentation method according to claim 2, wherein the matching of the key points according to the extracted local feature information comprises:
    根据提取的局部特征信息,使用近邻算法确定两幅输入图像中第一输入图像中的关键点在第二输入图像中对应的匹配点。And determining, according to the extracted local feature information, a matching point corresponding to a key point in the first input image in the second input image by using a neighbor algorithm.
  4. 如权利要求2或3所述的前景分割方法,其中,从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点包括:The foreground segmentation method according to claim 2 or 3, wherein the false matching points are filtered out from the matching points of the obtained key points, and all the correct matching points are obtained:
    配置尺度比例SR和方向OA,根据所述关键点匹配所得到的结果,计算两幅输入图像中第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的尺度比例以及方向比例,并以此构建如下二维数组:Configuring a scale ratio SR and a direction OA, and calculating a match between a key point in the first input image and a key point in the first input image in the second input image according to the result obtained by the key point matching The scale ratio of the points and the direction scale, and construct the following two-dimensional array:
    P={<SR1,OA1>,<SR2,OA2>…<SRn,OAn>}P={<SR 1 , OA 1 >, <SR 2 , OA 2 >...<SR n , OA n >}
    其中,
    Figure PCTCN2017080274-appb-100001
    OAn=θnn
    among them,
    Figure PCTCN2017080274-appb-100001
    OA nnn '
    进行匹配点的筛选;Perform screening of matching points;
    其中,sn与sn′的比值为第一输入图像中的关键点与第一输入图像中的关 键点在第二输入图像中的匹配点的尺度比值,取对数后获得尺度比例;θn与θ’n的差为第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的方向差。Wherein, the ratio of s n to s n ' is a scale ratio of a key point in the first input image and a matching point in the first input image in the second input image, and a logarithm is obtained to obtain a scale ratio; The difference between n and θ' n is the difference in direction between the key point in the first input image and the matching point in the second input image of the key point in the first input image.
  5. 如权利要求4所述的前景分割方法,其中,所述使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组包括:The foreground segmentation method according to claim 4, wherein said using cluster analysis to derive feature point groups on the foreground object from all of the correct matching points comprises:
    采用如下算法随机选取k个聚类之心点为:The following algorithm is used to randomly select the heart points of k clusters as:
    μ12,…,μk∈Rn
    Figure PCTCN2017080274-appb-100002
    μ 1 , μ 2 ,...,μ k ∈R n ,
    Figure PCTCN2017080274-appb-100002
    对于每一个样例i,计算到k个种子点的距离,距离种子点μn最近的点属于μn点群,其中,按照如下公式计算128维尺度不变特征变换SIFT特征空间中的欧氏距离:For each of the samples i, the distance to the k seed points is calculated, and the point closest to the seed point μ n belongs to the μ n point group, wherein the Euclidean in the 128-dimensional scale-invariant feature transform SIFT feature space is calculated according to the following formula distance:
    Figure PCTCN2017080274-appb-100003
    Figure PCTCN2017080274-appb-100003
    将每一个点群的μn种子点移动到该μn点群的中心,Moving the μ n seed point of each point group to the center of the μ n point group,
    Figure PCTCN2017080274-appb-100004
    Figure PCTCN2017080274-appb-100004
    重复计算每一个μn种子点的距离,直到每一个类的中心逐渐稳定,得到前景点群和背景种子点群,将得到的前景点群和背景种子点群作为所述特征点群组;Repeating the calculation of the distance of each μ n seed point until the center of each class is gradually stabilized, obtaining a pre-attraction group and a background seed point group, and obtaining the obtained pre-attraction group and background seed point group as the feature point group;
    其中,Si代表是SIFT特征的一维,Rn表示选取K个聚类的心点均属于从点集中随机取n个聚类的集合。Wherein, S i represents a one-dimensional feature of the SIFT feature, and R n represents that the heart points of the selected K clusters belong to a set of n clusters randomly taken from the point set.
  6. 一种前景分割装置,包括:A foreground segmentation device comprising:
    第一单元设置为,分别提取两幅输入图像的局部特征信息,根据提取的局部特征信息进行关键点的匹配;The first unit is configured to separately extract local feature information of the two input images, and perform matching of the key points according to the extracted local feature information;
    第二单元设置为,从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点;The second unit is configured to filter out the wrong matching points from the matching points of the obtained key points to obtain all correct matching points;
    第三单元设置为,使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组; The third unit is configured to use cluster analysis to derive feature point groups on the foreground target from all the correct matching points;
    第四单元设置为,根据所得出的特征点群组,利用图像分割算法得出图像中的前景目标。The fourth unit is configured to obtain a foreground target in the image by using an image segmentation algorithm according to the obtained feature point group.
  7. 如权利要求6所述的前景分割装置,其中,所述第一单元设置为提取两幅输入图像的局部特征信息包括:The foreground segmentation apparatus according to claim 6, wherein the first unit is configured to extract local feature information of the two input images, including:
    将用户输入的两幅图像进行灰度化处理,使用加速鲁棒特征SURF算法提取图像的局部特征信息。The two images input by the user are grayed out, and the local feature information of the image is extracted by using the accelerated robust feature SURF algorithm.
  8. 如权利要求7所述的前景分割装置,其中,所述第一单元设置为根据提取的局部特征信息进行关键点的匹配包括:The foreground segmentation apparatus according to claim 7, wherein the matching of the first unit by the first unit to perform key points according to the extracted local feature information comprises:
    根据提取的局部特征信息,使用近邻算法确定两幅输入图像中第一输入图像中的关键点在第二输入图像中对应的匹配点。And determining, according to the extracted local feature information, a matching point corresponding to a key point in the first input image in the second input image by using a neighbor algorithm.
  9. 如权利要求7或8所述的前景分割装置,其中,所述第二单元设置为从得到的关键点的匹配点中筛除错误匹配点,得到所有正确的匹配点包括:The foreground segmentation apparatus according to claim 7 or 8, wherein said second unit is arranged to filter out the mismatched points from the matching points of the obtained key points, and obtaining all correct matching points comprises:
    配置尺度比例SR和方向OA,根据所述关键点匹配所得到的结果,计算两幅输入图像中第一输入图像中的关键点与第一输入图像中的关键点在第二输入图像中的匹配点的尺度比例以及方向比例,并以此构建如下二维数组:Configuring a scale ratio SR and a direction OA, and calculating a match between a key point in the first input image and a key point in the first input image in the second input image according to the result obtained by the key point matching The scale ratio of the points and the direction scale, and construct the following two-dimensional array:
    P={<SR1,OA1>,<SR2,OA2>…<SRn,OAn>}P={<SR 1 , OA 1 >, <SR 2 , OA 2 >...<SR n , OA n >}
    其中,
    Figure PCTCN2017080274-appb-100005
    OAn=θnn
    among them,
    Figure PCTCN2017080274-appb-100005
    OA nnn '
    进行匹配点的筛选。Perform screening of matching points.
  10. 如权利要求9所述的前景分割装置,其中,所述第三单元设置为使用聚类分析从所有正确的匹配点中得出前景目标上的特征点群组包括:The foreground segmentation apparatus according to claim 9, wherein said third unit is arranged to derive a cluster of feature points on the foreground object from all of the correct matching points using cluster analysis:
    采用如下算法随机选取k个聚类之心点为The following algorithm is used to randomly select the heart points of k clusters as
    μ12,…,μk∈Rn
    Figure PCTCN2017080274-appb-100006
    μ 1 , μ 2 ,...,μ k ∈R n ,
    Figure PCTCN2017080274-appb-100006
    对于每一个样例i,计算到k个种子点的距离,距离种子点μn最近的点 属于μn点群,其中,按照如下公式计算128维SIFT特征空间中的欧氏距离:For each of the samples i, the distance to the k seed points is calculated, and the point closest to the seed point μ n belongs to the μ n point group, wherein the Euclidean distance in the 128-dimensional SIFT feature space is calculated according to the following formula:
    Figure PCTCN2017080274-appb-100007
    Figure PCTCN2017080274-appb-100007
    将每一个点群的μn种子点移动到该μn点群的中心,Moving the μ n seed point of each point group to the center of the μ n point group,
    Figure PCTCN2017080274-appb-100008
    Figure PCTCN2017080274-appb-100008
    重复计算每一个μn种子点的距离,直到每一个类的中心逐渐稳定,得到前景点群和背景种子点群,将得到的前景点群和背景种子点群作为所述特征点群组。 The distance of each μ n seed point is repeatedly calculated until the center of each class is gradually stabilized, and the front spot group and the background seed point group are obtained, and the obtained front spot group and background seed point group are taken as the feature point group.
PCT/CN2017/080274 2016-04-19 2017-04-12 Foreground segmentation method and device WO2017181892A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610244730.5A CN107305691A (en) 2016-04-19 2016-04-19 Foreground segmentation method and device based on images match
CN201610244730.5 2016-04-19

Publications (1)

Publication Number Publication Date
WO2017181892A1 true WO2017181892A1 (en) 2017-10-26

Family

ID=60115618

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/080274 WO2017181892A1 (en) 2016-04-19 2017-04-12 Foreground segmentation method and device

Country Status (2)

Country Link
CN (1) CN107305691A (en)
WO (1) WO2017181892A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977809A (en) * 2019-03-08 2019-07-05 上海电力学院 A kind of adaptive crowd divides group's detection method
CN110555444A (en) * 2018-06-01 2019-12-10 中国科学院沈阳计算技术研究所有限公司 Feature matching screening algorithm based on local clustering
CN112601029A (en) * 2020-11-25 2021-04-02 上海卫莎网络科技有限公司 Video segmentation method, terminal and storage medium with known background prior information
CN117692649A (en) * 2024-02-02 2024-03-12 广州中海电信有限公司 Ship remote monitoring video efficient transmission method based on image feature matching

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862829B (en) * 2019-11-27 2024-03-12 武汉Tcl集团工业研究院有限公司 Label picture segmentation method, device and storage medium
CN111612824A (en) * 2020-05-26 2020-09-01 天津市微卡科技有限公司 Consciousness tracking recognition algorithm for robot control
CN112001939B (en) * 2020-08-10 2021-03-16 浙江大学 Image foreground segmentation algorithm based on edge knowledge conversion
CN112150512B (en) * 2020-09-30 2023-12-15 中国科学院上海微系统与信息技术研究所 Impact point positioning method integrating background difference method and clustering method
CN112287193B (en) * 2020-10-30 2022-10-04 腾讯科技(深圳)有限公司 Image segmentation method and device, computer equipment and storage medium
CN112347899B (en) * 2020-11-03 2023-09-19 广州杰赛科技股份有限公司 Moving object image extraction method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100098331A1 (en) * 2008-09-26 2010-04-22 Sony Corporation System and method for segmenting foreground and background in a video
CN101859436A (en) * 2010-06-09 2010-10-13 王巍 Large-amplitude regular movement background intelligent analysis and control system
CN102184550A (en) * 2011-05-04 2011-09-14 华中科技大学 Mobile platform ground movement object detection method
CN102663776A (en) * 2012-03-31 2012-09-12 北京智安邦科技有限公司 Violent movement detection method based on characteristic point analysis and device thereof
CN102708370A (en) * 2012-05-17 2012-10-03 北京交通大学 Method and device for extracting multi-view angle image foreground target
CN102819835A (en) * 2012-07-26 2012-12-12 中国航天科工集团第三研究院第八三五七研究所 Method for screening matching pairs of feature points to splice images
CN103714544A (en) * 2013-12-27 2014-04-09 苏州盛景空间信息技术有限公司 Optimization method based on SIFT feature point matching

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100098331A1 (en) * 2008-09-26 2010-04-22 Sony Corporation System and method for segmenting foreground and background in a video
CN101859436A (en) * 2010-06-09 2010-10-13 王巍 Large-amplitude regular movement background intelligent analysis and control system
CN102184550A (en) * 2011-05-04 2011-09-14 华中科技大学 Mobile platform ground movement object detection method
CN102663776A (en) * 2012-03-31 2012-09-12 北京智安邦科技有限公司 Violent movement detection method based on characteristic point analysis and device thereof
CN102708370A (en) * 2012-05-17 2012-10-03 北京交通大学 Method and device for extracting multi-view angle image foreground target
CN102819835A (en) * 2012-07-26 2012-12-12 中国航天科工集团第三研究院第八三五七研究所 Method for screening matching pairs of feature points to splice images
CN103714544A (en) * 2013-12-27 2014-04-09 苏州盛景空间信息技术有限公司 Optimization method based on SIFT feature point matching

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555444A (en) * 2018-06-01 2019-12-10 中国科学院沈阳计算技术研究所有限公司 Feature matching screening algorithm based on local clustering
CN110555444B (en) * 2018-06-01 2022-09-20 中国科学院沈阳计算技术研究所有限公司 Feature matching screening algorithm based on local clustering
CN109977809A (en) * 2019-03-08 2019-07-05 上海电力学院 A kind of adaptive crowd divides group's detection method
CN112601029A (en) * 2020-11-25 2021-04-02 上海卫莎网络科技有限公司 Video segmentation method, terminal and storage medium with known background prior information
CN112601029B (en) * 2020-11-25 2023-01-03 上海卫莎网络科技有限公司 Video segmentation method, terminal and storage medium with known background prior information
CN117692649A (en) * 2024-02-02 2024-03-12 广州中海电信有限公司 Ship remote monitoring video efficient transmission method based on image feature matching
CN117692649B (en) * 2024-02-02 2024-04-19 广州中海电信有限公司 Ship remote monitoring video efficient transmission method based on image feature matching

Also Published As

Publication number Publication date
CN107305691A (en) 2017-10-31

Similar Documents

Publication Publication Date Title
WO2017181892A1 (en) Foreground segmentation method and device
US11681418B2 (en) Multi-sample whole slide image processing in digital pathology via multi-resolution registration and machine learning
US9367766B2 (en) Text line detection in images
WO2019218824A1 (en) Method for acquiring motion track and device thereof, storage medium, and terminal
Jia et al. Category-independent object-level saliency detection
Peng et al. RGBD salient object detection: A benchmark and algorithms
Cheng et al. Efficient salient region detection with soft image abstraction
US9519660B2 (en) Information processing apparatus, clustering method, and recording medium storing clustering program
US9626585B2 (en) Composition modeling for photo retrieval through geometric image segmentation
Tian et al. Learning complementary saliency priors for foreground object segmentation in complex scenes
AU2014277853A1 (en) Object re-identification using self-dissimilarity
Manfredi et al. A complete system for garment segmentation and color classification
WO2019197021A1 (en) Device and method for instance-level segmentation of an image
Wu et al. Scene text detection using adaptive color reduction, adjacent character model and hybrid verification strategy
Zhang et al. Salient object detection via compactness and objectness cues
Bai et al. Principal pixel analysis and SVM for automatic image segmentation
Lecca et al. Comprehensive evaluation of image enhancement for unsupervised image description and matching
CN108664968B (en) Unsupervised text positioning method based on text selection model
Zeeshan et al. A newly developed ground truth dataset for visual saliency in videos
CN107610136B (en) Salient object detection method based on convex hull structure center query point sorting
Lu et al. Spectral segmentation via midlevel cues integrating geodesic and intensity
Hati et al. An image texture insensitive method for saliency detection
Zhou et al. Modeling perspective effects in photographic composition
Liu et al. Color topographical map segmentation algorithm based on linear element features
Lizarraga-Morales et al. Integration of color and texture cues in a rough set–based segmentation method

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17785377

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17785377

Country of ref document: EP

Kind code of ref document: A1