WO2018032704A1 - 跟踪指部轮廓的方法及其装置 - Google Patents

跟踪指部轮廓的方法及其装置 Download PDF

Info

Publication number
WO2018032704A1
WO2018032704A1 PCT/CN2016/113535 CN2016113535W WO2018032704A1 WO 2018032704 A1 WO2018032704 A1 WO 2018032704A1 CN 2016113535 W CN2016113535 W CN 2016113535W WO 2018032704 A1 WO2018032704 A1 WO 2018032704A1
Authority
WO
WIPO (PCT)
Prior art keywords
contour
finger
candidate
hand
outer contour
Prior art date
Application number
PCT/CN2016/113535
Other languages
English (en)
French (fr)
Inventor
杨铭
Original Assignee
广州视源电子科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州视源电子科技股份有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2018032704A1 publication Critical patent/WO2018032704A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/28Recognition of hand or arm movements, e.g. recognition of deaf sign language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method and device for tracking a finger profile.
  • Embodiments of the present invention provide a method and apparatus for tracking a finger contour, which can accurately track the outer contour of the finger.
  • an embodiment of the present invention provides a method for tracking a finger profile, including:
  • a candidate contour having the lowest sum of the values of the degree of the offset and the total length of the contour is selected as the tracking outer contour of the finger; wherein the degree of the offset refers to the deviation of the candidate contour The extent of the finger edge of the finger that corresponds to the finger.
  • the i-th discrete point on the initial outer contour of the finger is v i
  • the candidate contour having the lowest sum of the values of the degree of the offset and the total length of the contour is selected as Where I is a discrete function describing the image value of each pixel in the color image, and ⁇ is a preset coefficient.
  • the selected candidate profile in conjunction with the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the selected candidate profile
  • the state equation is solved by dynamic programming within a preset time, and coordinates of each discrete point included in the selected candidate contour X * are obtained.
  • the initial outer contour of the finger is obtained from a depth image or a color image of the same image recorded by the user's hand, specifically:
  • the finger of the outer contour of the hand is used as a dividing point of the dividing finger, and the outer contour of the hand is divided to obtain an initial outer contour of each finger.
  • the outer contour of the hand is extracted from the depth image, specifically:
  • the centroid of the contour is selected from the outer contours closest to the average distance of the joint points, and the outer contour having the longest total length of the contour curve serves as the outer contour of the hand.
  • the method for tracking a finger contour further includes extracting a position of a finger of the outer contour of the hand , Specifically:
  • a structural deviation degree of the candidate region from the local region is d(P, Q),
  • P is a set of pixel values including each pixel of the local area
  • Q is a set of pixel values including each pixel of the candidate area
  • ⁇ P is an average of all pixel values in the set P
  • ⁇ Q is the mean of all pixel values in the set Q
  • ⁇ PQ is the covariance of the set P and the set Q
  • ⁇ P is the variance of the set P
  • ⁇ Q is the square of the set Q
  • c 1 and c 2 are preset constants
  • the current location is used as the location of the fingerprint
  • the embodiment of the present invention further provides an apparatus for tracking a finger contour, including:
  • An initial outer contour acquisition module configured to acquire an initial outer contour of the finger from a depth image or a color image of the same image recorded by the user's hand;
  • a candidate contour obtaining module configured to acquire, according to each discrete point on the initial outer contour of the finger, a set of neighboring candidate points of each discrete point, and select each of the neighboring candidate point sets of each discrete point A candidate point is constructed as a candidate contour of the finger;
  • a tracking contour obtaining module configured to select, from the candidate contours of the fingers, a candidate contour having the lowest sum of the values of the offset degree and the total length of the contour as the tracking outer contour of the finger; wherein the partial contour
  • the degree of shifting refers to the extent to which the candidate contour deviates from the edge of the finger corresponding to the finger in the color image.
  • the i-th discrete point on the initial outer contour of the finger is v i
  • the candidate contour having the lowest sum of the values of the degree of the offset and the total length of the contour is selected as Where I is a discrete function describing the image value of each pixel in the color image, and ⁇ is a preset coefficient.
  • the selected candidate profile is selected
  • the tracking contour acquisition module is specifically configured to:
  • the state equation is solved by dynamic programming within a preset time, and the coordinates of each discrete point included in the selected candidate contour X * are obtained.
  • the initial outer contour acquiring module specifically includes:
  • An image obtaining unit configured to acquire a depth image and a color image of the same image recorded by the user's hand
  • An outer contour extracting unit configured to extract an outer contour of the hand from the depth image or the color image
  • the contour dividing unit is configured to divide the outer contour of the hand with the finger of the outer contour of the hand as a dividing point of the dividing finger, and obtain an initial outer contour of each finger.
  • the outer contour extraction unit is specifically:
  • a node depth calculation subunit for calculating a depth of each joint point of the hand from the depth image according to a preset hand joint point model
  • a reference depth determining subunit configured to take a median of the depth of the related node as a reference depth d ref ;
  • a first contour extraction subunit for extracting an outer contour of a region having a depth within a hand depth range [d ref - ⁇ , d ref + ⁇ ] from the depth image; wherein ⁇ is a measure of the hand The parameter value of the thickness between the back of the hand and the palm of the hand;
  • a contour selecting subunit wherein an outer contour of the contour from which the centroid of the contour is closest to the joint point and the longest total length of the contour curve is used as the outer contour of the hand;
  • a second contour extraction subunit for extracting an outer contour of a region of the pixel pixel in the hand pixel interval from the color image.
  • the apparatus for tracking a finger contour further includes a fingerprint for extracting an outer contour of the hand a fingerprint extraction module of the location, the fingerprint extraction module includes:
  • a contour inflection point selecting unit configured to select, from a contour point between adjacent fingertips of the outer contour of the hand, a contour point farthest from a line connecting the adjacent fingertips as a contour inflection point;
  • a local area determining unit configured to extract, from the color image, a local area centered on the current position by using the contour inflection point as a current position of the fingerprint
  • a candidate region determining unit configured to offset the current location to obtain a plurality of offset locations, and for each offset location, extract, from the color image, the offset location as a center point and the local portion a region of the same shape as a candidate region; wherein the current position is (x, y), the offset position is (x + ⁇ x , y + ⁇ y ); ⁇ x ⁇ ⁇ -1, 0, 1 ⁇ , ⁇ y ⁇ -1,0,1 ⁇ , and ⁇ x and ⁇ y are not 0 at the same time;
  • a deviation degree calculation unit configured to calculate a degree of structural deviation of each of the candidate regions and the local region; for each candidate region, a structural deviation degree of the candidate region from the local region is d(P, Q) ,
  • P is a set of pixel values including each pixel of the local area
  • Q is a set of pixel values including each pixel of the candidate area
  • ⁇ P is an average of all pixel values in the set P
  • ⁇ Q is the mean of all pixel values in the set Q
  • ⁇ PQ is the covariance of the set P and the set Q
  • ⁇ P is the variance of the set P
  • ⁇ Q is the square of the set Q
  • c 1 and c 2 are preset constants
  • a fingerprint position determining unit configured to use the current position as the position of the fingerprint when the degree of structural deviation of each of the candidate regions and the local region is greater than a preset threshold
  • a current location updating unit configured to: when there is a structural deviation degree of the candidate region and the local region is not greater than the preset threshold, select a partial corresponding to a candidate region with a minimum structural deviation of the local region The location is moved to update the current location and the local area and the candidate area are updated.
  • a method and apparatus for tracking a finger contour can acquire an initial outer contour of a finger from a depth image or a color image of the same image recorded by a user's hand; and then use the initial outer contour of the finger
  • Each discrete point is used as a reference, and a set of neighboring candidate points of each discrete point is obtained, and a candidate point is selected from each set of adjacent candidate points of each discrete point to construct a candidate contour of the finger;
  • a candidate contour that deviates from the sum of the degree of the offset of the finger edge corresponding to the finger and the total length of the contour in the color image is selected as the tracking of the finger
  • the contour accurately tracks the finger contour of the user's hand.
  • FIG. 1 is a schematic flow chart of one embodiment of a method for tracking a finger profile provided by the present invention
  • step S1 of the method for tracking a finger profile provided by FIG. 2 is a flow chart of an embodiment of step S1 of the method for tracking a finger profile provided by FIG.
  • FIG. 3 is a schematic structural view of an embodiment of a device for tracking a finger contour provided by the present invention.
  • FIG. 4 is a schematic structural diagram of an embodiment of an initial outer contour acquiring module of a device for tracking a finger contour provided by the present invention
  • FIG. 5 is a schematic structural diagram of an embodiment of an outer contour extracting unit of a device for tracking a finger contour provided by the present invention
  • FIG. 6 is a schematic structural diagram of an embodiment of a fingerprint extraction module of a device for tracking a finger contour provided by the present invention.
  • the inventor finds that in the process of transforming the problem of tracking the contour of the finger into the optimization problem of the finger, the solution space of the curve is a continuous high-dimensional real space.
  • the solution space of the curve is a continuous high-dimensional real space.
  • it is not necessary to track the finger profile to a very high precision for example, the error is less than 0.3 pixels
  • the optimization speed of the finger profile in real time tracking will be very slow and cannot satisfy the calculation.
  • Real-time demand the search position or optimized position of each point of the tracking outer contour of the finger can be discretized, which can greatly reduce the search space of the optimization process.
  • the initial outer contour of the finger to be optimized is composed of N vertices, and the i-th discrete point on the initial outer contour of the finger is v i , then the initial part of the finger
  • the range of ⁇ i can be set according to accuracy requirements.
  • FIG. 1 is a schematic flowchart of an embodiment of a method for tracking a finger profile provided by the present invention.
  • the method includes steps S1 to S3, specifically:
  • the i-th discrete point on the initial outer contour of the finger is v i
  • ⁇ i is the set of neighboring candidate points of the i-th discrete point
  • the selection of the candidate contour can greatly reduce the calculation amount of the real-time tracking finger contour. Since there are a plurality of candidate contours of the finger, and one candidate contour needs to be selected as the tracking outer contour of the finger, the following step S3 will describe the process of screening the candidate contour:
  • the screening criterion of the candidate contour included in step 3 is: selecting, from the candidate contours of the fingers, a candidate contour having the lowest sum of the values of the offset degree and the total length of the contour, and the expression is Where I is a discrete function describing the image value of each pixel in the color image, and ⁇ is a preset coefficient.
  • the candidate contour selected in this embodiment serves as the tracking outer contour of the finger, and is capable of constraining the total length of the outer contour of the finger after being able to vary along the position of the gradient in the color image.
  • the calculation amount of the selection process can be reduced, and ⁇ i is the i-th discrete point of the initial outer contour of the finger Adjacent to the set of candidate points, the constrained contour points are constrained from the initial contour points.
  • Each element included in the selected candidate outline can be marked as: Then based on the expression of the selected candidate contour described above
  • the selected candidate contours then conform to the following equation of state: If the state scheme satisfies the optimal substructure, the state equation is solved by dynamic programming within a preset time, and coordinates of each discrete point (each element) included in the selected candidate contour X * are obtained, thereby being fast The coordinates of the selected candidate contour are calculated.
  • FIG. 2 is a schematic flow chart of an embodiment of the step S1 of the method for tracking the contour of the finger provided in FIG. 1.
  • the depth image or color of the same image recorded from the user's hand in step S1 will be described below with reference to FIG.
  • the specific process of obtaining the initial outer contour of the finger in the image includes steps S11 to S13:
  • the depth image is an image captured by the depth camera, and the pixel value of each pixel included therein reflects the position of the object corresponding to the pixel from the camera.
  • the distance information; the color image is an image captured by a general imaging device, and the pixel value of each pixel included therein reflects the appearance color information of the position of the object corresponding to the pixel.
  • the centroid of the contour is selected from the outer contours closest to the average distance of the joint points, and the outer contour having the longest total length of the contour curve serves as the outer contour of the hand.
  • the outer contour of the acquired hand should be a set of coordinate points composed of a group of coordinate points.
  • the hand joint point model is a model that is trained in advance using a large number of training sets that record the depth image of the hand, including: a kinect-based hand joint point model, a multi-random forest model, etc., which is based on the hand.
  • the information generated by the depth image is trained to train the hand joint point model using a random forest algorithm.
  • the joint point of the hand provides the approximate position of each joint point of the hand, and the depth range of the entire hand can be estimated by the depth of each joint point.
  • the depth of the entire hand is within the hand depth range [d ref - ⁇ , d ref + ⁇ ], which is a measure of the back of the hand and the palm of the hand.
  • the parameter value between the thicknesses is extracted from the outer contour of the edge of the region within the range, that is, the initial outer contour of the hand.
  • the outer contour of the contour whose center of mass is closest to the joint point and the longest total length of the contour curve is selected. Just fine.
  • the centroid of the contour is selected from the outer contours closest to the average distance of the joint points, and the outer contour having the longest total length of the contour curve serves as the outer contour of the hand.
  • the skin color of the hand has a range in the RGB space, and the range can be used as the hand pixel interval in the embodiment of the present invention, and the color image is threshold-based according to the hand pixel interval, that is, The hand area is available.
  • the finger of the outer contour of the hand is used as a dividing point of the dividing finger, and the outer contour of the hand is divided to obtain an initial outer contour of each finger.
  • step S3 of the method for tracking the contour of the finger provided by the present invention further comprising determining the position of each finger on the outer contour of the hand, the acquiring process of the position of each finger is:
  • a structural deviation degree of the candidate region from the local region is d(P, Q),
  • P is a set of pixel values including each pixel of the local area
  • Q is a set of pixel values including each pixel of the candidate area
  • ⁇ P is an average of all pixel values in the set P
  • ⁇ Q is the mean of all pixel values in the set Q
  • ⁇ PQ is the covariance of the set P and the set Q
  • ⁇ P is the variance of the set P
  • ⁇ Q is the square of the set Q
  • c 1 and c 2 are preset constants
  • the current location is used as the location of the fingerprint
  • the color distribution (ie, the pixel value distribution) of the local area and the adjacent candidate area are largely different; when the local area is in the finger seam, the local area and the edge finger The difference in color distribution of adjacent candidate regions in the seam direction is relatively small, and the color distribution of the local region and the other candidate regions is relatively large.
  • the degree of structural deviation of each of the candidate regions and the local region is greater than a preset threshold, it can be determined that the local region falls on the fingerprint, and the central location of the local region (the above current Position) as the position of the finger, thereby completing the correction of the position of the finger; otherwise, it can be determined that the local area falls on the finger joint, and it is necessary to continue to correct the current position of the finger and select the local area
  • the central position corresponding to the candidate region with the smallest degree of structural deviation (the above-mentioned offset position) is updated to the current position of the fingerprint, and it can be ensured that the current position of the subsequently updated fingerprint is still on the finger joint, and is not offset to the non-offset. Fingers in other positions.
  • a method for tracking a finger contour can acquire an initial outer contour of a finger from a depth image or a color image of the same image recorded by a user's hand; and then each of the initial outer contours of the finger A discrete point is used as a reference to obtain a set of neighboring candidate points for each discrete point, and one of the adjacent candidate point sets of each discrete point is respectively selected.
  • a candidate point is constructed as a candidate contour of the finger; further, from among the candidate contours of the finger, a degree of deviation from the finger edge corresponding to the finger in the color image and a total length of the contour are selected.
  • the candidate profile with the lowest sum of values, as the tracking outer contour of the finger can accurately track the finger contour of the user's hand.
  • the embodiment of the present invention further provides a whole process of the method for tracking the contour of the finger to implement the tracking finger profile provided above, as shown in FIG. 3 , which is a device for tracking the contour of the finger provided by the present invention.
  • FIG. 3 is a device for tracking the contour of the finger provided by the present invention.
  • a schematic structural diagram of an embodiment, the apparatus specifically includes:
  • the initial outer contour acquisition module 10 is configured to acquire an initial outer contour of the finger from a depth image or a color image of the same image recorded by the user's hand;
  • the candidate contour obtaining module 20 is configured to acquire, according to each discrete point on the initial outer contour of the finger, a set of neighboring candidate points of each discrete point, and respectively obtain a set of neighboring candidate points from each discrete point. Selecting a candidate point to construct a candidate contour of the finger;
  • the tracking contour obtaining module 30 is configured to select a candidate contour having the lowest sum of the values of the offset degree and the total length of the contour as the tracking outer contour of the finger from the candidate contours of the finger;
  • the degree of offset refers to the extent to which the candidate contour deviates from the edge of the finger corresponding to the finger in the color image.
  • the i-th discrete point on the initial outer contour of the finger is v i
  • selecting, from the candidate contours of the fingers, a candidate contour that deviates from the sum of the degree of the offset of the finger edge corresponding to the finger and the total length of the contour in the color image is
  • I is a discrete function describing the image value of each pixel in the color image
  • is a preset coefficient
  • the selected candidate profile is specifically configured to:
  • the state equation is solved by dynamic programming within a preset time, and the coordinates of each discrete point included in the selected candidate contour X * are obtained.
  • FIG. 4 A schematic structural diagram of an embodiment of an initial outer contour acquisition module of a device for tracking a finger profile; the initial outer contour acquisition module 10 specifically includes:
  • the image obtaining unit 11 is configured to acquire a depth image and a color image of the same image recorded by the user's hand;
  • An outer contour extracting unit 12 configured to extract an outer contour of the hand from the depth image or the color image
  • the contour dividing unit 13 is configured to divide the outer contour of the hand with the finger of the outer contour of the hand as a dividing point of the dividing finger, and obtain an initial outer contour of each finger.
  • FIG. 5 is an outer contour extraction of a device for tracking a finger profile provided by the present invention.
  • a schematic structural diagram of an embodiment of the unit; the outer contour extraction unit 12 is specifically:
  • a node depth calculation sub-unit 121 configured to calculate a depth of each joint point of the hand from the depth image according to a preset hand joint point model
  • a reference depth determining sub-unit 122 configured to take a median of the depth of the related node as a reference depth d ref ;
  • a first contour extracting sub-unit 123 configured to extract, from the depth image, an outer contour of a region having a depth within a hand depth range [d ref - ⁇ , d ref + ⁇ ]; wherein ⁇ is a measure of the hand The parameter value of the thickness between the back of the hand and the palm of the hand;
  • a contour selecting subunit 124 configured to select, from the outer contour, a centroid whose contour is closest to an average distance of the joint point, and an outer contour having a longest total length of the contour curve as an outer contour of the hand;
  • the second contour extraction sub-unit 125 is configured to extract an outer contour of a region of the pixel pixel in the hand pixel interval from the color image.
  • the apparatus for tracking a finger contour further includes a fingerprint for extracting an outer contour of the hand
  • the fingerprint extraction module 40 of the position see FIG. 6 , is a schematic structural diagram of an embodiment of the fingerprint extraction module of the apparatus for tracking the contour of the finger provided by the present invention; the fingerprint extraction module 40 includes:
  • a contour inflection point selecting unit 41 configured to select, from a contour point between adjacent fingertips of the outer contour of the hand, a contour point farthest from a line connecting the adjacent fingertips as a contour inflection point;
  • a local area determining unit 42 is configured to extract, from the color image, a local area centered on the current position by using the contour inflection point as a current position of the fingerprint;
  • a candidate region determining unit 43 configured to offset the current location to obtain a plurality of offset locations, and for each offset location, extract, from the color image, the offset location as a center point and the a region of the same shape of the local region as a candidate region; wherein the current position is (x, y), the offset position is (x + ⁇ x , y + ⁇ y ); ⁇ x ⁇ ⁇ -1, 0, 1 ⁇ , ⁇ y ⁇ -1,0,1 ⁇ , and ⁇ x and ⁇ y are not 0 at the same time;
  • the deviation degree calculation unit 44 is configured to calculate a degree of structural deviation between each of the candidate regions and the local region; for each candidate region, a structural deviation degree of the candidate region from the local region is d (P, Q) ), Wherein P is a set of pixel values including each pixel of the local area, Q is a set of pixel values including each pixel of the candidate area, and ⁇ P is an average of all pixel values in the set P, ⁇ Q is the mean of all pixel values in the set Q, ⁇ PQ is the covariance of the set P and the set Q, ⁇ P is the variance of the set P, ⁇ Q is the square of the set Q, and c 1 and c 2 are preset constants;
  • the fingerprint position determining unit 45 is configured to use the current position as the position of the fingerprint when the degree of structural deviation of each of the candidate regions and the local region is greater than a preset threshold;
  • the current location updating unit 46 is configured to: when there is a structural deviation degree of the candidate region and the local region is not greater than the preset threshold, select a candidate region corresponding to the candidate region with the smallest degree of structural deviation of the local region The offset position is used to update the current location and update the local area and the candidate area.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种跟踪指部轮廓的方法,包括:从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个候选点构建成所述指部的候选轮廓;从所述指部的候选轮廓中选取候选轮廓作为所述指部的跟踪外轮廓。相应地,本发明还公开了一种跟踪指部轮廓的装置。采用本发明实施例,能准确跟踪指部的外轮廓。

Description

跟踪指部轮廓的方法及其装置 技术领域
本发明涉及计算机技术领域,尤其涉及一种跟踪指部轮廓的方法及其装置。
背景技术
在许多手部交互应用中,不仅仅需要跟踪手部的骨架坐标与朝向,还需要跟踪手指宽度等信息。为了获得精确的手指宽度,较为合理的方案是通过跟踪手指轮廓估算。而现有的手指级别的轮廓跟踪算法往往把重点放在指尖跟踪或大致手指位姿关系,较少关注手指侧边缘的精度,跟踪效果难以满足实际应用需求。
发明内容
本发明实施例提出一种跟踪指部轮廓的方法及装置,能准确跟踪指部的外轮廓。
在第一方面,本发明实施例提供一种跟踪指部轮廓的方法,包括:
从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;
以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个候选点构建成所述指部的候选轮廓;
从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓,作为所述指部的跟踪外轮廓;其中,所述偏移程度是指候选轮廓偏离所述彩色图像中对应所述指部的指部边缘的程度。
结合第一方面,在第一方面的第一种可能的实现方式中,所述指部的初始外轮廓上的第i个离散点为vi,则所述指部的初始外轮廓为V={vi,i∈{1,2,...,N}},所述指部的候选轮廓为X={xi,xi∈θi,i∈{1,2,...,N}};其中,θi为第i个离散点的邻近候选点集合;
进而,从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓为
Figure PCTCN2016113535-appb-000001
其中,I为描述所述彩色图像中的每一个像素点的像数值的离散函数,α为预设系数。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所选取的候选轮廓
Figure PCTCN2016113535-appb-000002
在所选取的候选轮廓为
Figure PCTCN2016113535-appb-000003
时,存在有状态方程为
Figure PCTCN2016113535-appb-000004
则在预设时间内通过动态规划求解所述状态方程,获得所述选取的候选轮廓X*所包含的每一个离散点的坐标。
结合第一方面,在第一方面的第三种可能的实现方式中,从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓,具体为:
获取记录用户手部的同一影像的深度图像和彩色图像;
从所述深度图像或所述彩色图像中提取所述手部的外轮廓;
以所述手部的外轮廓的指蹼作为分割指部的分割点,分割所述手部的外轮廓,获得每个指部的初始外轮廓。
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,从所述深度图像中提取所述手部的外轮廓,具体为:
根据预设的手部关节点模型,从所述深度图像中计算出所述手部的每一个关节点的深度;
取所述有关节点的深度的中值作为参考深度dref
从所述深度图像中提取深度在手部深度范围[dref-δ,dref+δ]内的区域的外轮廓;其中,δ为衡量所述手部的手背与手掌之间厚度的参数值;
从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓;
以及,从所述彩色图像中提取所述手部的外轮廓,具体为:
从所述彩色图像中提取像素值在手部像素区间的区域的外轮廓;
从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓。
结合第一方面的第三种可能的实现方式,在第一方面的第五种可能的实现方式中,所述跟踪指部轮廓的方法还包括提取所述手部的外轮廓的指蹼的位置,具体为:
从所述手部的外轮廓的相邻指尖之间的轮廓点中,选取距离连接所述相邻指尖的直线最远的轮廓点作为轮廓拐点;
以所述轮廓拐点作为指蹼的当前位置,从所述彩色图像中提取以所述当前位置为中心点的局部区域;
将所述当前位置进行偏移获得多个偏移位置,并对于每一个偏移位置,从所述彩色图像中提取以该偏移位置为中心点且与所述局部区域相同形状的区域作为候选区域;其中,所述当前位置为(x,y),所述偏移位置为(x+δx,y+δy);δx∈{-1,0,1},δy∈{-1,0,1},且δx和δy不 同时为0;
计算每一个所述候选区域与所述局部区域的结构偏差程度;对于每一个候选区域,所述候选区域与所述局部区域的结构偏差程度为d(P,Q),
Figure PCTCN2016113535-appb-000005
其中,P为包含所述局部区域的每一个像素点的像素值的集合,Q为包含所述候选区域的每一个像素点的像素值的集合,μP为集合P中所有像素值的均值,μQ为集合Q中所有像素值的均值,σPQ为集合P和集合Q的协方差,σP为集合P的方差,σQ为集合Q的方,c1和c2为预设常数;
若每一个所述候选区域与所述局部区域的结构偏差程度均大于预设阈值,则将所述当前位置作为所述指蹼的位置;
若存在一个所述候选区域与所述局部区域的结构偏差程度不大于所述预设阈值,则选取与所述局部区域的结构偏差程度最小的候选区域所对应的偏移位置来更新所述当前位置,并更新所述局部区域和所述候选区域。
对应于第一方面,在第二方面,本发明实施例还提供一种跟踪指部轮廓的装置,包括:
初始外轮廓获取模块,用于从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;
候选轮廓获取模块,用于以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个候选点构建成所述指部的候选轮廓;
跟踪轮廓获取模块,用于从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓,作为所述指部的跟踪外轮廓;其中,所述偏移程度是指候选轮廓偏离所述彩色图像中对应所述指部的指部边缘的程度。
结合第一方面,在第一方面的第一种可能的实现方式中,所述指部的初始外轮廓上的第i个离散点为vi,则所述指部的初始外轮廓为V={vi,i∈{1,2,...,N}},所述指部的候选轮廓为X={xi,xi∈θi,i∈{1,2,...,N}};其中,θi为第i个离散点的邻近候选点集合;
进而,从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓为
Figure PCTCN2016113535-appb-000006
其中,I为描述所述彩色图像中的每一个像素点的像数值的离散函数,α为预设系数。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所选 取的候选轮廓
Figure PCTCN2016113535-appb-000007
所述跟踪轮廓获取模块具体用于:
当所选取的候选轮廓为
Figure PCTCN2016113535-appb-000008
时,存在有状态方程为
Figure PCTCN2016113535-appb-000009
时,在预设时间内通过动态规划求解所述状态方程,获得所述选取的候选轮廓X*所包含的每一个离散点的坐标。
结合第一方面,在第一方面的第三种可能的实现方式中,所述初始外轮廓获取模块具体包括:
图像获取单元,用于获取记录用户手部的同一影像的深度图像和彩色图像;
外轮廓提取单元,用于从所述深度图像或所述彩色图像中提取所述手部的外轮廓;
轮廓分割单元,用于以所述手部的外轮廓的指蹼作为分割指部的分割点,分割所述手部的外轮廓,获得每个指部的初始外轮廓。
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述外轮廓提取单元具体为:
关节点深度计算子单元,用于根据预设的手部关节点模型,从所述深度图像中计算出所述手部的每一个关节点的深度;
参考深度确定子单元,用于取所述有关节点的深度的中值作为参考深度dref
第一轮廓提取子单元,用于从所述深度图像中提取深度在手部深度范围[dref-δ,dref+δ]内的区域的外轮廓;其中,δ为衡量所述手部的手背与手掌之间厚度的参数值;
轮廓选取子单元,用于从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓;
第二轮廓提取子单元,用于从所述彩色图像中提取像素值在手部像素区间的区域的外轮廓。
结合第一方面的第三种可能的实现方式,在第一方面的第五种可能的实现方式中,所述跟踪指部轮廓的装置还包括用于提取所述手部的外轮廓的指蹼的位置的指蹼提取模块,所述指蹼提取模块包括:
轮廓拐点选取单元,用于从所述手部的外轮廓的相邻指尖之间的轮廓点中,选取距离连接所述相邻指尖的直线最远的轮廓点作为轮廓拐点;
局部区域确定单元,用于以所述轮廓拐点作为指蹼的当前位置,从所述彩色图像中提取以所述当前位置为中心点的局部区域;
候选区域确定单元,用于将所述当前位置进行偏移获得多个偏移位置,并对于每一个偏移位置,从所述彩色图像中提取以该偏移位置为中心点且与所述局部区域相同形状的区域作 为候选区域;其中,所述当前位置为(x,y),所述偏移位置为(x+δx,y+δy);δx∈{-1,0,1},δy∈{-1,0,1},且δx和δy不同时为0;
偏差程度计算单元,用于计算每一个所述候选区域与所述局部区域的结构偏差程度;对于每一个候选区域,所述候选区域与所述局部区域的结构偏差程度为d(P,Q),
Figure PCTCN2016113535-appb-000010
其中,P为包含所述局部区域的每一个像素点的像素值的集合,Q为包含所述候选区域的每一个像素点的像素值的集合,μP为集合P中所有像素值的均值,μQ为集合Q中所有像素值的均值,σPQ为集合P和集合Q的协方差,σP为集合P的方差,σQ为集合Q的方,c1和c2为预设常数;
指蹼位置确定单元,用于当每一个所述候选区域与所述局部区域的结构偏差程度均大于预设阈值时,将所述当前位置作为所述指蹼的位置;
当前位置更新单元,用于当存在一个所述候选区域与所述局部区域的结构偏差程度不大于所述预设阈值时,选取与所述局部区域的结构偏差程度最小的候选区域所对应的偏移位置来更新所述当前位置,并更新所述局部区域和所述候选区域。
实施本发明实施例,具有如下有益效果:
本发明实施例提供的跟踪指部轮廓的方法及装置,能从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;然后以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个候选点构建成所述指部的候选轮廓;进而,从所述指部的候选轮廓中,选取偏离所述彩色图像中对应所述指部的指部边缘的偏移程度和轮廓总长度两者数值之和最低的候选轮廓,作为所述指部的跟踪外轮廓,能准确地跟踪到用户手部的指部轮廓。
附图说明
图1是本发明提供的跟踪指部轮廓的方法的一个实施例的流程示意图;
图2是图1提供的跟踪指部轮廓的方法的步骤S1的一个实施例的流程示意图
图3是本发明提供的一种跟踪指部轮廓的装置一个实施例的结构示意图;
图4是本发明提供的一种跟踪指部轮廓的装置的初始外轮廓获取模块的一个实施例的结构示意图;
图5是本发明提供的一种跟踪指部轮廓的装置的外轮廓提取单元的一个实施例的结构示意图;
图6是本发明提供的一种跟踪指部轮廓的装置的指蹼提取模块的一个实施例的结构示意 图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
发明人在实施本发明实施例提供跟踪指部轮廓的方法时,发现在将跟踪指部轮廓的问题转化指部曲化优化的问题的过程中,曲线的解空间是连续的高维实数空间,但在实际操作中并不需要跟踪指部轮廓达到很高的精度(例如误差低于0.3像素),而且要达到如此高精度则在实时跟踪指部轮廓的优化速度将会非常慢,无法满足计算的实时性需求。因而,可对指部的跟踪外轮廓的每一个点的搜索位置或优化位置离散化,这样可以大大减少优化过程的搜索空间。具体而言,可假设需要要优化的指部的初始外轮廓是由N个顶点构成,则所述指部的初始外轮廓上的第i个离散点为vi,则所述指部的初始外轮廓为V={vi,i∈{1,2,...,N}},进而限定每一个离散点的优化空间只能在初始外轮廓点的附近搜索,则对于其中的一条指部的候选轮廓为X={xi,xi∈θi,i∈{1,2,...,N}};其中,θi为第i个离散点的邻近候选点集合。综上,得益于θi的范围的限制,跟踪指部轮廓的实时计算量大大减少。另外,θi的范围可以根据精度要求进行设置。
以下将描述跟踪指部轮廓的具体过程:
参见图1,是本发明提供的跟踪指部轮廓的方法的一个实施例的流程示意图,该方法包括步骤S1至S3,具体为:
S1,从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;
S2,以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个候选点构建成所述指部的候选轮廓;
如同前述所说的,所述指部的初始外轮廓上的第i个离散点为vi,则所述指部的初始外轮廓为V={vi,i∈{1,2,...,N}},进而对于所述指部其中的一条的候选轮廓可描述为X={xi,xi∈θi,i∈{1,2,...,N}};其中,θi为第i个离散点的邻近候选点集合;对于候选轮廓的选取可以使实时跟踪指部轮廓的计算量大大减少。由于所述指部的候选轮廓有多个,需要从中选取一个候选轮廓作为所述指部的跟踪外轮廓,则下述步骤S3将描述进行候选轮廓的筛选的 过程:
S3,从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓,作为所述指部的跟踪外轮廓;其中,所述偏移程度是指候选轮廓偏离所述彩色图像中对应所述指部的指部边缘的程度。
需要说明的是,步骤3所包括的候选轮廓的筛选准则为:从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓,其表达式为
Figure PCTCN2016113535-appb-000011
其中,I为描述所述彩色图像中的每一个像素点的像数值的离散函数,α为预设系数。此实施方式所选取的候选轮廓作为所述指部的跟踪外轮廓,除了能够沿所述彩色图像中梯度最大的位置走向变化之后,还能够约束指部的外轮廓的总长度。并且由于限定了xi∈θi,i∈{1,2,...,N},可减少选取过程的计算量,而且,θi为指部的初始外轮廓的第i个离散点的邻近候选点集合,即可约束优化后的轮廓点不会远离初始轮廓点。
所选取的候选轮廓所包含的每一个元素可标记为:
Figure PCTCN2016113535-appb-000012
则基于上述所选取的候选轮廓的表达式
Figure PCTCN2016113535-appb-000013
则所选取的候选轮廓符合以下状态方程:
Figure PCTCN2016113535-appb-000014
该状态方案满足最优子结构,则在预设时间内通过动态规划求解所述状态方程,获得所选取的候选轮廓X*所包含的每一个离散点(每一个元素)的坐标,从而可以快速得计算出所选取的候选轮廓的坐标。
参见图2,图2是图1提供的跟踪指部轮廓的方法的步骤S1的一个实施例的流程示意图,以下将结合图2描述步骤S1中从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓的具体过程,包括步骤S11至S13:
S11,获取记录用户手部的同一影像的深度图像和彩色图像;
需要说明的是,深度图像是由深度摄像装置捕获到被拍摄物体的图像,其所包含的每一个像素点的像素值反映的是该被拍摄物体与该像素点对应的位置距离摄像头之间的距离信息;彩色图像是由普通摄像装置捕获到被拍摄物体的图像,其所包含的每一个像素点的像素值反映的是该被拍摄物体与该像素点对应的位置的外观颜色信息。
S12,从所述深度图像或所述彩色图像中提取所述手部的外轮廓;
以下将描述本步骤S12中从所述深度图像中提取所述手部的外轮廓的具体过程:
根据预设的手部关节点模型,从所述深度图像中计算出所述手部的每一个关节点的深度;
取所述有关节点的深度的中值作为参考深度dref
从所述深度图像中提取深度在手部深度范围[dref-δ,dref+δ]内的区域的外轮廓;其中,δ为衡量所述手部的手背与手掌之间厚度的参数值;
从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓。
在本发明实施例中,所获取到手部的外轮廓应是由一群坐标点构成的坐标点集合。手部关节点模型是预先利用大量的记录有手部的深度图像的训练集训练出来的模型,该模型包括:基于kinect的手部关节点踪模型、多随机森林模型等,其是基于手部的深度图像的信息训练生成的,可优选利用随机森林算法训练手部关节点模型。手部关节点提供手部各关节点的大致位置,并且通过各关节点的深度可以估算出整个手部的深度范围。另外,在少数情况下,计算到的部分关节点也可能因精度不足超出该手部的区域,或是因深度图像噪声导致关节点的深度误差较大,因而,为了减少这些异常关节点的影响,取所述关节点的深度的中值作为参考深度,则整个手部的深度处于手部深度范围[dref-δ,dref+δ]内,δ为衡量所述手部的手背与手掌之间厚度的参数值,则提取该范围内的区域的边缘的外轮廓出来,即为该手部的初始外轮廓。但是由于受到噪声或其它干扰区域的影响,提取出来的外轮廓可能会有多个,此时,从中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓即可。
以下将描述本步骤S12中从所述彩色图像中提取所述手部的外轮廓的具体过程:
从所述彩色图像中提取像素值在手部像素区间的区域的外轮廓;
从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓。
需要说明的是,手部的皮肤颜色在RGB空间中有一个范围,可以将这个范围作为本发明实施例的手部像素区间,则根据该手部像素区间对上述彩色图像作区间阈值化,即可获得手部区域。
S13,以所述手部的外轮廓的指蹼作为分割指部的分割点,分割所述手部的外轮廓,获得每个指部的初始外轮廓。
在执行本发明提供的跟踪指部轮廓的方法的步骤S3的之前,还包括确定所述手部的外轮廓上的每一个指蹼的位置,则每一个指蹼的位置的获取过程为:
从所述手部的外轮廓的相邻指尖之间的轮廓点中,选取距离连接所述相邻指尖的直线最远的轮廓点作为轮廓拐点;
以所述轮廓拐点作为指蹼的当前位置,从所述彩色图像中提取以所述当前位置为中心点 的局部区域;
将所述当前位置进行偏移获得多个偏移位置,并对于每一个偏移位置,从所述彩色图像中提取以该偏移位置为中心点且与所述局部区域相同形状的区域作为候选区域;其中,所述当前位置为(x,y),所述偏移位置为(x+δx,y+δy);δx和δy包括但不限于为:δx∈{-1,0,1}、δy∈{-1,0,1};δx和δy不同时为0;
计算每一个所述候选区域与所述局部区域的结构偏差程度;对于每一个候选区域,所述候选区域与所述局部区域的结构偏差程度为d(P,Q),
Figure PCTCN2016113535-appb-000015
其中,P为包含所述局部区域的每一个像素点的像素值的集合,Q为包含所述候选区域的每一个像素点的像素值的集合,μP为集合P中所有像素值的均值,μQ为集合Q中所有像素值的均值,σPQ为集合P和集合Q的协方差,σP为集合P的方差,σQ为集合Q的方,c1和c2为预设常数;
若每一个所述候选区域与所述局部区域的结构偏差程度均大于预设阈值,则将所述当前位置作为所述指蹼的位置;
若存在一个所述候选区域与所述局部区域的结构偏差程度不大于所述预设阈值,则选取与所述局部区域的结构偏差程度最小的候选区域所对应的偏移位置来更新所述当前位置,并更新所述局部区域和所述候选区域。
需要说明的是,当局部区域处于指蹼时,该局部区域与邻近的候选区域的颜色分布(即像素值分布)均有较大差别;当局部区域处于指缝时,该局部区域与沿指缝方向上的邻近的候选区域的颜色分布差别相对较小,且该局部区域与其他的候选区域的颜色分布差较大。因而,当在比较出每一个所述候选区域与所述局部区域的结构偏差程度均大于预设阈值时,即可判断出局部区域落在指蹼上,将该局部区域的中心位置(上述当前位置)作为指蹼的位置,从而完成对指蹼的位置的修正;反之,可判断出该局部区域落在指缝上,需要继续对该指蹼的当前位置进行修正,且选取与该局部区域的结构偏差程度最小的候选区域所对应的中心位置(上述偏移位置)更新为该指蹼的当前位置,可以确保后续更新后的指蹼的当前位置仍处于指缝上,不偏移到非指缝的其他位置上。
实施本发明实施例,具有如下有益效果:
本发明实施例提供的跟踪指部轮廓的方法,能从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;然后以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个 候选点构建成所述指部的候选轮廓;进而,从所述指部的候选轮廓中,选取偏离所述彩色图像中对应所述指部的指部边缘的偏移程度和轮廓总长度两者数值之和最低的候选轮廓,作为所述指部的跟踪外轮廓,能准确地跟踪到用户手部的指部轮廓。
本发明实施例还提供一种跟踪指部轮廓的装置能够实现上述提供的跟踪指部轮廓的方法的全部流程,如图3所示,图3是本发明提供的一种跟踪指部轮廓的装置一个实施例的结构示意图,该装置具体包括:
初始外轮廓获取模块10,用于从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;
候选轮廓获取模块20,用于以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个候选点构建成所述指部的候选轮廓;
跟踪轮廓获取模块30,用于从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓,作为所述指部的跟踪外轮廓;其中,所述偏移程度是指候选轮廓偏离所述彩色图像中的对应所述指部的指部边缘的程度。
结合第一方面,在第一方面的第一种可能的实现方式中,所述指部的初始外轮廓上的第i个离散点为vi,则所述指部的初始外轮廓为V={vi,i∈{1,2,...,N}},所述指部的候选轮廓为X={xi,xi∈θi,i∈{1,2,...,N}};其中,θi为第i个离散点的邻近候选点集合;
进而,从所述指部的候选轮廓中选取偏离所述彩色图像中的对应所述指部的指部边缘的偏移程度和轮廓总长度两者数值之和最低的候选轮廓为
Figure PCTCN2016113535-appb-000016
其中,I为描述所述彩色图像中的每一个像素点的像数值的离散函数,α为预设系数。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所选取的候选轮廓
Figure PCTCN2016113535-appb-000017
所述跟踪轮廓获取模块30具体用于:
当所选取的候选轮廓为
Figure PCTCN2016113535-appb-000018
存在有状态方程为
Figure PCTCN2016113535-appb-000019
时,在预设时间内通过动态规划求解所述状态方程,获得所述选取的候选轮廓X*所包含的每一个离散点的坐标。
结合第一方面,在第一方面的第三种可能的实现方式中,参见图4,图4是本发明提供 的一种跟踪指部轮廓的装置的初始外轮廓获取模块的一个实施例的结构示意图;该初始外轮廓获取模块10具体包括:
图像获取单元11,用于获取记录用户手部的同一影像的深度图像和彩色图像;
外轮廓提取单元12,用于从所述深度图像或所述彩色图像中提取所述手部的外轮廓;
轮廓分割单元13,用于以所述手部的外轮廓的指蹼作为分割指部的分割点,分割所述手部的外轮廓,获得每个指部的初始外轮廓。
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,参见图5,图5是本发明提供的一种跟踪指部轮廓的装置的外轮廓提取单元的一个实施例的结构示意图;该所述外轮廓提取单元12具体为:
关节点深度计算子单元121,用于根据预设的手部关节点模型,从所述深度图像中计算出所述手部的每一个关节点的深度;
参考深度确定子单元122,用于取所述有关节点的深度的中值作为参考深度dref
第一轮廓提取子单元123,用于从所述深度图像中提取深度在手部深度范围[dref-δ,dref+δ]内的区域的外轮廓;其中,δ为衡量所述手部的手背与手掌之间厚度的参数值;
轮廓选取子单元124,用于从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓;
第二轮廓提取子单元125,用于从所述彩色图像中提取像素值在手部像素区间的区域的外轮廓。
结合第一方面的第三种可能的实现方式,在第一方面的第五种可能的实现方式中,所述跟踪指部轮廓的装置还包括用于提取所述手部的外轮廓的指蹼的位置的指蹼提取模块40,参见图6,图6是本发明提供的一种跟踪指部轮廓的装置的指蹼提取模块的一个实施例的结构示意图;所述指蹼提取模块40包括:
轮廓拐点选取单元41,用于从所述手部的外轮廓的相邻指尖之间的轮廓点中,选取距离连接所述相邻指尖的直线最远的轮廓点作为轮廓拐点;
局部区域确定单元42,用于以所述轮廓拐点作为指蹼的当前位置,从所述彩色图像中提取以所述当前位置为中心点的局部区域;
候选区域确定单元43,用于将所述当前位置进行偏移获得多个偏移位置,并对于每一个偏移位置,从所述彩色图像中提取以该偏移位置为中心点且与所述局部区域相同形状的区域作为候选区域;其中,所述当前位置为(x,y),所述偏移位置为(x+δx,y+δy);δx∈{-1,0,1},δy∈{-1,0,1},且δx和δy不同时为0;
偏差程度计算单元44,用于计算每一个所述候选区域与所述局部区域的结构偏差程度; 对于每一个候选区域,所述候选区域与所述局部区域的结构偏差程度为d(P,Q),
Figure PCTCN2016113535-appb-000020
其中,P为包含所述局部区域的每一个像素点的像素值的集合,Q为包含所述候选区域的每一个像素点的像素值的集合,μP为集合P中所有像素值的均值,μQ为集合Q中所有像素值的均值,σPQ为集合P和集合Q的协方差,σP为集合P的方差,σQ为集合Q的方,c1和c2为预设常数;
指蹼位置确定单元45,用于当每一个所述候选区域与所述局部区域的结构偏差程度均大于预设阈值时,将所述当前位置作为所述指蹼的位置;
当前位置更新单元46,用于当存在一个所述候选区域与所述局部区域的结构偏差程度不大于所述预设阈值时,选取与所述局部区域的结构偏差程度最小的候选区域所对应的偏移位置来更新所述当前位置,并更新所述局部区域和所述候选区域。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。

Claims (12)

  1. 一种跟踪指部轮廓的方法,其特征在于,包括:
    从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;
    以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个候选点构建成所述指部的候选轮廓;
    从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓,作为所述指部的跟踪外轮廓;其中,所述偏移程度是指候选轮廓偏离所述彩色图像中对应所述指部的指部边缘的程度。
  2. 如权利要求1所述的跟踪指部轮廓的方法,其特征在于,所述指部的初始外轮廓上的第i个离散点为vi,则所述指部的初始外轮廓为V={vi,i∈{1,2,...,N}},所述指部的候选轮廓为X={xi,xi∈θi,i∈{1,2,...,N}};其中,θi为第i个离散点的邻近候选点集合;
    进而,从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓为
    Figure PCTCN2016113535-appb-100001
    其中,I为描述所述彩色图像中的每一个像素点的像数值的离散函数,α为预设系数。
  3. 如权利要求2所述的跟踪指部轮廓的方法,其特征在于,所选取的候选轮廓
    Figure PCTCN2016113535-appb-100002
    在所选取的候选轮廓为
    Figure PCTCN2016113535-appb-100003
    时,存在有状态方程为
    Figure PCTCN2016113535-appb-100004
    则在预设时间内通过动态规划求解所述状态方程,获得所述选取的候选轮廓X*所包含的每一个离散点的坐标。
  4. 如权利要求1所述的跟踪指部轮廓的方法,其特征在于,从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓,具体为:
    获取记录用户手部的同一影像的深度图像和彩色图像;
    从所述深度图像或所述彩色图像中提取所述手部的外轮廓;
    以所述手部的外轮廓的指蹼作为分割指部的分割点,分割所述手部的外轮廓,获得每个指部的初始外轮廓。
  5. 如权利要求4所述的跟踪指部轮廓的方法,其特征在于,从所述深度图像中提取所述手部的外轮廓,具体为:
    根据预设的手部关节点模型,从所述深度图像中计算出所述手部的每一个关节点的深度;
    取所述有关节点的深度的中值作为参考深度dref
    从所述深度图像中提取深度在手部深度范围[dref-δ,dref+δ]内的区域的外轮廓;其中,δ为衡量所述手部的手背与手掌之间厚度的参数值;
    从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓;
    以及,从所述彩色图像中提取所述手部的外轮廓,具体为:
    从所述彩色图像中提取像素值在手部像素区间的区域的外轮廓;
    从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓。
  6. 如权利要求4所述的跟踪指部轮廓的方法,其特征在于,所述跟踪指部轮廓的方法还包括提取所述手部的外轮廓的指蹼的位置,具体为:
    从所述手部的外轮廓的相邻指尖之间的轮廓点中,选取距离连接所述相邻指尖的直线最远的轮廓点作为轮廓拐点;
    以所述轮廓拐点作为指蹼的当前位置,从所述彩色图像中提取以所述当前位置为中心点的局部区域;
    将所述当前位置进行偏移获得多个偏移位置,并对于每一个偏移位置,从所述彩色图像中提取以该偏移位置为中心点且与所述局部区域相同形状的区域作为候选区域;其中,所述当前位置为(x,y),所述偏移位置为(x+δx,y+δy);δx∈{-1,0,1},δy∈{-1,0,1},且δx和δy不同时为0;
    计算每一个所述候选区域与所述局部区域的结构偏差程度;对于每一个候选区域,所述候选区域与所述局部区域的结构偏差程度为d(P,Q),
    Figure PCTCN2016113535-appb-100005
    其中,P为包含所述局部区域的每一个像素点的像素值的集合,Q为包含所述候选区域的每一个像素点的像素值的集合,μP为集合P中所有像素值的均值,μQ为集合Q中所有像素值的均值,σPQ为集合P和集合Q的协方差,σP为集合P的方差,σQ为集合Q的方,c1和c2为预设常数;
    若每一个所述候选区域与所述局部区域的结构偏差程度均大于预设阈值,则将所述当前位置作为所述指蹼的位置;
    若存在一个所述候选区域与所述局部区域的结构偏差程度不大于所述预设阈值,则选取与所述局部区域的结构偏差程度最小的候选区域所对应的偏移位置来更新所述当前位置,并更新所述局部区域和所述候选区域。
  7. 一种跟踪指部轮廓的装置,其特征在于,包括:
    初始外轮廓获取模块,用于从记录用户手部的同一影像的深度图像或彩色图像中获取指部的初始外轮廓;
    候选轮廓获取模块,用于以所述指部的初始外轮廓上的每一个离散点为基准,获取每一个离散点的邻近候选点集合,并分别从每一个离散点的邻近候选点集合中选取一个候选点构建成所述指部的候选轮廓;
    跟踪轮廓获取模块,用于从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓,作为所述指部的跟踪外轮廓;其中,所述偏移程度是指候选轮廓偏离所述彩色图像中对应所述指部的指部边缘的程度。
  8. 如权利要求7所述的跟踪指部轮廓的装置,其特征在于,所述指部的初始外轮廓上的第i个离散点为vi,则所述指部的初始外轮廓为V={vi,i∈{1,2,...,N}},所述指部的候选轮廓为X={xi,xi∈θi,i∈{1,2,...,N}};其中,θi为第i个离散点的邻近候选点集合;
    进而,从所述指部的候选轮廓中,选取偏移程度和轮廓总长度两者数值之和最低的候选轮廓为
    Figure PCTCN2016113535-appb-100006
    其中,I为描述所述彩色图像中的每一个像素点的像数值的离散函数,α为预设系数。
  9. 如权利要求8所述的跟踪指部轮廓的装置,其特征在于,所选取的候选轮廓
    Figure PCTCN2016113535-appb-100007
    所述跟踪轮廓获取模块具体用于:
    当所选取的候选轮廓为
    Figure PCTCN2016113535-appb-100008
    时,存在有状态方程为
    Figure PCTCN2016113535-appb-100009
    时,在预设时间内通过动态规划求解所述状态方程,获得所述选取的候选轮廓X*所包含的每一个离散点的坐标。
  10. 如权利要求7所述的跟踪指部轮廓的装置,其特征在于,所述初始外轮廓获取模块具体包括:
    图像获取单元,用于获取记录用户手部的同一影像的深度图像和彩色图像;
    外轮廓提取单元,用于从所述深度图像或所述彩色图像中提取所述手部的外轮廓;
    轮廓分割单元,用于以所述手部的外轮廓的指蹼作为分割指部的分割点,分割所述手部的外轮廓,获得每个指部的初始外轮廓。
  11. 如权利要求10所述的跟踪指部轮廓的装置,其特征在于,所述外轮廓提取单元具体为:
    关节点深度计算子单元,用于根据预设的手部关节点模型,从所述深度图像中计算出所述手部的每一个关节点的深度;
    参考深度确定子单元,用于取所述有关节点的深度的中值作为参考深度dref
    第一轮廓提取子单元,用于从所述深度图像中提取深度在手部深度范围[dref-δ,dref+δ]内的区域的外轮廓;其中,δ为衡量所述手部的手背与手掌之间厚度的参数值;
    轮廓选取子单元,用于从所述外轮廓中选取轮廓的质心距离所述关节点的平均距离最近,且轮廓曲线总长度最长的外轮廓作为所述手部的外轮廓;
    第二轮廓提取子单元,用于从所述彩色图像中提取像素值在手部像素区间的区域的外轮廓。
  12. 如权利要求10所述的跟踪指部轮廓的装置,其特征在于,所述跟踪指部轮廓的装置还包括用于提取所述手部的外轮廓的指蹼的位置的指蹼提取模块,所述指蹼提取模块包括:
    轮廓拐点选取单元,用于从所述手部的外轮廓的相邻指尖之间的轮廓点中,选取距离连接所述相邻指尖的直线最远的轮廓点作为轮廓拐点;
    局部区域确定单元,用于以所述轮廓拐点作为指蹼的当前位置,从所述彩色图像中提取以所述当前位置为中心点的局部区域;
    候选区域确定单元,用于将所述当前位置进行偏移获得多个偏移位置,并对于每一个偏移位置,从所述彩色图像中提取以该偏移位置为中心点且与所述局部区域相同形状的区域作为候选区域;其中,所述当前位置为(x,y),所述偏移位置为(x+δx,y+δy);δx∈{-1,0,1},δy∈{-1,0,1},且δx和δy不同时为0;
    偏差程度计算单元,用于计算每一个所述候选区域与所述局部区域的结构偏差程度;对于每一个候选区域,所述候选区域与所述局部区域的结构偏差程度为d(P,Q),
    Figure PCTCN2016113535-appb-100010
    其中,P为包含所述局部区域的每一个像素点的像素值的集合,Q为包含所述候选区域的每一个像素点的像素值的集合,μP为集合P中所有像素值的均值,μQ为集合Q中所有像素值的均值,σPQ为集合P和集合Q的协方差,σP为集合P的方差,σQ为集合Q的方,c1和c2为预设常数;
    指蹼位置确定单元,用于当每一个所述候选区域与所述局部区域的结构偏差程度均大于预设阈值时,将所述当前位置作为所述指蹼的位置;
    当前位置更新单元,用于当存在一个所述候选区域与所述局部区域的结构偏差程度不大于所述预设阈值时,选取与所述局部区域的结构偏差程度最小的候选区域所对应的偏移位置来更新所述当前位置,并更新所述局部区域和所述候选区域。
PCT/CN2016/113535 2016-08-16 2016-12-30 跟踪指部轮廓的方法及其装置 WO2018032704A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610675182.1 2016-08-16
CN201610675182.1A CN106340039B (zh) 2016-08-16 2016-08-16 跟踪指部轮廓的方法及其装置

Publications (1)

Publication Number Publication Date
WO2018032704A1 true WO2018032704A1 (zh) 2018-02-22

Family

ID=57825547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113535 WO2018032704A1 (zh) 2016-08-16 2016-12-30 跟踪指部轮廓的方法及其装置

Country Status (2)

Country Link
CN (1) CN106340039B (zh)
WO (1) WO2018032704A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112308071A (zh) * 2020-11-02 2021-02-02 沈阳民航东北凯亚有限公司 一种行李托运的入侵检测方法、装置及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6256411B1 (en) * 1997-05-28 2001-07-03 Minolta Co., Ltd. Image processing device and method for detecting objects in image data
CN103729875A (zh) * 2013-12-09 2014-04-16 深圳先进技术研究院 心脏磁共振图像的左心室三维轮廓重建方法和系统
CN105806315A (zh) * 2014-12-31 2016-07-27 上海新跃仪表厂 基于主动编码信息的非合作目标相对测量系统及测量方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470800B (zh) * 2007-12-30 2011-05-04 沈阳工业大学 手形识别方法
CN101807114B (zh) * 2010-04-02 2011-12-07 浙江大学 一种基于三维手势的自然交互方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6256411B1 (en) * 1997-05-28 2001-07-03 Minolta Co., Ltd. Image processing device and method for detecting objects in image data
CN103729875A (zh) * 2013-12-09 2014-04-16 深圳先进技术研究院 心脏磁共振图像的左心室三维轮廓重建方法和系统
CN105806315A (zh) * 2014-12-31 2016-07-27 上海新跃仪表厂 基于主动编码信息的非合作目标相对测量系统及测量方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GONG, YULAN: "China Masters' Theses Full-text Database (Electronic Journals", HAND-WRIST EXTRACTION OF EDGE BASED ON ACTIVE CONTOUR MODEL IN SKELETON AUTOMATIC ASSESSMENT SYSTEM, 31 August 2015 (2015-08-31), pages 13 , 25 - 28 , 31 and 33-36 *
WANG, YANKAI: "Research of Dynamic Gesture Recognition And Application", CHINA MASTERS' THESES FULL-TEXT DATABASE (ELECTRONIC JOURNALS), 31 March 2016 (2016-03-31), pages 12 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112308071A (zh) * 2020-11-02 2021-02-02 沈阳民航东北凯亚有限公司 一种行李托运的入侵检测方法、装置及电子设备
CN112308071B (zh) * 2020-11-02 2024-03-05 沈阳民航东北凯亚有限公司 一种行李托运的入侵检测方法、装置及电子设备

Also Published As

Publication number Publication date
CN106340039B (zh) 2019-06-21
CN106340039A (zh) 2017-01-18

Similar Documents

Publication Publication Date Title
CN106408592B (zh) 一种基于目标模板更新的目标跟踪方法
US8331619B2 (en) Image processing apparatus and image processing method
CN107844736B (zh) 虹膜定位方法和装置
CN106960449B (zh) 基于多特征约束的异源配准方法
WO2016127735A1 (zh) 纹线距离的计算方法和装置
CN108268823B (zh) 目标再识别方法和装置
MX2012000942A (es) Sistema de identificacion forense por superposicion craneofacial basado en soft computing.
CN108198201A (zh) 一种多目标跟踪方法、终端设备及存储介质
WO2018032703A1 (zh) 跟踪指部轮廓的方法及其装置
CN109740537B (zh) 人群视频图像中行人图像属性的精确标注方法及系统
CN103778406B (zh) 对象检测方法及设备
CN106373128B (zh) 一种嘴唇精确定位的方法和系统
JP2008204200A (ja) 顔解析システム及びプログラム
CN109297489A (zh) 一种基于用户特征的室内导航方法、电子设备及存储介质
JP2015121985A (ja) 対象線検出装置、方法、及びプログラム
JP5310485B2 (ja) 画像処理方法及び装置並びにプログラム
KR100994367B1 (ko) 영상 추적 장치의 이동표적 움직임 추적 방법
WO2018032700A1 (zh) 跟踪指蹼位置的方法及其装置
WO2018032704A1 (zh) 跟踪指部轮廓的方法及其装置
CN108764343B (zh) 一种跟踪算法中的跟踪目标框的定位方法
JP2012185774A (ja) 画像処理装置、画像処理方法、画像形成装置、プログラムおよび記録媒体
JP6713422B2 (ja) 学習装置、イベント検出装置、学習方法、イベント検出方法、プログラム
JP6754717B2 (ja) 物体候補領域推定装置、物体候補領域推定方法、及び物体候補領域推定プログラム
JP2007257310A (ja) 顔解析システム
Liu et al. Inner lips feature extraction based on CLNF with hybrid dynamic template for Cued Speech

Legal Events

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

Ref document number: 16913456

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25/04/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16913456

Country of ref document: EP

Kind code of ref document: A1