Method and device for smooth output of detection data

By using the technology of smooth output data in the pupil detection method, the problem that the detection results are affected by imaging quality is solved, the detection stability and accuracy are improved, the cost and time are reduced, and it is suitable for long-distance infrared pupil detection.

CN113052891BActive Publication Date: 2024-12-17TSINGHUA UNIVERSITY +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201911374673.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-27
Publication Date
2024-12-17
Estimated Expiration
2039-12-27

AI Technical Summary

Technical Problem

In the existing pupil detection methods, the detection results are easily affected by imaging quality, resulting in unstable pupil size, and conventional urine detection methods are time-consuming and costly, and drug users can bypass the detection through neutralization methods.

Method used

Using the smooth output method of detection data, by receiving the detection data and calculating the median value, comparing the difference from the previous output value. If the difference is within the threshold, the previous output value is used. If the difference is greater than the threshold, the median value is used to ensure the stability of the data. sex.

Benefits of technology

It improves the stability of the detection equipment, reduces fluctuations in measurement results, provides more accurate pupil size detection results, and reduces detection cost and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113052891B_ABST
    Figure CN113052891B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure provides a method and device for smoothing output of detection data, the method comprising receiving detection data in sequence; obtaining a first median satisfying a first time constraint based on the n-th detection data and the detection data received before the n-th detection data; comparing the first median with the output value of the n-1-th detection data: when the absolute value of the difference between the first median and the output value of the n-1-th detection data is less than a first threshold, taking the output value of the n-1-th detection data as the output value of the n-th detection data; when the absolute value of the difference between the first median and the output value of the n-1-th detection data is greater than or equal to the first threshold, taking the first median as the output value of the n-th detection data; wherein n is a natural number greater than 1, and when the n-1-th detection data satisfies a second time constraint, determining the output value of the n-1-th detection data based on multiple detection data satisfying the second time constraint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the field of data processing, and more specifically, to a method and device for smoothly outputting detection data. Background Art

[0002] Monitoring equipment based on video image processing technology is widely used in various occasions. For example, screening drug users based on infrared image acquisition is widely used in drug detection.

[0003] For a long time, in drug investigation work, the conventional test methods for checking whether suspects have taken drugs include urine, blood or saliva tests. Since the above tests must go through many links such as sampling under supervision, they often take up a lot of time, manpower and material resources, and the test results are easily interfered with, resulting in false negatives, false positives and other problems. In addition, there are many types of drugs, which need to be checked one by one with urine test strips, which increases the use of urine test strips and costs, and is not suitable for widespread screening. In addition, in recent years, some drug users have adopted special methods to neutralize the drug metabolism in their bodies, making conventional urine tests ineffective. Investigators can only use accurate detection methods such as gas chromatograph and gas chromatography-mass spectrometry. Although these methods are accurate, the detection time takes 2-3 days and the cost is very high.

[0004] In view of these obvious drawbacks and the many problems in drug addict detection, a method has been developed to collect pedestrian pupil images from a long distance without any harm to the human body. The method can be used to analyze the images to determine whether the person is suspected of drug use. The pupil size of the human body is obtained by collecting facial and eye images of the human body at a distance (the human body or user is 3 to 5 meters away from the infrared camera), pupil segmentation, and pupil size calculation, and drug addicts are screened based on the pupil size. However, this pupil detection method is still immature, and there is a problem that the detection results are seriously affected by the imaging quality. Summary of the invention

[0005] In order to solve the problem that the detection result in the above pupil detection method is seriously affected by the imaging quality and the detected pupil size is unstable, the embodiments of the present disclosure provide a method and device for smooth output of detection data.

[0006] According to a first aspect of the present invention, a method for smoothing output of detection data is provided, comprising: receiving detection data in sequence; obtaining a first median satisfying a first time constraint based on the nth detection data and the detection data received before the nth detection data; comparing the first median with the output value of the n-1th detection data: when the absolute value of the difference between the first median and the output value of the n-1th detection data is less than a first threshold, taking the output value of the n-1th detection data as the output value of the n-1th detection data; when the absolute value of the difference between the first median and the output value of the n-1th detection data is greater than or equal to the first threshold, taking the first median as the output value of the n-1th detection data; wherein n is a natural number greater than 1, and when the n-1th detection data satisfies a second time constraint, determining the output value of the n-1th detection data based on a plurality of detection data satisfying the second time constraint.

[0007] In some embodiments, a first median satisfying a first time constraint is obtained based on the nth detection data and the detection data received before the nth detection data, including: when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is less than a second threshold, obtaining the first median of the first detection data to the nth detection data; when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, discarding a portion of the detection data starting from the first detection data in sequence until the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the remaining first detection data is less than the second threshold, and obtaining the first median of the remaining first detection data to the nth detection data.

[0008] In some embodiments, when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, and no other detection data is received between the nth detection data and the first detection data, the first detection data is discarded and the nth detection data is used as the first detection data.

[0009] In some embodiments, the plurality of detection data satisfying the second time constraint includes detection data received within a range from a time point when the first detection data is received to a set time threshold.

[0010] In some embodiments, determining the output value of the n-1th detection data according to the plurality of detection data satisfying the second time constraint comprises: acquiring the detection data received within a range from the time point of receiving the first detection data to a set time threshold;

[0011] obtaining a second median value according to the received detection data; and when the n-1th detection data is the last detection data received among the received detection data, using the second median value as the output value of the n-1th detection data.

[0012] In some embodiments, it also includes: when the n-1th detection data is not the last detection data received among the received detection data, if the 1st detection data is within the confidence interval of the detection data, then the value of the 1st detection data is used as the output value of the n-1th detection data; if the 1st detection data is outside the confidence interval of the detection data, then the second median is used as the output value of the n-1th detection data.

[0013] In some embodiments, the first threshold comprises a minimum value of an identifiable output value of the detection data.

[0014] In some embodiments, the second threshold comprises a time interval for sampling the detected object.

[0015] In some embodiments, the detection data includes pupil detection data.

[0016] According to a second aspect of the present invention, a smooth output device for detection data is provided, comprising: a receiving module, configured to receive detection data in sequence; a first median acquisition module, configured to acquire a first median satisfying a first time constraint based on the nth detection data and the detection data received before the nth detection data; a first output module, configured to compare the first median with the output value of the n-1th detection data: when the absolute value of the difference between the first median and the output value of the n-1th detection data is less than a first threshold, the output value of the n-1th detection data is used as the output value of the nth detection data; when the absolute value of the difference between the first median and the output value of the n-1th detection data is greater than or equal to the first threshold, the first median is used as the output value of the nth detection data; and a second output module, configured to determine the output value of the n-1th detection data based on a plurality of detection data satisfying the second time constraint when the n-1th detection data satisfies a second time constraint, wherein n is a natural number greater than 1.

[0017] In some embodiments, the first median acquisition module is further configured to: when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is less than a second threshold, acquire the first median of the first detection data to the nth detection data; when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, sequentially discard a portion of the detection data starting from the first detection data until the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the remaining first detection data is less than the second threshold, and acquire the first median of the remaining first detection data to the nth detection data.

[0018] In some embodiments, the first median acquisition module is further configured to: when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, and no other detection data is received between the nth detection data and the first detection data, discard the first detection data, use the nth detection data as the first detection data, and return the first detection data to the second output module.

[0019] In some embodiments, the plurality of detection data satisfying the second time constraint includes detection data received within a range from a time point when the first detection data is received to a set time threshold.

[0020] In some embodiments, the second output module includes: a data acquisition unit, configured to acquire detection data received within a set time threshold from the time point of receiving the first detection data; a second median acquisition unit, configured to acquire a second median based on the received detection data; and a determination unit, configured to use the second median as the output value of the n-1th detection data when the n-1th detection data is the last detection data received among the received detection data.

[0021] In some embodiments, the determination unit is further configured to: when the n-1th detection data is not the last detection data received among the received detection data, if the 1st detection data is within the confidence interval of the detection data, then the value of the 1st detection data is used as the output value of the n-1th detection data; if the 1st detection data is outside the confidence interval of the detection data, then the second median is used as the output value of the n-1th detection data.

[0022] In some embodiments, the first threshold comprises a minimum value of an output value of the detection data that can be recognized by the device.

[0023] In some embodiments, the second threshold comprises a time interval for the device to sample the detected object.

[0024] In some embodiments, the detection data includes pupil detection data.

[0025] According to the method for smoothing the output of detection data of an embodiment of the present disclosure, by comparing the median of the current detection data with the output value of the previous detection data, factors in the detection data that make the measurement results unstable are screened out, and the output of the detection data is stabilized, thereby further improving the stability of the corresponding detection equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other features of the present disclosure will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which:

[0027] Figure 1 A flow chart showing a method for smoothing output of detection data according to an embodiment of the present disclosure is shown;

[0028] Figure 2 A block diagram showing a device for smoothing output of detection data according to an embodiment of the present disclosure; and

[0029] Figure 3 The application of the method for smoothing output of detection data according to an embodiment of the present disclosure is shown.

[0030] In the drawings, the same or similar structures are marked with the same or similar reference numerals. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings. It should be noted that the following description is only for illustration and is not intended to limit the present disclosure. In the following description, in order to provide a thorough understanding of the present disclosure, a large number of specific details are set forth. However, it is obvious to a person of ordinary skill in the art that these specific details do not have to be adopted to implement the present disclosure. In other examples, in order to avoid confusing the present disclosure, known circuits, materials or methods are not specifically described.

[0032] Throughout the specification, references to "one embodiment," "an embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in conjunction with the embodiment or example is included in at least one embodiment of the present disclosure. Therefore, the phrases "in one embodiment," "in an embodiment," "an example," or "an example" appearing in various places throughout the specification do not necessarily all refer to the same embodiment or example. In addition, particular features, structures, or characteristics may be combined in one or more embodiments or examples in any suitable combination and / or sub-combination. In addition, it will be appreciated by those of ordinary skill in the art that the figures provided herein are for illustrative purposes and that the figures are not necessarily drawn to scale. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0033] Figure 1 A flow chart of a method for smoothly outputting detection data according to an embodiment of the present disclosure is shown. Figure 1 As shown, the detection data smoothing output method 100 includes the following steps:

[0034] In step S110 , detection data is received sequentially.

[0035] In step S120 , a first median value satisfying a first time constraint is acquired according to the nth detection data and the detection data received before the nth detection data.

[0036] In step S130, the first median is compared with the output value of the n-1th detection data, and

[0037] In step S1301, when the absolute value of the difference between the first median value and the output value of the n-1th detection data is less than a first threshold, the output value of the n-1th detection data is used as the output value of the nth detection data.

[0038] In step S1301, when the absolute value of the difference between the first median value and the output value of the n-1th detection data is greater than or equal to a first threshold, the first median value is used as the output value of the nth detection data.

[0039] Where n is a natural number greater than 1, and

[0040] In step S140 , when the n-1th detection data satisfies the second time constraint, an output value of the n-1th detection data is determined according to a plurality of detection data satisfying the second time constraint.

[0041] According to an embodiment of the present disclosure, the plurality of detection data satisfying the second time constraint include detection data received within a range from a time point when the first detection data is received to a set time threshold.

[0042] According to an embodiment of the present disclosure, a method for determining an output value of the n-1th detection data based on multiple detection data satisfying a second time constraint may include obtaining detection data received from the time point of receiving the first detection data to a set time threshold, obtaining a second median value based on the received detection data, and when the n-1th detection data is the last detection data received among the received detection data, using the second median value as the output value of the n-1th detection data. When the n-1th detection data is not the last detection data received among the received detection data, if the first detection data is within the confidence interval of the detection data, using the value of the first detection data as the output value of the n-1th detection data, and if the first detection data is outside the confidence interval of the detection data, using the second median value as the output value of the n-1th detection data.

[0043] According to an embodiment of the present disclosure, a method for obtaining a first median satisfying a first time constraint based on the nth detection data and the detection data received before the nth detection data may include, when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is less than a second threshold, obtaining the first median of the first detection data to the nth detection data, and when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, discarding a portion of the detection data starting from the first detection data in sequence until the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the remaining first detection data is less than the second threshold, and obtaining the first median of the remaining first detection data to the nth detection data.

[0044] The following is explained with reference to specific examples. In the following examples, pupil size detection data collected by a long-distance infrared pupil detection device will be used for illustration, but the present disclosure is not limited thereto. Those skilled in the art can understand that the smoothing output method of the detection data according to the embodiment of the present disclosure can smooth the data detected using various measurement methods.

[0045] Assume that the detection data obtained by the human eye algorithm detection in the long-distance infrared pupil acquisition device is in the form of a three-dimensional data set, recorded as (f i , r i , t i ), where f i Indicates that the pupil image or human eye image of the pupil size is obtained, r i represents the obtained pupil size, t i represents the time when the image is acquired, (f i , r i , t i) can represent the i-th group of input data of the detection data smoothing output method according to the embodiment of the present disclosure. i , R i , T i ) represents the same as the i-th group of input data (f i , r i , t i ) Correspondingly, the i-th group of output data is processed by the detection data smoothing output method of the embodiment of the present disclosure.

[0046] Assume that after the detection device is started, if no pupil image or human eye image is detected within a certain time interval by scanning the target area, the device will enter the standby state. The certain time interval is the time interval for the detection device to sample the detection object. Therefore, the same time interval for sampling the detection object is set in method 100, which is recorded as the second threshold DT.

[0047] Next, at the next time t1, when the person being tested enters the screening range of the device and the infrared pupil image sensor has captured the pupil image of the person being tested, the first three-dimensional data group (f1, r1, t1) has been obtained, and method 100 starts to run.

[0048] The method 100 continuously receives a triplet of data from the device within a time period that satisfies a second time constraint (f i , r i , t i ). The second time constraint mentioned here involves a pre-set time threshold, denoted as FT. In order to obtain smooth detection data, the method 100 according to the embodiment of the present disclosure uses the median of multiple detection data for calculation. Therefore, within the range from the time point of receiving the first detection data to the set time threshold, the method 100 sequentially receives multiple detection data to obtain the median of the multiple detection data, and uses the obtained median for subsequent calculation and update.

[0049] On the other hand, if the detection device does not provide output within the range from the time point of receiving the first detection data to the set time threshold, the user experience will be reduced. Therefore, method 100 provides the following smoothing and output process:

[0050] Assume that from the moment t1 when the first triple data set (f1, r1, t1) is obtained, within the FT time, a total of m triple data sets (f1, r1, t1), (f2, r2, t2), ..., (f m , r m , t m ), find r1, r2, ..., r in the m ternary arrays representing pupil size m The median value of中 .

[0051] Next, determine whether the value of the first detection data is within the confidence interval of the detection data. The confidence interval of the detection data refers to the range of pupil size determined based on the general value of pupil size. When the first pupil size detected is within the size range, it can be considered that the pupil size value of the subject is within the normal range, that is, the subject belongs to the normal population. When the first pupil size detected is outside the size range, it can be considered that the pupil size value of the subject is within the abnormal range, that is, the subject is likely to be a drug addict and needs to be investigated.

[0052] Tmin represents the lower limit of the confidence interval of the detection data, and Tmax represents the upper limit of the confidence interval of the detection data.

[0053] If Tmin<r1<Tmax, then (F1=f1, R1=r1, T1=t1), (F2=f2, R2=r1, T2=t2), ..., (F m-1 =f m-1 , R m-1 = r1, T m-1 =t m-1 )、(F m =f m , R m = r′ 中 , T m =t m ).

[0054] If r1≤Tmin, or r1≥Tmax, then (F1=f1, R1=r′ 中 , T1=t1), (F2=f2, R2=r′ 中 , T2=t2)、……、(F m-1 =f m-1 , R m-1 = r′ 中 , T m-1 =t m-1 )、(F m =f m , R m = r′ 中 , T m =t m ).

[0055] That is to say, if the first detection data belongs to the normal pupil size value, the output value R of the last detection data will be mThe output values ​​of all test data except the first test data are represented and outputted by the value of the first test data. In this case, the possibility that the tested object is a person who needs to be checked is low. Therefore, the output can be immediately after the first input test data and each subsequent input test data are obtained, which is conducive to improving the user experience.

[0056] If the first test data is an abnormal pupil size value, it means that the subject is likely to be a person who needs to be investigated. Therefore, the second median r′ is calculated based on the m test data. 中 Then, the second median r′ 中 As output of all detection data.

[0057] But in either case, the last detection data output value R m The value of is determined as the second median r′ 中 , which is used as the first value for subsequent calculations.

[0058] At this point, the device has obtained the first value r' for subsequent calculations 中 Next, the method 100 performs smoothing based on the median value of each detection data.

[0059] Assume that the nth triplet data set obtained in the smoothing stage is (f n , r n , t n ), the ternary data group outputted by the detection data at the previous moment of the ternary data group is (F n-1 , R n-1 , T n-1 ).

[0060] If |t n –t1|<DT, then find the pupil sizes r1, r2, …, r in the three-dimensional data set n The median value of 中1 ,and

[0061] If |r 中1 –R n-1 |<M, then (F n =f n , R n =R n-1 , T n =t n );

[0062] If |r 中1 –R n-1 |≥M, then (F n =f n , R n =r 中1 , Tn =t n ).

[0063] Here, M represents the minimum value of the output value of the detection data that can be recognized by the device, that is, the first threshold value.

[0064] According to the above process, first compare the time point t at which the nth detection data is received n Whether the difference from the time point t1 of receiving the first detection data is within the range of the second threshold DT can be used to limit the set of detection data required for calculating the median of the nth detection data, thereby simplifying the calculation process.

[0065] Next, if the calculated difference between the median of the nth detection data and the output value of the previous detection data is within the range of M, it means that the nth detection data has not caused obvious measurement fluctuations, that is, the measurement is basically stable, so the output value of the previous detection data is used as the output value of the nth detection data. If the calculated difference between the median of the nth detection data and the output value of the previous detection data is not within the range of M, it means that the nth detection data may have caused obvious measurement fluctuations. This may be caused by inaccurate nth measurement or inaccurate previous measurement. Regardless of the cause, the nth detection data must be reflected in the output of the detection data, so the median of the nth detection data is used as the output value. 中1 as the output value.

[0066] If |t n –t1|≥DT, then discard t1 to t q The triplet of data sets until |t is satisfied n –t q+1 |<DT, and q≠n, find the pupil size r in the three-dimensional data set q+1 ,……,r n The median value of 中2 ,and

[0067] If |r 中2 –R n-1 |<M, then (F n =f n , R n =R n-1 , T n =t n );

[0068] If |r 中2 –R n-1 |≥M, then (F n =f n , R n =r 中2 , T n =tn ).

[0069] According to the above process, when the time point t at which the nth detection data is received n When the difference between the time point t1 at which the first detection data is received and the time point t2 at which the first detection data is received is within the second threshold DT range, it will be cumbersome to calculate the median of the nth detection data using all the detection data starting from the first detection data. Therefore, the time points t1 to t q The triplet data group is re-determined within the DT range. However, it should be noted that when discarding the detection data, it is necessary to ensure that q≠n. If q=n appears during the discarding process, it means that there is no other detection data between the first detection data and the nth detection data. In other words, after receiving the first detection data, it takes more than DT time to receive the second (i.e., the nth) detection data. At this time, the second detection data should be used as the new first detection data, and return to the calculation of the second median r′. 中 Because, when the pupil image or the human eye image is not detected within the DT, the device will enter the standby state, and the first detection data and the second detection data received beyond the DT time period will basically not be the same measurement object, and still using them together will cause errors.

[0070] The following comparison and assignment process is the same as |t n The situation of –t1|<DT is the same, please refer to the previous description, and will not be repeated here.

[0071] In practical applications, the first threshold M is mainly set according to the performance of the device. When the sensitivity of the device is high, M can be set to a smaller value, and when the sensitivity of the device is low, M can be set to a larger value. For example, when the device can effectively output pupil sizes within the range of 4 mm to 6 mm, M can be set to 1 mm. However, the present disclosure is not limited thereto, and those skilled in the art can make different settings according to the performance of the device.

[0072] In practical applications, the second threshold DT can be set according to the actual application of the device. For example, when the device is used for directional detection of the detected object, DT can be set to be longer, such as 10S. When the device is used for non-directional detection such as monitoring in public places, DT can be set to be shorter, such as 5S. However, the present disclosure is not limited thereto, and those skilled in the art can make different settings according to actual application scenarios.

[0073] In addition, the set time threshold (time interval) FT actually represents the latest reaction time of the first detection output. If FT is set larger, it is beneficial to increase the accuracy of detection, but it will obviously reduce the user experience. If FT is set smaller, it will be the opposite. In practical applications, it can be determined based on factors such as the distance at which the device is used and the performance of the device (such as computing speed). For example, when the installation distance of the device is 3 to 5 meters, FT can be set to 2S. However, the present disclosure is not limited to this, and those skilled in the art can make different settings according to actual application scenarios.

[0074] Figure 2 A block diagram of a device for smoothly outputting detection data according to an embodiment of the present disclosure is shown.

[0075] like Figure 2 As shown, the smooth output device 200 of the detection data according to the embodiment of the present disclosure includes a receiving module 201, a first median acquisition module 202, a first output module 203 and a second output module 204. The second output module 204 also includes a data acquisition unit 2041, a second median acquisition unit 2042 and a determination unit 2043. The operations performed by each functional module can refer to the relevant description of the smooth output method mentioned above, and will not be repeated here.

[0076] Figure 3 The application of the method for smoothing the output of detection data according to the embodiment of the present disclosure is shown. The method for smoothing the output of detection data according to the embodiment of the present disclosure can be directly applied to a long-distance infrared pupil acquisition device, receiving the pupil size detected by the pupil detection algorithm, and smoothing the received pupil size, thereby providing more accurate measurement results and a better user experience.

[0077] Those skilled in the art will appreciate that the methods shown above are exemplary only. The methods of the present invention are not limited to the steps and sequences shown above. Those skilled in the art may make many changes and modifications based on the teachings of the illustrated embodiments.

[0078] Although the present invention has been illustrated above in conjunction with the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications, substitutions and changes may be made to the present invention without departing from the spirit and scope of the present invention. Therefore, the present invention should not be limited by the above-described embodiments, but by the appended claims and their equivalents.

Claims

1. A smooth output method for detecting pupil size data, include: receiving detection data in sequence; Acquiring a first median satisfying a first time constraint according to an nth detection data and detection data received before the nth detection data, comprising: When the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is less than a second threshold, obtaining a first median value from the first detection data to the nth detection data, When the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, a portion of the detection data starting from the first detection data is discarded in sequence until the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the remaining first detection data is less than the second threshold, and a first median value of the remaining first detection data to the nth detection data is obtained; Compare the first median value with the output value of the n-1th detection data: When the absolute value of the difference between the first median and the output value of the n-1th detection data is less than a first threshold, the output value of the n-1th detection data is used as the output value of the nth detection data; When the absolute value of the difference between the first median value and the output value of the n-1th detection data is greater than or equal to the first threshold, the first median value is used as the output value of the nth detection data; Wherein, n is a natural number greater than 1, and when the n-1th detection data satisfies the second time constraint, the output value of the n-1th detection data is determined according to a plurality of detection data satisfying the second time constraint.

2. The method according to claim 1, in, When the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, and no other detection data is received between the nth detection data and the first detection data, the first detection data is discarded and the nth detection data is used as the first detection data.

3. The method according to claim 1, in, The plurality of detection data satisfying the second time constraint include detection data received from the time point of receiving the first detection data to a set time threshold.

4. The method according to any one of claims 1 to 3, in, Determining the output value of the n-1th detection data according to a plurality of detection data satisfying the second time constraint comprises: Obtain the detection data received within the range from the time point of receiving the first detection data to the set time threshold; Obtaining a second median value according to the received detection data; and When the n-1th detection data is the last received detection data among the received detection data, the second median value is used as the output value of the n-1th detection data.

5. The method according to claim 4, further comprising: include: When the n-1th detection data is not the last received detection data among the received detection data, If the first detection data is within the confidence interval of the detection data, the value of the first detection data is used as the output value of the n-1th detection data; If the first detection data is outside the confidence interval of the detection data, the second median is used as the output value of the n-1th detection data.

6. The method according to claim 1, in, The first threshold value includes a minimum value of an output value of the detection data that can be identified.

7. The method according to claim 1, in, The second threshold includes a time interval for sampling the detected object.

8. The method according to claim 1, in, The detection data includes pupil detection data.

9. A smooth output device for detecting pupil size data, include: A receiving module, configured to receive detection data in sequence; A first median acquisition module is configured to acquire a first median satisfying a first time constraint according to an nth detection data and detection data received before the nth detection data, including: When the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is less than a second threshold, obtaining a first median value from the first detection data to the nth detection data, When the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, a portion of the detection data starting from the first detection data is discarded in sequence until the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the remaining first detection data is less than the second threshold, and a first median value of the remaining first detection data to the nth detection data is obtained; The first output module is configured to compare the first median value with the output value of the n-1th detection data: When the absolute value of the difference between the first median and the output value of the n-1th detection data is less than a first threshold, the output value of the n-1th detection data is used as the output value of the nth detection data; When the absolute value of the difference between the first median value and the output value of the n-1th detection data is greater than or equal to the first threshold, taking the first median value as the output value of the nth detection data; and The second output module is configured to determine an output value of the n-1th detection data according to a plurality of detection data satisfying the second time constraint when the n-1th detection data satisfies the second time constraint, wherein n is a natural number greater than 1.

10. The device according to claim 9, in, The first median acquisition module is also configured to: when the absolute value of the difference between the time point of receiving the nth detection data and the time point of receiving the first detection data is greater than or equal to the second threshold, and no other detection data is received between the nth detection data and the first detection data, discard the first detection data, use the nth detection data as the first detection data, and return the first detection data to the second output module.

11. The device according to claim 9, in, The plurality of detection data satisfying the second time constraint include detection data received from the time point of receiving the first detection data to a set time threshold.

12. The device according to any one of claims 9 to 11, in, The second output module comprises: A data acquisition unit is configured to acquire the detection data received within a range from the time point of receiving the first detection data to a set time threshold; a second median obtaining unit, configured to obtain a second median according to the received detection data; and The determination unit is configured to use the second median value as the output value of the n-1th detection data when the n-1th detection data is the last received detection data among the received detection data.

13. The device according to claim 12, in, The determining unit is further configured to: When the n-1th detection data is not the last received detection data among the received detection data, If the first detection data is within the confidence interval of the detection data, the value of the first detection data is used as the output value of the n-1th detection data; If the first detection data is outside the confidence interval of the detection data, the second median is used as the output value of the n-1th detection data.

14. The device according to claim 9, in, The first threshold value includes a minimum value of an output value of the detection data that can be recognized by the device.

15. The device according to claim 9, in, The second threshold includes a time interval for the device to sample the detection object.

16. The device according to claim 9, in, The detection data includes pupil detection data.

Citation Information

Patent Citations

  • Method, device, terminal equipment and medium for the detection of drug users

    CN110013217A

  • Non-contact rapid detection system and method for drug addicts

    CN110151184A

  • Fundus image processing device

    JP2018102586A