CN110705468B - Eye movement range identification method and system based on image analysis - Google Patents

Eye movement range identification method and system based on image analysis Download PDF

Info

Publication number
CN110705468B
CN110705468B CN201910940365.5A CN201910940365A CN110705468B CN 110705468 B CN110705468 B CN 110705468B CN 201910940365 A CN201910940365 A CN 201910940365A CN 110705468 B CN110705468 B CN 110705468B
Authority
CN
China
Prior art keywords
eye
image
point
iris
contour
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.)
Expired - Fee Related
Application number
CN201910940365.5A
Other languages
Chinese (zh)
Other versions
CN110705468A (en
Inventor
何凌
付佳
何飞
李智倩
沈胤宏
徐严明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan University
Original Assignee
Sichuan University
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 Sichuan University filed Critical Sichuan University
Priority to CN201910940365.5A priority Critical patent/CN110705468B/en
Publication of CN110705468A publication Critical patent/CN110705468A/en
Application granted granted Critical
Publication of CN110705468B publication Critical patent/CN110705468B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/18Eye characteristics, e.g. of the iris
    • G06V40/19Sensors therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/18Eye characteristics, e.g. of the iris
    • G06V40/193Preprocessing; Feature extraction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Ophthalmology & Optometry (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an eye movement range identification method and system based on image analysis and processing, and relates to the field of image analysis and processing. The method comprises the following steps: carrying out primary positioning on a human eye image on an acquired video frame, preprocessing the human eye image, removing illumination influence, and determining an eye crack outline and an eye crack central point on the human eye image after illumination correction; further determining the iris outline and the iris center in the human eye image; the eye movement Range is determined based on the determined Iris Center point Center _ Iris and eye crack Center point Center _ eye. The eye movement range identification method and system based on image analysis can automatically analyze and detect based on the collected human eye movement video frames, and extract effective eyeball movement range characteristics by using an image processing method.

Description

基于图像分析的眼动范围识别方法和系统Eye movement range recognition method and system based on image analysis

技术领域technical field

本发明涉及图像分析和处理领域,尤其是一种基于图像分析的眼动范围识别方法和系统。The invention relates to the field of image analysis and processing, in particular to an eye movement range recognition method and system based on image analysis.

背景技术Background technique

在临床上医生对于某些症状或疾病的判断需要在一些行为指标或参数的基础上结合其他诊断理论和临床经验来给出结论。例如对于第二大常见的神经退行性疾病帕金森病 (Parkinson’s disease,PD),临床上发现,PD患者的眼动范围远远小于正常人,因此临床上医生可以结合眼动范围等患者行为参数和临床经验来进行判断。对于眼动范围的检测目前主要是利用眼动仪来实现人眼视线跟踪。然而,现有的眼动仪价格十分昂贵,且难以对大量数据进行存储和分析;其次在实验过程中,受试者的自由也会受到限制。此外,由于视线跟踪技术还没有完全成熟和眼动本身的特点,造成实验过程中数据可能会中断,存在许多干扰信号等问题,最终导致视线跟踪的准确度降低。如果能不需要借助眼动仪而通过对人眼眼动范围进行分析,那么将大大降低眼动分析的成本,并提高分析的准确率。In clinic, the doctor's judgment of certain symptoms or diseases needs to be based on some behavioral indicators or parameters combined with other diagnostic theories and clinical experience to draw conclusions. For example, for Parkinson's disease (PD), the second most common neurodegenerative disease, it is clinically found that the eye movement range of PD patients is much smaller than that of normal people, so clinicians can combine the eye movement range and other patient behavior parameters and clinical experience. For the detection of eye movement range, eye tracking is mainly realized by eye tracker. However, the existing eye trackers are very expensive, and it is difficult to store and analyze a large amount of data; secondly, during the experiment, the freedom of the subjects is also limited. In addition, due to the fact that the gaze tracking technology is not yet fully mature and the characteristics of eye movement itself, the data may be interrupted during the experiment, and there are many problems such as interference signals, which eventually lead to the reduction of the accuracy of the gaze tracking. If the human eye movement range can be analyzed without using an eye tracker, the cost of eye movement analysis will be greatly reduced and the analysis accuracy will be improved.

发明内容SUMMARY OF THE INVENTION

本发明针对现有技术存在的上述技术问题,提供一种基于图像分析的眼动范围识别方法和系统,通过利用数字信号处理技术,对采集的人眼活动的视频帧进行分析,提取人眼的虹膜中心和眼裂中心,计算二者之间的相对距离,进而实现人眼运动范围的分析和评估。Aiming at the above technical problems existing in the prior art, the present invention provides an eye movement range recognition method and system based on image analysis. Calculate the relative distance between the center of the iris and the center of the eye split, thereby realizing the analysis and evaluation of the range of motion of the human eye.

本发明采用的技术方案如下:The technical scheme adopted in the present invention is as follows:

一种基于图像分析的眼动范围识别方法,包括如下步骤:An eye movement range recognition method based on image analysis, comprising the following steps:

(1)对采集的视频帧I_frame进行人眼图像初定位,即对包含人眼的所有采集图像进行人眼范围的初步定位,得到初步定位后的人眼图像I_eye;(1) carry out the initial positioning of the human eye image to the collected video frame I_frame, that is, carry out the preliminary positioning of the human eye range to all the collected images including the human eye, and obtain the human eye image I_eye after the preliminary positioning;

(2)对人眼图像I_eye进行预处理,并去除光照影响,得到光照矫正后的人眼图像I_eye_color;(2) preprocess the human eye image I_eye, and remove the influence of illumination to obtain the human eye image I_eye_color after illumination correction;

(3)对光照矫正后的人眼图像I_eye_color确定眼裂轮廓Contour_eye以及眼裂中心点Center_eye;(3) determine the contour of the eye cleft Contour_eye and the center point of the eye cleft Center_eye to the human eye image I_eye_color after illumination correction;

(4)进一步确定光照矫正后的人眼图像I_eye_color中的虹膜轮廓Contour_Iris以及虹膜中心Center_Iris;(4) further determine the iris contour Contour_Iris and the iris center Center_Iris in the human eye image I_eye_color after illumination correction;

(5)基于确定的虹膜中心点Center_Iris和眼裂中心点Center_eye确定眼动范围Range。(5) Determine the eye movement range Range based on the determined iris center point Center_Iris and the eye split center point Center_eye.

进一步的,所述步骤(1)具体包括:Further, the step (1) specifically includes:

(1.1)对第一帧视频帧进行人眼图像初定位:(1.1) Initial positioning of the human eye image for the first video frame:

设定第一帧视频帧为I_frame(1),对I_frame(1)进行初步定位包括利用深度学习的训练模型对人脸进行标定,从标定的特征点中寻找人眼眼裂所在的位置,利用矩形拟合人眼的标定点,从而确定包含人眼初定位的人眼图像I_eye(1);The first video frame is set as I_frame(1), and the initial positioning of I_frame(1) includes calibrating the face with the training model of deep learning, and finding the position of the human eye crack from the calibrated feature points, using The rectangle fits the calibration point of the human eye, thereby determining the human eye image I_eye(1) containing the initial positioning of the human eye;

(1.2)对其余的视频帧进行人眼图像的初定位:(1.2) Perform the initial positioning of the human eye image for the remaining video frames:

(1.2.1)确定当前视频帧的人眼活动范围Range_eye;(1.2.1) Determine the range_eye of the human eye activity range of the current video frame;

假设当前视频帧为第n帧,该图像帧记为I_frame(n),利用前一帧初定位后的人眼图像I_eye(n-1)确定当前帧的人眼活动范围Range_eye;Assuming that the current video frame is the nth frame, the image frame is denoted as I_frame(n), and the human eye activity range Range_eye of the current frame is determined by using the human eye image I_eye(n-1) after the initial positioning of the previous frame;

该活动范围Range_eye的左右边界点的横坐标为Range_left_x和Range_right_x,上下边界点的纵坐标为Range_top_y,Range_bottom_y,分别为:The horizontal coordinates of the left and right boundary points of the range_eye are Range_left_x and Range_right_x, and the vertical coordinates of the upper and lower boundary points are Range_top_y and Range_bottom_y, respectively:

Range_left_x=eye_left_x-WRange_left_x=eye_left_x-W

Range_right_x=eye_right_x+WRange_right_x=eye_right_x+W

Range_top_y=eye_top_y-HRange_top_y=eye_top_y-H

Range_bottom_y=eye_bottom_y+H;Range_bottom_y=eye_bottom_y+H;

其中,W和H分别为人眼图像I_eye(n-1)的宽度和高度;Among them, W and H are the width and height of the human eye image I_eye(n-1) respectively;

(1.2.2)基于当前视频帧的人眼活动范围Range_eye对当前视频帧进行人眼初步定位,并依次完成对所有视频帧的人眼初步定位;(1.2.2) Preliminary eye positioning is performed on the current video frame based on the range_eye of the human eye movement range of the current video frame, and the preliminary human eye positioning for all video frames is completed in turn;

利用滑动窗口法将人眼活动范围Range_eye分成多个窗口Window,窗口大小为W×H,设定水平方向的步长为Step_len_x,竖直方向的步长为Step_len_y,则第一个窗口的左上角顶点对应当前帧人眼活动范围Range_eye的左上角顶点;Use the sliding window method to divide the range_eye of the human eye into multiple windows. The vertex corresponds to the upper left vertex of the range_eye of the current frame of the human eye;

将每一个窗口Window与前一帧人眼图像I_eye(n-1)计算相似性,寻找其中相似性最高的窗口Window,并将该相似性最高的窗口Window作为当前帧的人眼图像I_eye(n)。Calculate the similarity between each window Window and the human eye image I_eye(n-1) of the previous frame, find the window Window with the highest similarity, and use the window Window with the highest similarity as the human eye image I_eye(n-1) of the current frame. ).

进一步的,所述步骤(2)对人眼图像进行预处理的具体方法为:对于初定位后的人眼图像I_eye使用具有色彩恢复的多尺度Retinex算法对提取的人眼图像I_eye消除光照不均匀产生的影响,得到预处理后的图像I_eye_color。Further, the specific method for preprocessing the human eye image in the step (2) is: for the human eye image I_eye after the initial positioning, the multi-scale Retinex algorithm with color recovery is used to eliminate the uneven illumination of the extracted human eye image I_eye. The resulting effect, the preprocessed image I_eye_color is obtained.

进一步的,所述步骤(3)对光照矫正后的人眼图像I_eye_color确定眼裂轮廓Contour_eye以及眼裂中心点Center_eye具体包括:Further, the step (3) determines the contour of the eye split Contour_eye and the center point of the eye split Center_eye to the human eye image I_eye_color after the illumination correction specifically includes:

(3.1)获取光照矫正后的人眼图像I_eye_color对应的Scharr梯度分量图像:(3.1) Obtain the Scharr gradient component image corresponding to the human eye image I_eye_color after illumination correction:

(3.1.1)在RGB空间提取图像I_eye_color的Scharr梯度;(3.1.1) Extract the Scharr gradient of the image I_eye_color in the RGB space;

首先,利用Scharr算子计算图像I_eye_color的梯度,所述Scharr算子包括水平方向的Scharr算子Gx和竖直方向的Scharr算子Gy;First, use the Scharr operator to calculate the gradient of the image I_eye_color, and the Scharr operator includes the Scharr operator Gx in the horizontal direction and the Scharr operator Gy in the vertical direction;

若光照矫正后的人眼图像I_eye_color的第(i,j)个像素点在水平方向的梯度值为 Gx(i,j),在竖直方向的梯度值为Gy(i,j),则该像素点(i,j)处总的梯度值G(i,j)为:If the gradient value of the (i,j)th pixel of the human eye image I_eye_color after illumination correction is Gx(i,j) in the horizontal direction and Gy(i,j) in the vertical direction, then the The total gradient value G(i,j) at the pixel point (i,j) is:

Figure BDA0002222698150000031
Figure BDA0002222698150000031

(3.1.2)将初步提取的Scharr梯度图像I_Scharr转换到HSV空间,并提取对应的V分量,得到对应的分量图像I_ScharrV;(3.1.2) Convert the initially extracted Scharr gradient image I_Scharr to HSV space, and extract the corresponding V component to obtain the corresponding component image I_ScharrV;

(3.2)利用边缘检测算法对人眼图像I_eye_color进行边缘检测,得到对应的梯度图像I_HED;(3.2) Use the edge detection algorithm to perform edge detection on the human eye image I_eye_color to obtain the corresponding gradient image I_HED;

(3.3)基于梯度分量图像I_ScharrV和梯度图像I_HED,确定眼裂轮廓Contour_eye的位置;(3.3) Determine the position of the eye cleft contour Contour_eye based on the gradient component image I_ScharrV and the gradient image I_HED;

进一步的,所述步骤(3.3)中确定眼裂轮廓Contour_eye的位置的具体包括:Further, in the described step (3.3), determining the position of the eye split contour Contour_eye specifically includes:

(3.3.1)将梯度分量图像I_ScharrV和梯度图像I_HED相结合,用于提取对应的二值图像;(3.3.1) The gradient component image I_ScharrV and the gradient image I_HED are combined to extract the corresponding binary image;

设梯度分量图像I_ScharrV中所有像素点的像素值的最大值为V_Vmax,将阈值设置为 V_Vmax/4时得到的二值化图像I_binary1为:Let the maximum value of the pixel values of all pixels in the gradient component image I_ScharrV be V_Vmax, and the binarized image I_binary1 obtained when the threshold is set to V_Vmax/4 is:

Figure BDA0002222698150000032
Figure BDA0002222698150000032

设梯度图像I_HED中所有像素点的像素值的最大值为V_HEDmax,将阈值设置为 V_HEDmax/3时得到的二值化图像I_binary2为:Let the maximum value of the pixel values of all pixels in the gradient image I_HED be V_HEDmax, and the binarized image I_binary2 obtained when the threshold is set to V_HEDmax/3 is:

Figure BDA0002222698150000033
Figure BDA0002222698150000033

将二值化图像I_binary1和二值化图像I_binary2相与,取二者的交集得到处理后的二值图像I_binary,即:Add the binarized image I_binary1 and the binarized image I_binary2, and take the intersection of the two to obtain the processed binary image I_binary, that is:

I_binary(i,j)=I_binary1(i,j)&I_binary2(i,j);I_binary(i,j)=I_binary1(i,j)&I_binary2(i,j);

其中,I_binary(i,j)、I_binary1(i,j)和I_binary2(i,j)分别表示二值图像I_binary、 I_binary1和I_binary2中的第(i,j)个像素点的像素值;Wherein, I_binary(i,j), I_binary1(i,j) and I_binary2(i,j) represent the pixel value of the (i,j)th pixel in the binary images I_binary, I_binary1 and I_binary2 respectively;

(3.3.2)对提取的二值图像I_binary进行形态学处理;(3.3.2) Morphological processing is performed on the extracted binary image I_binary;

先对二值图像I_binary进行膨胀运算,得到I_dilate,再进行腐蚀运算得到图像I_closing,所述闭运算的计算公式如下所示:First perform the dilation operation on the binary image I_binary to obtain I_dilate, and then perform the erosion operation to obtain the image I_closing. The calculation formula of the closing operation is as follows:

Figure BDA0002222698150000041
Figure BDA0002222698150000041

Figure BDA0002222698150000042
Figure BDA0002222698150000042

其中,A为2*2的方形结构元,I_dilatec为I_dilate的补集;Among them, A is a square structure element of 2*2, and I_dilate c is the complement of I_dilate;

(3.3.3)进一步移除图像中多余的小物体,并提取图像中的最大连通域;(3.3.3) Further remove the redundant small objects in the image, and extract the largest connected domain in the image;

对于闭运算后得到图像I_closing利用形态学中移除小目标的方法去除图像I_closing 中小的噪点,得到对应的图像I_morphological,并进一步对图像I_morphological提取最大连通域作为对应的眼裂轮廓Contour_eye。For the image I_closing obtained after the closing operation, the method of removing small objects in morphology is used to remove the small noise in the image I_closing to obtain the corresponding image I_morphological, and further extract the maximum connected domain from the image I_morphological as the corresponding eye cleft contour Contour_eye.

进一步的,所述步骤(3.3.3)中提取图像中最大连通域的具体步骤如下:Further, the specific steps of extracting the largest connected domain in the image in the step (3.3.3) are as follows:

3.3.3.1)首先,提取图像I_morphological中的所有轮廓,记作C_mor_set,即:3.3.3.1) First, extract all contours in the image I_morphological, denoted as C_mor_set, namely:

C_mor_set={C_mor1,C_mor2,…,C_mork1,…,C_morn1}C_mor_set={C_mor 1 , C_mor 2 , ..., C_mor k1 , ..., C_mor n1 }

其中,C_mork1(1≤k1≤n1)表示第k1个轮廓,n1为图像I_morphological中的轮廓总数;Among them, C_mor k1 (1≤k1≤n1) represents the k1th contour, and n1 is the total number of contours in the image I_morphological;

3.3.3.2)接着,计算每一个轮廓的面积,得到面积集Area_set,即:3.3.3.2) Next, calculate the area of each contour to obtain the area set Area_set, namely:

Area_set={Area1,Area2,…,Areak1,…,Arean1}Area_set={Area 1 , Area 2 , ..., Area k1 , ..., Area n1 }

其中,Areak1表示第k1个轮廓的面积;Among them, Area k1 represents the area of the k1th contour;

3.3.3.3)移除面积小于300的连通域,得到对应的图像I_RemoveSmallObjects;3.3.3.3) Remove the connected domain whose area is less than 300 to obtain the corresponding image I_RemoveSmallObjects;

3.3.3.4)寻找图像I_RemoveSmallObjects中面积最大的轮廓C_mormax,该轮廓C_mormax即为对应的眼裂轮廓Contour_eye。3.3.3.4) Find the contour C_mormax with the largest area in the image I_RemoveSmallObjects, and the contour C_mormax is the corresponding eye cleft contour Contour_eye.

进一步的,所述步骤(3.4)确定眼裂轮廓Contour_eye的中心点Center_eye的具体步骤包括:Further, the concrete steps of determining the center point Center_eye of the eye split contour Contour_eye in the step (3.4) include:

对于眼裂轮廓Contour_eye,寻找轮廓的左右边界点,分别为Point_left和Point_right,即:For the eye cleft contour Contour_eye, find the left and right boundary points of the contour, which are Point_left and Point_right respectively, namely:

Point_left_x=min(Contour_eye_x)Point_left_x=min(Contour_eye_x)

Point_right_x=max(Contour_eye_x)Point_right_x=max(Contour_eye_x)

其中,Point_left_x和Point_right_x表示Point_left和Point_right的横坐标,Contour_eye_x表示组成眼裂轮廓的点的横坐标;Among them, Point_left_x and Point_right_x represent the abscissas of Point_left and Point_right, and Contour_eye_x represent the abscissas of the points that make up the contour of the eye cleft;

利用左右边界点Point_left和Point_right的横坐标Point_left_x和Point_right_x,在眼裂轮廓Contour_eye中寻找其对应的纵坐标Point_left_y和Point_right_y;Using the abscissas Point_left_x and Point_right_x of the left and right boundary points Point_left and Point_right, find the corresponding ordinates Point_left_y and Point_right_y in the eye cleft contour Contour_eye;

将左右边界点Point_left和Point_right的横坐标Point_left_x和Point_right_x的均值作为眼裂中心点Center_eye的横坐标值Center_eye_x,将Point_left和Point_right 的纵坐标Point_left_y和Point_right_y的均值作为眼裂中心Center_eye的纵坐标值 Center_eye_y,得到眼裂中心点Center_eye的像素坐标(Center_eye_x,Center_eye_y),即:Take the mean value of the abscissas Point_left_x and Point_right_x of the left and right boundary points Point_left and Point_right as the abscissa value Center_eye_x of the center point Center_eye of the eye cleft, and take the mean value of the ordinates Point_left_y and Point_right_y of Point_left and Point_right as the ordinate value Center_eye_y of the eye cleft center Center_eye, Obtain the pixel coordinates (Center_eye_x, Center_eye_y) of the center point of the eye split Center_eye, namely:

Center_eye_x=(Point_left_x+Point_right_x)/2Center_eye_x=(Point_left_x+Point_right_x)/2

Center_eye_y=(Point_left_y+Point_right_y)/2。Center_eye_y=(Point_left_y+Point_right_y)/2.

进一步的,所述步骤(4)确定图像中的虹膜轮廓Contour_Iris以及虹膜中心Center_Iris的具体步骤包括:Further, the concrete steps of determining the iris contour Contour_Iris in the image and the iris center Center_Iris in the step (4) include:

(4.1)图像二值化(4.1) Image binarization

利用Otsu阈值法对梯度图像I_ScharrV计算Otsu阈值Otsu_thresh,利用阈值Otsu_thresh对梯度图像I_Scharr进行二值化处理,得到对应的二值图像I_binary3:Use the Otsu threshold method to calculate the Otsu threshold Otsu_thresh for the gradient image I_ScharrV, and use the threshold Otsu_thresh to binarize the gradient image I_Scharr to obtain the corresponding binary image I_binary3:

Figure BDA0002222698150000051
Figure BDA0002222698150000051

(4.2)形态学腐蚀处理(4.2) Morphological corrosion treatment

利用3*3的方形结构元B对图像I_binary3进行形态学上的腐蚀操作,去除虹膜边缘的毛刺,断开与噪声点之间的连接,得到对应的图像I_erosion:Use the 3*3 square structure element B to perform morphological corrosion on the image I_binary3, remove the burrs on the edge of the iris, disconnect the connection with the noise points, and obtain the corresponding image I_erosion:

Figure BDA0002222698150000052
Figure BDA0002222698150000052

(4.3)孔洞填充,并寻找最大连通域(4.3) Hole filling and finding the largest connected domain

对图像I_erosion的虹膜轮廓中存在由于视频录制中灯光造成的孔洞,利用形态学上的孔洞填充法对孔洞进行填充,得到对应的图像I_holefilled;并进一步提取图像 I_holefilled中的所有连通域,将面积最大的连通域作为虹膜所在处;There are holes in the iris contour of the image I_erosion caused by the lights in the video recording, and the holes are filled by the morphological hole filling method to obtain the corresponding image I_holefilled; and further extract all the connected domains in the image I_holefilled, and the area is the largest. The connected domain of is where the iris is located;

(4.4)在虹膜轮廓Contour_Iris中确定对应的虹膜中心点Center_Iris:(4.4) Determine the corresponding iris center point Center_Iris in the iris contour Contour_Iris:

利用虹膜轮廓Contour_Iris计算其质心,该质心点即为虹膜的中心点(Center_Iris_x, Center_Iris_y),所述质心计算公式如下:The iris contour Contour_Iris is used to calculate its centroid, and the centroid point is the center point of the iris (Center_Iris_x, Center_Iris_y). The centroid calculation formula is as follows:

Figure BDA0002222698150000053
Figure BDA0002222698150000053

其中,px(k)和py(k)(1≤k≤m)分别表示虹膜轮廓Contour_Iris上第k个点的横坐标和纵坐标,Contour_Iris(i,j)表示第(i,j)个像素点的像素值。Among them, px(k) and py(k) (1≤k≤m) represent the abscissa and ordinate of the kth point on the iris contour Contour_Iris, respectively, and Contour_Iris(i,j) represents the (i,j)th pixel The pixel value of the point.

进一步的,所述步骤(4.3)中寻找最大连通域的具体步骤包括:Further, the specific steps of finding the largest connected domain in the step (4.3) include:

(4.3.1)首先,提取图像I_holefilled中的所有轮廓,形成轮廓集C_hole_set,即:(4.3.1) First, extract all the contours in the image I_holefilled to form the contour set C_hole_set, namely:

C_hole_set={C_hole1,C_hole2,…,C_holek2,…,C_holen2}C_hole_set={C_hole 1 , C_hole 2 , ..., C_hole k2 , ..., C_hole n2 }

其中,C_holek2(1≤k2≤n2)表示第k2个轮廓,n2为图像I_holefilled中的轮廓总数;Among them, C_hole k2 (1≤k2≤n2) represents the k2th contour, and n2 is the total number of contours in the image I_holefilled;

(4.3.2)接着,计算每一个轮廓的面积,得到面积集Area_set1,即:(4.3.2) Next, calculate the area of each contour to obtain the area set Area_set1, namely:

Area_set1={Area1,Area2,…,Areak2,…,Arean2}Area_set1={Area 1 , Area 2 , ..., Area k2 , ..., Area n2 }

其中,Areak2(1≤k2≤n2)表示第k2个轮廓的面积;Among them, Area k2 (1≤k2≤n2) represents the area of the k2th contour;

(4.3.3)寻找其中面积最大的轮廓C_holemax,该轮廓即为对应的虹膜轮廓Contour_Iris。(4.3.3) Find the contour C_holemax with the largest area, which is the corresponding iris contour Contour_Iris.

进一步的,所述步骤(5)中基于确定的虹膜中心点Center_Iris和眼裂中心点Center_eye确定眼动范围Range的具体步骤包括:Further, the specific steps of determining the eye movement range Range based on the determined iris center point Center_Iris and the eye split center point Center_eye in the step (5) include:

将每一帧图像中的眼裂中心点Center_eye和虹膜中心点Center_Iris定位并确定后,计算虹膜的运动幅度Mag,其中运动幅度Mag在x方向和y方向的位置值分别为Mag_x和Mag_y:After locating and determining the center point Center_eye of the eye split and the center point Center_Iris of the iris in each frame of image, the motion amplitude Mag of the iris is calculated, where the position values of the motion amplitude Mag in the x-direction and y-direction are Mag_x and Mag_y respectively:

Mag_x=Center_Iris_x-Center_eye_xMag_x=Center_Iris_x-Center_eye_x

Mag_y=Center_Iris_y-Center_eye_y;Mag_y=Center_Iris_y-Center_eye_y;

分别计算所有图像帧中虹膜运动幅度Mag在x方向和y方向的最大值和最小值,即Mag_x 和Mag_y的最大值和最小值,将Mag_x的最大值作为眼球在水平方向上向右运动的最大幅度Mag_right,将Mag_x的最小值作为眼球在水平方向上向左运动的最大幅度Mag_left,将Mag_y的最大值作为眼球在竖直方向上向下运动的最大幅度Mag_bottom,将Mag_y的最小值作为眼球在竖直方向上向上运动的最大幅度Mag_top,即:Calculate the maximum and minimum values of the iris movement amplitude Mag in the x-direction and y-direction, namely the maximum and minimum values of Mag_x and Mag_y in all image frames, and take the maximum value of Mag_x as the maximum rightward movement of the eyeball in the horizontal direction. Amplitude Mag_right, take the minimum value of Mag_x as the maximum amplitude Mag_left of the leftward movement of the eyeball in the horizontal direction, take the maximum value of Mag_y as the maximum amplitude of the downward movement of the eyeball in the vertical direction Mag_bottom, take the minimum value of Mag_y as the eyeball in the vertical direction. The maximum amplitude Mag_top of the upward movement in the vertical direction, namely:

Mag_right=max(Mag_x)Mag_right=max(Mag_x)

Mag_left=min(Mag_x)Mag_left=min(Mag_x)

Mag_bottom=max(Mag_y)Mag_bottom=max(Mag_y)

Mag_top=min(Mag_y)Mag_top=min(Mag_y)

则该图像帧对应的眼动范围Range为:[Mag_left:Mag_right,Mag_top:Mag_bottom]。Then the eye movement range corresponding to the image frame is Range: [Mag_left:Mag_right,Mag_top:Mag_bottom].

另一方面本发明还提供了一种基于图像分析的眼动范围识别系统,其特征在于,所述系统是基于前述任一眼动范围识别方法步骤对应的模块单元组成的识别系统,以用于实现对采集的视频帧中的眼动范围进行识别。On the other hand, the present invention also provides an eye movement range recognition system based on image analysis, characterized in that the system is a recognition system composed of module units corresponding to the steps of any of the foregoing eye movement range recognition methods, so as to realize Identify the eye movement range in the captured video frames.

综上所述,由于采用了上述技术方案,本发明的有益效果是:To sum up, due to the adoption of the above-mentioned technical solutions, the beneficial effects of the present invention are:

本发明提供的基于图像分析的眼动范围识别方法和系统,可以基于采集的人眼活动视频帧进行自动分析和检测,利用图像处理方法提取有效的眼球活动的范围特征,相比于现有技术,本发明的识别方案实现较高程度的自动测量,克服了现有技术数据采集困难的缺点,并且方案高效实用客观准确。The eye movement range recognition method and system based on image analysis provided by the present invention can automatically analyze and detect based on the collected human eye movement video frames, and use the image processing method to extract effective eye movement range features. Compared with the prior art , the identification scheme of the present invention achieves a high degree of automatic measurement, overcomes the disadvantage of difficult data collection in the prior art, and the scheme is efficient, practical, objective and accurate.

附图说明Description of drawings

图1是本发明实施例提供的人眼图像初定位流程示意图。FIG. 1 is a schematic diagram of a flowchart of initial positioning of a human eye image provided by an embodiment of the present invention.

图2是本发明实施例提供的第一帧人右眼图像示意图。FIG. 2 is a schematic diagram of a first frame of a human right eye image provided by an embodiment of the present invention.

图3是本发明实施例提供的第二帧人右眼活动范围在图像中对应的位置示意图。FIG. 3 is a schematic diagram of a position corresponding to the range of motion of the human right eye in a second frame in an image according to an embodiment of the present invention.

图4是本发明实施例提供的滑动窗口法的部分窗口示意图。FIG. 4 is a schematic diagram of a part of a window of a sliding window method provided by an embodiment of the present invention.

图5是本发明实施例提供的对人眼图像消除光照影响的流程示意图。FIG. 5 is a schematic flowchart of eliminating the influence of illumination on a human eye image provided by an embodiment of the present invention.

图6是本发明实施例提供的对人眼图像确定眼裂轮廓以及眼裂中心点的流程示意图。FIG. 6 is a schematic flowchart of determining an eye cleft contour and an eye cleft center point for a human eye image according to an embodiment of the present invention.

图7是本发明实施例提供的梯度图像示意图。FIG. 7 is a schematic diagram of a gradient image provided by an embodiment of the present invention.

图8是本发明实施例提供的HSV空间的梯度图像及分量示意图。FIG. 8 is a schematic diagram of a gradient image and components in an HSV space provided by an embodiment of the present invention.

图9是本发明实施例提供的边缘检测后的梯度图像示意图。FIG. 9 is a schematic diagram of a gradient image after edge detection provided by an embodiment of the present invention.

图10是本发明实施例提供的二值化图像示意图。FIG. 10 is a schematic diagram of a binarized image provided by an embodiment of the present invention.

图11是本发明实施例提供的二值化图像示意图。FIG. 11 is a schematic diagram of a binarized image provided by an embodiment of the present invention.

图12是本发明实施例提供的二值化图像示意图。FIG. 12 is a schematic diagram of a binarized image provided by an embodiment of the present invention.

图13是本发明实施例提供的闭运算处理后的图像示意图。FIG. 13 is a schematic diagram of an image after closing operation processing provided by an embodiment of the present invention.

图14是本发明实施例提供的连通域示意图。FIG. 14 is a schematic diagram of a connected domain provided by an embodiment of the present invention.

图15是本发明实施例提供的眼裂轮廓示意图。FIG. 15 is a schematic diagram of an eye cleft profile provided by an embodiment of the present invention.

图16是本发明实施例提供的眼裂轮廓以及眼裂中心点示意图。FIG. 16 is a schematic diagram of an eye cleft outline and an eye cleft center point provided by an embodiment of the present invention.

图17是本发明实施例提供的确定图像虹膜轮廓以及虹膜中心的流程示意图。FIG. 17 is a schematic flowchart of determining an image iris contour and an iris center according to an embodiment of the present invention.

图18是本发明实施例提供的二值图像示意图。FIG. 18 is a schematic diagram of a binary image provided by an embodiment of the present invention.

图19是本发明实施例提供的形态学处理后的示意图。FIG. 19 is a schematic diagram after morphological processing provided by an embodiment of the present invention.

图20是本发明实施例提供的孔洞填充后的示意图。FIG. 20 is a schematic diagram of a filled hole provided by an embodiment of the present invention.

图21是本发明实施例提供的虹膜轮廓示意图。FIG. 21 is a schematic diagram of an iris outline provided by an embodiment of the present invention.

图22是本发明实施例提供的虹膜质心点示意图。FIG. 22 is a schematic diagram of an iris centroid point according to an embodiment of the present invention.

图23是本发明实施例提供的确定眼动范围流程示意图。FIG. 23 is a schematic diagram of a flowchart for determining an eye movement range provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了使本领域的人员更好地理解本发明的技术方案,下面结合本发明的附图,对本发明的技术方案进行清楚、完整的描述,基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的其它类同实施例,都应当属于本申请保护的范围。In order for those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be described clearly and completely below with reference to the accompanying drawings. Other similar embodiments obtained under the premise of no creative work shall fall within the scope of protection of the present application.

需要说明的是,本发明以及相应实施例提出的图像特征处理方法、特征提取方法、信号识别与分类方法都仅仅是对图像信号的处理和识别方法本身进行研究和改进,虽然针对的为人眼眼动范围采集的图像信号,实现的范围识别结果可以作为评估参考,但在临床或医疗领域其评估结果也仅仅是一个辅助性的评估,对于具体的治疗方法仍需要并主要依赖于医生的临床经验和医生提供的治疗方法。It should be noted that the image feature processing method, feature extraction method, signal identification and classification method proposed in the present invention and the corresponding embodiments are only for research and improvement of the image signal processing and identification method itself, although it is aimed at the human eye. The image signal acquired by the moving range and the realized range recognition result can be used as an evaluation reference, but in the clinical or medical field, the evaluation result is only an auxiliary evaluation, and the specific treatment method still needs and mainly depends on the clinical experience of the doctor and the treatment provided by the doctor.

实施例1Example 1

本实施例为一种基于图像分析的眼动范围识别方法,包括如下步骤:The present embodiment is an eye movement range recognition method based on image analysis, including the following steps:

(1)对采集的视频帧进行人眼图像初定位,即对包含人眼的所有采集图像进行人眼范围的初步定位,如图1所示;(1) Preliminary positioning of the human eye image is performed on the collected video frames, that is, the preliminary positioning of the human eye range is performed on all the collected images including the human eye, as shown in Figure 1;

(1.1)对第一帧视频帧进行人眼图像初定位:(1.1) Initial positioning of the human eye image for the first video frame:

设定第一帧视频帧为I_frame(1),所述采集图像为利用图像采集设备对目标进行采集的图像,其采集范围可能较大,因而为了确定人眼眼裂所在的位置可以对采集图像进行初定位。对I_frame(1)进行初步定位包括利用深度学习的训练模型对人脸进行标定,从标定的特征点中寻找人眼眼裂所在的位置,利用矩形拟合人眼的标定点,从而确定包含人眼初定位的人眼图像I_eye(1);The first frame of video frame is set as I_frame(1), and the captured image is an image captured by an image capture device on the target, and its capture range may be large. Therefore, in order to determine the position of the human eye cleft, the captured image can be determined. Perform initial positioning. Preliminary positioning of I_frame (1) includes calibrating the face with a deep learning training model, finding the position of the human eye crack from the calibrated feature points, and using a rectangle to fit the calibration point of the human eye, so as to determine whether the human eye is included. The human eye image I_eye(1) for the initial positioning of the eye;

在一个实施例中可以采用已训练的Dlib人脸68个标记点模型实现人脸的标定,记为 Point[1:68],其中人左右眼的标定点序号分别为[43:48]和[37:42]。利用左右眼的标定点实现人眼的初步定位,得到的人眼图像I_eye(1)分别包含人左眼眼裂和右眼眼裂的人眼图像I_eye_left(1)和I_eye_right(1),其中人左眼图像I_eye_left(1)和人右眼图像I_eye_right(1)均为W×H的三维彩色图像,W和H分别表示人眼图像的宽度和高度。In one embodiment, the trained Dlib face 68 mark point model can be used to achieve face calibration, which is marked as Point[1:68], where the calibration point numbers of the left and right eyes of the human being are [43:48] and [43:48] and [ 37:42]. Using the calibration points of the left and right eyes to realize the preliminary positioning of the human eye, the obtained human eye image I_eye(1) contains the human eye images I_eye_left(1) and I_eye_right(1) of the human left eye split and the right eye split respectively. The left eye image I_eye_left(1) and the human right eye image I_eye_right(1) are both W×H three-dimensional color images, where W and H represent the width and height of the human eye image, respectively.

以右眼为例,右眼眼裂的最左侧点序号为37,最右侧序号为40,最上方点序号为38或 39,最下方序号为41或42,则人右眼图像I_eye_right(1)的左右边界点的横坐标 eye_left_x、eye_right_x,以及上下边界点的纵坐标为eye_top_y、eye_bottom_y,分别为:Taking the right eye as an example, the leftmost point number of the right eye cleft is 37, the rightmost point number is 40, the topmost point number is 38 or 39, and the bottommost number is 41 or 42, then the human right eye image I_eye_right( 1) The abscissas eye_left_x, eye_right_x of the left and right boundary points, and the ordinates of the upper and lower boundary points are eye_top_y, eye_bottom_y, respectively:

eye_left_x=Point[37]_x-l_xeye_left_x=Point[37]_x-l_x

eye_right_x=Point[40]_x+l_xeye_right_x=Point[40]_x+l_x

eye_top_y=min(Point[38]_y,Point[39]_y)-l_yeye_top_y=min(Point[38]_y, Point[39]_y)-l_y

eye_bottom_y=max(Point[41]_y,Point[42]_y)+l_yeye_bottom_y=max(Point[41]_y, Point[42]_y)+l_y

其中Point[α]_x和Point[α]_y分别表示序号为α(37≤α≤42)的点对应的横坐标和纵坐标,l_x和l_y分别表示人右眼图像I_eye_right(1)宽度和高度的延升。在本实施例中对参数选取l_x=l_y=40。Among them, Point[α]_x and Point[α]_y respectively represent the abscissa and ordinate corresponding to the point with serial number α (37≤α≤42), and l_x and l_y respectively represent the width and height of the human right eye image I_eye_right(1) of extension. In this embodiment, l_x=l_y=40 is selected for the parameter.

则人右眼图像I_eye_right(1)的宽度W和高度H分别为:Then the width W and height H of the human right eye image I_eye_right(1) are:

W=eye_right_x-eye_left_xW=eye_right_x-eye_left_x

H=eye_bottom_y-eye_top_yH=eye_bottom_y-eye_top_y

对应的第一帧人右眼图像I_eye_right(1)如图2所示。The corresponding first frame of the human right eye image I_eye_right(1) is shown in Figure 2.

需要说明的是,在实际的图像处理过程中可以按照I_eye(1)为单位、也可以分别以 I_eye_left(1)和I_eye_right(1)为单位进行处理,其处理实质都包含对采集图像中的左右眼进行处理,对于本实施例为了更简单清楚的描述图像处理过程后续步骤将使用I_eye(1) 进行描述。It should be noted that in the actual image processing process, the processing can be performed in units of I_eye(1), or in units of I_eye_left(1) and I_eye_right(1) respectively. In this embodiment, the subsequent steps of the image processing process will be described using I_eye(1) in order to describe the image processing process more simply and clearly.

(1.2)对其余的视频帧进行人眼图像的初定位;(1.2) Perform initial positioning of the human eye image on the remaining video frames;

(1.2.1)确定当前视频帧的人眼活动范围Range_eye;(1.2.1) Determine the range_eye of the human eye activity range of the current video frame;

假设当前视频帧为第n帧,该图像帧记为I_frame(n),利用前一帧初定位后的人眼图像I_eye(n-1)确定当前帧的人眼活动范围Range_eye,该活动范围Range_eye的左右边界点的横坐标为Range_left_x和Range_right_x,上下边界点的纵坐标为Range_top_y,Range_bottom_y,分别为:Assuming that the current video frame is the nth frame, the image frame is denoted as I_frame(n), and the human eye image I_eye(n-1) after initial positioning of the previous frame is used to determine the human eye activity range Range_eye of the current frame. The abscissas of the left and right boundary points are Range_left_x and Range_right_x, and the ordinates of the upper and lower boundary points are Range_top_y, Range_bottom_y, respectively:

Range_left_x=eye_left_x-WRange_left_x=eye_left_x-W

Range_right_x=eye_right_x+WRange_right_x=eye_right_x+W

Range_top_y=eye_top_y-HRange_top_y=eye_top_y-H

Range_bottom_y=eye_bottom_y+HRange_bottom_y=eye_bottom_y+H

则第n(n≥2)帧人眼活动范围Range_eye尺寸为3W×3H,以第二帧图像中右眼活动范围对应的位置为例如图3所示。Then, the size of the range_eye of the moving range of the human eye in the nth (n≥2) frame is 3W×3H, and the position corresponding to the moving range of the right eye in the second frame image is taken as an example, as shown in FIG. 3 .

(1.2.2)基于当前视频帧的人眼活动范围Range_eye对当前视频帧进行人眼初步定位;(1.2.2) Preliminary positioning of the human eye on the current video frame based on the range_eye of the human eye movement range of the current video frame;

利用滑动窗口法(窗口大小为W×H)将人眼活动范围Range_eye分成多个窗口Window,窗口Window的获取方法如下:Using the sliding window method (the window size is W×H), the range_eye of the human eye is divided into multiple windows. The method of obtaining the window is as follows:

(1.2.2.1)设定水平方向的步长为Step_len_x,竖直方向的步长为Step_len_y,第一个窗口的左上角顶点对应当前帧人眼活动范围Range_eye的左上角顶点,则:(1.2.2.1) Set the step size in the horizontal direction as Step_len_x and the step size in the vertical direction as Step_len_y. The upper left corner vertex of the first window corresponds to the upper left corner vertex of the current frame of the human eye range, then:

Window(1)_left_x=Range_left_xWindow(1)_left_x=Range_left_x

Window(1)_right_x=Range_left_x+WWindow(1)_right_x=Range_left_x+W

Window(1)_top_y=Range_top_yWindow(1)_top_y=Range_top_y

Window(1)_bottom_y=Range_top_y+HWindow(1)_bottom_y=Range_top_y+H

其中,Window(1)_left_x、Window(1)_right_x、Window(1)_top_y和 Window(1)_bottom_y分别表示第一个窗口Window的左边界、右边界、上边界和下边界。Among them, Window(1)_left_x, Window(1)_right_x, Window(1)_top_y and Window(1)_bottom_y represent the left border, right border, top border and bottom border of the first window Window, respectively.

(1.2.2.2)则对应的第k_row行、第k_col列的第k个窗口Window的边界点坐标如下所示:(1.2.2.2) The boundary point coordinates of the kth window Window corresponding to the kth row and the k_colth column are as follows:

Window(k)_left_x=Range_left_x+(k_col-1)*Step_len_xWindow(k)_left_x=Range_left_x+(k_col-1)*Step_len_x

Window(k)_right_x=Range_left_x+(k_col-1)*Step_len_x+WWindow(k)_right_x=Range_left_x+(k_col-1)*Step_len_x+W

Window(k)_top_y=Range_top_y+(k_row-1)*Step_len_yWindow(k)_top_y=Range_top_y+(k_row-1)*Step_len_y

Window(k)_bottom_y=Range_top_y+(k_row-1)*Step_len_y+HWindow(k)_bottom_y=Range_top_y+(k_row-1)*Step_len_y+H

其中,1≤k_row≤int(2H/(Setp_len_y))+1,1≤k_col≤int(2W/(Setp_len_x))+1,k= (k_row-1)*(int(2W/(Setp_len_x))+1)+k_col,Window(k)_left_x、Window(k)_right_x、 Window(k)_top_y和Window(k)_bottom_y分别表示第k个窗口Window的左边界、右边界、上边界和下边界。Among them, 1≤k_row≤int(2H/(Setp_len_y))+1, 1≤k_col≤int(2W/(Setp_len_x))+1, k= (k_row-1)*(int(2W/(Setp_len_x))+ 1) +k_col, Window(k)_left_x, Window(k)_right_x, Window(k)_top_y and Window(k)_bottom_y respectively represent the left border, right border, upper border and lower border of the kth window Window.

在一个实施例中参数选取Step_len_x=Step_len_y=25,则通过滑动窗口法得到的部分窗口Window如图4所示。In one embodiment, Step_len_x=Step_len_y=25 is selected as a parameter, and a partial window Window obtained by the sliding window method is shown in FIG. 4 .

(1.2.2.3)将每一个窗口Window与前一帧人眼图像I_eye(n-1)计算相似性,寻找其中相似性最高的窗口Window,并将该相似性最高的窗口Window作为当前帧的人眼图像I_eye(n)。(1.2.2.3) Calculate the similarity between each window Window and the human eye image I_eye(n-1) of the previous frame, find the window Window with the highest similarity, and use the window Window with the highest similarity as the person of the current frame Eye image I_eye(n).

在一个实施例中对于相似性算法采用模板匹配法—平均差匹配法,具体计算步骤如下:In one embodiment, the template matching method—the average difference matching method is used for the similarity algorithm, and the specific calculation steps are as follows:

遍历第k个窗口Window和前一帧的人眼图像I_eye(n-1)中的每一个像素点,计算对应像素点之间的平方差Diff(k),平方差Diff的计算公式如下:Traverse the kth window Window and each pixel in the human eye image I_eye(n-1) of the previous frame, and calculate the squared difference Diff(k) between the corresponding pixels. The calculation formula of the squared difference Diff is as follows:

Figure BDA0002222698150000101
Figure BDA0002222698150000101

其中,Window(k)(i,j)和I_eye(n-1)(i,j)分别表示第k个窗口Window和前一帧人眼图像I_eye(n-1)的第(i,j)个像素点的像素值。Among them, Window(k)(i,j) and I_eye(n-1)(i,j) respectively represent the kth window Window and the (i,j)th of the previous frame of human eye image I_eye(n-1) pixel value of a pixel.

对于所有窗口Window均有一个平方差Diff,距离值最小的Diff对应的窗口Window即为当前帧I_frame(n)的人眼图像I_eye(n)。There is a square difference Diff for all windows Window, and the window Window corresponding to the Diff with the smallest distance value is the human eye image I_eye(n) of the current frame I_frame(n).

(2)对人眼图像进行预处理,并去除光照影响。(2) Preprocess the human eye image and remove the influence of illumination.

对于初定位后的人眼图像I_eye,由于图像在采集的过程中会由于光照不均匀导致图像的灰度值分布不均,因而需要对人眼图像I_eye进行预处理从而实现光照矫正处理。在一个实施例中使用具有色彩恢复的多尺度Retinex(MSRCR)算法对提取的人眼图像I_eye消除光照不均匀产生的影响,得到预处理后的图像I_eye_color,该算法的步骤如图5所示。For the human eye image I_eye after initial positioning, since the gray value distribution of the image will be uneven due to uneven illumination during the image acquisition process, it is necessary to preprocess the human eye image I_eye to achieve illumination correction processing. In one embodiment, the multi-scale Retinex (MSRCR) algorithm with color recovery is used to eliminate the influence of uneven illumination on the extracted human eye image I_eye to obtain a preprocessed image I_eye_color. The steps of the algorithm are shown in FIG. 5 .

(2.1)对人眼图像I_eye的每一个像素点在R、G、B三个通道的像素值I_eye_R、I_eye_G 和I_eye_B计算对数值I_eye_R_log,I_eye_G_log和I_eye_B_log,并计算各个通道内的均值Mean_R、Mean_G、Mean_B和均方差Var_R、Var_G、Var_B,即:(2.1) Calculate the logarithm values I_eye_R_log, I_eye_G_log and I_eye_B_log of the pixel values I_eye_R, I_eye_G and I_eye_B of the three channels of R, G and B for each pixel of the human eye image I_eye, and calculate the mean values Mean_R, Mean_G, Mean_B and mean square error Var_R, Var_G, Var_B, namely:

I_eye_R_log(i,j)=log(I_eye_R(i,j))I_eye_R_log(i, j)=log(I_eye_R(i, j))

I_eye_G_iog(i,j)=log(I_eye_G(i,j))I_eye_G_iog(i,j)=log(I_eye_G(i,j))

I_eye_B_log(i,j)=log(I_eye_B(i,j))I_eye_B_log(i, j)=log(I_eye_B(i, j))

Figure BDA0002222698150000111
Figure BDA0002222698150000111

Figure BDA0002222698150000112
Figure BDA0002222698150000112

Figure BDA0002222698150000113
Figure BDA0002222698150000113

Figure BDA0002222698150000114
Figure BDA0002222698150000114

Figure BDA0002222698150000115
Figure BDA0002222698150000115

Figure BDA0002222698150000116
Figure BDA0002222698150000116

(2.2)寻找各个通道的像素均值的最大值Max_R,Max_G和Max_B,以及最小值Min_R, Min_G和Min_B,即:(2.2) Find the maximum values Max_R, Max_G and Max_B of the pixel mean values of each channel, and the minimum values Min_R, Min_G and Min_B, namely:

Max_R=max(Mean_R)Max_R=max(Mean_R)

Max_G=max(Mean_G)Max_G=max(Mean_G)

Max_B=max(Mean_B)Max_B=max(Mean_B)

Min_R=min(Mean_R)Min_R=min(Mean_R)

Min_G=min(Mean_G)Min_G=min(Mean_G)

Min_B=min(Mean_B)Min_B=min(Mean_B)

(2.3)将各个通道的像素对数值I_eye_R_log,I_eye_G_log和I_eye_B_log线性映射到[0,255]进行归一化处理,转换后得到的分别为R_R,R_G和R_B,即:(2.3) The pixel logarithm values I_eye_R_log, I_eye_G_log and I_eye_B_log of each channel are linearly mapped to [0, 255] for normalization, and the converted values are R_R, R_G and R_B respectively, namely:

Figure BDA0002222698150000121
Figure BDA0002222698150000121

Figure BDA0002222698150000122
Figure BDA0002222698150000122

Figure BDA0002222698150000123
Figure BDA0002222698150000123

(2.4)由R_R、R_G和R_B三个通道的值构成的图像即为光照矫正后的人眼图像 I_eye_color。(2.4) The image composed of the values of the three channels R_R, R_G and R_B is the human eye image I_eye_color after illumination correction.

(3)对光照矫正后的人眼图像I_eye_color确定眼裂轮廓Contour_eye以及眼裂中心点Center_eye,该算法的步骤如图6所示:(3) Determine the contour of the eye cleft Contour_eye and the center point of the eye cleft Center_eye for the human eye image I_eye_color after illumination correction. The steps of the algorithm are shown in Figure 6:

(3.1)获取光照矫正后的人眼图像I_eye_color对应的Scharr梯度图像,所述步骤如下:(3.1) Obtain the Scharr gradient image corresponding to the human eye image I_eye_color after illumination correction, and the steps are as follows:

(3.1.1)在RGB空间提取图像I_eye_color的Scharr梯度;由于在经过光照矫正后的人眼图像I_eye_color中人眼所包含的虹膜与巩膜、上下眼睑边界处的像素值相差很大,即梯度值较大,因此利用梯度检测算子可以很好的提取图像中的梯度信息,实现眼裂轮廓的提取。(3.1.1) Extract the Scharr gradient of the image I_eye_color in the RGB space; since the iris and the sclera, and the pixel values at the boundaries of the upper and lower eyelids contained in the human eye image I_eye_color after illumination correction are very different, that is, the gradient value Therefore, the gradient information in the image can be well extracted by using the gradient detection operator to realize the extraction of the eye cleft contour.

首先,利用Scharr算子计算图像I_eye_color的梯度,水平方向的Scharr算子Gx和竖直方向的Scharr算子Gy分别如下所示:First, use the Scharr operator to calculate the gradient of the image I_eye_color. The Scharr operator Gx in the horizontal direction and the Scharr operator Gy in the vertical direction are as follows:

Figure BDA0002222698150000124
Figure BDA0002222698150000124

若光照矫正后的人眼图像I_eye_color的第(i,j)个像素点在水平方向的梯度值为 Gx(i,j),在竖直方向的梯度值为Gy(i,j),则该像素点(i,j)处总的梯度值G(i,j)为:If the gradient value of the (i,j)th pixel of the human eye image I_eye_color after illumination correction is Gx(i,j) in the horizontal direction and Gy(i,j) in the vertical direction, then the The total gradient value G(i,j) at the pixel point (i,j) is:

Figure BDA0002222698150000131
Figure BDA0002222698150000131

对人眼图像I_eye_color计算梯度G(i,j)后,得到对应梯度图像I_Scharr,如图7所示。从图7中所示的图像中可以看出,眼裂的轮廓已经比较明显,然而初步提取的梯度图像I_Scharr中仍存在许多复杂的噪声纹理,还需要对其进一步处理和优化。After calculating the gradient G(i,j) for the human eye image I_eye_color, the corresponding gradient image I_Scharr is obtained, as shown in Figure 7. From the image shown in Figure 7, it can be seen that the outline of the eye split is relatively obvious, however, there are still many complex noise textures in the initially extracted gradient image I_Scharr, which needs to be further processed and optimized.

(3.1.2)将初步提取的梯度图像I_Scharr转换到HSV空间,并提取对应的V分量,得到对应的分量图像I_ScharrV。(3.1.2) Convert the initially extracted gradient image I_Scharr to HSV space, and extract the corresponding V component to obtain the corresponding component image I_ScharrV.

为了突出需要提取的眼裂轮廓,将初步提取的梯度图像I_Scharr从RGB空间转换到HSV 空间,得到HSV空间的梯度图像I_ScharrHSV,对应的图像I_ScharrHSV及其H、S、V三个分量分别如图8(a)-(d)所示。In order to highlight the contour of the eye cleft to be extracted, the initially extracted gradient image I_Scharr is converted from RGB space to HSV space, and the gradient image I_ScharrHSV in HSV space is obtained. The corresponding image I_ScharrHSV and its H, S, and V components are shown in Figure 8. (a)-(d).

由图8各图可以看出图(d)中I_ScharrHSV的V分量对应的梯度分量图像I_ScharrV中的眼裂轮廓相对较完整且图像中的噪声较小,因此进一步选择梯度分量图像I_ScharrV来进行进一步的分析。It can be seen from the graphs in Fig. 8 that the eye cleft contour in the gradient component image I_ScharrV corresponding to the V component of I_ScharrHSV in Fig. (d) is relatively complete and the noise in the image is small, so the gradient component image I_ScharrV is further selected for further analyze.

(3.2)利用边缘检测算法对人眼图像I_eye_color进行边缘检测,得到对应的梯度图像I_HED;(3.2) Use the edge detection algorithm to perform edge detection on the human eye image I_eye_color to obtain the corresponding gradient image I_HED;

在一个实施例中利用建立在卷积神经网络和深度监督网络的HED边缘检测算法对人眼图像I_eye_color进行边缘检测,可以实现多尺度多层次的特征学习。得到对应的梯度图像I_HED如图9所示。In one embodiment, the edge detection of the human eye image I_eye_color is performed by using the HED edge detection algorithm based on the convolutional neural network and the deep supervision network, which can realize multi-scale and multi-level feature learning. The corresponding gradient image I_HED is obtained as shown in Figure 9.

(3.3)基于梯度分量图像I_ScharrV和梯度图像I_HED,确定眼裂轮廓Contour_eye的位置;(3.3) Determine the position of the eye cleft contour Contour_eye based on the gradient component image I_ScharrV and the gradient image I_HED;

(3.3.1)将梯度分量图像I_ScharrV和梯度图像I_HED相结合,用于提取对应的二值图像;(3.3.1) The gradient component image I_ScharrV and the gradient image I_HED are combined to extract the corresponding binary image;

假设梯度分量图像I_ScharrV中所有像素点的像素值的最大值为V_Vmax,在一个实施例中经研究发现将阈值设置为V_Vmax/4时,可得到的二值化图像I_binary1为:Assuming that the maximum value of the pixel values of all pixels in the gradient component image I_ScharrV is V_Vmax, in one embodiment, it is found that when the threshold is set to V_Vmax/4, the obtained binarized image I_binary1 is:

Figure BDA0002222698150000132
Figure BDA0002222698150000132

所述二值化图像I_binary1如图10所示;The binarized image I_binary1 is shown in Figure 10;

假设梯度图像I_HED中所有像素点的像素值的最大值为V_HEDmax,在一个实施例中经研究发现将阈值设置为V_HEDmax/3时,可得到的二值化图像I_binary2为:Assuming that the maximum value of the pixel values of all the pixels in the gradient image I_HED is V_HEDmax, in one embodiment, it is found through research that when the threshold is set to V_HEDmax/3, the obtained binarized image I_binary2 is:

Figure BDA0002222698150000141
Figure BDA0002222698150000141

所述二值化图像I_binary2如图11所示。The binarized image I_binary2 is shown in FIG. 11 .

将二值化图像I_binary1和二值化图像I_binary2相与,取二者的交集得到处理后的二值图像I_binary,即:Add the binarized image I_binary1 and the binarized image I_binary2, and take the intersection of the two to obtain the processed binary image I_binary, that is:

I_binary(i,j)=I_binary1(i,j)&I_binary2(i,j)I_binary(i,j)=I_binary1(i,j)&I_binary2(i,j)

其中,I_binary(i,j)、I_binary1(i,j)和I_binary2(i,j)分别表示二值图像I_binary、 I_binary1和I_binary2中的第(i,j)个像素点的像素值。对应的二值图像I_binary如图 12所示。Among them, I_binary(i,j), I_binary1(i,j) and I_binary2(i,j) respectively represent the pixel value of the (i,j)th pixel in the binary images I_binary, I_binary1 and I_binary2. The corresponding binary image I_binary is shown in Figure 12.

(3.3.2)对提取的二值图像I_binary进行形态学处理(3.3.2) Morphological processing of the extracted binary image I_binary

由前述步骤得到的二值图像I_binary中仍存在与眼裂轮廓相连的毛刺,如图12中所示,因此需要进一步采用形态学上的闭运算,实现图像边缘平滑。闭运算是先对二值图像I_binary进行膨胀运算,得到I_dilate,再进行腐蚀运算,得到图像I_closing,闭运算的计算公式如下所示:In the binary image I_binary obtained by the above steps, there are still burrs connected to the contour of the eye cleft, as shown in FIG. 12 . Therefore, it is necessary to further adopt the morphological closing operation to achieve smooth image edges. The closing operation is to first perform the expansion operation on the binary image I_binary to obtain I_dilate, and then perform the erosion operation to obtain the image I_closing. The calculation formula of the closing operation is as follows:

Figure BDA0002222698150000142
Figure BDA0002222698150000142

Figure BDA0002222698150000143
Figure BDA0002222698150000143

其中,A为2*2的方形结构元,I_dilatec为I_dilate的补集。Among them, A is a 2*2 square structure element, and I_dilate c is the complement of I_dilate.

对应的闭运算处理后的图像I_closing如图13所示。The corresponding image I_closing after closing operation processing is shown in FIG. 13 .

(3.3.3)进一步移除图像中多余的小物体,并提取图像中的最大连通域;(3.3.3) Further remove the redundant small objects in the image, and extract the largest connected domain in the image;

闭运算后得到图像I_closing如图13所示,图中可以看到仍存在一定的小的孤立的噪声点,利用形态学中移除小目标的方法去除图像I_closing中小的噪点,得到对应的图像 I_morphological,并进一步对图像I_morphological提取最大连通域,具体提取步骤如下:After the closing operation, the image I_closing is obtained as shown in Figure 13. In the figure, it can be seen that there are still some small isolated noise points. The method of removing small objects in morphology is used to remove the small noise points in the image I_closing, and the corresponding image I_morphological is obtained. , and further extract the maximum connected domain from the image I_morphological. The specific extraction steps are as follows:

3.3.3.1)首先,提取图像I_morphological中的所有轮廓,记作C_mor_set,即:3.3.3.1) First, extract all contours in the image I_morphological, denoted as C_mor_set, namely:

C_mor_set={C_mor1,C_mor2,…,C_mork1,…,C_morn1}C_mor_set={C_mor 1 , C_mor 2 , ..., C_mor k1 , ..., C_mor n1 }

其中,C_mork1(1≤k1≤n1)表示第k1个轮廓,n1为图像I_morphological中的轮廓总数;Among them, C_mor k1 (1≤k1≤n1) represents the k1th contour, and n1 is the total number of contours in the image I_morphological;

3.3.3.2)接着,计算每一个轮廓的面积,得到面积集Area_set,即:3.3.3.2) Next, calculate the area of each contour to obtain the area set Area_set, namely:

Area_set={Area1,Area2,…,Areak1,…,Arean1}Area_set={Area 1 , Area 2 , ..., Area k1 , ..., Area n1 }

其中,Areak1表示第k1个轮廓的面积。Among them, Area k1 represents the area of the k1th contour.

3.3.3.3)移除面积小于300的连通域,得到对应的图像I_RemoveSmallObjects,如图 14所示。3.3.3.3) Remove the connected domain whose area is less than 300 to obtain the corresponding image I_RemoveSmallObjects, as shown in Figure 14.

3.3.3.4)寻找图像I_RemoveSmallObjects中面积最大的轮廓C_mormax,该轮廓C_mormax即为对应的眼裂轮廓Contour_eye,眼裂轮廓如图15所示。3.3.3.4) Find the contour C_mormax with the largest area in the image I_RemoveSmallObjects, the contour C_mormax is the corresponding eye cleft contour Contour_eye, and the eye cleft contour is shown in Figure 15.

(3.4)确定眼裂轮廓Contour_eye的中心点Center_eye(3.4) Determine the center point Center_eye of the eye cleft contour Contour_eye

对于眼裂轮廓Contour_eye,寻找轮廓的左右边界点,分别为Point_left和Point_right,即:For the eye cleft contour Contour_eye, find the left and right boundary points of the contour, which are Point_left and Point_right respectively, namely:

Point_left_x=min(Contour_eye_x)Point_left_x=min(Contour_eye_x)

Point_right_x=max(Contour_eye_x)Point_right_x=max(Contour_eye_x)

其中,Point_left_x和Point_right_x表示Point_left和Point_right的横坐标,Contour_eye_x表示组成眼裂轮廓的点的横坐标。Among them, Point_left_x and Point_right_x represent the abscissas of Point_left and Point_right, and Contour_eye_x represent the abscissas of the points that make up the contour of the eye cleft.

利用左右边界点Point_left和Point_right的横坐标Point_left_x和Point_right_x,在眼裂轮廓Contour_eye中寻找其对应的纵坐标Point_left_y和Point_right_y。Using the abscissas Point_left_x and Point_right_x of the left and right boundary points Point_left and Point_right, find their corresponding ordinates Point_left_y and Point_right_y in the eye cleft contour Contour_eye.

将左右边界点Point_left和Point_right的横坐标Point_left_x和Point_right_x的均值作为眼裂中心点Center_eye的横坐标值Center_eye_x,将Point_left和Point_right 的纵坐标Point_left_y和Point_right_y的均值作为眼裂中心Center_eye的纵坐标值 Center_eye_y,得到眼裂中心点Center_eye的像素坐标(Center_eye_x,Center_eye_y),即:Take the mean value of the abscissas Point_left_x and Point_right_x of the left and right boundary points Point_left and Point_right as the abscissa value Center_eye_x of the center point Center_eye of the eye cleft, and take the mean value of the ordinates Point_left_y and Point_right_y of Point_left and Point_right as the ordinate value Center_eye_y of the eye cleft center Center_eye, Obtain the pixel coordinates (Center_eye_x, Center_eye_y) of the center point of the eye split Center_eye, namely:

Center_eye_x=(Point_left_x+Point_right_x)/2Center_eye_x=(Point_left_x+Point_right_x)/2

Center_eye_y=(Point_left_y+Point_right_y)/2Center_eye_y=(Point_left_y+Point_right_y)/2

所述眼裂轮廓Contour_eye以及眼裂中心点Center_eye如图16所示。The contour of the eye cleft Contour_eye and the center point of the eye cleft Center_eye are shown in FIG. 16 .

(4)确定图像中的虹膜轮廓Contour_Iris以及虹膜中心Center_Iris,该算法步骤如图17所示。(4) Determine the iris contour Contour_Iris and the iris center Center_Iris in the image, and the algorithm steps are shown in FIG. 17 .

(4.1)图像二值化(4.1) Image binarization

利用Otsu阈值法对梯度图像I_ScharrV计算Otsu阈值Otsu_thresh,利用阈值Otsu_thresh对梯度图像I_Scharr进行二值化处理,得到对应的二值图像I_binary3,即:Use the Otsu threshold method to calculate the Otsu threshold Otsu_thresh for the gradient image I_ScharrV, and use the threshold Otsu_thresh to binarize the gradient image I_Scharr to obtain the corresponding binary image I_binary3, namely:

Figure BDA0002222698150000151
Figure BDA0002222698150000151

二值图像I_binary3如图18所示。The binary image I_binary3 is shown in FIG. 18 .

(4.2)形态学腐蚀处理(4.2) Morphological corrosion treatment

如图18所示二值化图像I_binary3中存在许多与虹膜相连的噪声,利用3*3的方形结构元B对图像I_binary3进行形态学上的腐蚀操作,去除虹膜边缘的毛刺,断开与噪声点之间的连接,得到对应的图像I_erosion如图19所示。As shown in Figure 18, there is a lot of noise connected to the iris in the binarized image I_binary3. The 3*3 square structure element B is used to perform a morphological corrosion operation on the image I_binary3 to remove the burrs on the edge of the iris, and disconnect the noise points. The connection between, the corresponding image I_erosion is obtained as shown in Figure 19.

Figure BDA0002222698150000161
Figure BDA0002222698150000161

(4.3)孔洞填充,并寻找最大连通域(4.3) Hole filling and finding the largest connected domain

图像I_erosion如图19所示,其中虹膜轮廓中存在由于视频录制中灯光造成的孔洞,利用形态学上的孔洞填充法对图像I_erosion的孔洞进行填充,得到对应的图像 I_holefilled,如图20所示。The image I_erosion is shown in Figure 19, in which there are holes in the iris contour due to lights in the video recording, and the holes in the image I_erosion are filled with the morphological hole filling method to obtain the corresponding image I_holefilled, as shown in Figure 20.

进一步提取图像I_holefilled中的所有连通域,将面积最大的连通域作为虹膜所在处,具体步骤包括:Further extract all connected domains in the image I_holefilled, and use the connected domain with the largest area as the location of the iris. The specific steps include:

(4.3.1)首先,提取图像I_holefilled中的所有轮廓,形成轮廓集C_hole_set,即:(4.3.1) First, extract all the contours in the image I_holefilled to form the contour set C_hole_set, namely:

C_hole_set={C_hole1,C_hole2,…,C_holek2,…,C_holen2}C_hole_set={C_hole 1 , C_hole 2 , ..., C_hole k2 , ..., C_hole n2 }

其中,C_holek2(1≤k2≤n2)表示第k2个轮廓,n2为图像I_holefilled中的轮廓总数。Among them, C_hole k2 (1≤k2≤n2) represents the k2th contour, and n2 is the total number of contours in the image I_holefilled.

(4.3.2)接着,计算每一个轮廓的面积,得到面积集Area_set1,即:(4.3.2) Next, calculate the area of each contour to obtain the area set Area_set1, namely:

Area_set1={Area1,Area2,…,Areak2,…,Arean2}Area_set1={Area 1 , Area 2 , ..., Area k2 , ..., Area n2 }

其中,Areak2(1≤k2≤n2)表示第k2个轮廓的面积。Among them, Area k2 (1≤k2≤n2) represents the area of the k2th contour.

(4.3.3)寻找其中面积最大的轮廓C_holemax,该轮廓即为对应的虹膜轮廓Contour_Iris,所述虹膜轮廓如图21所示。(4.3.3) Find the contour C_holemax with the largest area, which is the corresponding iris contour Contour_Iris, and the iris contour is shown in FIG. 21 .

(4.4)在虹膜轮廓Contour_Iris中确定对应的虹膜中心点Center_Iris(4.4) Determine the corresponding iris center point Center_Iris in the iris contour Contour_Iris

利用虹膜轮廓Contour_Iris计算其质心,该质心点即为虹膜的中心点(Center_Iris_x, Center_Iris_y),所述质心计算公式如下:The iris contour Contour_Iris is used to calculate its centroid, and the centroid point is the center point of the iris (Center_Iris_x, Center_Iris_y). The centroid calculation formula is as follows:

Figure BDA0002222698150000162
Figure BDA0002222698150000162

其中,px(k)和py(k)(1≤k≤m)分别表示虹膜轮廓Contour_Iris上第k个点的横坐标和纵坐标,Contour_Iris(i,j)表示第(i,j)个像素点的像素值。Among them, px(k) and py(k) (1≤k≤m) represent the abscissa and ordinate of the kth point on the iris contour Contour_Iris, respectively, and Contour_Iris(i,j) represents the (i,j)th pixel The pixel value of the point.

所述虹膜中心点Contour_Iris如图22所示。The iris center point Contour_Iris is shown in Figure 22.

(5)基于确定的虹膜中心点Center_Iris和眼裂中心点Center_eye确定眼动范围Range,如图23所示。(5) Determine the eye movement range Range based on the determined iris center point Center_Iris and the eye split center point Center_eye, as shown in FIG. 23 .

将每一帧图像中的眼裂中心点Center_eye和虹膜中心点Center_Iris定位并确定后,计算虹膜的运动幅度Mag,其中运动幅度Mag在x方向和y方向的位置值分别为Mag_x和Mag_y:After locating and determining the center point Center_eye of the eye split and the center point Center_Iris of the iris in each frame of image, the motion amplitude Mag of the iris is calculated, where the position values of the motion amplitude Mag in the x-direction and y-direction are Mag_x and Mag_y respectively:

Mag_x=Center_Iris_x-Center_eye_xMag_x=Center_Iris_x-Center_eye_x

Mag_y=Center_Iris_y-Center_eye_yMag_y=Center_Iris_y-Center_eye_y

分别计算所有图像帧中虹膜运动幅度Mag在x方向和y方向的最大值和最小值,即Mag_x 和Mag_y的最大值和最小值,将Mag_x的最大值作为眼球在水平方向上向右运动的最大幅度Mag_right,将Mag_x的最小值作为眼球在水平方向上向左运动的最大幅度Mag_left,将Mag_y的最大值作为眼球在竖直方向上向下运动的最大幅度Mag_bottom,将Mag_y的最小值作为眼球在竖直方向上向上运动的最大幅度Mag_top,即:Calculate the maximum and minimum values of the iris movement amplitude Mag in the x-direction and y-direction, namely the maximum and minimum values of Mag_x and Mag_y in all image frames, and take the maximum value of Mag_x as the maximum rightward movement of the eyeball in the horizontal direction. Amplitude Mag_right, take the minimum value of Mag_x as the maximum amplitude Mag_left of the leftward movement of the eyeball in the horizontal direction, take the maximum value of Mag_y as the maximum amplitude of the downward movement of the eyeball in the vertical direction Mag_bottom, take the minimum value of Mag_y as the eyeball in the vertical direction. The maximum amplitude Mag_top of the upward movement in the vertical direction, namely:

Mag_right=max(Mag_x)Mag_right=max(Mag_x)

Mag_left=min(Mag_x)Mag_left=min(Mag_x)

Mag_bottom=max(Mag_y)Mag_bottom=max(Mag_y)

Mag_top=min(Mag_y)Mag_top=min(Mag_y)

则该图像帧对应的眼动范围Range为:[Mag_left:Mag_right,Mag_top:Mag_bottom]。Then the eye movement range corresponding to the image frame is Range: [Mag_left:Mag_right,Mag_top:Mag_bottom].

通过以上处理步骤可完成本实施例的眼动范围识别方法并得到对应的识别结果,并在采集的视频图像帧中可以分别画出该眼动范围对应的眼球在水平方向(x_axis)和垂直方向 (y_axis)的运动幅度曲线。Through the above processing steps, the eye movement range recognition method of this embodiment can be completed and a corresponding recognition result can be obtained, and the eyeball corresponding to the eye movement range can be drawn in the horizontal direction (x_axis) and the vertical direction in the collected video image frames. (y_axis) Motion amplitude curve.

实施例2Example 2

本实施例为一种基于图像分析的眼动范围识别系统,所述系统是基于前述任一实施例中的识别方法对应的模块单元组成的识别系统,以用于实现对采集视频图像帧中的眼动范围进行识别。This embodiment is an eye movement range recognition system based on image analysis. The system is a recognition system composed of module units corresponding to the recognition methods in any of the foregoing embodiments, and is used to realize the recognition of data in captured video image frames. Eye movement range for recognition.

通过本发明提供的各实施例,可以基于采集的人眼活动视频图像帧进行自动分析和检测,利用图像处理方法提取有效的眼球活动的范围特征,相比于现有技术,本发明的识别方案检测结果客观准确,实现较高程度的自动测量,克服了现有技术数据采集困难的缺点,并且方案高效实用客观准确。Through the various embodiments provided by the present invention, automatic analysis and detection can be performed based on the collected human eye activity video image frames, and the effective range features of eye movements can be extracted by using the image processing method. Compared with the prior art, the identification scheme of the present invention The detection result is objective and accurate, a high degree of automatic measurement is realized, the disadvantage of difficult data collection in the prior art is overcome, and the scheme is efficient, practical, objective and accurate.

本说明书中公开的所有特征,或公开的所有方法或过程中的步骤,除了互相排斥的特征和/或步骤以外,均可以以任何方式组合。All features disclosed in this specification, or all disclosed steps in a method or process, may be combined in any way except mutually exclusive features and/or steps.

本发明并不局限于前述的具体实施方式。本发明扩展到任何在本说明书中披露的新特征或任何新的组合,以及披露的任一新的方法或过程的步骤或任何新的组合。The present invention is not limited to the foregoing specific embodiments. The present invention extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed.

Claims (10)

1. An eye movement range identification method based on image analysis is characterized by comprising the following steps:
(1) carrying out primary positioning on human eye images on the acquired video frames I _ frames, namely carrying out primary positioning on all acquired images containing human eyes within the range of human eyes to obtain the human eye images I _ eye after the primary positioning;
(2) preprocessing the human eye image I _ eye, and removing illumination influence to obtain a human eye image I _ eye _ color after illumination correction;
(3) determining an eye crack Contour ContoureEye for the eye image I _ eye _ color after the illumination correction, and determining an eye crack central point Center _ eye from the eye crack Contour ContoureEye;
(4) further determining an Iris outline Contour _ Iris in the human eye image I _ eye _ color after the illumination correction, and determining an Iris Center _ Iris from the Iris outline Contour _ Iris;
(5) determining an eye movement Range based on the determined Iris Center point Center _ Iris and eye fissure Center point Center _ eye;
the step (1) specifically comprises:
(1.1) initially positioning the human eye image of the first frame video frame:
setting a first frame video frame as an I _ frame (1), carrying out primary positioning on the I _ frame (1) comprises calibrating a human face by using a deep learning training model, searching the position of eye cracks of human eyes from calibrated characteristic points, and fitting the calibrated point of the human eyes by using a rectangle so as to determine an eye image I _ eye (1) containing the primary positioning of the human eyes;
(1.2) carrying out initial positioning on the human eye image on the rest video frames:
(1.2.1) determining the human eye activity Range _ eye of the current video frame;
assuming that the current video frame is the nth frame, the image frame is marked as I _ frame (n), and the human eye movement Range _ eye of the current frame is determined by using the human eye image I _ eye (n-1) after the initial positioning of the previous frame;
the abscissa of the left and right boundary points of the Range _ eye of the active Range is Range _ left _ x and Range _ right _ x, and the ordinate of the upper and lower boundary points is Range _ top _ y and Range _ bottom _ y, which are respectively:
Range_left_x=eye_left_x-W
Range_right_x=eye_right_x+W
Range_top_y=eye_top_y-H
Range_bottom_y=eye_bottom_y+H;
wherein, W and H are the width and height of the human eye image I _ eye (n-1) respectively;
(1.2.2) carrying out primary human eye positioning on the current video frame based on the human eye activity Range _ eye of the current video frame, and sequentially finishing the primary human eye positioning on all the video frames;
dividing the human eye activity Range _ eye into a plurality of windows by using a sliding Window method, wherein the Window size is WxH, the Step length in the horizontal direction is set to be Step _ len _ x, the Step length in the vertical direction is set to be Step _ len _ y, and then the top left corner vertex of the first Window corresponds to the top left corner vertex of the current human eye activity Range _ eye;
calculating the similarity between each Window and the previous human eye image I _ eye (n-1), searching the Window with the highest similarity, and taking the Window with the highest similarity as the human eye image I _ eye (n) of the current frame.
2. The eye movement range recognition method based on image analysis as claimed in claim 1, wherein the specific method for preprocessing the human eye image in the step (2) is as follows: and for the initially positioned human eye image I _ eye, eliminating the influence caused by uneven illumination on the extracted human eye image I _ eye by using a multi-scale Retinex algorithm with color recovery to obtain a preprocessed image I _ eye _ color.
3. The eye movement range recognition method based on image analysis as claimed in claim 2, wherein the step (3) of determining the eye crack Contour _ eye and the eye crack Center point _ eye for the photo-corrected eye image I _ eye _ color specifically comprises:
(3.1) acquiring a Scharr gradient component image corresponding to the human eye image I _ eye _ color after illumination correction:
(3.1.1) extracting the Scharr gradient of the image I _ eye _ color in the RGB space;
firstly, calculating the gradient of an image I _ eye _ color by using a Scharr operator, wherein the Scharr operator comprises a Scharr operator Gx in the horizontal direction and a Scharr operator Gy in the vertical direction;
if the gradient value of the (I, j) th pixel point of the eye image I _ eye _ color after the illumination correction in the horizontal direction is Gx (I, j), and the gradient value in the vertical direction is Gy (I, j), the total gradient value G (I, j) at the pixel point (I, j) is:
Figure FDA0003750168420000021
(3.1.2) converting the preliminarily extracted Scharr gradient image I _ Scharr into an HSV space, and extracting a corresponding V component to obtain a corresponding component image I _ ScharrV;
(3.2) carrying out edge detection on the human eye image I _ eye _ color by using an edge detection algorithm to obtain a corresponding gradient image I _ HED;
(3.3) determining the position of the eye crack Contour Contour _ eye based on the gradient component image I _ ScharrV and the gradient image I _ HED;
(3.4) determining the Center _ eye of the eye crack Contour Contour _ eye.
4. The eye movement range recognition method based on image analysis as claimed in claim 3, wherein the step (3.3) of determining the position of the eye crack Contour Contour _ eye specifically comprises:
(3.3.1) combining the gradient component image I _ ScharrV and the gradient image I _ HED for extracting a corresponding binary image;
the maximum value of the pixel values of all the pixel points in the gradient component image I _ ScharrV is set as V _ Vmax, and the binary image I _ binary1 obtained when the threshold is set as V _ Vmax/4 is:
Figure FDA0003750168420000031
the maximum value of the pixel values of all the pixel points in the gradient image I _ HED is set as V _ HEDmax, and the binary image I _ binary2 obtained when the threshold is set as V _ HEDmax/3 is:
Figure FDA0003750168420000032
and (3) performing phase comparison on the binarized image I _ binary1 and the binarized image I _ binary2, and taking the intersection of the two to obtain a processed binary image I _ binary, namely:
I_binary(i,j)=I_binary1(i,j)&I_binary2(i,j);
wherein, I _ binary (I, j), I _ binary1(I, j) and I _ binary2(I, j) respectively represent the pixel values of the (I, j) th pixel points in the binary images I _ binary, I _ binary1 and I _ binary 2;
(3.3.2) performing morphological processing on the extracted binary image I _ binary;
firstly, performing expansion operation on the binary image I _ binary to obtain I _ dilate, and then performing corrosion operation to obtain an image I _ closing, wherein a calculation formula of the closing operation is as follows:
Figure FDA0003750168420000033
Figure FDA0003750168420000034
wherein A is 2 x 2 square structural element, I _ die c Is the complement of I _ dilate;
(3.3.3) further removing redundant small objects in the image and extracting the maximum connected domain in the image;
and removing small noise points in the image I _ closing obtained after the closed operation by using a method for removing small targets in morphology to obtain a corresponding image I _ morphology, and further extracting a maximum connected domain from the image I _ morphology as a corresponding eye fissure Contour Contour _ eye.
5. The eye movement range recognition method based on image analysis as claimed in claim 4, wherein the specific steps of extracting the maximum connected component in the image in the step (3.3.3) are as follows:
3.3.3.1) first, all contours in the image I _ morphology are extracted, denoted as C _ mor _ set, i.e.:
C_mor_set={C_mor 1 ,C_mor 2 ,…,C_mor k1 ,…,C_mor n1 }
wherein, C _ mor k1 (1 ≦ k1 ≦ n1) representing the k1 th contour, n1 being the total number of contours in the image I _ morphology;
3.3.3.2) then, the Area of each contour is calculated, resulting in an Area set Area _ set, namely:
Area_set={Area 1 ,Area 2 ,…,Area k1 ,…,Area n1 }
wherein, Area k1 Area representing the k1 th contour;
3.3.3.3) removing connected domains with the area less than 300 to obtain corresponding images I _ RemoveSmallObjects;
3.3.3.4) find the Contour C _ mormax with the largest area in the image I _ removesmalllobjects, which is the corresponding eye-crack Contour _ eye.
6. The eye movement range recognition method based on image analysis as claimed in claim 5, wherein the step (3.4) of determining the Center point Center _ eye of the eye crack Contour Contour _ eye comprises the following steps:
for the eye crack Contour _ eye, finding the left and right boundary points of the Contour, respectively Point _ left and Point _ right, namely:
Point_left_x=min(Contour_eye_x)
Point_right_x=max(Contour_eye_x)
wherein Point _ left _ x and Point _ right _ x represent the abscissa of Point _ left and Point _ right, and content _ eye _ x represents the abscissa of the points constituting the eye crack Contour;
searching the vertical coordinates Point _ left _ y and Point _ right _ y corresponding to the left boundary Point _ left and the right boundary Point _ right by using the horizontal coordinates Point _ left _ x and Point _ right _ x of the left boundary Point and the right boundary Point _ right;
taking the average value of the abscissa points Point _ left _ x and Point _ right _ x of the left and right boundary points Point _ left and Point _ right as the abscissa value Center _ eye _ x of the eye crack Center Point _ eye, taking the average value of the ordinate points Point _ left _ y and Point _ right _ y of Point _ left and Point _ right as the ordinate value Center _ eye _ y of the eye crack Center _ eye, and obtaining the pixel coordinates (Center _ eye _ x, Center _ eye _ y) of the eye crack Center Point _ eye, namely:
Center_eye_x=(Point_left_x+Point_right_x)/2
Center_eye_y=(Point_left_y+Point_right_y)/2。
7. the eye movement range recognition method based on image analysis as claimed in claim 2, wherein the step (4) of determining the Iris outline Contour _ Iris and the Iris Center _ Iris in the image comprises the specific steps of:
(4.1) image binarization
Calculating an Otsu threshold value Otsu _ thresh for the gradient image I _ ScharrV by using an Otsu threshold value method, and performing binarization processing on the gradient image I _ Scharr by using the threshold value Otsu _ thresh to obtain a corresponding binary image I _ binary 3:
Figure FDA0003750168420000051
(4.2) morphological Corrosion treatment
Performing morphological corrosion operation on the image I _ binary3 by using the 3 × 3 square structural element B, removing burrs at the edge of the iris, disconnecting the connection with a noise point, and obtaining a corresponding image I _ evolution:
Figure FDA0003750168420000052
(4.3) filling holes and finding the maximum connected domain
Filling holes caused by lamplight in video recording in the iris outline of the image I _ exposure by using a morphological hole filling method to obtain a corresponding image I _ holeruled; further extracting all connected domains in the image I _ holeruled, and taking the connected domain with the largest area as the position of the iris;
(4.4) determining the corresponding Iris Center point Center _ Iris in the Iris Contour _ Iris:
calculating the centroid of the Iris outline Contour _ Iris, wherein the centroid point is the central point (Center _ Iris _ x, Center _ Iris _ y) of the Iris, and the centroid calculation formula is as follows:
Figure FDA0003750168420000053
wherein px (k) and py (k) (k is more than or equal to 1 and less than or equal to m) respectively represent the abscissa and the ordinate of the kth point on the Iris outline Contour _ Iris, and Contour _ Iris (i, j) represents the pixel value of the (i, j) th pixel point.
8. The eye movement range recognition method based on image analysis as claimed in claim 7, wherein the specific step of finding the maximum connected component in step (4.3) comprises:
(4.3.1) first, all contours in the image I _ holeruled are extracted, forming a contour set C _ hole _ set, namely:
C_hole_set=[C_hole 1 ,C_hole 2 ,…,C_hole k2 ,…,C_hole n2 }
wherein, C _ hole k2 (1 ≦ k2 ≦ n2) representing the k2 th contour, n2 being the total number of contours in the image I _ holeruled;
(4.3.2) Next, the Area of each contour is calculated, resulting in the Area set Area _ set1, namely:
Area_set1={Area 1 ,Area 2 ,…,Area k2 ,…,Area n2 }
wherein, Area k2 (1. ltoreq. k 2. ltoreq. n2) represents the area of the k2 th contour;
(4.3.3) searching the Contour C _ holomax with the largest area, wherein the Contour is the corresponding Iris Contour Contour _ Iris.
9. The eye movement Range recognition method based on image analysis as claimed in claim 2, wherein the step (5) of determining the eye movement Range based on the determined Iris Center point Center _ Iris and eye fissure Center point Center _ eye comprises the specific steps of:
after the eye fissure Center point _ eye and the Iris Center point _ Iris in each frame of image are located and determined, calculating the motion amplitude Mag of the Iris, wherein the position values of the motion amplitude Mag in the x direction and the y direction are Mag _ x and Mag _ y respectively:
Mag_x=Center_Iris_x-Center_eye_x
Mag_y=Center_Iris_y-Center_eye_y;
calculating the maximum value and the minimum value of the iris motion amplitude Mag in the x direction and the y direction, namely the maximum value and the minimum value of Mag _ x and Mag _ y, respectively, taking the maximum value of Mag _ x as the maximum amplitude Mag _ right of the eyeball moving to the right in the horizontal direction, taking the minimum value of Mag _ x as the maximum amplitude Mag _ left of the eyeball moving to the left in the horizontal direction, taking the maximum value of Mag _ y as the maximum amplitude Mag _ bottom of the eyeball moving downwards in the vertical direction, and taking the minimum value of Mag _ y as the maximum amplitude Mag _ top of the eyeball moving upwards in the vertical direction, namely:
Mag_right=max(Mag_x)
Mag_left=min(Mag_x)
Mag_bottom=max(Mag_y)
Mag_top=min(Mag_y)
the eye movement Range corresponding to the image frame is: [ Mag _ left: Mag _ right, Mag _ top: Mag _ bottom ].
10. An eye movement range recognition system based on image analysis, which is characterized in that the system is a recognition system composed of module units corresponding to the steps of the eye movement range recognition method according to any one of claims 1-9, and is used for recognizing the eye movement range in the collected video image frame.
CN201910940365.5A 2019-09-30 2019-09-30 Eye movement range identification method and system based on image analysis Expired - Fee Related CN110705468B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910940365.5A CN110705468B (en) 2019-09-30 2019-09-30 Eye movement range identification method and system based on image analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910940365.5A CN110705468B (en) 2019-09-30 2019-09-30 Eye movement range identification method and system based on image analysis

Publications (2)

Publication Number Publication Date
CN110705468A CN110705468A (en) 2020-01-17
CN110705468B true CN110705468B (en) 2022-08-30

Family

ID=69197842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910940365.5A Expired - Fee Related CN110705468B (en) 2019-09-30 2019-09-30 Eye movement range identification method and system based on image analysis

Country Status (1)

Country Link
CN (1) CN110705468B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861977A (en) * 2020-05-27 2020-10-30 温州医科大学附属眼视光医院 A feature extraction method of anterior segment tomographic images based on machine vision
CN112347860B (en) * 2020-10-16 2023-04-28 福建天泉教育科技有限公司 Gradient-based eye state detection method and computer-readable storage medium
CN115908237B (en) * 2022-08-18 2023-09-08 上海佰翊医疗科技有限公司 Eye crack width measuring method, device and storage medium
CN115376167B (en) * 2022-10-26 2023-02-24 山东圣点世纪科技有限公司 Palm detection method and system under complex background
CN115761871B (en) * 2022-12-01 2023-08-11 北京中科睿医信息科技有限公司 Detection image generation method, device, equipment and medium based on eye movement detection
CN116958885B (en) * 2023-09-19 2023-12-05 四川大学 Correcting glasses wearing comfort evaluation method and system based on reading vision

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102426644A (en) * 2011-08-24 2012-04-25 夏东 Human Eye Cross Positioning Method Based on GentleBoost Machine Learning
CN103885589A (en) * 2014-03-06 2014-06-25 华为技术有限公司 Eye tracking method and device
CN106778499A (en) * 2016-11-24 2017-05-31 江苏大学 A kind of method of quick positioning people's eye iris during iris capturing
US10089525B1 (en) * 2014-12-31 2018-10-02 Morphotrust Usa, Llc Differentiating left and right eye images
WO2019011803A1 (en) * 2017-07-10 2019-01-17 Trinamix Gmbh Detector for optically detecting at least one object
CN110221699A (en) * 2019-06-13 2019-09-10 北京师范大学珠海分校 A kind of eye movement Activity recognition method of front camera video source

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7085401B2 (en) * 2001-10-31 2006-08-01 Infowrap Systems Ltd. Automatic object extraction
US7508979B2 (en) * 2003-11-21 2009-03-24 Siemens Corporate Research, Inc. System and method for detecting an occupant and head pose using stereo detectors

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102426644A (en) * 2011-08-24 2012-04-25 夏东 Human Eye Cross Positioning Method Based on GentleBoost Machine Learning
CN103885589A (en) * 2014-03-06 2014-06-25 华为技术有限公司 Eye tracking method and device
US10089525B1 (en) * 2014-12-31 2018-10-02 Morphotrust Usa, Llc Differentiating left and right eye images
CN106778499A (en) * 2016-11-24 2017-05-31 江苏大学 A kind of method of quick positioning people's eye iris during iris capturing
WO2019011803A1 (en) * 2017-07-10 2019-01-17 Trinamix Gmbh Detector for optically detecting at least one object
CN110221699A (en) * 2019-06-13 2019-09-10 北京师范大学珠海分校 A kind of eye movement Activity recognition method of front camera video source

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于MATLAB的视觉方向识别算法;吴海翔;《中国科技信息》;20171012;全文 *
虹膜识别关键技术研究及实现;周啸;《南京航空航天大学硕士论文》;20120815;第3.4.1节 *

Also Published As

Publication number Publication date
CN110705468A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN110705468B (en) Eye movement range identification method and system based on image analysis
CN101359365B (en) A Method of Iris Location Based on Maximum Inter-class Variance and Gray Level Information
CN109753997B (en) An automatic accurate and robust segmentation method for liver tumors in CT images
CN107563996B (en) A kind of novel discus nervi optici dividing method and system
CN106530283A (en) SVM (support vector machine)-based medical image blood vessel recognition method
CN101539991A (en) Effective image-region detection and segmentation method for iris recognition
WO2014031086A1 (en) Methods and systems for automatic location of optic structures in an image of an eye, and for automatic retina cup-to-disc ratio computation
CN106778499B (en) Method for rapidly positioning human iris in iris acquisition process
CN108615239B (en) Tongue Image Segmentation Method Based on Thresholding Technique and Grayscale Projection
CN1885314A (en) Pre-processing method for iris image
CN106127735B (en) A kind of facilities vegetable edge clear class blade face scab dividing method and device
CN110889846A (en) Diabetes retina image optic disk segmentation method based on FCM
CN104463215A (en) Tiny aneurysm occurrence risk prediction system based on retina image processing
Meng et al. A framework for retinal vasculature segmentation based on matched filters
CN114972272A (en) Grad-CAM-based segmentation method for new coronary pneumonia lesions
Mahdi et al. Glaucoma Diagnosis Based on Retinal Fundus Image: A Review
Harangi et al. Automatic detection of the optic disc using majority voting in a collection of optic disc detectors
CN110929570A (en) Iris rapid positioning device and positioning method thereof
CN114202795A (en) Method for quickly positioning pupils of old people
Aruchamy et al. Automated glaucoma screening in retinal fundus images
CN110751064B (en) Method and system for analyzing blink times based on image processing
Jayanthi et al. Automatic diagnosis of retinal diseases from color retinal images
CN112258532A (en) A method for localization and segmentation of the corpus callosum in ultrasound images
CN106846348A (en) The method that glasses are automatically removed in facial image
CN114283176B (en) Pupil track generation method based on human eye video

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220830

CF01 Termination of patent right due to non-payment of annual fee