Visual acuity measurement method and apparatus, device, and medium
By acquiring the display device resolution and adjusting the optotype size and detection distance, the problem of insufficient pixel resolution of television and display screens is solved, thus achieving the reliability and accuracy of vision testing and adapting to vision testing under different device resolutions.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- BEIJING SIGHTNOVO MEDICAL TECH CO LTD
- Filing Date
- 2026-01-09
- Publication Date
- 2026-07-16
AI Technical Summary
In the existing technology, the pixel resolution of television and display screens is insufficient to accurately represent small visual targets at high visual acuity levels, affecting the accuracy of vision tests.
By obtaining the device resolution of the display device, the target size of the target to be displayed is determined, and the detection distance is adjusted based on the target size to ensure that the target is displayed clearly and completely. The target size is optimized by using target display rules and pixel rules.
It improves the reliability and accuracy of vision testing, adapts to vision testing under different device resolutions, and enhances the reliability of vision testing and user experience.
Smart Images

Figure CN2026071595_16072026_PF_FP_ABST
Abstract
Description
Vision testing methods, devices, equipment and media
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510051393.7, filed on January 13, 2025, entitled "Vision Testing Method, Device, Equipment and Medium". Technical Field
[0003] This disclosure generally relates to the field of visual target display technology, and specifically to a vision testing method, device, equipment, and medium. Background Technology
[0004] In modern homes, the widespread use of televisions and other electronic screens has made vision monitoring more convenient. However, the pixel resolution of many televisions and display screens makes it difficult to accurately represent small optotypes at high visual acuity levels, thus affecting the accuracy of vision tests. Summary of the Invention
[0005] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a vision testing method, device, equipment and medium that can perform reliable vision testing while ensuring that the visual targets are clear and fully displayed.
[0006] In a first aspect, embodiments of this application provide a vision testing method, including:
[0007] Get the device resolution of the display device;
[0008] The target size of the visual target to be displayed is determined based on the device resolution; the visual target to be displayed is a random directional visual target determined according to the visual acuity value to be tested.
[0009] Based on the target size, a target detection distance is determined for detecting the visual acuity value to be tested.
[0010] In some embodiments, obtaining the device resolution of the display device includes:
[0011] The display device is controlled to display an initial calibration line segment in a preset direction, the initial calibration line segment containing a preset first number of pixels;
[0012] Obtain a target calibration line segment with the same length as the preset physical object by adjusting the number of pixels occupied by the initial calibration line segment based on the preset physical object;
[0013] The device resolution of the display device is determined based on the number of second pixels occupied by the target calibration line segment.
[0014] In some embodiments, the length of the initial calibration line segment is N times the length of the target line segment, the length of the target line segment is a preset integer centimeter length, and N times is n times the preset ratio of the actual physical resolution to the logical resolution.
[0015] In some embodiments, obtaining the target size of the target image to be displayed at the device resolution includes:
[0016] Obtain the expected detection distance input by the user;
[0017] Based on the expected detection distance, determine the mapping relationship between each visual acuity value and the target difference value;
[0018] Based on the target difference and the preset target display rules, the smallest pixel unit corresponding to the target to be displayed is determined; wherein, the target display rules are pixel rules corresponding to the target, and the pixel rules include at least one of pixel distribution rules and pixel ratio rules;
[0019] Determine whether the device resolution is less than or equal to the smallest pixel unit;
[0020] When the device resolution is less than or equal to the smallest pixel unit, the target size corresponding to the target to be displayed is determined based on the expected detection distance; or
[0021] When the device resolution is greater than the minimum pixel unit, the target size corresponding to the target to be displayed is determined based on the device resolution and the preset target display rules; wherein, the target display rules are the pixel rules corresponding to the target, and the pixel rules include at least one of pixel distribution rules and pixel ratio rules.
[0022] In some embodiments, when the displayed target is an "E" target, the preset target display rule is that the number of pixels contained in the target to be displayed is a multiple of 5;
[0023] When the displayed target is another type of target, the preset target display rule is determined according to the type of the displayed target.
[0024] In some embodiments, determining the target detection distance for detecting the visual acuity value to be tested, based on the target size, includes:
[0025] Obtain the division angle corresponding to the target to be displayed;
[0026] The target detection distance for detecting the visual acuity value to be tested is determined based on the division angle and the target size.
[0027] In some embodiments, it also includes:
[0028] A distance adjustment prompt message is sent to the user based on the target detection distance.
[0029] Secondly, embodiments of this application provide a vision testing device, comprising:
[0030] The first acquisition module is used to acquire the device resolution of the display device;
[0031] The second acquisition module is used to determine the target size of the visual target to be displayed based on the device resolution; the visual target to be displayed is a random directional visual target determined according to the visual acuity value to be tested;
[0032] The determination module is used to determine the target detection distance for detecting the visual acuity value to be tested based on the target size.
[0033] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in embodiments of this application.
[0034] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in embodiments of this application.
[0035] Fifthly, embodiments of this application provide a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the method described in embodiments of this application.
[0036] The vision testing method, apparatus, device, and medium proposed in this embodiment achieve effective display of the visual target according to the device resolution by acquiring the device resolution of the display device and determining the target size of the visual target to be displayed based on the device resolution. This ensures that the visual target can be displayed clearly and completely by adjusting its target size, improving the reliability of the visual target display and providing an effective visual target basis for vision testing. Simultaneously, by determining the target detection distance for detecting the visual acuity value based on the target size, vision testing can meet the detection distance requirements while ensuring the reliability of the visual target, further improving the reliability of vision testing.
[0037] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0038] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0039] Figure 1 shows the implementation environment architecture of the vision detection method provided in the embodiments of this application;
[0040] Figure 2 shows a schematic flowchart of a vision testing method provided in an embodiment of this application;
[0041] Figure 3 shows a flowchart of a vision testing method provided in another embodiment of this application;
[0042] Figure 4 shows a schematic diagram of the structure of an "E"-type target provided in an embodiment of this application;
[0043] Figure 5 shows a schematic diagram of the structure of a vision testing device provided in an embodiment of this application;
[0044] Figure 6 shows a schematic diagram of the structure of a computer system suitable for implementing an electronic device or server according to the embodiments of this application. Detailed Implementation
[0045] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0046] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0047] The specific implementation environment of the vision testing method proposed in this application is shown in Figure 1. Figure 1 shows the implementation environment architecture diagram of the vision testing method provided in the embodiment of this application.
[0048] As shown in Figure 1, the implementation environment architecture includes: a display device 101, an image acquisition device 102, and a server 103.
[0049] Display device 101 is used to display the target image according to the target size calculated by server 103. Display device 101 may be a television, a standalone monitor, a desktop computer, a laptop computer, a smartphone, a tablet computer, an e-book reader, a smartwatch, etc., but is not limited to these.
[0050] The image acquisition device 102 is used to acquire images of the user's face to determine the distance between the user and the display device 101. The image acquisition device 102 is typically a camera mounted on the display device 101, but it can also be a stand-alone image acquisition device 102.
[0051] Server 103 is connected to display device 101 and image acquisition device 102 respectively to obtain the device resolution of display device, obtain the target size of the visual target to be displayed based on device resolution, and determine the target detection distance for detecting visual acuity value based on target size.
[0052] Server 103 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0053] The display device 101 and image acquisition device 102 are directly or indirectly connected to the server 103 via wired or wireless communication. Optionally, the aforementioned wireless or wired network uses standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to any combination of Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, wired or wireless network, private network, or virtual private network.
[0054] The vision testing method proposed in this application can be implemented by a vision testing device, which can be installed on a terminal device or a server.
[0055] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation instruction steps as shown in the following embodiments or drawings, the method may include more or fewer operation instruction steps based on conventional or non-creative effort. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.
[0056] Please refer to Figure 2, which shows a flowchart of a vision testing method provided in an embodiment of this application. As shown in Figure 2, the method includes:
[0057] Step 201: Obtain the device resolution of the display device.
[0058] In the field of display devices, resolution typically refers to the number of pixels on a screen in the horizontal and vertical directions. Resolution is indicated by a product, such as 1920×1080. When a display device has a higher resolution, it displays more pixels, and each pixel is relatively small. In this embodiment, the device resolution is the size of one pixel.
[0059] In some feasible embodiments, the device resolution of the display device can be obtained by querying the model of the display device. For example, when conducting a vision test for the first time, the brand and model information of the display device used for the test are entered, and the server obtains the resolution of the display device by querying the corresponding brand, model and other information.
[0060] In other feasible embodiments, the device resolution of the display device can also be obtained by utilizing the communication interface of the display device. For example, under normal circumstances, the display device itself stores the corresponding resolution information. When performing vision testing for the first time, the server obtains the self-resolution information stored by the display device by calling the interface information of the display device.
[0061] In a preferred embodiment, for non-standard display devices, such as e-readers, there may be situations where the network or its internal storage does not store the corresponding resolution information. In order to meet the need to accurately obtain the resolution of the display device, users can be guided to perform a resolution calibration operation to determine the true resolution of the display device.
[0062] Specifically, the display device is controlled to display an initial calibration line segment in a preset direction. The initial calibration line segment contains a preset first number of pixels. A target calibration line segment, with a preset food length, is obtained by adjusting the number of pixels occupied by the initial calibration line segment based on a preset physical object. The device resolution of the display device is determined based on the second number of pixels occupied by the target calibration line segment.
[0063] The initial calibration line segment length is N times the target line segment length, the target line segment length is a preset integer centimeter length, and N times is n times the preset ratio of the actual physical resolution to the logical resolution.
[0064] In other words, the server first controls the display device to display an initial calibration line segment in a preset direction according to the assumed (expected) resolution. For example, assuming the resolution is a = 0.2mm, the initial calibration line segment is a 20cm horizontal line segment output according to the assumed resolution. The required first pixel count is calculated to be 20 × 100 / 0.2 = 1000, meaning the initial calibration line segment is a horizontal line segment containing 1000 pixels. Then, a user compares the initial calibration line segment with a 20cm object and adjusts the display device according to the object's length, ensuring the displayed calibration line segment matches the object's length. At this point, the device resolution is calculated using the formula described above. For example, if the second pixel count of the adjusted target calibration line segment is 1500, the device resolution is 20 × 100 / 1500 = 1.333mm.
[0065] It should be noted that the preset object can be determined according to the type of display device, that is, it should be able to be executed within the display range of the display device as much as possible. This application does not make specific limitations. For example, when the screen size of the display device is small, such as when a mobile terminal is used as the display device, both the initial calibration line segment and the preset object are selected to be relatively small in size, such as displaying the initial calibration line segment at 5cm.
[0066] It should also be noted that the calibration of the display device can be performed in only one direction to infer the number of pixels in the perpendicular direction, or it can be performed in both directions; this application does not impose any specific limitations. For example, the device resolution in the vertical direction can be determined based on the device resolution in the horizontal direction, or the device resolution can be calibrated separately for the horizontal and vertical directions.
[0067] Therefore, the embodiments of this application can accurately obtain the device resolution of the display device through interaction with the user, providing a reliable data foundation for displaying clear and accurate visual targets, effectively avoiding problems such as blurred visual targets and unclear boundaries caused by insufficient display device resolution, as well as inaccurate vision tests.
[0068] Step 202: Determine the target size of the visual object to be displayed based on the device resolution.
[0069] The target to be displayed is a random directional target determined based on the visual acuity value to be tested.
[0070] It should be noted that the optotype is a marker used for visual acuity testing, and in this embodiment, it is preferably the "E" type optotype specified in GB / T 11533-2011. The size of the optotype is related to the visual acuity value; that is, given a fixed user testing distance, the higher the visual acuity value, the smaller the optotype. The visual acuity value range specified in GB / T 11533-2011 is 4.0-5.3.
[0071] It should be noted that when using a display device for vision testing, unlike the physical vision chart used in conventional vision testing, the display device relies on screen pixel blocks to display the optotypes. When the pixel block size is larger than or close to the minimum resolution required by the optotypes, the displayed optotypes are prone to deviating from the requirements of vision testing and cannot meet the needs of vision testing.
[0072] On the other hand, in practical applications, especially during home vision testing, situations may arise where the standard testing distance cannot be met. In such cases, particularly during higher visual acuity tests, to ensure both clear and reliable display of the visual targets and compliance with the distance requirements of vision testing, this application innovatively proposes a technical solution that first determines the target size of the visual targets to be displayed based on the device resolution, and then guides the user to adjust the testing distance based on the target size. This approach ensures the reliability of the visual targets while meeting the distance requirements of vision testing.
[0073] Specifically, as shown in Figure 3, obtaining the target size of the icon to be displayed at the device resolution includes:
[0074] Step 301: Obtain the expected detection distance input by the user.
[0075] It should be noted that, based on the visual rule that objects appear larger when they are closer and smaller when they are farther away, it is only meaningful to determine the size of the target to be displayed within a certain range.
[0076] In this embodiment, the expected detection distance can be the furthest detection distance that the user can provide, such as the distance between the TV and the sofa when using a home TV for vision testing. The expected detection distance can be input through an interactive device or acquired by data collection. Specifically, the expected detection distance can be a distance value sent by the user to the server through an interactive interface during each vision test or the first vision test, or the server can acquire the user's image through an image acquisition device that works with the display device and calculate the expected detection distance input by the user based on an image analysis algorithm.
[0077] In this embodiment of the application, no specific limitation is made on the image analysis algorithm for distance calculation.
[0078] Step 302: Based on the expected detection distance, determine the mapping relationship between each visual acuity value and the target difference value.
[0079] It should be noted that after determining the expected detection distance input by the user, the size of the optotype corresponding to each visual acuity value can be obtained based on the expected detection distance, and then the optotype difference between adjacent visual acuity values can be determined.
[0080] For example, this application uses the following formula to determine the optotype size corresponding to each visual acuity value: D=παd / 10800
[0081] Where D is the target size, d is the test distance (in the current embodiment, the expected detection distance), and α is the horizontal division angle corresponding to the visual acuity value.
[0082] Taking a target detection distance α of 5m as an example, the calculated visual acuity values and their corresponding optotype sizes are as follows:
[0083] The optotype size corresponding to a visual acuity of 5.3 is:
[0084] D=3.14.5926×0.501'×5000 / 10800=0.729mm;
[0085] The optotype size corresponding to a visual acuity of 5.2 is:
[0086] D=3.14.5926×0.631'×5000 / 10800=0.918mm;
[0087] The optotype size corresponding to a visual acuity of 5.1 is:
[0088] D=3.14.5926×0.794'×5000 / 10800=1.155mm;
[0089] The optotype size corresponding to a visual acuity of 5.0 is:
[0090] D=3.14.5926×1'×5000 / 10800=1.454mm;
[0091] The optotype size corresponding to a visual acuity of 4.9 is:
[0092] D=3.14.5926×1.259'×5000 / 10800=1.831mm;
[0093] The optotype size corresponding to a visual acuity of 4.8 is:
[0094] D=3.14.5926×1.585'×5000 / 10800=2.305mm;
[0095] The optotype size corresponding to a visual acuity of 4.7 is:
[0096] D=3.14.5926×1.995'×5000 / 10800=2.902mm;
[0097] The optotype size corresponding to a visual acuity of 4.6 is:
[0098] D=3.14.5926×2.512'×5000 / 10800=3.654mm;
[0099] The optotype size corresponding to a visual acuity of 4.5 is:
[0100] D=3.14.5926×3.162'×5000 / 10800=4.599mm;
[0101] The optotype size corresponding to a visual acuity of 4.4 is:
[0102] D=3.14.5926×3.981'×5000 / 10800=5.790mm;
[0103] The optotype size corresponding to a visual acuity of 4.3 is:
[0104] D=3.14.5926×5.012'×5000 / 10800=7.290mm;
[0105] The optotype size corresponding to a visual acuity of 4.2 is:
[0106] D=3.14.5926×6.31'×5000 / 10800=9.178mm;
[0107] The optotype size corresponding to a visual acuity of 4.1 is:
[0108] D=3.14.5926×7.943'×5000 / 10800=11.553mm;
[0109] The optotype size corresponding to a visual acuity of 4.0 is:
[0110] D=3.14.5926×10'×5000 / 10800=14.544mm.
[0111] Furthermore, based on the aforementioned optotype sizes, the optotype difference value corresponding to each optotype size is obtained. For example, the optotype difference value between visual acuity values of 5.0 and 5.1 is 0.299mm.
[0112] Step 303: Based on the target difference and the preset target display rules, determine the smallest pixel unit corresponding to the target to be displayed.
[0113] Among them, the target display rule is the pixel rule corresponding to the target, and the pixel rule includes at least one of the pixel distribution rule and the pixel ratio rule.
[0114] It should be understood that the icon display rules can be determined based on the selected icon type. Optionally, when displaying an "E" icon, the default icon display rule is that the number of pixels contained in the icon to be displayed is a multiple of 5; when displaying other icons, such as "C" icons or text icons, the icon display rules are determined based on the specific icon type.
[0115] Furthermore, as shown in Figure 4, 51×51 pixels are needed to display a complete “E” type target. Therefore, after determining the target difference, the target difference can be divided by 5 to obtain the smallest pixel unit corresponding to the “E” type target, including but not limited to the smallest pixel unit of the “E” type target in the horizontal direction or the smallest pixel unit of the “E” type target in the vertical direction.
[0116] Step 304: Determine whether the device resolution is less than or equal to the smallest pixel unit.
[0117] It should be noted that the target difference is the amount of pixel change reflected by the change in the target corresponding to adjacent visual acuity values, and the smallest pixel unit is the smallest pixel adjustment amount corresponding to the target to be displayed. At lower resolutions, when changing the target size based on visual acuity values, the resolution may not be sufficient to meet the required pixel change for the target size change, resulting in the target not being displayed clearly and completely.
[0118] Based on this, this application proposes to determine different strategies according to the relationship between device resolution and minimum pixel unit, specifically, as in steps 305 and 306.
[0119] Step 305: When the device resolution is less than or equal to the smallest pixel unit, determine the target size corresponding to the target to be displayed based on the expected detection distance.
[0120] It should be noted that when the device resolution is less than or equal to the smallest pixel unit, it means that the pixel size corresponding to the resolution is sufficient to accommodate the pixel unit change required to transform the visual acuity target from the previous visual acuity value to the target being tested. In this case, it is confirmed that the target being tested can be displayed completely and clearly in its normal state. Therefore, no further adjustments are needed, and the target size corresponding to the target to be displayed can be directly determined based on the expected detection distance. For example, when the expected detection distance is 5m, the target size corresponding to the target to be displayed can be directly calculated using the above-described target calculation method.
[0121] Step 306: When the device resolution is greater than the minimum pixel unit, determine the target size corresponding to the target to be displayed based on the device resolution and the preset target display rules.
[0122] When the device resolution is greater than the minimum pixel unit, it indicates that the pixel size corresponding to the resolution cannot meet the pixel unit change amount required for the visual target to change from the previous visual acuity value to the visual target to be measured, that is, the pixel change amount required for the visual target to shrink in any direction is less than the change amount provided by the display device pixels. At this time, in order to ensure the clear and reliable display of the visual target, the target size corresponding to the visual target to be displayed is determined according to the preset visual target display rule.
[0123] It should also be noted that in the embodiments of the present application, since the pixels of the display device and the size of the visual target to be displayed cannot fit perfectly, therefore, in the embodiments of the present application, a technical solution for detecting the clarity of the visual target to be displayed is further proposed.
[0124] Specifically, obtain the pre-display pixel size corresponding to the display device displaying the visual target to be displayed and the target size of the visual target to be displayed, and then obtain the display difference between the pre-display pixels and the target size. If the display difference is greater than or equal to the preset difference value, it is determined that the display device cannot clearly and completely display the visual target to be displayed. At this time, the target size corresponding to the visual target to be displayed needs to be re-determined based on the device resolution and the preset visual target display rule. If the display difference is less than the preset difference value, it is determined that the display device can clearly and completely display the visual target to be displayed.
[0125] Thus, the embodiments of the present application can judge whether the display device can clearly and completely display the visual target to be displayed from two aspects: the device resolution and the visual target difference, and the target size and the pre-display pixels, greatly improving the reliability of the display of the visual target to be displayed, being able to timely and accurately detect inappropriate display scenarios and replace the corresponding display strategy, ensuring that the visual target to be displayed can be clearly and completely displayed, avoiding ineffective detection, and improving the reliability of visual acuity detection.
[0126] Step 203, based on the target size, determine the target detection distance for detecting the visual acuity value to be measured.
[0127] Specifically, the sub-angle corresponding to the visual target to be displayed can be obtained, and based on the sub-angle and the target size, the target detection distance for detecting the visual acuity value to be measured is determined.
[0128] Exemplarily, the following formula can be used to determine the target detection distance: d’ = D’×10800 / (πα)
[0129] Where, d’ is the target detection distance, D’ is the target size, and α is the horizontal corresponding graduation angle corresponding to the visual acuity value.
[0130] That is to say, by using the target size of the visual target to be displayed determined in the aforementioned step 304 or 305, the target detection distance required for actual detection can be determined.
[0131] In a feasible embodiment, when the device resolution is less than or equal to the minimum pixel unit, the expected detection distance can be directly used as the target detection distance without additional calculation.
[0132] In another feasible embodiment, when the device resolution is greater than the minimum pixel unit, the size of 5 times the pixel block is used to determine the target size of the visual target to be displayed, and then the target detection distance corresponding to the visual target corresponding to each visual acuity value is determined using the target size.
[0133] Exemplarily, for a display device of a certain brand with a size of 55 inches, the device resolution is 3840×2160, and the size of a single pixel block (a pixel block composed of 5 consecutive pixel points in the horizontal or vertical direction) is approximately 0.3166 mm. When using 5 pixel blocks to represent a complete "E" - shaped visual target, there are:
[0134] The target detection distance corresponding to the visual acuity value of 5.2 is:
[0135] d’ = 0.3166×10800 / (3.1415926×(0.631 / 60)×π) = 1.725 m;
[0136] The target detection distance corresponding to the visual acuity value of 5.0 is:
[0137] d’ = 0.3166×10800 / (3.1415926×(1 / 60)×π) = 1.088 m;
[0138] The target detection distance corresponding to the visual acuity value of 4.6 is:
[0139] d’ = 0.3166×10800 / (3.1415926×(2.512 / 60)×π) = 0.433 m;
[0140] When using 10 pixel blocks to represent a complete "E" - shaped visual target, there are:
[0141] The target detection distance corresponding to the visual acuity value of 5.2 is:
[0142] d’ = 0.6332×10800 / (3.1415926×(0.631 / 60)×π) = 3.45 m;
[0143] The target detection distance corresponding to the visual acuity value of 5.0 is:
[0144] d’ = 0.6332×10800 / (3.1415926×(1 / 60)×π) = 2.176 m;
[0145] The target detection distance corresponding to the visual acuity value of 4.6 is:
[0146] d'=0.6332×10800 / (3.1415926×2.512′)=0.866m.
[0147] In a feasible embodiment, to further reduce the impact of user movement during the testing process on the user's detection results, the two determination methods described above can be combined. That is, when the display device can clearly and completely display a portion of the visual acuity values corresponding to the target visual object when the user tests at the expected detection distance, the target visual object corresponding to that portion of the visual acuity values is displayed at the expected detection distance. When the display device cannot clearly and completely display another portion of the visual acuity values corresponding to the target visual object when the user tests at the expected detection distance, the target size of the target visual object is determined according to the device resolution and preset target display rules, and then the target detection distance is determined.
[0148] For example, for the aforementioned 55-inch display device with a resolution of 3840×2160, when the expected detection distance is 5m, if the device resolution is less than or equal to the smallest pixel unit corresponding to a visual acuity value of 4.0-5.0, the detection can be performed normally according to the expected detection distance without needing to redetermine the target detection distance. If the device resolution is greater than the optotype difference corresponding to a visual acuity value of 5.1-5.2, it is necessary to redetermine the target size corresponding to the optotype to be displayed according to the device resolution and the preset optotype display rules, and determine the target detection distance based on the target size. Alternatively, when the expected detection distance is 3m, since the target difference between visual acuity values of 4.8 and 4.9 is 0.284mm, and the target difference between visual acuity values of 4.8 and 4.7 is 0.358mm, the device resolution is smaller than the smallest pixel unit between visual acuity values of 4.8 and 4.7, but larger than the smallest pixel unit between visual acuity values of 4.8 and 4.9. Therefore, when detecting visual acuity values of 4.0-4.8, the user does not need to adjust the detection distance. However, when detecting visual acuity values of 4.9-5.2, it is necessary to redetermine the target size corresponding to the visual acuity to be displayed and determine the target detection distance based on the target size.
[0149] Therefore, this application can select an appropriate detection strategy according to the size requirements of the display device and the target to be displayed. It can reduce user movement and improve the user detection experience when the display device resolution is sufficient. When the display device resolution is insufficient, it can ensure the reliability of vision detection by adjusting the user's target detection distance while ensuring that the target to be displayed is clear and completely displayed.
[0150] In summary, the vision testing method proposed in this embodiment achieves effective display of the visual target according to the device resolution by acquiring the device resolution and determining the target size of the visual target based on the device resolution. It can ensure that the visual target can be displayed clearly and completely by adjusting its target size, thus improving the reliability of the visual target display and providing an effective visual target basis for vision testing. Simultaneously, by determining the target detection distance for detecting the visual acuity value based on the target size, vision testing can meet the detection distance requirements while ensuring the reliability of the visual target, further improving the reliability of vision testing.
[0151] Based on this, the vision testing method proposed in the embodiments of this application can be used to perform vision tests on display devices with different resolutions, allowing users to perform tests according to their needs. By adjusting the size of the optotypes and the detection distance, reliable vision testing can be achieved in complex environments, improving the scenario generalization of vision testing and enhancing the user experience.
[0152] In one feasible embodiment, in order to ensure that the user's actual detection distance is consistent with the target detection distance, that is, to ensure that the user performs vision testing at the target detection distance, this application further proposes to send a distance adjustment prompt message to the user based on the target detection distance.
[0153] Optionally, an iris tracking algorithm can be used to perform iris tracking on the user to determine the user's actual detection distance. When the user's actual detection distance is inconsistent with the target detection distance, a distance adjustment prompt message can be sent to the user based on the difference between the actual detection distance and the target detection distance, including but not limited to moving forward XX, moving backward XX, etc.
[0154] Specifically, image acquisition devices used in conjunction with display devices can be used to collect information about the user's eyes. Then, through image analysis, the diameter of the user's iris in the image can be obtained, and the actual detection distance of the user can be determined based on the changes in the user's iris diameter.
[0155] For example, the user's actual detection distance can be determined using the following formula: DD=L×DX / Dx
[0156] Where DD is the actual detection distance, L is the user distance when calibrating the image acquisition device, DX is the user's iris diameter when calibrating the image acquisition device, and Dx is the current user's iris diameter.
[0157] In one feasible embodiment, this application further determines the target to be displayed through target calibration image processing to improve the clarity and completeness of the target to be displayed.
[0158] Specifically, by performing lossless image compression on a target vector graphic or a high-resolution large image according to the target size, the final displayed target will not suffer from problems such as proportional distortion, edge blurring, or contrast changes.
[0159] For example, the `setRenderingHint` method in the `java.awt.Graphics2D` tool is used. Then, by appropriately setting the three attributes `VALUE_INTERPOLATION_BICUBIC`, `VALUE_ANTIALIAS_ON`, and `VALUE_RENDER_QUALITY`, bicubic interpolation, anti-aliasing, and higher-quality compression are implemented sequentially. The compressed image is then decoded into RGBA format and uploaded as a texture object to the GPU. The texture filtering and edge processing methods, such as linear filtering and edge clamping, are configured using `glTexParameteri`. Next, the vertex coordinates and texture coordinates of the target view are defined according to the display area of the target size, thus mapping the image to the display area of the target view. Rendering is completed using vertex shaders and fragment shaders. The vertex shader is responsible for mapping the texture coordinates, and the fragment shader applies the image texture to each pixel. Finally, quadrilaterals are drawn using functions such as `glDrawArrays` to map the image texture onto the display device, achieving lossless display of the target view and further ensuring clear and complete display of the target view from an image processing perspective.
[0160] In one specific embodiment, the user tests their visual acuity from 4.0 to 5.2 according to a vision test chart. The user stands in front of the display device, and the expected testing distance is determined by collecting the user's eye information. For example, if the predicted testing distance is calculated to be 5m, the smallest pixel unit corresponding to visual acuity values 4.0 and 4.1 is determined. The device resolution of the display device is determined to be smaller than the smallest pixel unit corresponding to visual acuity values 4.0 and 4.1. At least two randomly oriented optotypes are displayed according to the expected testing distance, corresponding to the target size of visual acuity value 4.0, to perform vision testing on the user. The random directions include four directions: left, right, up, and back from the "E"-shaped opening. The system determines whether the user's test result is consistent with the visual target direction. If they are, it determines the relationship between the device resolution and the smallest pixel unit between the next visual acuity value (currently 4.1) and the next after that (currently 4.2). If the device resolution is smaller than the smallest pixel unit, it continues to display the visual target and perform the test. If the device resolution is greater than or equal to the smallest pixel unit, it determines the target size corresponding to the visual target to be displayed based on the device resolution and preset visual target display rules. Then, it determines the target detection distance based on the target size and prompts the user to adjust the actual detection distance based on the target detection distance, thereby completing the visual acuity test. This process continues until the user makes two consecutive major errors in the visual target direction during a certain visual acuity test, at which point the user's visual acuity level is determined.
[0161] It should be noted that although the operation of the method of the present invention is described in a specific order in the accompanying drawings, this does not require or imply that the operations must be performed in that specific order, or that all the operations shown must be performed in order to achieve the desired result.
[0162] Figure 5 shows a schematic diagram of the structure of a vision testing device provided in an embodiment of this application.
[0163] As shown in Figure 5, the vision testing device 10 includes:
[0164] The first acquisition module 11 is used to acquire the device resolution of the display device;
[0165] The second acquisition module 12 is used to determine the target size of the visual target to be displayed based on the device resolution; the visual target to be displayed is a random directional visual target determined according to the visual acuity value to be tested;
[0166] The determining module 13 is used to determine the target detection distance for detecting the visual acuity value to be tested based on the target size.
[0167] In some embodiments, the first acquisition module 11 is further configured to:
[0168] The display device is controlled to display an initial calibration line segment in a preset direction, the initial calibration line segment containing a preset first number of pixels;
[0169] Obtain a target calibration line segment with the same length as the preset physical object by adjusting the number of pixels occupied by the initial calibration line segment based on the preset physical object;
[0170] The device resolution of the display device is determined based on the number of second pixels occupied by the target calibration line segment.
[0171] In some embodiments, the second acquisition module 12 is further configured to:
[0172] Obtain the expected detection distance input by the user;
[0173] Based on the expected detection distance, determine the mapping relationship between each visual acuity value and the target difference value;
[0174] Based on the target difference and the preset target display rules, the smallest pixel unit corresponding to the target to be displayed is determined; wherein, the target display rules are pixel rules corresponding to the target, and the pixel rules include at least one of pixel distribution rules and pixel ratio rules;
[0175] Determine whether the device resolution is less than or equal to the smallest pixel unit;
[0176] When the device resolution is less than or equal to the smallest pixel unit, the target size corresponding to the target to be displayed is determined based on the expected detection distance; or
[0177] When the device resolution is greater than the minimum pixel unit, the target size corresponding to the target to be displayed is determined based on the device resolution and the preset target display rules.
[0178] In some embodiments, the preset target display rule is that the number of pixels contained in the target to be displayed is a multiple of 5.
[0179] In some embodiments, the determining module 13 is further configured to:
[0180] Obtain the division angle corresponding to the target to be displayed;
[0181] The target detection distance for detecting the visual acuity value to be tested is determined based on the division angle and the target size.
[0182] In some embodiments, the determining module 13 is further configured to:
[0183] A distance adjustment prompt message is sent to the user based on the target detection distance.
[0184] It should be understood that the modules or components described in the vision testing device 10 correspond to the various steps in the method described with reference to FIG2. Therefore, the operations and features described above for the method also apply to the vision testing device 10 and the modules contained therein, and will not be repeated here. The vision testing device 10 can be pre-implemented in the browser or other security applications of an electronic device, or it can be loaded into the browser or other security applications of an electronic device by means of downloading. The corresponding modules in the vision testing device 10 can cooperate with the modules in the electronic device to implement the solutions of the embodiments of this application.
[0185] The division of modules or units mentioned in the detailed description above is not mandatory. In fact, according to the embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0186] Referring now to FIG6, FIG6 illustrates a schematic diagram of a computer system suitable for implementing an electronic device or server according to embodiments of the present application.
[0187] As shown in Figure 6, the computer system includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the system's operating instructions. CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0188] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0189] Specifically, according to embodiments of this application, the processes described above with reference to flowchart FIG2 can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program contains program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this application.
[0190] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0191] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operational instructions of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two connected blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified functions or operational instructions, or using a combination of dedicated hardware and computer instructions.
[0192] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be housed in a processor; for example, a processor can be described as including a first acquisition module, a second acquisition module, and a determination module. The names of these units or modules do not necessarily limit the specific unit or module itself; for example, the first acquisition module can also be described as "acquiring the device resolution of the display device".
[0193] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the vision detection method described in this application.
[0194] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A vision testing method, characterized in that, include: Get the device resolution of the display device; The target size of the visual target to be displayed is determined based on the device resolution. The visual target to be displayed is a random directional visual target determined based on the visual acuity value to be tested; Based on the target size, a target detection distance is determined for detecting the visual acuity value to be tested.
2. The vision testing method according to claim 1, characterized in that, The process of obtaining the device resolution of the display device includes: The display device is controlled to display an initial calibration line segment in a preset direction, the initial calibration line segment containing a preset first number of pixels; Obtain a target calibration line segment with the same length as the preset physical object by adjusting the number of pixels occupied by the initial calibration line segment based on the preset physical object; The device resolution of the display device is determined based on the number of second pixels occupied by the target calibration line segment.
3. The vision testing method according to claim 2, characterized in that, The length of the initial calibration line segment is N times the length of the target line segment, the length of the target line segment is a preset integer length in centimeters, and N times is n times the preset ratio of the actual physical resolution to the logical resolution.
4. The vision testing method according to claim 1, characterized in that, The step of obtaining the target size of the display target at the device resolution includes: Obtain the expected detection distance input by the user; Based on the expected detection distance, determine the mapping relationship between each visual acuity value and the target difference value; Based on the target difference and the preset target display rules, the smallest pixel unit corresponding to the target to be displayed is determined; wherein, the target display rules are pixel rules corresponding to the target, and the pixel rules include at least one of pixel distribution rules and pixel ratio rules; Determine whether the device resolution is less than or equal to the smallest pixel unit; When the device resolution is less than or equal to the smallest pixel unit, the target size corresponding to the target to be displayed is determined based on the expected detection distance; or When the device resolution is greater than the minimum pixel unit, the target size corresponding to the target to be displayed is determined based on the device resolution and the preset target display rules.
5. The vision testing method according to claim 4, characterized in that, When the displayed icon is an "E" icon, the preset icon display rule is that the number of pixels contained in the icon to be displayed is a multiple of 5; When the displayed target is another type of target, the preset target display rule is determined according to the type of the displayed target.
6. The vision testing method according to claim 1, characterized in that, The step of determining the target detection distance for detecting the visual acuity value to be tested based on the target size includes: Obtain the division angle corresponding to the target to be displayed; The target detection distance for detecting the visual acuity value to be tested is determined based on the division angle and the target size.
7. The vision testing method according to claim 1, characterized in that, Also includes: A distance adjustment prompt message is sent to the user based on the target detection distance.
8. A vision testing device, characterized in that, include: The first acquisition module is used to acquire the device resolution of the display device; The second acquisition module is used to determine the target size of the visual target to be displayed based on the device resolution; The visual target to be displayed is a random directional visual target determined based on the visual acuity value to be tested; The determination module is used to determine the target detection distance for detecting the visual acuity value to be tested based on the target size.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the vision detection method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, this program implements the vision detection method as described in any one of claims 1-7.