WO2017113736A1 - 手指与手腕的区分方法及其装置 - Google Patents
手指与手腕的区分方法及其装置 Download PDFInfo
- Publication number
- WO2017113736A1 WO2017113736A1 PCT/CN2016/089576 CN2016089576W WO2017113736A1 WO 2017113736 A1 WO2017113736 A1 WO 2017113736A1 CN 2016089576 W CN2016089576 W CN 2016089576W WO 2017113736 A1 WO2017113736 A1 WO 2017113736A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- area
- finger
- wrist
- hand image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/107—Static hand or arm
Definitions
- gesture recognition is a process of recognizing human gestures through a series of algorithms, and the required hand information is collected through human-computer interaction.
- One of the key techniques for gesture recognition is to locate the palm and the fingertips of each finger.
- the existing gesture recognition technology mainly uses the characteristics of the convex and concave features of the contour to detect the fingers and the wrist.
- the finger and the wrist may have similar contour characteristics. Therefore, the fingertip is often interfered by the wrist during the positioning process, and the finger and the wrist are misjudged, resulting in low accuracy of gesture recognition. Problems such as poor accuracy.
- Some embodiments of the present invention further provide a finger and wrist distinguishing device, comprising: a hand image acquiring module for acquiring a hand image, the hand image includes a finger, a wrist and an arm; and a split straight line acquiring module for calculating a dividing line that passes through the palm position of the hand image and is perpendicular to the major axis of the hand image; the detecting module is configured to acquire the relationship between the area and the circumference of each of the two image regions in which the hand image is divided by the dividing line; A module for determining the image area in which the finger and the wrist are located, based on the relationship between the area and the circumference.
- the relationship between the area and the circumference is the ratio of the square of the circumference to the area; according to the relationship between the area and the square of the circumference, the step of determining the image area in which the finger and the wrist are located includes the following substeps: The ratio of the square of the circumference of each image area to the area is compared; the image area corresponding to the larger ratio is used as the image area where the finger is located, and the smaller ratio corresponds to The image area serves as the image area where the wrist is located. In order to judge the finger and the palm more accurately, the ratio of the square of the circumference to the area is used as the judgment index.
- the distinct distinguishing feature (the contour circumference) of the finger and the wrist is enlarged, so that The ratio of the square of the circumference to the area has a significant difference, effectively eliminating the interference of the wrist on the fingertip positioning of the finger, so that the image area where the finger is located can be obtained quickly and accurately.
- the step of acquiring the intersection of the segmentation line and the hand image includes: detecting an angle between the segmentation line and the horizontal line. If the angle is less than 45 degrees, the intersection coordinates of the segmentation line and the hand image are obtained according to the following formula:
- the angle between the segmentation line and the horizontal line is detected, and according to whether the angle between the line and the horizontal line is less than 45 degrees, different coordinates are used to obtain the coordinates of the intersection point according to different situations, and the segmentation can be avoided.
- the line is perpendicular or parallel to the horizontal line, the correct intersection cannot be calculated.
- the step of acquiring the hand image includes the following sub-steps: acquiring a model of the skin pixel and the non-skin pixel in advance; traversing each pixel in the original image, and traversing the obtained pixel point with the pre-acquired skin
- the pixel model is matched with the non-skin pixel model; the skin region and the non-skin region are segmented according to the matching result; and the connected region is detected for the skin region to obtain a hand image.
- FIG. 1 is a flow chart showing a method of distinguishing a finger from a wrist according to a first embodiment of the present invention
- FIG. 2 is a connected domain diagram of a hand according to a first embodiment of the present invention
- Figure 3 is a positional view of the palm of the hand on the connected domain of the hand according to the first embodiment of the present invention
- FIG. 4 is a positional view of a straight line of a spindle in a connected domain of a hand according to a first embodiment of the present invention
- Figure 5 is a sectional straight line diagram of a finger and a wrist according to a first embodiment of the present invention
- FIG. 6 is a schematic structural view of a device for distinguishing a finger from a wrist according to a third embodiment of the present invention.
- a first embodiment of the present invention relates to a method for distinguishing a finger from a wrist. The specific flow is shown in FIG. 1.
- a hand image is acquired. Specifically, the original image is segmented to obtain a connected domain of the hand (ie, a hand image), a hand image including a finger, a wrist, and an arm.
- a model of the skin pixel and the non-skin pixel is acquired in advance; the pixel points in the original image are traversed, and the traversed pixel is compared with the pre-acquired skin pixel model and the non-skin pixel model.
- the skin area and the non-skin area are obtained according to the matching result; the connected area is detected by the skin area to obtain a hand image.
- the acquired hand image is converted into a color model HSV or a color space YCrCb, and then each pixel in the image belongs to the skin or non-skin according to the skin color value range, and the foreground obtained by segmenting the original image is
- the connected domain of the hand is shown in Figure 2.
- step 103 proceed to step 103 to find a straight line of the foreground area spindle.
- the method for finding the main axis of the foreground region is to traverse all the pixels of the hand image, and save the obtained coordinates of each pixel to a matrix; fitting each element in the matrix to obtain a straight line by least squares method
- the straight line obtained by fitting is the principal straight line.
- the open source computer vision library Open Source Computer Vision Library (OpenCV) can be used to achieve the fitting of each element.
- OpenCV Open Source Computer Vision Library
- the function cvFitLine can be called from OpenCV to fit the elements in the matrix.
- the spindle is straight.
- the definition of cvFitLine is as follows:
- CVAPI (void)cvFitLine(const CvArr*points,int dist_type,double param,double reps,double aeps,float*line);
- points is a matrix composed of foreground pixel coordinates, line is used to return the line equation, dist_type is CV_DIST_L2, param is 0, and both reps and aeps are 0.01.
- A, B and C are parameters of the general formula of the straight line, (v 1, v 2) is a direction vector of a straight line, (x, y) is a point on a straight line.
- the position of the obtained spindle straight line on the connected domain of the hand is as shown in FIG.
- a division straight line of the region to which the finger and the wrist belong is calculated.
- a straight line is calculated by calculating a straight line passing through the palm position of the hand image and perpendicular to the main axis of the hand image.
- the straight line equation perpendicular to the main axis that is, the dividing line of the finger and the area to which the wrist belongs, can be obtained.
- the calculation formula is as follows:
- the linear equation parameters of the A, B, and C spindle straight lines, A v , B v , and C v are the linear equation parameters of the split straight line, and (x p , y p ) is the coordinate of the palm position.
- a dividing line is drawn to divide the foreground area into two parts.
- the dividing line drawn here is the same color as the background, so the foreground can be split into two parts.
- the intersection of the split line and the hand image is calculated.
- cvLine is called from OpenCV, and the split line is drawn in the image to divide the image into two parts.
- the definition of cvLine is as follows:
- pt1 and pt2 are the intersections of the split line and the hand image.
- the image area in which the finger and the wrist are located is determined according to the relationship between the area of the foreground area and the circumference.
- the image area in which the finger and the wrist are located is determined based on the relationship between the area and the square of the circumference.
- the hand image is divided into two regions, region 1 and region 2, as shown in FIG.
- the ratio T1 of the square of the circumference of the area 1 to the area is calculated, and the ratio T2 of the square of the circumference of the area 1 to the area is calculated.
- the unit of measurement here is a pixel, and the length of one pixel is 1, in pixels.
- the square of the perimeter and the area ratio are used as the eigenvalues, and the obtained eigenvalues are independent of the length unit, which can effectively avoid the influence of the different length units on the calculation results.
- the image region corresponding to the larger ratio is used as the image region where the finger is located, and the image region corresponding to the smaller ratio is used as the image region
- the image area where the wrist is located For example, if T1 is greater than T2, then area 1 is the image area where the finger is located, and area 2 is the image area where the wrist is located.
- the functions cvContourArea and cvArcLength in OpenCV can be respectively used to calculate the area and perimeter of the contour, and then the ratio of the square of the perimeter to the area is obtained.
- the image area where the finger is located is determined.
- the larger one corresponds to the area where the finger is located, and the smaller one corresponds to the area where the wrist is located. Since the ratio of the square of the circumference of the connected field on the side of the finger to the area is larger than the value of the side of the wrist, by comparing the size of the feature value, the image area where the finger is located can be determined.
- the fingers are more slender relative to the wrists, the wrists are more circular toward the fingers, and the sum of the contours of the fingers is larger than the circumference of the wrist contour, but the difference between the two areas is small, the same area of the figure Medium, the circumference of the circle is the smallest. Therefore, the perimeter and area features of the connected domain of the hand can be used to distinguish the finger from the wrist, effectively eliminating the interference of the wrist on the fingertip positioning of the finger, and the finger image area can be obtained simply, accurately, and quickly.
- the ratio of the square of the circumference to the area is used as the judgment index, and the algorithm of the square of the circumference is adopted, and the difference between the finger and the wrist is clearly distinguished.
- the feature is magnified so that the ratio of the square of the perimeter to the area has a significant difference, so that the image area where the finger is located can be obtained more quickly and accurately.
- other relationship between perimeter and area may be used as the detection basis of the image area where the finger is located, and will not be described herein.
- a second embodiment of the present invention relates to a method of distinguishing a finger from a wrist.
- the second embodiment is further improved on the basis of the first embodiment.
- the main improvement is that the step of acquiring the intersection of the dividing line and the hand image includes: detecting an angle between the dividing line and the horizontal line;
- intersection coordinates of the segmentation line and the hand image are obtained according to the following formula:
- the gestures of any angle acquired can obtain the intersection of the segmentation line and the hand region through one of the above two different formulas, and no longer limit the gesture to a specific angle. Calculate the intersection coordinates.
- a third embodiment of the present invention relates to a finger and wrist distinguishing device, as shown in FIG. 6, comprising: a hand image acquiring module for acquiring a hand image, the hand image including a finger, a wrist, and an arm; a module for calculating a dividing line passing through a palm line position of the hand image and perpendicular to a straight line of the hand image; and a detecting module for acquiring an area and a circumference of each of the two image areas in which the hand image is divided by the dividing line A long relationship; a determination module for determining an image area in which the finger and the wrist are located according to the relationship between the area and the circumference.
- the relationship between the area and the circumference is the ratio of the square of the circumference to the area
- the decision module contains:
- the determining sub-module is configured to use an image area corresponding to the larger ratio as the image area where the finger is located, and an image area corresponding to the smaller ratio as the image area where the wrist is located.
- the split straight line acquisition module includes:
- a second calculation sub-module for calculating a split line according to the following formula:
- A, B and C are the linear equation parameters of the straight line
- a v , B v and C v are the linear equation parameters of the split straight line
- (x p , y p ) is the coordinate of the palm position.
- the present embodiment is a system embodiment corresponding to the first embodiment, and the present embodiment can be implemented in cooperation with the first embodiment.
- the related technical details mentioned in the first embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the first embodiment.
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
一种手指与手腕的区分方法及其装置,涉及手势识别技术领域。所述方法包括以下步骤:获取手部图像,手部图像包含手指、手腕和手臂;计算经过手部图像的掌心位置且垂直于手部图像的主轴直线的分割直线;获取手部图像被分割直线分割而成的两个图像区域各自的面积与周长的关系;根据面积与周长的关系,确定手指和手腕各自所在的图像区域。基于手的连通域的周长和面积特征区分手指和手腕,有效的排除了手腕对手指指尖定位的干扰,从而能够简单、精准、快速获取手指图像区域。
Description
交叉引用
本申请要求于2015年12月27日提交中国专利局、申请号为201511007486.2的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本专利申请涉及手势识别技术领域,特别涉及手指与手腕的区分方法及其装置。
发明人在实现本发明的过程中发现,手势识别是通过一系列算法来识别人类手势的过程,通过人机交互方式采集到所需的手部信息。手势识别的一个关键技术是定位手掌和各个手指指尖的位置,现有的手势识别技术主要是利用轮廓的凸起、凹陷的特性来检测手指和手腕的。
但是,由于手的变形很大,手指与手腕有可能存在相似的轮廓特性,因此,手指指尖的定位过程中经常受到手腕的干扰,出现手指和手腕误判情况,进而导致手势识别精度低、准确度差等问题。
发明内容
本发明部分实施例的目的在于提供一种手指与手腕的区分方法及其装置,有效的排除了手腕对手指指尖定位的干扰,从而能够简单、精准、快速获取手指图像区域。
为解决上述技术问题,本发明部分实施例提供了一种手指与手腕的区分方法,包含以下步骤:获取手部图像,手部图像包含手指、手腕和手臂;计算经过手部图像的掌心位置且垂直于手部图像的主轴直线的分割直线;获取手部图像被分割直线分割而成的两个图像区域各自的面积与周长的关系;根据面积与周长的关系,确定手指和手腕各自所在的图像区域。
本发明的一个实施例提供了一种计算机可读存储介质,包括计算机可执行指令,所述计算机可执行指令在由至少一个处理器执行时致使所述处理器执行上述方法。
本发明部分实施例还提供了一种手指与手腕的区分装置,包含:手部图像获取模块,用于获取手部图像,手部图像包含手指、手腕和手臂;分割直线获取模块,用于计算经过手部图像的掌心位置且垂直与手部图像的主轴直线的分割直线;检测模块,用于获取手部图像被分割直线分割而成的两个图像区域各自的面积与周长的关系;判定模块,用于根据面积与周长的关系,确定手指和手腕各自所在的图像区域。
本发明部分实施例相对于现有技术而言,通过计算得到经过手部图像的掌心位置且垂直于主轴直线的分割直线,并利用分割直线将手部图像分割成两个图像区域。从手指与手腕的特征来看,手指相对手腕更加修长,手腕相对手指更偏向圆形,且其各手指的轮廓周长之和大于手腕轮廓周长,二者面积相差却不大,同等面积的图形中,圆的周长最小。因此,利用手的连通域的周长和面积特征区分手指和手腕,有效的排除了手腕对手指指尖定位的干扰,可以简单、精准、快速获取手指图像区域。
在一个实施例中,面积与周长的关系为周长平方与面积的比值;根据面积与周长平方的关系,确定手指和手腕各自所在的图像区域的步骤中,包含以下子步骤:将两个图像区域各自的周长平方与面积的比值,进行比较;将较大比值所对应的图像区域作为手指所在的图像区域,将较小比值所对应的
图像区域作为手腕所在的图像区域。为了能更加精准的判断出手指与手掌,采用周长平方与面积的比值作为判断指标,由于采取了周长平方的算法,对手指和手腕的明显区别特征(轮廓周长)进行了放大,使得周长平方与面积的比值具有很明显的差异,有效的排除了手腕对手指指尖定位的干扰,从而可以快速、准确的得到手指所在的图像区域。
在一个实施例中,获取分割直线与手部图像的交点的步骤中,包含:检测分割直线与水平线的夹角。如果夹角小于45度,则根据以下公式获取分割直线与手部图像的交点坐标:
如果夹角大于或等于45度,则根据以下公式获取分割直线与手部图像的交点坐标:
其中,(x1,y1)和(x2,y2)分别是交点坐标,w和h分别是手部图像的宽和高。
在获取分割直线与手部图像的交点的时检测分割直线与水平线的夹角,并根据直线与水平线的夹角是否小于45度,根据不同的情况采用不同的公式进行获取交点坐标,可以避免分割直线垂直或平行于水平线时,无法计算得到正确的交点的情况。
在一个实施例中,获取手部图像的步骤中,包含以下子步骤:预先获取皮肤像素和非皮肤像素的模型;遍历原始图像中的各像素点,将遍历得到的像素点与预先获取的皮肤像素模型和非皮肤像素模型进行匹配;根据匹配结果分割得到皮肤区域和非皮肤区域;对皮肤区域进行连通域检测得到手部图像。通过将原始图像中的各像素点与预先获取的皮肤像素模型和非皮肤像素
模型进行匹配,可以简单、精准的区分出皮肤区域和非皮肤区域,从而快速的获取手部图像,有效的简化了手部图像获取流程。
图1是根据本发明第一实施方式的手指与手腕的区分方法的流程图;
图2是根据本发明第一实施方式的手的连通域图;
图3是根据本发明第一实施方式的掌心在手的连通域上的位置图;
图4是根据本发明第一实施方式的主轴直线在手的连通域上的位置图;
图5是根据本发明第一实施方式的手指和手腕的分割直线图;
图6是根据本发明第三实施方式的手指与手腕的区分装置结构示意图。
为使本发明部分实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请各权利要求所要求保护的技术方案。
本发明的第一实施方式涉及一种手指与手腕的区分方法,具体流程如图1所示。
在步骤101中,获取手部图像。具体地说,对原始图像进行分割,得到手的连通域(即手部图像),手部图像,包括手指、手腕和手臂。在本步骤中,预先获取皮肤像素和非皮肤像素的模型;遍历原始图像中的各像素点,将遍历得到的像素点与预先获取的皮肤像素模型和非皮肤像素模型进行匹
配;根据匹配结果分割得到皮肤区域和非皮肤区域;对皮肤区域进行连通域检测得到手部图像。通过将原始图像中的各像素点与预先获取的皮肤像素模型和非皮肤像素模型进行匹配,可以简单、精准的区分出皮肤区域和非皮肤区域,从而快速的获取手部图像。
比如说,将获取的手部图像转化到色彩模型HSV或者颜色空间YCrCb中,而后根据皮肤颜色取值范围来判断图像中的每一个像素属于皮肤还是非皮肤,对原始图像分割得到的前景即为手的连通域,如图2所示。
接着,进入步骤102,计算掌心的位置。掌心位置的确定可以通过轮廓的特征来定位,比如说,首先,遍历每个像素点,得到每个像素点到所有轮廓点的距离;然后,获取与轮廓距离最短的像素,得到所有像素到轮廓的最短距离;最后,在得到的最短距离中,将最大距离所对应的像素点,作为掌心。掌心在手的连通域上的位置如图3所示。
接着,进入步骤103,寻找前景区域主轴直线。
具体的说,寻找前景区域主轴直线的方法是,遍历手部图像的所有像素点,将得到的各像素点坐标保存至一矩阵中;采用最小二乘法将矩阵中的各元素拟合得到一条直线,拟合得到的直线即为主轴直线。在实际操作中可通过开源计算机视觉库Open Source Computer Vision Library(OpenCV)来实现对各元素的拟合,更具体的说,从OpenCV中调用函数cvFitLine,即可将矩阵中的各元素拟合得到主轴直线。cvFitLine的定义如下:
CVAPI(void)cvFitLine(const CvArr*points,int dist_type,double param,double reps,double aeps,float*line);
其中,points为前景像素坐标构成的矩阵,line用于返回的直线方程,dist_type为CV_DIST_L2,param为0,reps和aeps均为0.01。
由于cvFitLine返回的直线方程为直线的方向向量和直线上的一个点,需要转化为直线的一般式方程才可以使用,通过如下转化公式,得到主轴直线
的一般式参数:
A=v1
B=-v2
C=v1*y-v2*X
其中A、B和C是直线的一般式参数,(v1,v2)是直线的方向向量,(x,y)是直线上一点。得到的主轴直线在手的连通域上的位置,如图4所示。
接着,进入步骤104,计算得到手指和手腕所属区域的分割直线。通过计算经过手部图像的掌心位置且垂直于手部图像的主轴直线的直线即为分割直线。根据主轴方程和掌心坐标即可以得到垂直于主轴的直线方程,即手指和手腕所属区域的分割直线,计算公式如下所示:
A=B
Bv¨=-A
Cy=A*yv-B*xp
其中A、B和C主轴直线的直线方程参数,Av、Bv和Cv是分割直线的直线方程参数,(xp,yp)是掌心位置的坐标。
接着,进入步骤105,绘制分割直线,将前景区域分割成两部分。此处绘制的分割线颜色与背景相同,从而前景可以被分割为两部分。绘制分割直线时,计算得到分割直线与手部图像的交点。
根据以下公式获取分割直线与手部图像的交点坐标:
其中(x1,y1)和(x2,y2)分别是交点坐标,w是手部图像的宽。
根据获取的交点与分割直线,得到手部图像被分割直线分割而成的两个图像区域。在实际操作中可以利用OpenCV实现,具体的说,从OpenCV中调用函数cvLine,在图像中绘制分割直线,将图像分割为两部分。cvLine的定义如下所示:
CVAPI(void)cvLine(CvArr*img,CvPoint pt1,CvPoint pt2,
CvScalar color,int thickness CV_DEFAULT(1),
int line_type CV_DEFAULT(8),int shift CV_DEFAULT(0));
其中pt1和pt2是分割直线与手部图像的交点。
手指和手腕的分割直线的绘制结果,如图5所示。
接着,进入步骤106,根据前景区域的面积和周长的关系,确定手指和手腕各自所在的图像区域。在本实施方式中,根据面积与周长平方的关系,确定手指和手腕各自所在的图像区域。
具体地说,在得到绘制的分割直线后,手部图像被划分为两个区域,区域1和区域2,如图5所示。在本步骤中,计算区域1的周长平方与面积的比值T1,并计算区域1的周长平方与面积的比值T2,此处的计量单位为像素,一个像素的长度即为1,以像素为单位,采用周长平方与面积比值作为特征值,得到的特征值与长度单位无关,可以有效的避免因采用长度单位的不同对计算结果带来的影响。将两个图像区域各自的周长平方与面积的比值(即T1与T2),进行比较;将较大比值所对应的图像区域作为手指所在的图像区域,将较小比值所对应的图像区域作为手腕所在的图像区域。比如说,如果T1大于T2,则说明区域1为手指所在的图像区域,区域2为手腕所在的图像区域。
以在OpenCV中实现为例进行说明,首先,利用OpenCV的函数cvFindContours实现寻找连通域的功能,cvFindContours的定义如下:
int cvFindContours(CvArr*image,CvMemStorage*storage,CvSeq**
firstContour,int headerSize=sizeof(CvContour),int mode=CV_RETR_LIST,intmethod=CV_CHAIN_APPROX_SIMPLE,CvPoint offset=cvPoint(0,0))
其次,在检测得到连通域之后,可以分别调用OpenCV中的函数cvContourArea和cvArcLength计算得到轮廓的面积和周长,进而得到周长平方与面积的比值。
最后,通过比较周长平方和面积的比值,确定手指所在图像区域。较大者对应手指所在区域,较小者对应手腕所在区域。由于手指所在一侧连通域的周长平方与面积之比大于手腕所在一侧的值,因此,通过比较此特征值的大小,就可以确定手指所在的图像区域。从手指与手腕的特征来看,手指相对手腕更加修长,手腕相对手指更偏向圆形,且其各手指的轮廓周长之和大于手腕轮廓周长,而两者面积相差却不大,同等面积的图形中,圆的周长最小。因此,可利用手的连通域的周长和面积特征区分手指和手腕,有效的排除了手腕对手指指尖定位的干扰,可以简单、精准、快速获取手指图像区域。
需要说明的是,在本实施方式中,为了能更加精准的判断出手指与手掌,采用周长平方与面积的比值作为判断指标,由于采取了周长平方的算法,对手指和手腕的明显区别特征(轮廓周长)进行了放大,使得周长平方与面积的比值具有很明显的差异,从而能更快速、准确的得到手指所在的图像区域。但是,在实际应用中,也可以采用其他周长与面积的关系(如周长平方与面积的比值的任意数学变形),作为手指所在的图像区域的检测依据,在此不再赘述。
本发明的第二实施方式涉及一种手指与手腕的区分方法。第二实施方式在第一实施方式的基础上做了进一步改进,主要改进之处在于:获取分割直线与手部图像的交点的步骤中,包含:检测分割直线与水平线的夹角;
如果夹角小于45度,则根据以下公式获取分割直线与手部图像的交点坐标:
如果夹角大于或等于45度,则根据以下公式获取分割直线与手部图像的交点坐标:
其中,(x1,y1)和(x2,y2)分别是交点坐标,w和h分别是手部图像的宽和高。
通过检测分割直线与水平线的夹角,并判断该夹角与45度之间的关系,根据判断结果采用相应的公式进行计算,可以避免出现直线垂直或平行于水平线时,无法计算得到正确的交点的情况。在手部图像采集过程中,采集到的任何角度的手势均可以通过上述两种不同公式中的一个,获取分割直线与手部区域的交点,而不再限制手势只能是特定的角度时才能计算出交点坐标。
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包含相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。
本发明第三实施方式涉及一种手指与手腕的区分装置,如图6所示,包含:手部图像获取模块,用于获取手部图像,手部图像包含手指、手腕和手臂;分割直线获取模块,用于计算经过手部图像的掌心位置且垂直于手部图像的主轴直线的分割直线;检测模块,用于获取手部图像被分割直线分割而成的两个图像区域各自的面积与周长的关系;判定模块,用于根据面积与周长的关系,确定手指和手腕各自所在的图像区域。
进一步地,面积与周长的关系为周长平方与面积的比值;
判定模块包含:
比较子模块,用于将两个图像区域各自的周长平方与面积的比值,进行比较;
确定子模块,用于将较大比值所对应的图像区域作为手指所在的图像区域,将较小比值所对应的图像区域作为手腕所在的图像区域。
进一步地,分割直线获取模块包含:
第一计算子模块,用于计算手部图像的掌心位置和手部图像的主轴直线;
第二计算子模块,用于根据以下公式计算分割直线:
Ay=B
Bv¨=-A
Cv=A*yp-B*xp
其中,A、B和C为主轴直线的直线方程参数,Av、Bv和Cv为分割直线的直线方程参数,(xp,yp)为掌心位置的坐标。
不难发现,本实施方式为与第一实施方式相对应的系统实施例,本实施方式可与第一实施方式互相配合实施。第一实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第一实施方式中。
值得一提的是,本实施方式中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本发明的创新部分,本实施方式中并没有将与解决本发明所提出的技术问题关系不太密切的单元
引入,但这并不表明本实施方式中不存在其它的单元。
结合本文中所揭示的实施例而描述的方法或算法的步骤可直接体现于硬件中,由处理器执行的软件模块中或所述两者的组合中。软件模块可驻留在随机存取存储器(RAM)、快闪存储器、只读存储器(ROM)、可编程只读存储器(PROM),可擦除只读存储器(PROM)、可擦除可编程只读存储器(EPROM)、电可擦除可编程只读存储器(EEPROM)、寄存器、硬盘、可装卸式盘、压缩光盘只读存储器(CD-ROM)或此项技术中已知的任一其他形式的存储媒体。在替代方案中,存储媒体可与处理器成一体式。处理器及存储媒体可驻留在专用集成电路(ASIC)中。ASIC可驻留在计算装置或用户终端中,或者,处理器及存储媒体可作为离散组件驻留在计算装置或用户终端中。
本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。
Claims (11)
- 一种手指与手腕的区分方法,包含以下步骤:获取手部图像,所述手部图像包含手指、手腕和手臂;计算经过所述手部图像的掌心位置且垂直与所述手部图像的主轴直线的分割直线;获取所述手部图像被所述分割直线分割而成的两个图像区域各自的面积与周长的关系;根据所述面积与周长的关系,确定所述手指和手腕各自所在的图像区域。
- 根据权利要求1所述的手指与手腕的区分方法,其中,所述面积与周长的关系为周长平方与面积的比值;所述根据面积与周长平方的关系,确定所述手指和手腕各自所在的图像区域的步骤中,包含以下子步骤:将所述两个图像区域各自的周长平方与面积的比值,进行比较;将较大比值所对应的图像区域作为所述手指所在的图像区域,将较小比值所对应的图像区域作为所述手腕所在的图像区域。
- 根据权利要求1或2所述的手指与手腕的区分方法,其中,所述计算经过所述手部图像的掌心位置且垂直于所述手部图像的主轴直线的分割直线的步骤中,包含以下子步骤:计算所述手部图像的掌心位置和所述手部图像的主轴直线;根据以下公式计算所述分割直线:Av=BBv=-ACv=A*yp-B*xp其中,所述A、B和C为所述主轴直线的直线方程参数,Av、Bv和Cv为所述分割直线的直线方程参数,(xp,yp)为所述掌心位置的坐标。
- 根据权利要求1,2或3所述的手指与手腕的区分方法,其中,获取所述手部图像被所述分割直线分割而成的两个图像区域各自的面积与周长平方的关系的步骤中,包含以下子步骤:获取所述分割直线与所述手部图像的交点;根据所述获取的交点与所述分割直线,得到所述手部图像被所述分割直线分割而成的两个图像区域。
- 根据权利要求3所述的手指与手腕的区分方法,其中,计算所述手部图像的主轴直线的步骤中,包含以下子步骤;遍历所述手部图像的所有像素点,将得到的各像素点的坐标保存至一矩阵中;采用最小二乘法将所述矩阵中的各元素拟合得到一条直线;将所述拟合得到的直线作为所述主轴直线。
- 根据权利要求1至6任一项所述的手指与手腕的区分方法,其中,所述获取手部图像的步骤中,包含以下子步骤:预先获取皮肤像素和非皮肤像素的模型;遍历原始图像中的各像素点,将遍历得到的像素点与预先获取的皮肤像素模型和非皮肤像素模型进行匹配;根据匹配结果分割得到皮肤区域和非皮肤区域;对皮肤区域进行连通域检测得到所述手部图像。
- 一种手指与手腕的区分装置,包含:手部图像获取模块,用于获取手部图像,所述手部图像包含手指、手腕和手臂;分割直线获取模块,用于计算经过所述手部图像的掌心位置且垂直于所述手部图像的主轴直线的分割直线;检测模块,用于获取所述手部图像被所述分割直线分割而成的两个图像区域各自的面积与周长的关系;判定模块,用于根据所述面积与周长的关系,确定所述手指和手腕各自所在的图像区域。
- 根据权利要求8所述的手指与手腕的区分装置,其中,所述面积与周长的关系为周长平方与面积的比值;所述判定模块包含:比较子模块,用于将所述两个图像区域各自的周长平方与面积的比值,进行比较;确定子模块,用于将较大比值所对应的图像区域作为所述手指所在的图像区域,将较小比值所对应的图像区域作为所述手腕所在的图像区域。
- 根据权利要求8或9所述的手指与手腕的区分装置,其中,所述分割直线获取模块包含:第一计算子模块,用于计算所述手部图像的掌心位置和所述手部图像的主轴直线;第二计算子模块,用于根据以下公式计算所述分割直线:Av=BBv=-ACv=A*yp-B*xp其中,所述A、B和C为所述主轴直线的直线方程参数,Av、Bv和Cv为所述分割直线的直线方程参数,(xp,yp)为所述掌心位置的坐标。
- 一种计算机可读存储介质,包括计算机可执行指令,所述计算机可执行指令在由至少一个处理器执行时致使所述处理器执行如权利要求1至7任一项所述的方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/241,353 US20170185831A1 (en) | 2015-12-27 | 2016-08-19 | Method and device for distinguishing finger and wrist |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201511007486.2A CN105893929A (zh) | 2015-12-27 | 2015-12-27 | 手指与手腕的区分方法及其装置 |
| CN201511007486.2 | 2015-12-27 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/241,353 Continuation US20170185831A1 (en) | 2015-12-27 | 2016-08-19 | Method and device for distinguishing finger and wrist |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017113736A1 true WO2017113736A1 (zh) | 2017-07-06 |
Family
ID=57002573
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/089576 Ceased WO2017113736A1 (zh) | 2015-12-27 | 2016-07-10 | 手指与手腕的区分方法及其装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105893929A (zh) |
| WO (1) | WO2017113736A1 (zh) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111222379A (zh) * | 2018-11-27 | 2020-06-02 | 株式会社日立制作所 | 一种手部检测方法及装置 |
| CN113343934A (zh) * | 2021-07-14 | 2021-09-03 | 华东理工大学 | 一种基于局部图像差异分析的手部饰品检测方法 |
| CN113393483A (zh) * | 2021-07-14 | 2021-09-14 | 华东理工大学 | 一种基于分割定位的手指甲异物检测方法 |
| CN114792431A (zh) * | 2022-06-22 | 2022-07-26 | 北京圣点云信息技术有限公司 | 一种静脉图像识别方法 |
| CN115393891A (zh) * | 2022-07-18 | 2022-11-25 | 张淼 | 短指畸形识别方法、装置、计算机设备和存储介质 |
| CN115471874A (zh) * | 2022-10-28 | 2022-12-13 | 山东新众通信息科技有限公司 | 基于监控视频的施工现场危险行为识别方法 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10586335B2 (en) * | 2017-08-28 | 2020-03-10 | Intel Corporation | Hand segmentation in a 3-dimensional image |
| CN108647597B (zh) | 2018-04-27 | 2021-02-02 | 京东方科技集团股份有限公司 | 一种手腕识别方法、手势识别方法、装置和电子设备 |
| CN113128324B (zh) * | 2020-01-16 | 2023-05-02 | 舜宇光学(浙江)研究院有限公司 | 基于深度数据的手势分割方法及其系统和电子设备 |
| CN113609917B (zh) * | 2021-07-12 | 2022-09-27 | 深圳市鸿合创新信息技术有限责任公司 | 人手位置信息确定方法及相关设备 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101211341A (zh) * | 2006-12-29 | 2008-07-02 | 上海芯盛电子科技有限公司 | 图像智能模式识别搜索方法 |
| CN103294996A (zh) * | 2013-05-09 | 2013-09-11 | 电子科技大学 | 一种3d手势识别方法 |
| CN103971102A (zh) * | 2014-05-21 | 2014-08-06 | 南京大学 | 基于手指轮廓和决策树的静态手势识别方法 |
| US20140253429A1 (en) * | 2013-03-08 | 2014-09-11 | Fastvdo Llc | Visual language for human computer interfaces |
| CN104063059A (zh) * | 2014-07-13 | 2014-09-24 | 华东理工大学 | 一种基于手指分割的实时手势识别方法 |
| CN104699238A (zh) * | 2013-12-10 | 2015-06-10 | 现代自动车株式会社 | 用于识别用户的手势以执行车辆的操作的系统和方法 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8971572B1 (en) * | 2011-08-12 | 2015-03-03 | The Research Foundation For The State University Of New York | Hand pointing estimation for human computer interaction |
| CN103679145A (zh) * | 2013-12-06 | 2014-03-26 | 河海大学 | 一种手势自动识别方法 |
-
2015
- 2015-12-27 CN CN201511007486.2A patent/CN105893929A/zh active Pending
-
2016
- 2016-07-10 WO PCT/CN2016/089576 patent/WO2017113736A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101211341A (zh) * | 2006-12-29 | 2008-07-02 | 上海芯盛电子科技有限公司 | 图像智能模式识别搜索方法 |
| US20140253429A1 (en) * | 2013-03-08 | 2014-09-11 | Fastvdo Llc | Visual language for human computer interfaces |
| CN103294996A (zh) * | 2013-05-09 | 2013-09-11 | 电子科技大学 | 一种3d手势识别方法 |
| CN104699238A (zh) * | 2013-12-10 | 2015-06-10 | 现代自动车株式会社 | 用于识别用户的手势以执行车辆的操作的系统和方法 |
| CN103971102A (zh) * | 2014-05-21 | 2014-08-06 | 南京大学 | 基于手指轮廓和决策树的静态手势识别方法 |
| CN104063059A (zh) * | 2014-07-13 | 2014-09-24 | 华东理工大学 | 一种基于手指分割的实时手势识别方法 |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111222379A (zh) * | 2018-11-27 | 2020-06-02 | 株式会社日立制作所 | 一种手部检测方法及装置 |
| CN113343934A (zh) * | 2021-07-14 | 2021-09-03 | 华东理工大学 | 一种基于局部图像差异分析的手部饰品检测方法 |
| CN113393483A (zh) * | 2021-07-14 | 2021-09-14 | 华东理工大学 | 一种基于分割定位的手指甲异物检测方法 |
| CN114792431A (zh) * | 2022-06-22 | 2022-07-26 | 北京圣点云信息技术有限公司 | 一种静脉图像识别方法 |
| CN115393891A (zh) * | 2022-07-18 | 2022-11-25 | 张淼 | 短指畸形识别方法、装置、计算机设备和存储介质 |
| CN115471874A (zh) * | 2022-10-28 | 2022-12-13 | 山东新众通信息科技有限公司 | 基于监控视频的施工现场危险行为识别方法 |
| CN115471874B (zh) * | 2022-10-28 | 2023-02-07 | 山东新众通信息科技有限公司 | 基于监控视频的施工现场危险行为识别方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105893929A (zh) | 2016-08-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017113736A1 (zh) | 手指与手腕的区分方法及其装置 | |
| Yao et al. | Curvature aided Hough transform for circle detection | |
| JP6494776B2 (ja) | 線間距離計算方法、線間距離計算装置、コンピュータプログラム、及びコンピュータ読み取り可能な記憶媒体 | |
| Tian et al. | Fast algorithm and application of hough transform in iris segmentation | |
| US9558455B2 (en) | Touch classification | |
| CN111062239A (zh) | 人体目标检测方法、装置、计算机设备及存储介质 | |
| CN104978012B (zh) | 一种指向交互方法、装置及系统 | |
| CN109426789B (zh) | 手和图像检测方法和系统、手分割方法、存储介质和设备 | |
| WO2017041488A1 (zh) | 指纹纹线点的识别方法及装置 | |
| CN106340010B (zh) | 一种基于二阶轮廓差分的角点检测方法 | |
| CN108647597A (zh) | 一种手腕识别方法、手势识别方法、装置和电子设备 | |
| CN109375833B (zh) | 一种触控指令的生成方法及设备 | |
| JP2024109741A (ja) | 非接触指紋画像のスラップセグメンテーション | |
| Hagara et al. | Fingertip detection for virtual keyboard based on camera | |
| CN105718918B (zh) | 基于视频的空中签名认证方法 | |
| Augustauskas et al. | Robust hand detection using arm segmentation from depth data and static palm gesture recognition | |
| CN116258843B (zh) | 一种红外弱小目标的检测方法、装置、计算机设备和介质 | |
| CN109934858A (zh) | 图像配准方法及装置 | |
| CN106204542A (zh) | 视觉识别方法及系统 | |
| CN108205641B (zh) | 手势图像处理方法及装置 | |
| CN103886291B (zh) | 基于动态模板的掌纹图像褶皱检测方法 | |
| CN106340040A (zh) | 跟踪指部轮廓的方法及其装置 | |
| CN101408935A (zh) | 基于捕捉有效域的快速指纹特征提取方法 | |
| Wang et al. | Clump splitting via bottleneck detection | |
| Prasertsakul et al. | A fingertip detection method based on the top-hat transform |
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: 16880534 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16880534 Country of ref document: EP Kind code of ref document: A1 |