A distance calibration device, detection equipment, and method

By designing a distance calibration device including a base, a first rotation shaft and a rotating plate, the distance sensor collects calibration data of multiple different distances at different times, solving the problem that multiple different distance data cannot be collected in the prior art, and improving calibration efficiency.

CN120063186BActive Publication Date: 2025-08-05NORTHERN JIANGSU PEOPLES HOSPITAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510551828.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-05
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

The prior art distance calibration device cannot cooperate with the distance sensor to achieve the acquisition of calibration data of multiple different distances.

Method used

A distance calibration device including a base, a first rotation shaft, a rotating plate and a driving assembly is designed. By rotating the first rotation shaft, the distance sensor can irradiate to multiple ranging planes at different times, and collect calibration data of multiple different distances.

Benefits of technology

The acquisition time of distance sensor calibration data is greatly reduced and calibration efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120063186B_ABST
    Figure CN120063186B_ABST
Patent Text Reader

Abstract

The present application discloses a distance calibration device and detection equipment and method, which relate to the technical field of distance calibration devices. The distance calibration device includes: a base; the base includes a ranging base plate, and the ranging base plate includes a first ranging plane; a first rotating shaft, which forms a rotational connection with the ranging base plate; at least one rotating plate; each rotating plate is arranged on the first rotating shaft at intervals along the axial direction of the first rotating shaft; each rotating plate includes a second ranging plane; if the first rotating shaft rotates, the distance sensor can illuminate the first ranging plane and each second ranging plane at different times; a driving component, which is used to drive the first rotating shaft to rotate. The present application facilitates the distance sensor to collect calibration data of multiple different distances through the arrangement of the first rotating shaft, the ranging base plate and the rotating plate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of distance calibration devices, and specifically to a distance calibration device and detection equipment and method. Background Art

[0002] Some existing detection devices (for example, pupillary light reflex detection devices, hereinafter referred to as pupil detection devices) require automatic calibration of their internal distance sensors before use or before shipment. Typical distance sensors require collecting calibration data at multiple different distances for accurate automatic calibration. However, existing distance calibration devices are unable to work with distance sensors to collect calibration data at multiple different distances. Summary of the Invention

[0003] The purpose of the present application is to provide a distance calibration device and detection equipment and method to solve the technical problem that the distance calibration device in the prior art cannot enable the distance sensor to collect calibration data of multiple different distances.

[0004] To achieve the above objectives, this application provides the following technical solutions:

[0005] In a first aspect, the present application provides a distance calibration device, which is applied to calibrate a distance sensor, and includes:

[0006] Base; the base includes a ranging base plate, the ranging base plate includes a first ranging plane; the base is used to place the distance sensor;

[0007] A first rotating shaft is rotatably connected to the ranging base plate;

[0008] At least one rotating plate; each rotating plate is spaced apart from the first rotating shaft along the axial direction of the first rotating shaft; each rotating plate includes a second ranging plane; a normal line of the first ranging plane and a normal line of each second ranging plane are parallel to the axis of the first rotating shaft, and the first ranging plane and each second ranging plane are oriented in the same direction; if the first rotating shaft rotates, the distance sensor can illuminate the first ranging plane and each second ranging plane at different times;

[0009] A driving assembly is provided on the distance measuring base plate and is used for driving the first rotating shaft to rotate.

[0010] In a second aspect, the present application proposes a detection device, which includes a distance sensor and the distance calibration device described in the above technical solution; the distance calibration device is used to calibrate the distance sensor.

[0011] In a third aspect, the present application proposes a method for using a detection device, which is applied to the detection device in the above technical solution, wherein the detection device has an image acquisition function, and the method includes:

[0012] Acquire a first data set, wherein the data in the first data set are distances collected by the detection device; before acquiring the first data set, calibrate the distance sensor in the detection device using a distance calibration device in advance;

[0013] determining a current state of the detection device based on the first data set and a previous state of the detection device;

[0014] Turning on or off image acquisition according to the current state of the detection device;

[0015] The states of the detection device include an observation state and a non-observation state. The observation state is a state in which image acquisition is performed, and the non-observation state is a state in which image acquisition is not performed.

[0016] Compared with the prior art, the present invention has the following advantages:

[0017] The present invention utilizes a first rotating shaft, a distance-measuring base plate, and a rotating plate to facilitate the collection of calibration data for a distance sensor at multiple different distances. Compared to existing techniques that require multiple movements of the distance sensor or the distance-measuring surface to collect calibration data at multiple different distances, the distance calibration device proposed in this application significantly reduces the time required to collect distance sensor calibration data. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A three-dimensional schematic diagram of a distance calibration device proposed in an embodiment of the present application;

[0019] Figure 2 for Figure 1 A schematic diagram of the main view of the mid-range calibration device;

[0020] Figure 3 for Figure 1 Schematic diagram of the mid-range calibration device from the right;

[0021] Figure 4 This is a three-dimensional schematic diagram of another distance calibration device proposed in an embodiment of the present application;

[0022] Figure 5 for Figure 4 Schematic top view of the mid-range calibration device (the first rotating shaft is in the second working state);

[0023] Figure 6 for Figure 4Schematic top view of the mid-range calibration device (the first rotating shaft is in the first working state);

[0024] Figure 7 A three-dimensional schematic diagram of another distance calibration device proposed in an embodiment of the present application;

[0025] Figure 8 A three-dimensional schematic diagram of a speed stabilizing assembly proposed in an embodiment of the present application;

[0026] Figure 9 A three-dimensional schematic diagram of another distance calibration device proposed in an embodiment of the present application;

[0027] Figure 10 A three-dimensional schematic diagram of another speed stabilizing assembly proposed in an embodiment of the present application;

[0028] Figure 11 This is a three-dimensional schematic diagram of yet another distance calibration device proposed in an embodiment of the present application;

[0029] Figure 12 for Figure 11 Schematic diagram of the mid-range calibration device from the right;

[0030] Figure 13 A schematic diagram of the structure of a detection device proposed in an embodiment of the present application;

[0031] Figure 14 A schematic diagram of the method flow provided in the embodiment of the present application;

[0032] Figure 15 This is a schematic diagram of the pupil detection device state according to an embodiment of the present application;

[0033] Figure 16 This is a schematic diagram of the distance collected by the pupil detection device according to an embodiment of the present application;

[0034] Figure 17 A schematic diagram of acquiring a second image based on a first image according to an embodiment of the present application;

[0035] Figure 18 This is a schematic diagram of acquiring an iris edge image based on a second image according to an embodiment of the present application;

[0036] Figure 19 This is a schematic diagram of obtaining a region of interest based on an iris edge image according to an embodiment of the present application.

[0037] In the figure: 1. base; 11. ranging base plate; 12. positioning part; 2. first rotating shaft; 3. rotating plate; 31. first rotating plate; 32. second rotating plate; 4. driving assembly; 41. motor; 42. second rotating shaft; 43. third gear; 44. fourth gear; 45. fifth gear; 46. sixth gear; 47. first gear; 48. second gear; 5. distance sensor; 6. speed stabilizing assembly; 61. connecting rod; 62. first counterweight; 63. first elastic member; 64. sleeve; 65. telescopic rod; 66. second counterweight; 67. second elastic member; 7. detection equipment; 71. distance calibration device. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0039] It should be noted that, in the description of this application, the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as a limitation on this application.

[0040] Furthermore, it should be understood that for the sake of ease of description, the sizes of the various components shown in the drawings are not drawn according to actual proportions. For example, the thickness or width of certain layers may be exaggerated relative to other layers.

[0041] It should be noted that like numbers and letters represent similar items in the following figures, so once an item is defined or described in one figure, it will not need to be further discussed and described in detail in the description of the subsequent figures.

[0042] To address the technical issue, discussed in the background art, that the prior art distance calibration device is unable to cooperate with a distance sensor to collect calibration data for multiple different distances, this application proposes a distance calibration device. This distance calibration device is used to calibrate a distance sensor 5 and comprises a base 1, a first rotating shaft 2, a drive assembly 4, and at least one rotating plate 3. The base 1 includes a distance measuring base plate 11, which includes a first distance measuring plane. The base 1 is used to mount or place the distance sensor 5. The first rotating shaft 2 is rotatably connected to the distance measuring base plate 11. The rotating plates 3 are spaced axially about the first rotating shaft 2, each including a second distance measuring plane. The normals of the first distance measuring plane and each of the second distance measuring planes are parallel to the axis of the first rotating shaft 2, and the first and second distance measuring planes are oriented in the same direction. As the first rotating shaft 2 rotates, the distance sensor 5 can illuminate the first and second distance measuring planes at different times. The drive assembly 4 is disposed on the distance measuring base plate 11 and is used to drive the first rotating shaft 2 to rotate.

[0043] In the embodiments of the present application, there is no restriction on the number of rotating plates 3, and an appropriate number of rotating plates 3 can be selected as required. The following description of the present application is based on an embodiment in which two rotating plates 3 (i.e., a first rotating plate 31 and a second rotating plate 32) are provided. This does not mean that the distance calibration device proposed in the present application can only be provided with two rotating plates 3. It should be understood that the embodiments of the present application can be provided with any number of rotating plates 3 as required, for example, one rotating plate 3 or four rotating plates 3.

[0044] It should be noted that the distance sensor's ranging principle follows the time-of-flight method. This method involves emitting a very short wave (e.g., a light wave, sound wave, or electromagnetic wave) and measuring the time interval between the wave's emission and its reflection from an object (in this embodiment, the first ranging plane or the second ranging plane). The distance between the sensor and the object is then calculated based on this time interval. This is a mature technology and will not be described in detail here. That is, in this embodiment, the distance sensor 5 can be a distance sensor that emits arbitrary waves. For example, the distance sensor 5 can be a laser distance sensor, an optical distance sensor, an infrared distance sensor, or an ultrasonic distance sensor.

[0045] It should be noted that, in the embodiment of the present application, the distance measuring plane (i.e., the first distance measuring plane and the second distance measuring plane) refers to the plane used to reflect the waves emitted by the distance sensor 5. As can be seen from the foregoing, since the rotating plates 3 are arranged on the first rotating shaft 2 at intervals along the axial direction of the first rotating shaft 2, Figure 2As shown, during calibration, the distances between the first distance measuring plane and each second distance measuring plane and the distance sensor 5 are different, namely, distance S1, distance S2 and distance S3 respectively.

[0046] In an embodiment of the present application, the distance S1, the distance S2, and the distance S3 can be set as needed. For example, in the application scenario of pupillary light reflex, the doctor generally controls the handheld detection device at a distance of 5 cm to 15 cm from the pupil. That is to say, in the application scenario of pupillary light reflex, the distance sensor 5 only needs to ensure that the distance measurement is relatively accurate within the range of 5 cm to 15 cm to meet the use requirements. In other words, in the application scenario of pupillary light reflex, the distance S1 can be 5 cm, the distance S2 can be 10 cm, and the distance S3 can be 15 cm. Of course, the distance S1, the distance S2, and the distance S3 can also be set to other distance values as needed.

[0047] As mentioned above, if the first rotating shaft 2 rotates, the distance sensor 5 can sequentially illuminate the first ranging plane and each second ranging plane. That is, in this embodiment, simply rotating the first rotating shaft 2 allows the distance sensor 5 to sequentially illuminate the first ranging plane and each second ranging plane. In other words, by rotating the first rotating shaft 2, the distance sensor 5 can collect calibration data for multiple different distances. Compared to the prior art, which requires multiple movements of the distance sensor or ranging plane to collect calibration data for multiple different distances, the distance calibration device proposed in this application can significantly reduce the time required to collect distance sensor calibration data.

[0048] It should be noted that manual calibration or automatic calibration of the distance sensor 5 based on the collected calibration data of multiple different distances is a mature technology and will not be described in detail here.

[0049] In the embodiment of the present application, there is no restriction on the shape and structure of the base 1. It is only necessary that the base 1 can support various parts (such as the first rotating shaft 2 and the motor 41, etc.) and have a ranging base 11. For example, the base 1 can be set as a bracket-like structure, or the base 1 can be set as Figure 1 The L-shaped sheet structure shown.

[0050] In the embodiment of the present application, there is no limitation on the shape of the ranging base plate 11. For example, the ranging base plate 11 can be in the shape of a semicircular block or a triangular block, or can be in the shape of a Figures 1 to 3 Shown as a square block.

[0051] In order to avoid relative displacement between the base 1 and the distance sensor 5 during calibration, thereby affecting the calibration result, in one embodiment of the present application, the base 1 may further include a positioning portion 12. The positioning portion 12 is used to limit the relative displacement between the base 1 and the distance sensor 5. In this embodiment, the positioning portion 12 may be any suitable component or structure for limiting the relative displacement between the base 1 and the distance sensor 5. For example: the distance sensor 5 may be tubular, and the positioning portion 12 may be a pipe clamp provided on the base 1 (the pipe clamp is a prior art and will not be described in detail). It may also be as follows Figure 1 As shown, the positioning portion 12 is a contoured groove provided on the base 1, which is adapted to the distance sensor 5. When in use, the distance sensor 5 is vertically inserted into the contoured groove, so that the distance sensor 5 and the base 1 cannot produce any relative displacement along the horizontal plane.

[0052] In the embodiment of the present application, there is no restriction on the shape and structure of the rotating plate 3. It is only necessary that the projections of any two rotating plates 3 on the first distance measuring plane do not overlap or do not completely overlap. It is easy to understand that if the projections of any two rotating plates 3 along the axial direction of the first rotating shaft 2 (that is, the normal direction of each second distance measuring plane) do not overlap, then during the rotation of the first rotating shaft 2, the distance sensor 5 will definitely be able to illuminate each rotating plate 3, that is, illuminate each second distance measuring plane. For example: the rotating plate 3 can be as follows: Figure 1 and Figure 3 As shown, it is in the shape of a regular triangle; it can also be as Figure 11 and Figure 12 As shown, it is in the form of petals.

[0053] It should be noted that the distance calibration device proposed in this application can also detect and calibrate whether the test frequency and upload frequency of distance sensor 5 match. It is easy to understand that if the test frequency of distance sensor 5 is lower than the upload frequency, data will inevitably be uploaded repeatedly, which will result in inaccurate test results of distance sensor 5. For example, if the test frequency of distance sensor 5 is 20 times / second and the upload frequency is 30 times / second, then of the 30 distance test results uploaded per second, 10 test results will definitely be duplicates, resulting in incorrect test results.

[0054] It's easy to understand that if the test frequency of distance sensor 5 is less than the upload frequency (i.e., the test frequency and upload frequency of distance sensor 5 don't match), distance sensor 5 will inevitably produce periodically repeating and continuous detection results. In this embodiment, a continuous detection result refers to a detection result in which the value of a detection result is the same as the value of the previous detection result. For example, if the 20th and 21st test results of distance sensor 5 in a given second are both 10.34 cm, then the 21st detection result in that second is a continuous detection result. In this embodiment, a periodically repeating and continuous detection result means that a certain number of detection results in each second are always continuous detection results. For example, if the 20th and 21st test results in one second are both 10.34 cm, and the 20th and 21st test results in another second are both 5.21 cm, then the 21st detection result in each second is likely to be a periodically repeating and continuous detection result.

[0055] In the prior art, since the distance between the distance sensor 5 and the distance measuring plane is fixed, the test results of multiple times are extremely similar. In other words, even if periodic and continuous test results appear, it is difficult to determine whether the test result is caused by the high test stability of the distance sensor 5 itself, or the mismatch between the test frequency and the upload frequency of the distance sensor 5. In the embodiment of the present application, since the first rotating shaft 2 can drive each rotating plate 3 to rotate, the distance between the distance sensor 5 and the distance measuring plane also changes dynamically. For example, if the test point is located on the second rotating plate 32 (that is, Figure 3 Point A shown in the figure), the distance between the distance sensor 5 and the distance measuring plane is Figure 2 If the test point is located at the distance measuring base plate 11 (ie Figure 12 Point A shown in the figure), the distance between the distance sensor 5 and the distance measuring plane is Figure 2 The distance S3 in the image is obtained. In other words, the distance between distance sensor 5 and the distance measurement plane constantly varies between distance S1 and distance S3. Therefore, even if distance sensor 5 has high test stability, it is difficult to achieve periodically repeated and continuous test results. If periodically repeated and continuous test results occur, it is likely that the test frequency and upload frequency of distance sensor 5 do not match. Based on this, it can be determined whether the test frequency and upload frequency of the distance sensor 5 match.

[0056] In one embodiment of the present application, it is assumed that the upload frequency of the distance sensor 5 is y times / second, y is any positive integer greater than or equal to 2; the calibration data acquisition time of the distance sensor 5 is z seconds, z is any positive integer greater than or equal to 1. In this embodiment, the calibration data of the distance sensor 5 can be divided into z time series according to a time length of 1 second, that is, the number of data values in each time series is y. In order to determine how many of the test results uploaded every y times are periodically repeated and continuous test results, in this embodiment, the repeatability value of each test result can be calculated. The larger the repeatability value, the more likely it is that the uploaded test result is a repeatedly uploaded test result. Specifically, in this embodiment, the calculation formula for the repeatability value of the i-th test result in every y uploaded test results is as follows:

[0057]

[0058] in, Represents the repeatability value of the i-th test result in every y-uploaded test results, where i is greater than or equal to 1 and less than or equal to y; represents the sequence number of the jth time series, where j is greater than or equal to 1 and less than or equal to z; Indicates whether the i-th detection result in the j-th time series is a continuous detection result. If it is a continuous detection result, then =1, if it is not a continuous test result, =0; z represents the number of time series.

[0059] In this embodiment, if the repeatability value of the i-th detection result among every y uploaded detection results is greater than or equal to 0.9 (of course, in other embodiments of the present application, this value can be set to other values as needed, such as 0.8 or 0.7), then it can be considered that the i-th detection result among every y uploaded detection results is a periodically repeated and continuous detection result. In application scenarios where the test frequency and upload frequency of the distance sensor are not adjustable, this method can be used to detect whether the test frequency and upload frequency of the distance sensor 5 match. In application scenarios where the test frequency and upload frequency of the distance sensor are adjustable, the test frequency and upload frequency of the distance sensor can be adjusted and calibrated manually or automatically based on the number of periodically repeated and continuous detection results per second. For example, if the number of periodically repeated and continuous detection results per second is m, where m is a positive integer greater than or equal to 1, the test frequency can be increased by m times / second, or the upload frequency can be decreased by m times / second.

[0060] It should be noted that, for distance sensors with adjustable test frequency and upload frequency, adjusting the test frequency and upload frequency is a mature technology and will not be described in detail here.

[0061] In the embodiment of the present application, the drive assembly 4 can be a crank (not shown) mounted on the first rotating shaft 2. During use, the crank can be used to manually rotate the first rotating shaft 2. Manually rotating the rotating shaft using a crank is a mature technique and will not be described in detail here. As described below, if the first rotating shaft 2 cannot rotate periodically and stably, the distance calibration device cannot be used to determine whether the test cycle of the distance sensor 5 is stable, nor can the distance calibration device be used to calibrate the test cycle of the distance sensor 5. Manually rotating the first rotating shaft 2 using a crank makes it difficult to achieve periodic and stable rotation of the first rotating shaft 2.

[0062] In order to enable the first rotating shaft 2 to perform periodic and stable rotation, in one embodiment of the present application, as shown in FIG. Figure 1 and Figure 2 As shown, the driving assembly 4 can be a motor, which is used to directly drive the first rotating shaft 2 to rotate. By driving the first rotating shaft 2 by the motor, it is easy to make the first rotating shaft 2 form a periodic and stable rotation.

[0063] It is easy to understand that the rotation speed of the motor is relatively fast. If the motor is used to directly drive the first rotating shaft 2 to rotate, the rotation speed of the first rotating shaft 2 will also be relatively fast. In the application scenario of the pupil light reflex detection device proposed in the present application, if the rotation speed of the first rotating shaft 2 is relatively fast, it may cause the distance sensor 5 to be unable to obtain different distance data. For example: if the rotation speed of the first rotating shaft 2 is 30 revolutions per second, and the test frequency of the distance sensor 5 is 30 times per second, then the distance sensor 5 can only test one distance data at all times. Specifically, in the application scenario of the pupil light reflex detection device, the rotation speed of the first rotating shaft 2 is generally maintained at about 1 revolution per second. Based on this, in one embodiment of the present application, the drive assembly 4 may include a motor 41, a first gear 47 and a second gear 48. As Figure 7 As shown, a motor 41 is mounted on the rangefinder base plate 11. A first gear 47 is mounted at the output end of the motor 41. A second gear 48 is mounted on the first rotating shaft 2 and meshes with the second gear 48. During design, the dimensions of the first and second gears 47, 48, can be used to achieve an appropriate transmission ratio between the motor 41 and the first rotating shaft 2. In other words, the dimensions of the first and second gears 47, 48 can be used to ensure that the rotational speed of the first rotating shaft 2 meets the desired operating requirements.

[0064] As can be seen from the foregoing, in this embodiment, when calibrating whether the test frequency and upload frequency of the distance sensor 5 match, if a periodically repeated and continuous test result appears, it can be basically determined that the test result is the result of repeated uploading. In order to accurately determine the number of periodically repeated and continuous test results, in an embodiment of the present application, the periodically repeated and continuous test results can be confirmed twice to improve the confirmation accuracy of the periodically repeated and continuous test results. It should be clear that if in the first calibration process, the i-th test result in every y uploaded test results is confirmed as a periodically repeated and continuous test result, and in the second calibration process, the i-th test result in every y uploaded test results is also a periodically repeated and continuous test result, then it can be determined that the i-th test result in every y uploaded test results must be a periodically repeated and continuous test result.

[0065] When collecting the second calibration data, the rotation speed of the first rotating shaft 2 or the distance between each rotating plate 3 and the distance sensor 5 can be adjusted to increase the difference between the first calibration data and the second calibration data, so as to avoid the systematic error caused by the close proximity of the first calibration data and the second calibration data. In order to enable the operator to adjust the rotation speed of the first rotating shaft 2 and the distance between each rotating plate 3 and the distance sensor 5 at the same time during the second calibration process, in one embodiment of the present application, the drive assembly 4 may include a motor 41, a second rotating shaft 42, a third gear 43, a fourth gear 44, a fifth gear 45 and a sixth gear 46. Figure 5 As shown, the second rotating shaft 42 is rotatably connected to the ranging base plate 11. Figure 4 As shown, the third gear 43 and the fourth gear 44 are both provided on the second rotating shaft 42. The fifth gear 45 and the sixth gear 46 are both provided on the first rotating shaft 2. The first rotating shaft 2 can slide along its axis to form a first working state or a second working state. When the first rotating shaft 2 is in the first working state, as shown in FIG. Figure 6 As shown, the third gear 43 and the fifth gear 45 are meshed. When the first rotating shaft 2 is in the second working state, as shown in FIG. Figure 5 As shown, the fourth gear 44 and the sixth gear 46 are meshed. The transmission ratios of the third gear 43 and the fifth gear 45, and the transmission ratios of the fourth gear 44 and the sixth gear 46 are unequal. The motor 41 is disposed on the ranging base plate 11 and is used to drive the second rotating shaft 42 to rotate. Of course, in other embodiments of the present application, the motor 41 may be disposed not on the ranging base plate 11, but rather at other suitable locations on the base 1, which will not be detailed here.

[0066] When using, you can Figure 6As shown, first, the third gear 43 and the fifth gear 45 are meshed, that is, the first rotating shaft 2 is in the first working state, and the motor 41 can drive the third gear 43 to rotate through the second rotating shaft 42. Since the third gear 43 and the fifth gear 45 are meshed, the third gear 43 can also drive the fifth gear 45 to rotate. Since the fifth gear 45 is set on the first rotating shaft 2, the fifth gear 45 can drive the first rotating shaft 2 to rotate. After the first calibration data collection is completed, the first rotating shaft 2 is moved along the axial direction of the first rotating shaft 2 so that the fourth gear 44 and the sixth gear 46 are as shown in FIG. Figure 5 As shown, the first rotating shaft 2 is in the second operating state, and the motor 41 can drive the fourth gear 44 to rotate via the second rotating shaft 42. Since the fourth gear 44 and the sixth gear 46 are meshed, the fourth gear 44 can drive the sixth gear 46 to rotate. Since the sixth gear 46 is provided on the first rotating shaft 2, the sixth gear 46 can drive the first rotating shaft 2 to rotate, thereby allowing the distance sensor 5 to perform a second calibration data acquisition.

[0067] It should be understood that, in this embodiment, since the transmission ratios of the third gear 43 and the fifth gear 45, and the transmission ratios of the fourth gear 44 and the sixth gear 46 are not equal, the rotational speeds of the first rotating shaft 2 when in the first operating state and the second operating state are necessarily different. Since the first rotating shaft 2 needs to move along its axial direction when switching its operating state, the distances between the various rotating plates 3 and the distance sensors 5 when the first rotating shaft 2 is in the first operating state and the second operating state are necessarily different. In other words, in the embodiment of the present application, the rotational speed of the first rotating shaft 2 and the distances between the various rotating plates 3 and the distance sensors 5 can be simultaneously switched by simply moving the first rotating shaft 2 along its axial direction.

[0068] In pupillary light reflex applications, accurate temporal alignment of distance data (obtained by the distance sensor) and video data (captured by the micro-camera) is essential to obtaining accurate image results based on this data. If the distance sensor's test cycle is unstable, accurate temporal alignment between distance data and video data will be difficult, resulting in errors in the subsequent image results.

[0069] In an embodiment of the present application, it is possible to determine whether the test cycle of the distance sensor 5 is stable based on the distance calibration device. Under the premise that the first rotating shaft 2 rotates at a constant speed and the rotation speed is a positive integer multiple of 1 rev / s, if the test cycle of the distance sensor 5 is stable, then the various test results obtained by the distance sensor 5 every second during the calibration process are similar. For example: if the first rotating shaft 2 rotates at a constant speed and the rotation speed is 1 rev / s, and the test cycle of the distance sensor 5 is 100 milliseconds, then the distance sensor 5 can test a total of 10 distance values per second. If the test cycle of the distance sensor 5 is stable, then the 10 distance values tested by any two seconds of the distance sensor in the 1st second, the 2nd second, the 3rd second... the nth second must be similar, where n is a positive integer greater than or equal to 2. Based on this, it is possible to determine whether the test cycle of the distance sensor is stable.

[0070] In one embodiment of the present application, assume that the test frequency of distance sensor 5 is x times / second, meaning that the test period of distance sensor 5 is 1000 / x milliseconds. The calibration data collection duration for distance sensor 5 is z seconds, where z is any positive integer greater than or equal to 1. In this embodiment, the calibration data of distance sensor 5 can be segmented into z time series sequences of 1-second duration. In other words, the number of data values in each time series sequence is x (i.e., the test frequency and upload frequency of distance sensor 5 are the same). As previously mentioned, if the test period of the distance sensor is stable, the similarity of the z time series sequences is extremely high. Furthermore, by calculating the similarity of each time series sequence, the stability of the test period of distance sensor 5 is determined. As previously mentioned, the higher the similarity of the time series sequences, the more stable the test period of distance sensor 5; the lower the similarity of the time series sequences, the more unstable the test period of distance sensor 5. Calculating the similarity between sequences is a mature technology and will not be described in detail here.

[0071] In application scenarios where the test period of the distance sensor is not adjustable, it can be determined whether the distance sensor needs to be replaced based on the size of the similarity. For example, if the similarity is less than 0.9, the distance sensor can be replaced. In application scenarios where the test period of the distance sensor is adjustable, the test period of the distance sensor can be calibrated based on the size of the similarity so that the above-mentioned similarity of the adjusted distance sensor is greater than or equal to 0.9 (of course, in other embodiments of the present application, it can be set to other values as needed, such as 0.8 or 0.7, etc.). For distance sensors with adjustable test periods, adjusting their test periods is a mature technology and will not be elaborated here.

[0072] It should be noted that, in the process of determining whether the test cycle of the distance sensor is stable, if the rotational speed of the first rotating shaft 2 is unstable, it may also lead to a low similarity between the above-mentioned time sequences. In order to avoid the phenomenon of low similarity between the above-mentioned time sequences caused by the unstable rotational speed of the first rotating shaft 2, in one embodiment of the present application, the motor 41 can be a servo motor. A servo motor is an electric motor that achieves high-precision position, speed, and torque control through a closed-loop control system. In other words, if the motor 41 is a servo motor, the rotational speed of the first rotating shaft 2 can be stabilized.

[0073] In order to further stabilize the rotational speed of the first rotating shaft 2, in one embodiment of the present application, the first rotating shaft 2 may also be provided with a speed stabilizing component 6, which is used to absorb energy to reduce the increase in the rotational speed of the first rotating shaft 2 when the rotational speed of the first rotating shaft 2 increases; and to release energy to reduce the decrease in the rotational speed of the first rotating shaft 2 when the rotational speed of the first rotating shaft 2 decreases.

[0074] In the embodiments of the present application, any device that meets the above functions can be used as the speed stabilizing component 6. For example, the speed stabilizing component 6 can be as shown in the following two embodiments.

[0075] Example 1 of the speed stabilizing component

[0076] In this embodiment, if Figure 7 and Figure 8 As shown, the speed stabilizing assembly 6 may include a plurality of connecting rods 61, a first counterweight block 62 corresponding to each of the connecting rods 61, and a first elastic member 63. Figure 8 As shown, the connecting rods 61 are evenly distributed around the axis of the first rotating shaft 2, and the first end of each connecting rod 61 is hinged to the first rotating shaft 2. A first counterweight 62 is provided at the second end of the corresponding connecting rod 61. One end of the first elastic member 63 is connected to the first rotating shaft 2, and the other end is connected to the corresponding connecting rod 61. In this embodiment, there is no restriction on the direction of the hinge connection between the connecting rod 61 and the first rotating shaft 2, as long as the connecting rod 61 does not rotate circumferentially around the first rotating shaft 2.

[0077] During use, if the first rotating shaft 2 accelerates, the first counterweight 62 drives the second end of the corresponding connecting rod 61 to rotate away from the first rotating shaft 2 under the centrifugal effect of inertia. If the second end of the connecting rod 61 rotates away from the first rotating shaft 2, the corresponding first elastic member 63 is stretched, absorbing energy, and the elastic potential energy of the first elastic member 63 increases, thereby reducing the increase in the rotation speed of the first rotating shaft 2. If the first rotating shaft 2 decelerates, the elastic force of the first elastic member 63 causes the corresponding connecting rod 61 to drive the first counterweight 62 at its second end to rotate toward the first rotating shaft 2. If the connecting rod 61 and the corresponding first counterweight 62 rotate toward the first rotating shaft 2, the first elastic member 63 actively contracts, releasing energy, and the elastic potential energy of the first elastic member 63 decreases, thereby reducing the decrease in the rotation speed of the first rotating shaft 2.

[0078] Example 2 of the speed stabilizing component

[0079] In this embodiment, if Figure 9 and Figure 10 As shown, the speed stabilizing assembly 6 includes a plurality of sleeves 64, telescopic rods 65 corresponding to the sleeves 64, a second counterweight 66 and a second elastic member 67. Figure 10 As shown, the sleeves 64 are evenly distributed around the axis of the first rotating shaft 2, and each sleeve 64 is connected to the first rotating shaft 2. The axis of the corresponding sleeve 64 of the telescopic rod 65 coincides with the axis of the telescopic rod 65, and the telescopic rod 65 and the corresponding sleeve 64 are slidably connected along their axis. The first end of the telescopic rod 65 is located inside the corresponding sleeve 64. One end of the second elastic member 67 is connected to the first end of the telescopic rod 65, and the other end is connected to the first rotating shaft 2. The second counterweight 66 is provided at the second end of the telescopic rod 65.

[0080] During use, if the first rotating shaft 2 accelerates, the second counterweight 66 drives the telescopic rod 65 to move away from the first rotating shaft 2 under the centrifugal effect of inertia. If the telescopic rod 65 moves away from the first rotating shaft 2, the second elastic member 67 is stretched, the second elastic member 67 absorbs energy, and the elastic potential energy of the second elastic member 67 increases, thereby reducing the increase in the rotation speed of the first rotating shaft 2. If the first rotating shaft 2 decelerates, the telescopic rod 65 drives the second counterweight 66 to move toward the first rotating shaft 2 under the action of the elastic force of the second elastic member 67. If the telescopic rod 65 moves toward the first rotating shaft 2, the second elastic member 67 actively contracts, that is, the second elastic member 67 releases energy, and the elastic potential energy of the second elastic member 67 decreases, thereby reducing the decrease in the rotation speed of the first rotating shaft 2. This completes the introduction to the second embodiment of the speed stabilization component.

[0081] It should be clear that in the embodiment of the present application, there is no restriction on the shape and structure of the first counterweight block 62 and the second counterweight block 66, as long as they have the counterweight function. For example, the first counterweight block 62 and the second counterweight block 66 can be square blocks or can be as Figure 8 and Figure 10 In the embodiment of the present application, there is no limitation on the shape, structure and material of the first elastic member 63 and the second elastic member 67, as long as they can absorb and release energy. For example, the first elastic member 63 and the second elastic member 67 can be long strips or circular rubber bands, or the first elastic member 63 and the second elastic member 67 can be as follows: Figure 8 and Figure 10 Spring shown.

[0082] The distance calibration device proposed in the present application, through the arrangement of a first rotating shaft, a ranging base plate, and a rotating plate, facilitates the distance sensor to collect calibration data for multiple different distances. Compared to the prior art, which requires multiple movements of the distance sensor or ranging surface to collect calibration data for multiple different distances, the distance calibration device proposed in the present application can significantly reduce the time required to collect distance sensor calibration data.

[0083] After introducing the distance calibration device proposed in the embodiment of this application, the following describes a detection device proposed in this application. Specifically, Figure 13 As shown, the detection device 7 includes a distance sensor 5 and a distance calibration device 71. The distance calibration device 71 is as shown in any one of the embodiments above, and is used to calibrate the distance sensor 5.

[0084] The detection device proposed in the embodiments of the present application includes a distance calibration device, which facilitates the collection of calibration data for multiple distances by the distance sensor through the arrangement of a first rotating shaft, a distance measuring base plate, and a rotating plate. Compared to the prior art, which requires multiple movements of the distance sensor or the distance measuring surface to collect calibration data for multiple distances, the distance calibration device proposed in the present application can significantly reduce the time required to collect distance sensor calibration data.

[0085] After introducing the detection device proposed in the embodiment of this application, the following describes a method for using the detection device proposed in this application. Specifically, Figure 14 This is a flow chart of a method for using a detection device provided in an embodiment of the present application. The following takes the detection device as an example of a pupil detection device to introduce the method. Figure 14 The method for using the pupil detection device shown includes steps 101 to 103 .

[0086] Step 101: A pupil detection device obtains a first data set.

[0087] The data in the first data set is the distance collected by the pupil detection device. It should be noted that collecting distance using the distance sensor 5 is a mature technology and will not be described in detail here.

[0088] Step 102: The pupil detection device determines a current state of the pupil detection device based on the first data set and a previous state of the pupil detection device.

[0089] The states of the pupil detection device include an observation state and a non-observation state. The observation state is a state in which image acquisition is performed, and the non-observation state is a state in which image acquisition is not performed.

[0090] Reference Figure 15 , Figure 15 This is a schematic diagram of the states of the pupil detection device according to an embodiment of the present application. In some embodiments, the observation state includes the start observation state and the observing state. The non-observation state includes the active state, the end observation state, and the standby state. The standby state is the state in which the pupil detection device is in the standby stage, for example, the pupil detection device is fixedly connected to the pupil pen, and the pupil pen is placed on a table. The active state is the state in which the user is in the active stage of using the pupil detection device, for example, a doctor picks up the pupil pen from a table.

[0091] By setting the observation state and non-observation state, and differentiating the observation state into the start observation state and the observing state, and the non-observation state into the active state, the end observation state, and the standby state, the status of the pupil detection device can be distinguished according to the user's common operation process, so that in subsequent operations, the current status of the pupil detection device can be used to make corresponding processing.

[0092] In some embodiments, the pupil detection device determines the current state of the pupil detection device based on the current distance, the previous distance, and the previous state of the pupil detection device. For example, the first distance collected by the pupil detection device is 410, and the state of the pupil detection device is the initial state, which is the standby state. The second distance collected by the pupil detection device is 410, and the previous state is the standby state. Because the absolute value of the difference between the second distance collected by the pupil detection device and the previous distance collected by the pupil detection device (the first distance) is less than a preset difference, for example, the preset difference is 150, the current state of the pupil detection device remains unchanged and remains in the standby state. The 50th distance collected by the pupil detection device is 410, and the 51st distance is 240. When the pupil detection device collects the 50th distance, the state is the standby state. Because the absolute value of the difference between the 51st distance and the 50th distance is greater than the preset difference, the current state of the pupil detection device changes to the active state.

[0093] Step 103: The pupil detection device turns on or off image acquisition according to the current state of the pupil detection device.

[0094] In some embodiments, if the pupil detection device is currently in active or standby mode, the device does not start image capture. Alternatively, the device does not change the image capture state. If image capture is already enabled, the device continues to capture images; if not, the device remains disabled. This reduces the number of image sensor on-and-off operations and improves video continuity.

[0095] Reference Figure 16 , Figure 16 This diagram shows the distances collected by the pupil detection device. The horizontal axis represents the Nth distance collected by the pupil detection device, in units of units, where N is a positive integer. The vertical axis represents the distance collected by the pupil detection device, in millimeters.

[0096] For example, intervals 1 to 7 represent the standby state, active state, observation start state, observation in progress, observation end state, active state, and standby state, respectively. When the pupil detection device enters the observation start state, it starts capturing images. Subsequently, it enters the observation state, continuing to capture images. Then, it enters the observation end state, stopping image capture.

[0097] For example, consider a doctor examining a patient's pupils. The pupil detection device is attached to a pupil pen. The pupil pen is placed in a chest pocket, and the pupil detection device is in standby mode. The doctor then picks up the pupil pen, and the pupil detection device becomes active. The doctor then illuminates the patient's pupils with the pupil pen, and the pupil detection device enters the observation start state. The doctor continues observing the patient's pupils, and the pupil detection device enters the observation state. After the doctor completes the observation, the pupil pen is returned to the pocket, and the pupil detection device enters the observation end state, active state, and standby state, respectively. Thus, while the doctor is observing the patient's pupils, the pupil detection device can begin capturing images when the doctor begins observation and stop capturing images when the doctor ends. The images captured by the pupil detection device can assist the doctor in examining the patient's pupils and serve as a record of the patient's condition during subsequent treatment.

[0098] In some embodiments, the pupil detection device can output photos or video files through image acquisition. As mentioned above, by analyzing and processing the images, the doctor's work can be assisted.

[0099] In some embodiments, the above method further includes step 201.

[0100] Step 201: Adjust the data in the data window according to the current state of the pupil detection device.

[0101] The data window is composed of part of the data in the first data set.

[0102] For the distances collected by the pupil detection device, you can set a data window to include a portion of the data as the data in the data window. For example, the default number of data in the data window is 20. When the pupil detection device collects the 20th distance, the data in the data window will be the data from the 1st to the 20th distance. When the pupil detection device collects the 21st distance, the data in the data window will be the data from the 2nd to the 21st distance.

[0103] In some embodiments, when the pupil detection device is in an observation state, the number in the data window is a first number. When the pupil detection device is in a non-observation state, the number in the data window is a second number, and the first number is smaller than the second number. For example, the first number is 15 and the second number is 25.

[0104] In some embodiments, when the pupil detection device is currently in the observation state (including the start observation state and the observing state), the amount of data in the data window can be adjusted to a first value. When the pupil detection device is currently in the end observation state, the amount of data in the data window can be adjusted to a second value. When the pupil detection device is currently in the active state, the amount of data in the data window can be adjusted to a third value. When the pupil detection device is currently in the standby state, the amount of data in the data window can be adjusted to a fourth value. For example, the first value is 10, the second value is 20, the third value is 20, and the fourth value is 25. Another example is the first value is 10, the second value is 25, the third value is 30, and the fourth value is 40. In this embodiment, the data in the data window is adjusted based on the current state of the pupil detection device. This allows the pupil detection device to more accurately determine the next state based on the window data.

[0105] In some embodiments, the above step 102 may be implemented as step 202 .

[0106] Step 202: The pupil detection device determines a current state of the pupil detection device according to the distance corresponding to the pupil detection device and the previous state of the pupil detection device.

[0107] The distance corresponding to the pupil detection device is determined based on the data in the data window.

[0108] The data window includes partial data sequentially acquired from the first data set based on a previous state of the pupil detection device.

[0109] In some embodiments, the distance corresponding to the pupil detection device includes a first value and a second value, wherein the first value is used to represent the overall level of data in the data window, and the second value is used to represent the stability of the data in the data window. In some examples, the first value is the mean, median, or mode of the data window. In some examples, the second value is the variance, standard deviation, range, interquartile range, coefficient of variation, mean absolute deviation, kurtosis, or skewness of the data window.

[0110] In some embodiments, the first value is greater than a first threshold and less than a second threshold, and the second value is not greater than a third threshold, and the pupil detection device determines that the current state of the pupil detection device is an observation state.

[0111] In some embodiments, if the first value is greater than the first threshold and less than the second threshold, the second value is not greater than the third threshold, and the previous state of the pupil detection device is the observing state or the starting observing state, the pupil detection device determines that the current state of the pupil detection device is the observing state.

[0112] In some embodiments, if the first value is greater than the first threshold and less than the second threshold, the second value is not greater than the third threshold, and the previous state of the pupil detection device is not the observing state, the pupil detection device determines that the current state of the pupil detection device is the starting observation state.

[0113] Referring to Formula 1, Formula 1 shows the judgment logic of the observing state and the starting observation state in some embodiments of the present application. Shows the current status. Indicates the previous state. represents the first threshold, represents the second threshold, represents the first value, The second value, represents the third threshold, Indicates the start of observation state. Indicates the status is being observed.

[0114]

[0115] The above method for determining the start observation state and the observing state sets the start observation state as a transitional state before the pupil detection device enters the observing state. This makes the pupil detection device's determination of the observing state more accurate and reduces misjudgments. This reduces image capture caused by misjudgments and reduces resource usage associated with image capture. This method is particularly suitable for the pupil detection device of the present application embodiment, which has limited storage resources.

[0116] In some examples, the first threshold is 10 mm and the second threshold is 40 mm. In a scenario where a doctor is examining the pupil, the distance between the pupil stylus and the pupil is approximately 10 to 40 mm. Therefore, this example sets the first and second thresholds based on the application scenario of the pupil detection device, making the set thresholds more suitable for actual applications.

[0117] In some embodiments, the second value is not less than (or greater than or equal to) the third threshold, the previous state of the pupil detection device is not the observing state, and the pupil detection device determines that the current state of the pupil detection device is the active state.

[0118] In some embodiments, the first value is not greater than (or less than or equal to) the first threshold or not less than the second threshold, and the second value is not greater than the third threshold, the previous state of the pupil detection device is a non-observation state, and the pupil detection device determines that the current state of the pupil detection device is a standby state.

[0119] In some embodiments, the second value is not less than the third threshold, the previous state of the pupil detection device is the observing state, and the pupil detection device determines that the current state of the pupil detection device is the active state or the ended observing state.

[0120] In some embodiments, the first value is not greater than the first threshold or not less than the second threshold, and the second value is not greater than the third threshold, the previous state of the pupil detection device is the observation state, and the pupil detection device determines that the current state of the pupil detection device is the end observation state or the standby state.

[0121] In some examples, the pupil detection device determines the current state of the pupil detection device based on a non-observation state counter, wherein the non-observation state counter indicates the cumulative number of times the state before the current state was the non-observation state.

[0122] In some examples, if the second value is not less than a third threshold, the pupil detection device increments the non-observing state counter by 1. If the previous state of the pupil detection device was the observing state and the non-observing state counter is not less than a fourth threshold, the pupil detection device determines that the current state of the pupil detection device is the ending observation state.

[0123] In some examples, if the second value is not less than the third threshold, the pupil detection device increments the non-observing state counter by 1. If the previous state of the pupil detection device was the observing state and the non-observing state counter is less than the fourth threshold, the pupil detection device determines that the current state of the pupil detection device is the active state.

[0124] In some examples, if the first value is not greater than a first threshold or not less than a second threshold, and the second value is not greater than a third threshold, the pupil detection device increments the non-observation state counter by 1. If the previous state of the pupil detection device was the observing state or the ready-to-observe state, and the non-observation state counter is not less than a fourth threshold, the pupil detection device determines that the current state of the pupil detection device is the end-of-observation state.

[0125] In some examples, if the first value is not greater than a first threshold or not less than a second threshold, and the second value is not greater than a third threshold, the pupil detection device increments the non-observing state counter by 1. If the previous state of the pupil detection device was an observing state or a ready-to-observe state, and the non-observing state counter is less than a fourth threshold, the pupil detection device determines that the current state of the pupil detection device is a standby state.

[0126] In some examples, the initial value of the non-observation state counter is 0. If the non-observation state counter equals a fourth threshold, the non-observation state counter is cleared. By setting the initial value to 0 and setting the non-observation state counter to be cleared after reaching the fourth threshold, the value of the non-observation state counter is restricted, thereby determining the state of the pupil detection device based on the non-observation state counter. Further processing is then performed based on the state of the pupil detection device.

[0127] Referring to Formula 2, Formula 2 shows the judgment logic of the active state and the end observation state in some embodiments of the present application. Shows the current status. Indicates the previous state. The second value, represents the third threshold, Indicates the value of the non-observable state counter, represents the fourth threshold, Indicates the active state, Indicates the status is being observed.

[0128]

[0129] Referring to Formula 3, Formula 3 shows the judgment logic of the standby state and the end observation state in some embodiments of the present application. Shows the current status. Indicates the previous state. represents the first threshold, represents the second threshold, represents the first value, The second value, represents the third threshold, Indicates the value of the non-observable state counter, represents the fourth threshold, Indicates the end of observation state. Indicates standby status.

[0130]

[0131] Through the above-described solution, the embodiment of the present application determines the state of the pupil detection device based on the order in which the states that may occur during actual operation of the pupil detection device occur and the distances collected. In subsequent steps, the amount of data in the window collected by the pupil detection device is adjusted based on the determined state, thereby increasing the accuracy of the state determination. Consequently, corresponding processing is performed based on the current state of the pupil detection device.

[0132] The above embodiment describes how the pupil detection device determines the current state according to the collected distance and turns on or off the image collection process according to the current state. The following embodiment provides methods related to image collection processing. Figure 17 , the method includes step 401.

[0133] Step 401: If the first value is not less than the first threshold and not greater than the second threshold, the pupil detection device obtains a first focal length corresponding to the first value.

[0134] Illustratively, the pupil detection device may pre-store first focal lengths corresponding to first values. For example, the first value may be the average value of the data in the data window. The focal lengths corresponding to the first values stored by the pupil detection device may range from a first value not less than a first threshold value to a second threshold value. Table 1 shows the correspondence between some first values and first focal lengths when the first value is the average value of the data in the data window.

[0135] Table 1 Correspondence between the first value and the first focal length

[0136]

[0137] In some embodiments, step 401 is located before step 103. Starting image acquisition in step 103 can be implemented as step 402.

[0138] Step 402: A pupil detection device captures an image at a first focal length.

[0139] When the pupil detection device starts image acquisition, the first focal length corresponding to the first value obtained can be used as the focal length of image acquisition. Therefore, during image acquisition, different first focal lengths are obtained according to the different distances between the pupil detection device and the target to be acquired. This makes it easier to acquire clear images and is more conducive to the subsequent analysis of the acquired images. The above embodiment exemplifies the process of determining the state based on the distance detected by the pupil detection device and acquiring images based on the state. Taking the acquisition of images in the form of video as an example, the present application also provides the following embodiments, which can process the video acquired by the pupil detection device, locate the pupil through the iris, and obtain the area of interest. Therefore, the pupil detection device can identify the area of interest in the video and identify the zoom speed of the pupil. The method of the embodiment of the present application includes steps 501 and 502.

[0140] Step 501: The pupil detection device reads the pupil image.

[0141] In some examples, the pupil detection device can read the images captured in the above embodiments, for example, the video file created in step 1100. The video file is processed frame by frame, each frame image is stored in a variable multidimensional array, and a frame count is calculated for each frame image. For example, the first frame image is counted as 1, the frame image after the first frame image is counted as 2, and so on. The following description uses the frame image processing as an example.

[0142] In some examples, the pupil detection device uses all images collected through the above embodiments as pupil images and performs frame counting on these images.

[0143] In other examples, the pupil detection device processes the images collected by the above embodiments, takes the images with pupils in the images as pupil images, and counts the frames of these filtered pupil images.

[0144] In other examples, the data collected by the pupil detection device is stored in an image format, and the pupil detection device can directly read the stored image.

[0145] Step 502: The pupil detection device determines a region of interest in the pupil image.

[0146] In some examples, the pupil detection device intercepts the region of interest (ROI) from the frame image, selecting the area near the pupil as the ROI. For example, the iris is used as the target, and the area near the pupil is selected. Because the pupil is located within the iris and has a relatively small area, using the iris to identify the ROI preserves the critical pupil image while significantly reducing the size of the frame image. By intercepting the ROI, the computing resources consumed in subsequent frame image processing can be reduced.

[0147] The following describes a method for capturing a region of interest, which includes steps 601 to 605 .

[0148] Step 601: The pupil detection device performs frame skipping processing on the pupil image to obtain a first image.

[0149] The first image is a frame image after frame skipping processing.

[0150] The pupil detection device reads the frame count of the current frame image. If the remainder of dividing the current frame count by the number of skipped frames is 0, the image is considered the first image. Processing of this image continues. The number of skipped frames can be a preset value, such as 2, 3, or 4. Frame skipping can reduce the number of frames processed by the pupil detection device, thereby reducing computational overhead.

[0151] In step 602 , the pupil detection device performs edge detection on the first image, filters the eyelash features in the first image, and obtains the first image after processing the eyelashes. Step 602 includes steps 6021 and 6022 .

[0152] In step 6021, the pupil detection device performs gradient calculation on the first image to obtain the gradient amplitude of the image.

[0153] The pupil detection device can calculate the horizontal gradient component and the vertical gradient component of the first image, see Formula 4.

[0154]

[0155] Where I represents the first image, represents the horizontal gradient component of the first image, represents the vertical gradient component of the first image, x represents the horizontal gradient component, and y represents the vertical gradient component.

[0156] In some examples, the pupil detection device copies a first image and calculates a horizontal gradient component and a vertical gradient component from the copied first image.

[0157] The pupil detection device calculates the gradient magnitude of the first image, see Formula 5.

[0158]

[0159] in, represents the gradient magnitude of the first image, represents the horizontal gradient component of the first image, Represents the vertical gradient component of the first image.

[0160] Step 6022: The pupil detection device obtains a second image based on the gradient amplitude of the first image.

[0161] The second image is the first image without the eyelashes.

[0162] The pupil detection device filters the vertical morphological structures appearing in the first image using a direction-sensitive convolution kernel, thereby filtering out the upper and lower eyelashes and reducing interference with pupil image recognition.

[0163] The direction-sensitive convolution kernel K refers to Formula 6.

[0164] Formula 6

[0165] The pupil detection device performs convolution processing on each pixel of the first image, referring to Formula 7.

[0166] Formula 7

[0167] Each pixel of the first image is represented by a horizontal component x and a vertical component y. Represents the pixel point of the first image with horizontal component x and vertical component y-1, A function that represents the convolution process.

[0168] The formula for convolution of all pixels in a first image can be simplified to Formula 8.

[0169]

[0170] The pupil detection device normalizes the first image after the gradient amplitude processing, with a range of 0 to 255. The normalization formula is shown in Formula 9. Through normalization, the influence of the gradient operation on the image is eliminated.

[0171]

[0172] See also Figure 17 Figures A to C in the Figure 17 Figure A in FIG is a schematic diagram of an unprocessed first image according to an embodiment of the present application. Figure 17 Figure B is a schematic diagram of the first image after gradient amplitude processing in an embodiment of the present application. Figure 17 Figure C is a schematic diagram of the second image of an embodiment of the present application.

[0173] It can be understood that the unprocessed first image can be the image captured by the image acquisition device in the above steps, or can be the image captured by the image acquisition device after being processed, for example, cropped, toned, etc.

[0174] In step 603 , the pupil detection device filters the pixels in the iris edge area of the second image to obtain an iris edge image. Step 603 includes steps 6031 and 6032 .

[0175] The iris edge image refers to an image obtained by extracting the edge of the iris, for example, a linear edge image composed of white discrete points on the edge of the pupil.

[0176] In step 6031 , the pupil detection device sets a mask on the second image to obtain a second image filtered by the mask.

[0177] The pupil detection device sets a mask that is initialized to be completely white and has the same size as the second image, that is, the value of the mask is 1.

[0178] The pupil detection device performs a binarization process on the second image to obtain a binarized second image. Referring to Formula 10, a bitwise AND operation is performed on the binarized second image and the second image to generate a mask-filtered second image. The binarized second image is a mask image composed of 0 or 1, and the second image is a grayscale image of 0-255. By performing a bitwise AND operation on the binarized second image and the second image, pixels with a grayscale value of 1 in the second image are deducted, thereby enhancing the mask-filtered second image in subsequent processing. The mask-filtered second image is referred to Figure 18 As shown in Figure D.

[0179]

[0180] in, represents the second image filtered by the mask, represents the second image after binarization, Indicates the second image.

[0181] Step 6032: The pupil detection device performs HSV color space range filtering on the second image that has been filtered by the mask.

[0182] Among them, the image HSV represents hue H, saturation S, and brightness V. The second image after mask filtering is converted from a BGR format image to an HSV image, and range filtering is performed through the iris edge color range to obtain the pupil mask The range of the pupil mask is the image within the edge of the iris. The expression of the pupil mask is shown in Formula 11. Among them, the color range of the iris edge is between the fifth threshold and the sixth threshold. L represents the fifth threshold, , U represents the sixth threshold, .

[0183]

[0184] Referring to formula 12, the pupil mask Perform a bitwise AND operation with the second image filtered by the mask to obtain the iris edge image.

[0185]

[0186] in, represents the iris edge image, Represents the image after the second image filtered by the mask is converted into the HSV color space. Represents the pupil mask. Figure 18 Figures E and F in Figure 18 Figure E in the figure is the image after the second image is converted into HSV color space after mask filtering. Figure 18 Figure F is the iris edge image.

[0187] In step 604 , the pupil detection device calculates a focus mask based on the iris edge image to obtain a focus area image.

[0188] The pupil detection device can perform mask processing on the iris edge image to obtain a focus area image. Exemplarily, the pupil detection device obtains the width W and height H of the iris edge image, sets the focus size ratio, and obtains the border width w and border height h after calculation. For example, if the focus size ratio is set to 80%, 10% of the upper and lower directions of the iris edge image are cut off, and 10% of the left and right directions are cut off. The pupil detection device converts the iris edge image into a grayscale image to obtain the grayscaled iris edge image. The pupil detection device sets a first mask with an initial pixel value of 255, and uses the first mask to perform a bitwise AND operation on the grayscaled iris edge image, shielding the area outside the border of the grayscaled iris edge image and retaining the area within the border of the grayscaled iris edge image, which can be called the focus area. The expression of the first mask is shown in Formula 13. Wherein, represents the first mask, b represents the border width, H represents the height of the iris edge image, and W represents the width of the iris edge image.

[0189]

[0190] Refer to Formula 14, which shows that the pupil detection device uses the first mask to perform a bitwise AND operation on the grayscale-converted iris edge image to obtain a focus area image. Figure 19 In the G graph, Figure 19 Figure G is a schematic diagram of the focus area image.

[0191]

[0192] in, represents the focus area image, represents the first mask, Represents the iris edge image after conversion to grayscale.

[0193] The image collected in the above steps will contain redundant image areas, for example, areas outside the iris. Considering that when medical staff use the pupil pen to detect the patient's pupil, they will aim the pupil pen at the pupil, so the image brightness near the pupil will be higher. The iris edge image can be further filtered to cut out the redundant areas, and the areas outside the border of the iris edge image after grayscale conversion can be filtered out to reduce the noise and calculation amount of the final extracted area of interest. In the subsequent image analysis process, computing power can be saved. For example, the 10% area on the right side of the image is the area outside the iris, and this area can be cut out.

[0194] Step 605: The pupil detection device determines a region of interest based on the enhanced image.

[0195] Step 605 includes step 6051 and step 6052 .

[0196] In step 6051, the pupil detection device performs an erosion operation on the enhanced image to obtain an eroded image.

[0197] Referring to Formula 15, the pupil detection device uses a 3×3 or 3×1 structure element to erode the enhanced image to obtain an eroded image.

[0198]

[0199] in, Indicates that the image after corrosion is at position The pixel value at Represents the structural element, defining the neighborhood of the corrosion operation, Represents an offset in a structure element, Indicates that the enhanced image is at position The pixel value at .

[0200] By selecting a 3×3 or 3×1 structural element, the eroded image has a better effect, making the overall image clearer and the vertical line features clearer.

[0201] By performing an erosion operation on the enhanced image, small noise points are eliminated, making the enhanced image more regular and reducing the boundary of the enhanced image.

[0202] In step 6052, the pupil detection device binarizes the eroded image to obtain a binary image.

[0203] Referring to Formula 16, the pupil detection device binarizes the eroded image to obtain a binary image. The pixel value of the eroded image is set to 255, and the pixel value of the remaining area is set to 0. The remaining area is filtered by the seventh threshold. The value of the seventh threshold can be determined based on experience. For example, after multiple attempts to select different values as the seventh threshold and obtain a binary image, it can be determined that the value corresponding to the binary image with the best effect is the seventh threshold. Figure 19 Figure H in the figure, Figure 19 Figure H in is a schematic diagram of a binary image.

[0204]

[0205] in, represents a binary image, represents the image after corrosion, Indicates the seventh threshold.

[0206] Step 6053: The pupil detection device determines the minimum bounding box of the binary image.

[0207] The minimum bounding box of the binary image is the region of interest of the pupil image.

[0208] The pupil detection device can update the first variable by traversing the non-zero points row by row Second variable By traversing the non-zero points column by column, update the third variable and the fourth variable After traversing the binary image, the area enclosed by the first variable to the fourth variable can be obtained, which is the region of interest.

[0209] Traversing non-zero points row by row may refer to traversing a binary image from top to bottom or from bottom to top, checking whether it contains non-zero points. If a certain point is a non-zero point, the position of the point is returned, and the position with the smallest coordinate in the y direction is used as the first variable, and the position with the largest coordinate in the y direction is used as the first variable. Traversing non-zero points column by column may refer to traversing a binary image from left to right or from right to left, checking whether it contains non-zero points. If a certain point is a non-zero point, the position of the point is returned, and the position with the smallest coordinate in the x direction is used as the third variable, and the position with the largest coordinate in the x direction is used as the fourth variable. Exemplarily, the first to fourth variables may be determined by Formulas 17 to 21. The region of interest is represented by Formula 21. Reference Figure 19 In the J diagram, Figure 19 The range in the J frame is the area of interest.

[0210]

[0211] in, represents the first variable, represents the second variable, represents the third variable, represents the fourth variable, and ROI represents region of interest.

[0212] Through the above method, the pupil detection device can identify a region of interest in the captured video. The region of interest includes the pupil. Consequently, in subsequent operations, the pupil detection device can use the region of interest to better analyze the pupil, such as analyzing the speed of pupil changes, to assist doctors in their analysis.

[0213] While the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the present application, and the scope of the present application is defined by the appended claims and their equivalents. For example, to reduce the danger of using the distance calibration device, a cover may be provided to cover components such as the gears and rotating plate. Alternatively, to facilitate reflection of the waves emitted by the distance sensor 5 by the first and second ranging planes, corresponding reflective coatings may be provided on the first and second ranging planes (this prior art is not described in detail).

Claims

1. A method for using a distance calibration device, applied to the calibration of a distance sensor (5), characterized in that: The distance calibration device comprises: Base (1); the base (1) includes a distance measuring base plate (11), and the distance measuring base plate (11) includes a first distance measuring plane; the base (1) is used to place the distance sensor (5); A first rotating shaft (2) is rotationally connected to the distance measuring base plate (11); At least one rotating plate (3); each rotating plate (3) is arranged on the first rotating shaft (2) at intervals along the axial direction of the first rotating shaft (2); each rotating plate (3) includes a second ranging plane; the normal line of the first ranging plane and the normal line of each second ranging plane are parallel to the axis of the first rotating shaft (2), and the first ranging plane and each second ranging plane have the same orientation; if the first rotating shaft (2) rotates, the distance sensor (5) can illuminate the first ranging plane and each second ranging plane at different times respectively; A driving assembly (4), arranged on the distance measuring base plate (11), and used for driving the first rotating shaft (2) to rotate; The method for using the distance calibration device at least includes determining whether the test frequency and the upload frequency of the distance sensor (5) match; or at least includes determining whether the test cycle of the distance sensor (5) is stable; The determining whether the test frequency of the distance sensor (5) matches the upload frequency includes: The calibration data of the distance sensor (5) is divided into z time series according to a time length of 1 second; z is the acquisition time length of the calibration data of the distance sensor (5), and z is any positive integer greater than or equal to 1; the upload frequency of the distance sensor (5) is y times / second, and y is any positive integer greater than or equal to 2; Based on each time series, determine how many of the test results uploaded every y times are periodically repeated and continuous test results; The determining how many of the test results uploaded every y times are periodically repeated and continuous test results includes: calculating a repeatability value of each test result; The calculation formula for calculating the repeatability value of each test result is as follows: in, Represents the repeatability value of the i-th test result in every y-uploaded test results, where i is greater than or equal to 1 and less than or equal to y; represents the sequence number of the jth time series, where j is greater than or equal to 1 and less than or equal to z; Indicates whether the i-th detection result in the j-th time series is a continuous detection result. If it is a continuous detection result, then =1, if it is not a continuous test result, =0; z represents the number of time series; Determining whether the test cycle of the distance sensor (5) is stable includes: The calibration data of the distance sensor (5) is divided into z time series according to a time length of 1 second; z is the acquisition time length of the calibration data of the distance sensor (5), and z is any positive integer greater than or equal to 1; the first rotating shaft (2) rotates at a constant speed and the rotation speed is a positive integer multiple of 1 revolution per second; Based on each time series, obtain the similarity of each time series; Based on the similarity, it is determined whether the test cycle of the distance sensor (5) is stable.

2. The method for using the distance calibration device according to claim 1, characterized in that: The base (1) further comprises a positioning portion (12); the positioning portion (12) is used to limit relative displacement between the base (1) and the distance sensor (5).

3. The method for using the distance calibration device according to claim 1, wherein: The projections of the rotating plates (3) on the first distance measurement plane do not overlap or do not completely overlap; The rotating plate (3) is in the shape of a regular triangle or a petal-shaped plate.

4. The method for using the distance calibration device according to any one of claims 1 to 3, characterized in that: The driving assembly (4) comprises: A motor (41) is provided on the distance measuring base plate (11); a first gear (47) disposed at an output end of the motor (41); The second gear (48) is arranged on the first rotating shaft (2), and the second gear (48) is meshed with the first gear (47).

5. The method for using the distance calibration device according to any one of claims 1 to 3, characterized in that: The driving assembly (4) comprises: A second rotating shaft (42) is rotationally connected to the distance measuring base plate (11); A third gear (43) and a fourth gear (44) are both arranged on the second rotating shaft (42); The fifth gear (45) and the sixth gear (46) are both arranged on the first rotating shaft (2); the first rotating shaft (2) can slide along its axis to form a first working state or a second working state; when the first rotating shaft (2) is in the first working state, the third gear (43) and the fifth gear (45) are meshed; when the first rotating shaft (2) is in the second working state, the fourth gear (44) and the sixth gear (46) are meshed; the transmission ratio of the third gear (43) and the fifth gear (45) and the transmission ratio of the fourth gear (44) and the sixth gear (46) are not equal; A motor (41) is provided on the distance measuring base plate (11) and is used to drive the second rotating shaft (42) to rotate.

6. The method for using the distance calibration device according to any one of claims 1 to 3, characterized in that: The first rotating shaft (2) is further provided with a speed stabilizing component (6), which is used to absorb energy to reduce the increase range of the speed of the first rotating shaft (2) when the speed of the first rotating shaft (2) increases; and to release energy to reduce the decrease range of the speed of the first rotating shaft (2) when the speed of the first rotating shaft (2) decreases.

7. The method for using the distance calibration device according to claim 6, characterized in that: The speed stabilizing component (6) comprises: a plurality of connecting rods (61), each connecting rod (61) being evenly distributed around the axis of the first rotating shaft (2), and a first end of each connecting rod (61) being hinged to the first rotating shaft (2); A first counterweight (62) and a first elastic member (63) are provided in one-to-one correspondence with the connecting rod (61); the first counterweight (62) is arranged at the second end of the corresponding connecting rod (61); one end of the first elastic member (63) is connected to the first rotating shaft (2), and the other end is connected to the corresponding connecting rod (61).

8. The method for using the distance calibration device according to claim 6, wherein: The speed stabilizing component (6) comprises: A plurality of sleeves (64), each sleeve (64) being evenly distributed around the axis of the first rotating shaft (2), and each sleeve (64) being connected to the first rotating shaft (2); A telescopic rod (65), a second counterweight (66) and a second elastic member (67) are provided in one-to-one correspondence with the sleeve (64); the axis of the telescopic rod (65) and the corresponding sleeve (64) coincide with each other, and the telescopic rod (65) and the corresponding sleeve (64) form a sliding connection along their axis; the first end of the telescopic rod (65) is located inside the corresponding sleeve (64); one end of the second elastic member (67) is connected to the first end of the telescopic rod (65), and the other end is connected to the first rotating shaft (2); the second counterweight (66) is provided at the second end of the telescopic rod (65).

9. A detection device, characterized in that: The device comprises a distance sensor (5) and a distance calibration device. When in use, the distance calibration device calibrates the distance sensor (5) using the method for using the distance calibration device according to any one of claims 1 to 8.

10. A method for using a detection device, applied to the detection device as claimed in claim 9, wherein the detection device has an image acquisition function, characterized in that: The method of use includes: Acquire a first data set, wherein the data in the first data set are the distances collected by the detection device; before acquiring the first data set, calibrate the distance sensor (5) in the detection device in advance using a distance calibration device; determining a current state of the detection device based on the first data set and a previous state of the detection device; Turning on or off image acquisition according to the current state of the detection device; The states of the detection device include an observation state and a non-observation state. The observation state is a state in which image acquisition is performed, and the non-observation state is a state in which image acquisition is not performed.

Citation Information

Patent Citations

  • Multiple iris collecting device using active vision feedback

    CN101051349A

  • Laser radar automatic test device and method

    CN113156410A