Infrared pupil identification measurement method and device, storage medium and terminal equipment

文档序号:1526443 发布日期:2020-02-14 浏览:42次 中文

阅读说明:本技术 一种红外线瞳孔识别测量方法、装置、存储介质及终端设备 (Infrared pupil identification measurement method and device, storage medium and terminal equipment ) 是由 张冰 伊合山·艾尼瓦尔 李新灵 张静静 陈杰 于 2019-12-12 设计创作,主要内容包括:本发明公开了一种红外线瞳孔识别测量方法、装置、存储介质及终端设备,包括如下步骤:采集待测量的瞳孔图像;将瞳孔图像进行灰度转换;进行图像分割获得瞳孔图像的二值化图像;对得到的二值化图像进行边缘检测和边缘圆弧拟合;重复上述步骤获得多组测量数据并求取平均值;对所得测量数据进行比例转换得到测量结果。本发明通过对采集的眼部图像进行处理,获得客观、准确、量化的瞳孔变化数据信息,在针对病人治疗时和诊断某些引起瞳孔收缩变化的症状时,可以减轻传统治疗对医患双方的体力消耗,提高了病情数据分析的准确度和人们就诊的效率,为后续治疗提供了准确的依据。(The invention discloses an infrared pupil identification measurement method, an infrared pupil identification measurement device, a storage medium and a terminal device, wherein the method comprises the following steps: collecting a pupil image to be measured; carrying out gray level conversion on the pupil image; carrying out image segmentation to obtain a binary image of the pupil image; performing edge detection and edge arc fitting on the obtained binary image; repeating the steps to obtain a plurality of groups of measurement data and calculating an average value; and carrying out proportional conversion on the obtained measurement data to obtain a measurement result. According to the invention, the acquired eye images are processed to obtain objective, accurate and quantitative pupil change data information, so that the physical consumption of the traditional treatment on the doctor and the patient can be reduced when the patient is treated and some symptoms causing pupil contraction change are diagnosed, the accuracy of disease condition data analysis and the efficiency of seeing a doctor are improved, and an accurate basis is provided for subsequent treatment.)

1. An infrared pupil identification measurement method is characterized by comprising the following steps:

s1: collecting a pupil image to be measured;

s2: carrying out gray level conversion on the pupil image;

s3: carrying out image segmentation to obtain a binary image of the pupil image;

s4: performing edge detection and edge arc fitting on the obtained binary image;

s5: repeating the steps S1-S4 to obtain a plurality of groups of measurement data and calculating an average value;

s6: and carrying out proportional conversion on the obtained measurement data according to the pixel/true ratio value to obtain a measurement result.

2. The infrared pupil identification and measurement method according to claim 1, wherein the image segmentation adopts a histogram two-peak method, and a gray value corresponding to a minimum frequency value between two peaks is selected as a segmentation gray threshold value to generate a binarized image of the pupil; the method for generating the binary image of the pupil comprises the steps of taking pixel points with the gray value smaller than a segmentation gray threshold value in the image as pupil pixel points, and taking the pixel points as background pixel points if the pixel points are not the segmentation gray threshold value, and carrying out binary segmentation on the pupil image and the background image in the image according to the pupil pixel points and the background pixel points.

3. The infrared pupil identification and measurement method according to claim 1, wherein the edge detection obtains edge pixel points of a pupil binarized image by an IMAQ edge detection function; and the edge arc fitting outputs the radius value of the optimal arc fitting through an IMAQ.Fit.circle.2 arc fitting function and through inputting an edge pixel image.

4. The infrared pupil identification measurement method according to claim 1, further comprising a pixel/true ratio value obtaining step, comprising the following sub-steps:

a1: setting an image acquisition device at a measurement position and acquiring image information of a reference object;

a2: extracting the pixel width of the reference object and acquiring the real width of the reference object;

a3: the calculated pixel true ratio value ppm = object pixel width/object true width.

5. An infrared pupil identification measuring device, comprising:

a pupil image acquisition unit which acquires a pupil image to be measured;

the gray level conversion unit is used for carrying out gray level conversion on the collected pupil image;

an image segmentation unit for performing image segmentation on the gray level image to obtain a binary image of the pupil image;

the edge detection and arc fitting unit is used for acquiring edge pixel points of the binarized pupil image and performing arc fitting according to the acquired edge pixel points to obtain the optimal arc fitting radius;

and the operation processing unit is used for solving the average value of the obtained multiple groups of optimal circular arc fitting radiuses and carrying out proportion conversion according to the pixel/real ratio value to obtain a measurement result.

6. The infrared pupil identification measuring device according to claim 5, wherein the image segmentation unit selects a gray value corresponding to a minimum frequency value between two peaks in an image gray histogram as a segmentation gray threshold to generate a binarized image of the pupil; and the generated binary image of the pupil takes the pixel points with the gray value smaller than the segmentation gray threshold value in the image as pupil pixel points, and otherwise, the pixel points are taken as background pixel points, and the pupil image and the background image in the image are subjected to binary segmentation according to the pupil pixel points and the background pixel points.

7. The infrared pupil identification and measurement device according to claim 5, wherein the edge detection and arc fitting unit obtains edge pixel points of the pupil binarized image by an IMAQ edge detection function; and inputting edge pixel points of the pupil binarization image into an IMAQ.Fit.circle.2 arc fitting function to obtain a radius value of the optimal arc fitting.

8. The infrared pupil identification measuring device according to claim 5, further comprising a pixel/true ratio value obtaining unit that calculates a ratio of a pixel width to a true width of a reference object as a pixel/true ratio value by obtaining image pixel information of the reference object collected by the image collecting device at the measurement position and true size information of the reference object.

9. A terminal device for realizing infrared pupil identification measurement, the terminal device comprising:

one or more processors;

storage means for storing one or more programs;

the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of infrared pupil identification measurement of any of claims 1-4.

10. A computer readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement a method of infrared pupil identification measurement as recited in any of claims 1-4.

Technical Field

The present invention relates to the field of measurement technologies, and in particular, to an infrared pupil identification measurement method, an infrared pupil identification measurement apparatus, a storage medium, and a terminal device.

Background

In recent years, with the continuous progress of medical level, examination of vital signs and health status of patients by measuring pupils is becoming one of clinically important detection methods. At present, no monitoring means for effectively evaluating pain stress exists in the perioperative period of general anesthesia patients, and an anesthesiologist only evaluates the analgesic level through personal experience, blood pressure and heart rate of the patients and other indexes. The pupil is under dual sympathetic/parasympathetic control: sympathetic excitation causes the pupil to dilate, and parasympathetic excitation causes it to contract. The pupil diameter therefore increases upon painful stimuli, a phenomenon known as "pupillary reflex dilation" and is observed in both awake and anesthetized patients.

Traditional pupil monitoring is by observation and calibration, or by manual measurement with calipers. The method not only has rough measurement results and consumes time, but also causes energy consumption to doctors, reduces the working efficiency, increases the error probability and brings great inconvenience to clinical work. Currently, the pupil size of a patient is clinically measured by visual inspection or by directly using a ruler, or by punching a hole on the ruler for contrast measurement. The subjective factors or operation errors of a measurer are large, so that the reading is inaccurate, and accurate treatment reference cannot be provided for clinic.

Disclosure of Invention

The invention aims to provide an infrared pupil identification and measurement method, device, storage medium and terminal equipment, aiming at the problems, the pupil is detected by utilizing image processing and analysis through eye image information acquired by an early-stage pupil image acquisition device, the center, radius, area and real-time dynamic characteristic curve of the pupil are acquired, the objective, accurate and quantitative pupil detection is realized, and reliable diagnosis basis is provided for doctors.

An infrared pupil identification measurement method comprises the following steps:

s1: collecting a pupil image to be measured;

s2: carrying out gray level conversion on the pupil image;

s3: carrying out image segmentation to obtain a binary image of the pupil image;

s4: performing edge detection and edge arc fitting on the obtained binary image;

s5: repeating the steps S1-S4 to obtain a plurality of groups of measurement data and calculating an average value;

s6: and carrying out proportional conversion on the obtained measurement data according to the pixel/true ratio value to obtain a measurement result.

Furthermore, the image segmentation adopts a histogram double peak method, a gray value corresponding to a minimum frequency value between two peaks is selected as a segmentation gray threshold value, and a binary image of the pupil is generated.

Further, the infrared pupil identification measurement method is characterized in that the method for generating the pupil binarized image is to use pixel points with the gray value smaller than the segmentation gray threshold value in the image as pupil pixel points, and vice versa as background pixel points, and to perform binarized segmentation on the pupil image and the background image in the image according to the pupil pixel points and the background pixel points.

Further, an infrared pupil identification measurement method, wherein the edge detection obtains edge pixel points of a pupil binarization image through an IMAQ edge detection function; and the edge arc fitting outputs the radius value of the optimal arc fitting through an IMAQ.Fit.circle.2 arc fitting function and through inputting an edge pixel image.

Further, the infrared pupil identification measurement method further comprises a step of obtaining a pixel/true ratio value, and comprises the following substeps:

a1: setting an image acquisition device at a measurement position and acquiring image information of a reference object;

a2: extracting the pixel width of the reference object and acquiring the real width of the reference object;

a3: the calculated pixel true ratio value ppm = object pixel width/object true width.

An infrared pupil identification measuring device comprising:

a pupil image acquisition unit which acquires a pupil image to be measured;

the gray level conversion unit is used for carrying out gray level conversion on the collected pupil image;

an image segmentation unit for performing image segmentation on the gray level image to obtain a binary image of the pupil image;

the edge detection and arc fitting unit is used for acquiring edge pixel points of the binarized pupil image and performing arc fitting according to the acquired edge pixel points to obtain the optimal arc fitting radius;

and the operation processing unit is used for calculating the average value of the obtained multiple groups of optimal circular arc fitting radiuses and carrying out proportion conversion to obtain a measurement result.

Furthermore, the image segmentation unit selects a gray value corresponding to a minimum frequency value between two peaks in an image gray histogram as a segmentation gray threshold value to generate a binary image of the pupil.

Further, the infrared pupil identification measuring device generates a pupil binarized image, takes pixel points with the gray value smaller than a segmentation gray threshold value in the image as pupil pixel points, and takes the pixel points as background pixel points, and performs binarized segmentation on the pupil image and the background image in the image according to the pupil pixel points and the background pixel points.

Further, the edge detection and arc fitting unit obtains edge pixel points of a pupil binarization image through an IMAQ edge detection function; and inputting edge pixel points of the pupil binarization image into an IMAQ.Fit.circle.2 arc fitting function to obtain a radius value of the optimal arc fitting.

Further, the infrared pupil identification measuring device further comprises a pixel/real ratio value acquisition unit, and the pixel/real ratio value acquisition unit is used for calculating the ratio of the pixel width to the real width of the reference object as the pixel/real ratio value by acquiring the image pixel information of the reference object acquired by the image acquisition equipment at the measurement position and the real size information of the reference object.

A terminal device for enabling infrared pupil identification measurement, the terminal device comprising:

one or more processors;

storage means for storing one or more programs;

the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the above-described method of infrared pupil identification measurement.

A computer readable storage medium having stored thereon instructions which, when executed by a processor, implement the above-described method of infrared pupil identification measurement.

The invention has the beneficial effects that: according to the invention, the acquired eye images are processed to obtain objective, accurate and quantitative pupil change data information, so that the physical consumption of the traditional treatment on the doctor and the patient can be reduced when the patient is treated and some symptoms causing pupil contraction change are diagnosed, the accuracy of disease condition data analysis and the efficiency of seeing a doctor are improved, and an accurate basis is provided for subsequent treatment.

Drawings

FIG. 1 is a schematic flow diagram of the process of the present invention.

Fig. 2 is a schematic structural diagram of the pupil identification and measurement device of the present invention.

Detailed Description

In order to more clearly understand the technical features, objects, and effects of the present invention, embodiments of the present invention will now be described with reference to the accompanying drawings.

As shown in fig. 1, in this embodiment, an infrared pupil identification and measurement method includes the following steps: s1: collecting a pupil image to be measured; s2: carrying out gray level conversion on the pupil image; s3: carrying out image segmentation to obtain a binary image of the pupil image; s4: performing edge detection and edge arc fitting on the obtained binary image; s5: repeating the steps S1-S4 to obtain a plurality of groups of measurement data and calculating an average value; s6: and carrying out proportional conversion on the obtained measurement data according to the pixel/true ratio value to obtain a measurement result.

Eye image acquisition:

as shown in fig. 2, an infrared pupil identification measuring device includes: a handle 1; the image acquisition unit is arranged on the front side of the handle measuring part 2 and used for acquiring pupil image information; an image display unit 3 disposed behind the handle measuring unit 2 for receiving and displaying data information generated by the image processing circuit; the measurement control circuit is electrically connected with the image acquisition unit and the image display unit 3, is arranged in the cavity of the handle 1, and controls the running states of the image acquisition unit and the image display unit 3; the image processing circuit is arranged in the cavity of the handle 1, receives image information acquired by the image acquisition unit, calculates and generates size data information of pupils, and sends the data information to the image display unit 3, wherein the image acquisition unit adopts an infrared camera; the image display unit 3 adopts a liquid crystal display.

Specifically, the infrared pupil identification measuring device comprises a measuring control circuit, an interface circuit and a driving circuit, wherein the interface circuit and the driving circuit are connected with the control unit; the interface circuit is connected with the image acquisition unit and is used for transmitting the acquired pupil image information; the driving circuit is connected with the image display unit and is used for driving the image display unit to display the received data information.

The image processing circuit comprises a microprocessor and a communication unit connected with the microprocessor, and is used for processing and uploading collected images, an embedded system is installed on the microprocessor, and Labview in the embedded system is used for image processing.

Specifically, an infrared ray pupil discernment measuring device, communication unit adopt WIFI communication module for microprocessor carries out data communication with outside intelligent equipment.

In another embodiment, the infrared pupil identification measuring device further comprises a shading cylinder 4; the connecting end of the shading cylinder 4 is connected with the front side of the handle testing part, and an image acquisition unit is arranged in the shading cylinder; the attaching end of the shading cylinder 4 is provided with an attaching joint 5 for attaching the eye socket structure of the human body; the fitting joint 5 adopts a soft silicon rubber joint, so that the light shading cylinder can be conveniently fitted with the eye socket of a human body and used for shading measurement.

In another embodiment, the infrared pupil identification measuring device further comprises a measurement control device 6, which is arranged at the lower side of the image display unit of the handle measuring part 2, is electrically connected with the measurement control circuit and is used for transmitting a measurement control signal to the measurement control circuit; the measurement control device 6 adopts a control button group.

Processing of the image:

and carrying out gray level conversion on the pupil image, realizing image segmentation by using a histogram double-peak method, and selecting the minimum value between two peaks in a gray level histogram as a segmentation threshold. The segmentation Threshold is applied to the pupil image using an IMAQ Threshold function, so that the object and background of the image are relatively distinct. The pupil and the background have obvious difference in gray value, the gray value of the pupil image is concentrated on the left front of the histogram, the gray value of the background is concentrated on the right front, the minimum gray value is the optimal threshold value, the threshold value is 50, the pupil image can be segmented, the segmented image is also called a binary image, 0 represents black, and 1 represents white.

And (3) edge detection and edge arc fitting, wherein the function for detecting the edge of the image in the Labview is IMAQ edge definition by utilizing the function for detecting the edge of the image in the Labview. And searching a point capable of realizing the best circular arc fitting by using an IMAQ.Fit.circle.2 function and returning a circle with radius, perimeter and area. Wherein the input setting parameters include the distance of the pixel radius accepted at the moment of fitting the circle: 36 pixels; specify the quality of the fit circle required: 700 of the base material; maximum iteration number: 500.

and calculating a mean value, measuring a plurality of direction data of the pupil in the acquired image, and calculating the mean value.

And (4) carrying out proportion conversion on the obtained data according to the pixel/real ratio value to obtain final pupil data information. And calculating the ratio of the pixel width to the real width of the reference object by acquiring the image pixel information of the reference object acquired by the image acquisition equipment at the measurement position and the real size information of the reference object. And acquiring the real size data information of the pupil by utilizing the pixel/real ratio value and the acquired and calculated pupil pixel width information.

Specifically, a ratio is first defined to measure the number of pixels per given unit of measure (pixels permetric). To determine the size of the pupil diameter in an image, it is first necessary to use a reference object as a "calibration" point. The true dimensions of the reference object (the size of a millimeter or inch equivalent in width or height) are known at the optimal camera height. It is used to define the pixels per metric ratio, which is defined as: pixels per metric = object pixel width/object true width. Assuming that the reference has a pixel width of 150 pixels (based on its associated bounding box) and a true width of 1 inch, in this case pixel per metric =150 px/1in =150px, there are approximately 150 pixels per inch in the image at the optimum height. With this ratio, the size of the pupil diameter detected in the image can be calculated, and this optimal camera height is constant at the measuring pupil.

An infrared pupil identification measuring device comprising: a pupil image acquisition unit which acquires a pupil image to be measured;

the gray level conversion unit is used for carrying out gray level conversion on the collected pupil image; an image segmentation unit for performing image segmentation on the gray level image to obtain a binary image of the pupil image; the edge detection and arc fitting unit is used for acquiring edge pixel points of the binarized pupil image and performing arc fitting according to the acquired edge pixel points to obtain the optimal arc fitting radius; and the operation processing unit is used for calculating the average value of the obtained multiple groups of optimal circular arc fitting radiuses and carrying out proportion conversion to obtain a measurement result.

In this embodiment, a terminal device is provided, and the terminal device includes: a memory and a processor, the memory having stored therein a computer program operable on the processor. The processor executes the computer program to implement the infrared pupil identification measurement method in the above embodiments, and the number of the memory and the processor may be one or more.

In this embodiment, a computer scale storage medium is provided, on which a computer program is stored, which when executed by a processor implements the steps of the method of the above embodiment.

The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于边界框修正网络的粗标注眼底照出血病变检测方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!