A system and method for color vision testing
Through custom color nm number division and deep learning model, combined with dynamic life background, fast and accurate color vision detection is achieved, solving the problems of large errors and expensive equipment in the existing technology for people with low cognitive levels, and providing specific color vision abnormality assessment to adapt to a variety of life scenarios.
Patent Information
- Application Number
- CN202510098740.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-01-22
AI Technical Summary
The existing color vision detection technology has large errors for people with low cognitive levels, lacks accurate quantification, and is expensive and inconvenient to popularize the equipment, which cannot meet the requirements of accuracy, comprehensiveness and universality of color vision detection in many fields.
Through the custom color nm number, it is divided into seven colors: red, orange, yellow, green, blue, blue, purple, and purple. Two color blocks are used to display and drag the color bar operations, combined with dynamic or static life backgrounds, the color block selection influence factor and user color block adjustment factor are generated, and the color difference recognition is used for deep learning model to generate target color difference information.
Fast and accurate color vision detection is achieved, shortening detection time, improving efficiency, adapting to different life scenarios, discovering color vision abnormalities missing in hospital testing, providing specific objective data, and evaluating the degree of color vision abnormalities.
Smart Images

Figure CN120000147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a system and method for color vision testing. Background Art
[0002] Color vision testing is of key significance in many fields such as medicine, transportation, and professional qualification certification. Its accurate assessment is crucial for ensuring people's quality of life, work safety, and the normal operation of society. In the prior art, the widely used color blindness books (such as Ishihara's color blindness test chart, etc.) and pseudo-isochromatic color chart test methods are mainly used to detect by observing graphic discrimination. However, this method relies heavily on the patient's cognitive and comprehension abilities, and has large errors for people with low cognitive levels (such as children, intellectually disabled people, etc.). Moreover, its test results are mostly qualitative judgments (such as normal, color blind, color weakness, etc.), lack accurate quantitative data, and cannot carefully reflect the degree of color vision abnormality. Although color vision can be quantitatively measured using the color vision mirror method, the operation is complicated and requires professional personnel to operate and interpret the results, which is not convenient for the general public to use. The equipment is expensive and large in size, making it difficult to widely popularize, limiting its application in large-scale screening.
[0003] With the development of society, the demand for color vision testing to be accurate, comprehensive, efficient, and universal is increasing across various fields. For example, the transportation industry must ensure that drivers have accurate color vision to ensure traffic safety; the medical field requires more precise testing to assist in disease diagnosis and treatment; and some occupations in industrial production have strict color vision requirements, requiring precise screening of qualified personnel. Therefore, there is an urgent need for innovative color vision testing technology that overcomes the shortcomings of existing methods and meets diverse practical needs.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0005] The purpose of this application is to provide a system and method for color vision testing that, at least to a certain extent, overcomes the problems of the prior art. By changing the detection range that was previously based on red, green, or yellow, and customizing the division based on the color nm number, the system measures seven colors: red, orange, yellow, green, cyan, blue, and violet, and comprehensively diagnoses the human eye's recognition of each color, thereby accurately judging the human eye's color vision ability. Breaking through the limitations of only giving qualitative conclusions in the past, it can display specific objective data such as the minimum recognizable color difference within a specific color range, and define it as the minimum difference that the human eye can recognize for a single color, thereby achieving refinement of color vision detection and accurately assessing the degree of color vision abnormality. Using two color blocks for display, the color blocks are made to tend to the same color by dragging the color bar. This method is fast and accurate, is not affected by user cognitive differences, can effectively shorten detection time, and improve detection efficiency. It only takes 5 minutes per person to test 7 colors. Setting the detection background to a variety of life scenes (static or dynamic scenes such as driving, sports, and roads) is more in line with the real-life visual environment, can detect color vision abnormalities missed in hospital tests, and help users understand the color vision problems they face in life.
[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the invention.
[0007] According to one aspect of the present application, a method for color vision testing is provided, comprising: obtaining background image information to be checked, target user information, background adjustment information to be checked, medical history information of the target user, a preset color difference recognition model and a training sample set, wherein the background image information to be checked is a dynamic life background or a static life background, and the background adjustment information to be checked is used to characterize the background information customized by the target user; processing the background image information to be checked and the background adjustment information to be checked to generate a color block selection influencing factor vector; processing the medical history information of the target user to generate a user color block adjustment factor; based on the The target user information is processed using the color block selection influencing factor vector and the user color block adjustment factor to generate preset color block information and color block selection information of the target user; the preset color difference recognition model is processed based on the training sample set to generate a target color difference recognition model; the preset color block information and the color block selection information of the target user are processed based on the target color difference recognition model to generate target color block recognition information; the target color block recognition information is processed to generate target color difference recognition information, wherein the target recognition color difference information is used to characterize the presence of any color difference information of red, orange, yellow, green, cyan, blue and purple for the target user.
[0008] Another aspect of the present application is a device for color vision testing, characterized in that it includes: an acquisition module for acquiring background image information to be checked, target user information, background adjustment information to be checked, medical history information of the target user, a preset color difference recognition model and a training sample set, wherein the background image information to be checked is a dynamic life background or a static life background, and the background adjustment information to be checked is used to represent the background information customized by the target user; a processing module for processing the background image information to be checked and the background adjustment information to be checked to generate a color block selection influencing factor vector; processing the medical history information of the target user to generate a user color block adjustment factor; processing the target user information based on the color block selection influencing factor vector and the user color block adjustment factor to generate preset color block information and color block selection information of the target user; processing the preset color difference recognition model based on the training sample set to generate a target color difference recognition model; processing the preset color block information and the color block selection information of the target user based on the target color difference recognition model to generate target color block recognition information; processing the target color block recognition information to generate target color difference recognition information, wherein the target recognition color difference information is used to characterize the presence of any color difference information of red, orange, yellow, green, cyan, blue and purple for the target user.
[0009] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a second processor, the computer program implements the above-mentioned color vision testing method.
[0010] The system and method of a color vision test provided by the application, by changing the detection range based on red, green or yellow and blue in the past, according to the user-defined division of the color nm number, measures seven colors of red, orange, yellow, green, blue and purple, comprehensively diagnoses the human eye's recognition of each color, and thus accurately judges the human eye's color vision ability. Breaking through the limitation of only giving qualitative conclusions in the past, it can show specific objective data such as the minimum recognizable color difference (such as 2nm) within a specific color range (such as red 635nm-700nm), and define it as the minimum difference that the human eye can recognize for a single color, realize the refinement of color vision detection, and accurately assess the degree of color vision abnormality. Using two color blocks to display, the color block colors are made to converge in a consistent manner by dragging the color bar. This method is fast and accurate, is not affected by user cognitive differences, can effectively shorten detection time, and improve detection efficiency. It only takes 5 minutes to test 7 colors per capita. The detection background is set to a variety of life scenes (static or dynamic scenes such as driving, sports, roads, etc.), which is more in line with the actual life visual environment. It can find color vision abnormalities missed in hospital detection and help users understand the color vision problems faced in life.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A flowchart showing a method for color vision testing provided by an embodiment of the present application is shown;
[0013] Figure 2 A schematic structural diagram of a color vision testing device provided in one embodiment of the present application is shown;
[0014] Figure 3 A schematic diagram of an operating interface for a color vision test provided in one embodiment of the present application is shown. DETAILED DESCRIPTION
[0015] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0016] The following combination Figure 1 The method of color vision testing according to an exemplary embodiment of the present application is described below. In one embodiment, the present application also provides a system and method for color vision testing. Figure 1 The following schematically shows a flow chart of a method for color vision testing according to an embodiment of the present application. Figure 1 As shown, the method is applied to the server and includes:
[0017] S101, obtaining background image information to be inspected, target user information, background adjustment information to be inspected, medical history information of the target user, a preset color difference recognition model and a training sample set.
[0018] In one embodiment, the background image information to be checked is a dynamic life background or a static life background, and the background adjustment information to be checked is used to characterize the background information customized by the target user. The system provides a background image library, which contains a variety of dynamic life backgrounds (such as videos of urban traffic intersections, dynamic pictures of sunrise and sunset at the seaside, etc.) and static life scenes (such as indoor living room layout pictures, outdoor park scenery photos, etc.). The picture format supports common JPEG, PNG and other formats, and the video format supports MP4 and other formats. The resolution of these background pictures is moderate to ensure that they can be displayed clearly on different devices while taking into account the system processing efficiency. For example, for a general computer screen, the picture resolution can be set to 1920×1080 pixels and the video resolution to 1280×720 pixels.
[0019] Users can select background images from the image library that they think are similar to color vision scenes in real life. For example, users who drive frequently can choose pictures of traffic intersection scenes. If users want to use photos or videos they have taken as backgrounds, the system provides an upload function that supports direct upload after shooting with a mobile phone or computer camera. During the upload process, the system automatically detects the format, resolution and other information of the image or video. If it does not meet the requirements, the user is prompted to make corresponding adjustments (such as adjusting the resolution, converting the format, etc.). For example, a user took a photo of his own garden, but the resolution was too high (such as 4000×3000 pixels). The system prompts the user to reduce the resolution to an appropriate range before uploading to ensure that the system can quickly process the background image information.
[0020] A dedicated user information entry form is designed within the software interface, requiring users to manually enter basic information such as name (e.g., Zhang San), gender (e.g., male), and date of birth (e.g., May 10, 1985). To ensure accuracy, the system rigorously validates input formats. For example, names cannot be left blank and must be within a certain length (e.g., 2-20 characters), gender can only be "male" or "female," and date of birth must conform to the date format (e.g., YYYY-MM-DD). If the user enters incorrect information, a warning box will pop up, prompting the user to correct the error until the correct information is entered. For example, if a user enters only one character in their name, the system will display a warning message stating "Incomplete name, please re-enter." The system is capable of interfacing with medical institution information systems to obtain more comprehensive user information. After obtaining user authorization, the system connects to the institution's HIS through a secure data interface to obtain the user's medical history (e.g., any history of eye or systemic diseases) and previous examination records (e.g., previous color vision test results, eye examination reports, etc.). For example, if a user has undergone eye surgery in a hospital, the system will obtain detailed information such as the surgery time, surgery type (such as cataract surgery), and postoperative recovery status from the hospital's HIS system. This information will be used as part of the target user information to provide richer data support for subsequent color vision tests, so as to more accurately analyze the user's color vision condition.
[0021] The software's background settings interface provides users with a range of adjustment tools, including a brightness slider (ranging from -100 to 100, representing the percentage decrease or increase in brightness), a contrast slider (ranging from -50 to 50, indicating the degree of contrast decrease or increase), a saturation slider (ranging from -50 to 50, for adjusting color vividness), and a cropping button (allowing users to freely select a cropping area). Users can manipulate the selected background image based on their visual preferences and actual needs. For example, if the background image is too bright, users can drag the brightness slider to the left to -30 to reduce the brightness. If the background color is not vibrant enough, they can increase the saturation (e.g., adjust the saturation slider to 20). After users make background adjustments, the system records the user's operation parameters in real time as background adjustment information to be checked. For brightness adjustments, the system records the percentage change between the adjusted brightness value and the original brightness value; for contrast adjustments, the system records the difference between the adjusted contrast value and the original contrast; for saturation adjustments, the system records the difference between the adjusted saturation value and the original saturation; and for cropping, the system records the coordinates of the cropped area. For example, if the original background image has a brightness of 50%, and the user adjusts it to 30%, the system will record the brightness adjustment as -20%, indicating a 20% decrease in brightness. This quantified adjustment information will be used to subsequently generate a color block selection influencing factor vector to meet the personalized background needs of different users and improve the accuracy and reliability of color vision detection.
[0022] If the user has an electronic medical record file, the system provides an upload entry and supports common electronic medical record formats, such as PDF and XML. After the user selects the medical record file to upload, the system automatically identifies the file format and parses it. For example, if a user uploads a medical record in PDF format, the system uses a special PDF parsing tool to extract the text information, including disease diagnosis (such as glaucoma, diabetic retinopathy, etc.), illness time (such as diabetes diagnosed in 2015), treatment process (such as drug treatment records, surgical records, etc.) and doctor's diagnosis opinions. During the parsing process, the system marks and classifies key information for subsequent processing. For users who do not have electronic medical records or whose medical record information is incomplete, the system provides the function of manually entering medical record information. A corresponding form is designed on the interface to guide users to enter important information such as disease name, illness duration, and treatment status. In order to help users enter accurately, the system provides a drop-down menu of common disease names for users to choose from, and at the same time verifies the input time format. For example, a user manually enters that he or she has macular degeneration, has been ill for 3 years, and is currently receiving medication. The system records this information and integrates it with other acquired medical records to ensure the integrity of the user's medical records and provide an accurate basis for generating the user's color block adjustment factor, thereby making the color vision test more in line with the user's actual health status.
[0023] The preset color difference recognition model is pre-built using a deep learning architecture, such as a convolutional neural network (CNN)-based model structure. The model's initial parameters are obtained through pre-training on a large sample of people with normal and abnormal color vision. For example, the model structure includes multiple convolutional layers (used to extract local image features such as color edges and texture patterns), pooling layers (used to reduce data dimensionality and enhance feature robustness), and fully connected layers (used to integrate features and perform classification predictions). Parameters such as the convolution kernel size and stride of the convolutional layer are set based on extensive experiments to optimize the model's ability to extract color block image features.
[0024] The trained preset color difference recognition model is stored in the model library specified by the system. The model file format can be the common H5 format (for Keras framework) or PT format (for PyTorch framework), etc. When performing a color vision test, the system accurately loads the preset color difference recognition model from the model library into the memory according to the user's operation instructions, ensuring that the model can participate in the subsequent calculation and prediction process in a timely manner. For example, when the user starts the test, the system detects that the preset color difference recognition model needs to be used, and then finds the corresponding model file from the local model library, loads it into the running memory, and initializes the model's parameters and status to prepare for the subsequent processing of the preset color block information and the target user's color block selection information.
[0025] The training sample set is collected from a wide range of sources, including color vision test data from professional ophthalmology institutions (such as detailed records of color vision examinations conducted by hospitals on users, including test results for people of different age groups, genders, and health conditions), synthetic image data that simulates different color vision abnormalities (using image processing algorithms to generate color block combination images with different degrees of color vision abnormalities, simulating various types of color vision defects), and data that is continuously expanded through actual user test feedback (new user test data is added to the training sample set after screening and annotation). For example, 1,000 sets of real user color vision test data were obtained from a large ophthalmology hospital, including data from users with different types of color vision abnormalities (such as red-green color blindness, color weakness, etc.) as well as people with normal color vision; at the same time, 500 images simulating color vision abnormalities were generated using image synthesis technology, covering combinations of color blocks of different colors and different degrees of color difference to enrich the diversity of training samples.
[0026] Each sample obtained is annotated in detail, including color information of the color blocks (such as the specific wavelength range of colors such as red, orange, and yellow), color difference information (the color difference between color blocks expressed in nanometers), the type of color vision abnormality (such as normal, mild abnormality, moderate abnormality, color blindness, etc.), and corresponding user characteristics (such as age, gender, and whether there is a history of eye disease, etc.). Before inputting the sample data into the model for training, the data is preprocessed, such as image data normalization (mapping pixel values to a specific numerical range, such as between 0 and 1) and data augmentation operations (rotating, flipping, scaling, and other transformations on the image to increase the number and diversity of samples) to improve the model's generalization ability and training effect. For example, a sample image consisting of a red block (wavelength range 630nm-700nm) and a green block (wavelength range 490nm-560nm) is annotated with a color difference of 140nm (calculated based on the wavelength range) and a color vision abnormality type of normal (the sample comes from a population with normal color vision). After the image is normalized, it is added to the training sample set to provide accurate and rich data support for model training, ensuring that the model can learn effective features and patterns, thereby improving the accuracy of color vision abnormality recognition.
[0027] S102: Process the background image information to be checked and the background adjustment information to be checked to generate a color block selection influencing factor vector.
[0028] In one embodiment, feature extraction is performed on the background image information to be inspected to generate color feature information, brightness feature information, and texture feature information. The background image to be inspected is converted from the RGB color space to the HSV color space, because the HSV space is more consistent with the way humans perceive color and facilitates subsequent feature extraction. For example, for a pixel with an RGB value of (128, 128, 255), the converted HSV value is (240, 1, 1) (this is just an example, and the actual calculation will involve complex conversion formulas). Calculate the histogram of hue (H), saturation (S), and value (V) in the HSV space. Divide the hue range into 36 intervals (0-359 degrees, each interval is 10 degrees), and count the number of pixels in each interval. For example, if in a background image, the proportion of pixels in the blue hue interval (220-230 degrees) reaches 30%, it means that blue is one of the main colors of the image. At the same time, statistics such as the mean and variance of saturation and brightness are calculated. For example, the mean saturation value is 0.5 and the variance is 0.1. These statistics can reflect the vividness of the color and the overall brightness distribution as part of the color feature information.
[0029] For an image of 800×600 pixels, we traverse the brightness value of each pixel (which can be the brightness component after conversion from RGB values, or the V value in HSV space), add up the brightness values of all pixels, and divide by the total number of pixels to get the average brightness value. Assuming that the total brightness value of all pixels in the image is 240,000, then the average brightness value L = 240,000 / (800×600) = 0.5 (here we assume that the brightness value has been normalized to the range of 0-1). In addition to the average brightness, we also calculate the distribution of brightness, such as the brightness histogram (dividing the brightness value range into several intervals and counting the number of pixels in each interval), the variance or standard deviation of the brightness, etc. For example, if the brightness histogram shows that there are more pixels in the low brightness range (0-0.3) and the brightness variance is small, it means that the background image is dark overall and the brightness changes are not obvious. This feature will affect the subsequent color block selection strategy because the darker background makes bright color blocks easier to select, while the distinction between dark color blocks and the background is reduced. Therefore, it is necessary to consider adjustments when generating the color block selection influencing factor vector.
[0030] Convert the background image to a grayscale image and then calculate the gray-level co-occurrence matrix (GLCM). Select appropriate distance and direction parameters, such as a distance of 1 pixel and directions such as horizontal, vertical, and diagonal. For example, for a horizontal GLCM, the element (i, j) represents the number of times a pixel with a grayscale value of i and a pixel with a horizontal distance of 1 pixel and a grayscale value of j appear simultaneously in the image. A series of texture feature parameters such as contrast, energy, and entropy can be calculated using GLCM. Contrast is calculated based on GLCM using the formula Contrast = ∑ i,j |ij| 2 P(i,j) (where P(i,j) is an element in the gray-level co-occurrence matrix) reflects the degree of change in the grayscale value of the pixel in the image. High contrast indicates clear texture and rich changes. Energy is calculated using the formula Energy = ∑ i,j P(i,j) 2 , a large energy value indicates that the texture distribution in the image is relatively uniform; calculate entropy (Entropy), the formula is Entrogr=-∑ i,j P(i,j)log(P(i,j)), the entropy value reflects the complexity of the image texture; the greater the entropy, the more complex the texture. For example, if the calculated contrast of a background image is 0.8, the energy is 0.3, and the entropy is 1.2, these texture features will be used together with the color and brightness features to generate the color patch selection influencing factor vector. Because complex texture backgrounds can interfere with user selection of color patches, the color patch display and selection strategy needs to be adjusted based on the texture characteristics.
[0031] The background adjustment information to be checked is processed to generate a feature adjustment amplitude value. If the user adjusts the brightness of the background, the system records the brightness values before and after the adjustment. Assuming that the average brightness of the original background image is 0.5 (as calculated above), the user drags the brightness slider to the right to increase it by 30%, then the adjusted brightness value is 0.5×(1+0.3)=0.65. The brightness adjustment amplitude value is calculated as the difference between the adjusted brightness value and the original brightness value, that is, 0.65-0.5=0.15. This value will be used for subsequent adjustments to the color feature information and brightness feature information to reflect the impact of the user's preference for background brightness on color block selection. For example, if the brightness adjustment amplitude value is large, it means that the user is more sensitive to brightness changes. When generating the color block selection influencing factor vector, the brightness contrast of the color block needs to be adjusted accordingly to make the color block easier to select and distinguish under the new brightness environment.
[0032] For contrast adjustment, the contrast values before and after the adjustment are also recorded. If the original contrast is 0.5 and the user increases the contrast by 20%, the adjusted contrast is 0.5 × (1 + 0.2) = 0.6. The contrast adjustment amplitude is 0.6 - 0.5 = 0.1. A higher contrast adjustment amplitude indicates that the user prefers to select color patches in a more contrasting environment. This will affect the color contrast-related parameter settings in the color patch selection influence factor vector. For example, when generating color patches, the contrast difference between different colors is increased to suit the user's visual needs. Assuming the original average saturation is 0.5 and the user increases the saturation by 10%, the adjusted saturation is 0.5 × (1 + 0.1) = 0.55, and the saturation adjustment amplitude is 0.55 - 0.5 = 0.05. Changes in saturation affect the vividness of colors, and thus the distinction between the color patch and the background. When generating the color patch selection influence factor vector, the saturation range of the color patch colors is adjusted according to the saturation adjustment amplitude to ensure that the color patch can still be clearly identified and selected under the background saturation adjusted by the user.
[0033] Based on the feature adjustment amplitude value, the color feature information, brightness feature information, and texture feature information are processed to generate a color block selection influence factor vector. According to the color histogram of the background image and the brightness, contrast, and saturation adjustment amplitude values, the weights of different hues in the color feature information are adjusted. If the background image has a high proportion of blue hues (such as 30%) and the user increases the contrast, since blue and yellow are contrasting colors, the distinction between blue and yellow will be more obvious when the contrast is increased. Therefore, the weights of blue and yellow hues in the color block selection influence factor vector can be appropriately increased. For example, the weight of blue hues is increased from the original 0.3 to 0.4, and the weight of yellow hues is increased from 0.2 to 0.3, so as to guide the user to prefer blue and yellow related color blocks when generating preset color block information in the future, or to pay more attention to the selection operations of blue and yellow when the user selects a color block.
[0034] Taking into account the impact of the saturation and brightness adjustment amplitude values on color perception, the saturation and brightness related parameters in the color feature information are adjusted in an associated manner. If the user increases the saturation and the background brightness is high, in order to avoid the color being too bright and dazzling and affecting the color vision judgment, when generating the color block selection influencing factor vector, the weight of the high-saturation color in the high-brightness area can be appropriately reduced, while the weight of the low-saturation color can be increased to make the color block selection more balanced. For example, for the red block, if the original saturation weight is 0.4, under the above background adjustment, its weight is reduced to 0.3, while the weight of the green block (assuming the original saturation weight is 0.3) is increased to 0.4, so as to guide the color block selection to be more in line with the requirements of visual comfort and color vision detection accuracy.
[0035] Based on the brightness adjustment value and the average brightness of the background image, the user's brightness sensitivity parameter in the color patch selection influencing factor vector is adjusted. If the user significantly increases the background brightness (e.g., the brightness adjustment value is greater than 0.2), and the background image originally has a higher average brightness, this means that the user is more sensitive to bright color patches. In this case, the brightness sensitivity weight of bright color patches in the factor vector can be increased, while the weight of dark color patches can be decreased. For example, the brightness sensitivity weight of bright color patches (such as white and light yellow) can be increased from 0.5 to 0.7, while the weight of dark color patches (such as black and dark blue) can be decreased from 0.5 to 0.3. This way, when generating preset color patch information and when the user selects a color patch, the system will prioritize the selection and display of bright color patches, adapting to the user's visual perception characteristics in high-brightness backgrounds and improving the accuracy of color vision detection. Combined with the contrast adjustment value, the brightness contrast parameter between the color patch and the background in the factor vector is adjusted. If the user increases the contrast, the acceptable range of brightness differences between the color block and the background is appropriately expanded. This means that when generating the color block selection influencing factor vector, a stronger brightness contrast between the color block and the background is allowed to enhance the visibility and distinguishability of the color block against the background. For example, if the original threshold for the brightness difference between the color block and the background is 0.3, after the contrast is increased, the threshold is raised to 0.4. This means that when selecting and generating color blocks, a larger brightness difference from the background can be selected, making the color block easier to identify and select against the adjusted background, thereby more accurately testing the user's color vision ability.
[0036] The weight of texture complexity's influence on patch selection in the factor vector is adjusted based on the background image's texture features (such as contrast, energy, and entropy) and the user's background adjustments. If the background image has a complex texture (e.g., high texture contrast and high entropy) and the user has not made significant background adjustments, this indicates that the user has a strong ability to discern color in complex texture environments. In this case, the weight of texture complexity's influence on patch selection can be appropriately reduced, as the user is better able to select patches in such environments. For example, reducing the texture complexity weight from 0.4 to 0.3 will make patch selection more dependent on color and brightness features. Conversely, if the user has adjusted the background, such as reducing contrast and blurring the texture, this suggests that the user has difficulty discerning color in complex texture environments. In this case, the texture complexity weight should be increased, for example, from 0.4 to 0.5. This will encourage the system to more carefully consider texture factors when generating preset patch information and selecting patches, selecting patches that interfere less with the background texture, and ensuring the accuracy of color vision detection results.
[0037] When calculating texture features, texture direction (such as horizontal, vertical, and diagonal texture features) is taken into account. Based on the user's adjustment of the background and viewing direction preference (assuming that the user's direction preference information can be obtained through user operation behavior or other means, such as the user's preference for dragging the color block horizontally during operation, suggesting a higher visual attention to the horizontal direction), the weight of the influence of different texture directions on color block selection in the factor vector is adjusted. For example, if the user is more sensitive to horizontal texture (such as operating more accurately in a background with obvious horizontal texture), the weight of the horizontal texture feature in the color block selection influence factor vector can be increased, such as from the original 0.3 to 0.4, while the weight of texture features in other directions can be reduced. This guides the system to prioritize color block layouts and selection strategies that are compatible with horizontal textures when generating color blocks and user selection, thereby improving the color vision detection effect under the user's specific texture direction preference. It can generate a color block selection influencing factor vector based on the background image information and background adjustment information to be checked in a more comprehensive and detailed manner. This vector can fully consider the impact of background factors and user adjustment operations on color block selection, and provide an important basis for the subsequent generation of personalized preset color block information and accurate color vision detection, making the entire color vision test system more in line with the user's actual visual perception and improving the accuracy and reliability of detection.
[0038] S103: Process the medical record information of the target user to generate a user color block adjustment factor.
[0039] In one embodiment, the medical record information of the target user is processed to generate eye disease characteristic information and physiological characteristic information. Eye disease diagnostic information, such as glaucoma, cataracts, macular degeneration, retinitis pigmentosa, etc., is extracted from the user's medical record and classified and labeled according to the disease type. For example, if the medical record records that the user suffers from glaucoma, it is labeled as eye disease characteristic information of the "glaucoma" type. For each disease, its detailed information is further recorded, such as glaucoma users record intraocular pressure values (such as intraocular pressure of 25mmHg, the normal range is 10-21mmHg), visual field defects (such as nasal visual field defects of 30 degrees), etc.; cataract users record the degree of lens opacity (such as nuclear opacity, moderate opacity), etc. These detailed information helps to more accurately assess the impact of eye diseases on color vision. Record the onset time, treatment process and current disease progression of the eye disease. Taking diabetic retinopathy as an example, the user's diabetes diagnosis date (e.g., 2010), the first time the retinopathy was discovered (e.g., 2015), treatments received (e.g., the number of laser photocoagulation treatments, the name of the medication used, and the duration of treatment), and the current stage of the disease (e.g., proliferative diabetic retinopathy stage III according to international staging standards) are recorded. Disease progression reflects the changes in eye structure and function and is crucial for calculating the color vision impact factor, as different stages of the disease affect color vision to varying degrees.
[0040] Extract basic physiological information such as the user's age (e.g., 45 years old), gender (e.g., female), height (e.g., 160 cm), and weight (e.g., 60 kg). Age is a key factor influencing color vision. With aging, physiological changes such as aging of the lens and decreased retinal function lead to decreased color sensitivity. Gender also has a certain correlation with color vision. While the overall difference is small, some studies have shown subtle differences in color perception between men and women, so this is also taken into account. Height and weight information can be used to calculate body mass index (BMI). Abnormal BMI values (e.g., obesity or underweight) are associated with some systemic diseases, which in turn indirectly affect color vision. For example, obesity increases the risk of diseases such as diabetes, and diabetes can cause retinopathy that affects color vision. Information is collected on whether the user has systemic diseases that affect color vision, such as diabetes (recording blood sugar control, such as a fasting blood sugar level of 7.5 mmol / L and a two-hour postprandial blood sugar level of 11.2 mmol / L, indicating poor blood sugar control), hypertension (recording blood pressure values, such as systolic blood pressure of 145 mmHg and diastolic blood pressure of 90 mmHg), and cardiovascular disease. At the same time, we also need to understand the user's living habits, such as smoking history (number of cigarettes smoked per day, years of smoking, such as smoking 15 cigarettes a day and a smoking history of 10 years), drinking habits (number of drinks per week, amount of each drink, such as drinking 3 times a week and 100ml of liquor each time), eye habits (daily use of electronic devices, such as using computers and mobile phones for more than 8 hours a day), etc. These systemic diseases and lifestyle factors have a potential impact on color vision by affecting the health of blood circulation, nervous system or eye tissue, and are an important part of generating physiological characteristic information.
[0041] The eye disease characteristic information and physiological characteristic information are processed to generate a color vision impact factor and weight information that matches the color vision impact factor. Based on research data and clinical experience on the impact of different eye diseases on color vision, a corresponding color vision impact factor is set for each eye disease. For example, users with glaucoma have decreased color sensitivity and weakened color discrimination ability due to damage to the optic nerve. Their color vision impact factor is set to 0.8 (indicating a significant impact on color vision. The specific value can be obtained based on statistical analysis of color vision test data from a large number of glaucoma users). Users with cataracts have a clouding of the lens that affects light transmission. The color vision impact factor is set to 0.6 (moderate impact). Users with macular degeneration mainly affect central vision and the ability to distinguish color details. The color vision impact factor is set to 0.7. For the same disease, the impact factor can be further subdivided according to the severity of the disease. For example, the color vision impact factor for early-stage glaucoma is 0.6, 0.8 for mid-stage glaucoma, and 1.0 for late-stage glaucoma (indicating a very severe impact on color vision).
[0042] The color vision impact factor is adjusted based on physiological characteristics. For age factors, an age-related function is used to calculate the adjustment value. For example, for users aged 40-50, the color vision impact factor increases by 0.02 for each additional year (assuming a base impact factor of 0.5). For a user aged 45, the color vision impact factor increases by 0.1 (0.02 x 5) due to age. For users with systemic diseases, such as diabetes, the color vision impact factor is adjusted based on blood sugar control. For poor blood sugar control (e.g., fasting and postprandial blood sugar levels significantly outside the normal range), the color vision impact factor increases by an additional 0.3. For users with hypertension, if their blood pressure is chronically unstable (e.g., systolic blood pressure consistently above 140 mmHg or diastolic blood pressure consistently above 90 mmHg), the color vision impact factor increases by 0.2. Lifestyle factors are also adjusted. For users with a long smoking history (e.g., more than 10 years) and a high daily smoking volume (e.g., more than 15 cigarettes), the color vision impact factor increases by 0.1. For users who use electronic devices for extended periods of time (e.g., more than 8 hours per day), the color vision impact factor increases by 0.05. These adjusted color vision impact factors comprehensively reflect the potential impact of eye diseases and physiological characteristics on users' color vision.
[0043] By analyzing extensive clinical data, we found that eye diseases have a relatively direct and significant impact on color vision, and therefore are given higher weights. For example, a weight of 0.7 for eye diseases indicates that they play a significant role in the comprehensive consideration of factors influencing color vision. Within eye diseases, weights are assigned based on factors such as the incidence of each disease and the severity of its impact on color vision. For example, glaucoma is weighted 0.3 (relatively high among eye diseases due to its severe and common impact on color vision), cataracts are weighted 0.2, macular degeneration is weighted 0.15, and diabetic retinopathy is weighted 0.25 (given the high prevalence of diabetics and the significant impact of retinopathy on color vision). The sum of these weights is 1, indicating the relative importance of each disease type within the eye disease factor on color vision. Physiological characteristics are weighted 0.3, indicating that they also play a role in color vision, but their weight is lower than that of eye disease factors. Within the physiological characteristics, the weight of age is 0.4 (because age is a common and important physiological factor affecting color vision), the weight of gender is 0.1 (gender has a relatively small effect on color vision), the weight of systemic diseases is 0.3 (systemic diseases indirectly affect color vision through various pathways and are of certain importance), and the weight of lifestyle habits is 0.2 (lifestyle habits have an impact on color vision under long-term effects). For example, among systemic diseases, the weight of diabetes is 0.4 (because its impact on the eyes is relatively common and serious), the weight of hypertension is 0.3, the weight of cardiovascular disease is 0.2, and the weight of other diseases is 0.1. Similarly, the sum of these weights is 1, reflecting the relative importance of the impact of each sub-factor within the physiological characteristics on color vision. Through such weight distribution, the degree of influence of eye diseases and physiological characteristics on color vision can be more reasonably considered, and the contribution ratio of each factor can be accurately reflected in the subsequent calculation of the color block adjustment value.
[0044] Process the color vision influencing factors and the weight information that matches the color vision influencing factors to generate the color block adjustment value. Use the given calculation formula Calculate the color patch adjustment value, where n represents the number of major factor categories affecting color vision, m represents the number of subdivided factors under each major factor category, p represents the number of special factors related to eye diseases, i represents the index of the major factor category affecting color vision, j represents the index of the subdivided factors under each major factor category, and F ij Represents the color vision impact factor of the jth subdivision factor in the i-th main factor, which is used to quantify the impact of the subdivision factor on color vision. ij represents the weight of the jth sub-factor in the i-th main factor, indicating the relative importance of the sub-factor in the influence of the main factor on color vision. k represents the special factor index related to eye diseases. G k represents the impact factor of the kth special factor, H kRepresents the weight of the kth special factor, I t represents the influencing factor of the tth lifestyle factor, J t represents the weight of the t-th lifestyle factor, and K represents the individual difference coefficient, which is used to adjust the impact of individual differences in physiological functions, gene expression, etc. on color vision.
[0045] Assume that the main factors affecting color vision are eye disease (n=1) and physiological characteristics (n=2) (this is just a simplified example, and there are more categories in reality). For the eye disease category (i=1), the subdivided factors are disease type (j=1 to 4, corresponding to glaucoma, cataract, macular degeneration, and diabetic retinopathy, respectively). Assume that the color vision influencing factor F for glaucoma is 11 =0.8, weight W 11 =0.3; cataract F 12 =0.6,W 12 =0.2; Macular degeneration F 13 =0.7,W 13 =0.15; diabetic retinopathy F 14 =0.75,W 14 =0.25. Special factors related to eye diseases (such as family genetic history, assuming k = 1), if there is a family genetic history, G1 = 0.5, H1 = 0.8 (indicating that family genetic history has a greater impact on color vision and has a higher weight). For the physiological characteristics category (i = 2), subdivided factors such as age (j = 1), systemic diseases (j = 2), etc., assuming that the age factor color vision influence factor F 21 =0.1 (calculated based on the above age), weight W 21 =0.4; Diabetes factor in systemic diseases F 22 =0.3 (the impact factor adjusted for poor blood sugar control), weight W 22 =0.3. Lifestyle factors (assuming t=1 to 3, corresponding to smoking, drinking, and eye habits, respectively), smoking I1=0.1, J1=0.2; drinking I2=0.05 (assuming that the impact of low alcohol consumption is relatively small), J2=0.05; eye habits I3=0.05, J3=0.2, individual difference coefficient K=1.1 (assuming that the user has good overall physical fitness, which has relatively little impact on color vision, and the coefficient is slightly greater than 1). The calculation process is as follows:
[0046]
[0047] V = (0.6525 + 0.13) + 0.4 + (0.035 × 1.1) = 1.221. This calculated color patch adjustment value, V = 1.221, will be used to subsequently generate the user color patch adjustment factor. It integrates multiple factors such as eye disease characteristics, physiological characteristics and their respective weights, special factors, and individual difference coefficients. It reflects the quantitative need to adjust color patch selection based on the user's medical history and physiological characteristics. This allows for more precise adaptation to individual differences in color vision testing and improves the accuracy of test results.
[0048] The color block adjustment value is processed to generate a user color block adjustment factor. The user color block adjustment factor is generated based on the calculated color block adjustment value. A simple method is to normalize the color block adjustment value and map it to a specific range (such as 0-1 or -1-1) to determine the user color block adjustment factor. Assuming that the 0-1 range is used for mapping, if the calculated color block adjustment value V = 1.221, through the normalization formula (such as adjustment factor = V / (V max -V min ), assuming V max =2, V min =0) and the adjustment factor is calculated to be 0.6105. This adjustment factor will be used to subsequently adjust the preset color block information and the color block selection information of the target user. For example, in the color range selection of the preset color block, if the wavelength range of the original red color block is 630nm-700nm, it will be adjusted to 635nm-695nm according to the adjustment factor to adapt to the color vision conditions of users with specific eye diseases and physiological characteristics, making the test more targeted and accurate. At the same time, when the user selects a color block, the adjustment factor can also affect the display properties of the color block (such as brightness, contrast, saturation, etc.) or the difficulty of selection (such as adjusting the sensitivity of dragging the slider, increasing or decreasing the selection steps, etc.), ensuring that the test process can accurately reflect the user's actual color vision ability and reduce test errors caused by individual differences.
[0049] S104 : Process the target user information based on the color block selection influencing factor vector and the user color block adjustment factor to generate preset color block information and color block selection information of the target user.
[0050] In one embodiment, target user information is processed to generate color vision information to be tested. Basic information such as age (e.g., 35 years old) and gender (e.g., male) is extracted from the target user information. Based on the age factor and referring to research data related to color vision development and age, color vision is essentially mature for people aged 35, but slight color vision changes begin to occur with age. Men differ from women in their sensitivity to certain colors (e.g., men are slightly less sensitive to green than women). This information is recorded. For example, age information is quantified as an age-related coefficient (e.g., a coefficient of 0.95 for 35 years old, indicating the relative state of color vision relative to a normal adult; the range of coefficients for different ages can be determined based on extensive experimental data). Gender information is marked as "male" for subsequent preliminary adjustments to the color vision information to be tested. If the user has a history of eye or systemic diseases, a detailed analysis of the impact of these medical histories on color vision is performed. For example, if the user has suffered from mild retinopathy, information such as the type of lesion, the duration of illness (e.g., two years ago), and treatment status (e.g., laser treatment received, with some recovery of vision after treatment) is recorded. According to medical research, retinal lesions affect the ability to distinguish red and green colors, especially within the visual field corresponding to the lesion area. This medical history information is converted into descriptive information about the impact on color vision, such as "mild impairment of red-green color discrimination, affecting approximately 20% of the visual field (estimated based on the severity and extent of the lesion)." This information is then integrated with the basic information to form part of the color vision information to be tested, allowing for targeted adjustments to the color patch selection range and testing strategy in subsequent steps.
[0051] The color perception information to be tested is processed based on the color patch selection influence factor vector to generate a color selection range value. Assume that the blue hue in the color patch selection influence factor vector has a high weight (e.g., 0.4, higher than the weights of other colors), and the background image has a large proportion of blue hues (e.g., 40%) and a high brightness (e.g., an average brightness value of 0.7). Based on this information, when generating the color selection range value, the selection range for blue-related colors (such as blue, cyan, and purple) is appropriately expanded. For example, the standard wavelength range for blue is 450nm-490nm. Based on the influence factor, this range is adjusted to 445nm-495nm to increase the probability of blue colors appearing in the test and adapt to the background and user's visual preferences. For colors that strongly contrast with blue (such as yellow), the range is also appropriately adjusted, for example, from 560nm-590nm to 555nm-595nm, to enhance the color contrast effect and facilitate the user's color patch selection and color perception judgment in this context. Taking into account the high background brightness (e.g., the average brightness value of 0.7 mentioned above), the selection range for bright colors (such as light blue, light green, and light yellow) was appropriately narrowed when generating color selection range values to avoid low differentiation between bright colors that could affect test results. The range for dark colors (such as dark blue, dark green, and purple) was appropriately expanded. For example, the wavelength range for light blue, originally 470nm-490nm, was adjusted to 475nm-485nm; the range for dark blue was adjusted from 450nm-470nm to 445nm-475nm. Furthermore, based on the background saturation (e.g., an average saturation value of 0.6, which is high), the selection range for highly saturated colors (such as bright red, green, and blue) was slightly adjusted. For example, red was adjusted from 630nm-700nm to 632nm-698nm. This was to avoid visual fatigue or difficulty distinguishing due to overly bright colors. This ensured that the color selection range for the color patches, given the current background, both reflects color differences and facilitates user operation and accurate color perception.
[0052] The color selection range value is processed based on the user color block adjustment factor to generate preset color block information. If the user color block adjustment factor shows that the user has a certain eye disease (such as glaucoma, the color vision impact factor is 0.8 and the weight is 0.3), the preset color block information is adjusted according to the characteristics of the disease's impact on color vision. Users with glaucoma have difficulty distinguishing low-contrast colors, so the number and types of low-contrast color combinations are increased in the preset color blocks. For example, color block pairs of gray and similar colors (such as light gray and white, dark gray and black, etc.) are increased, as well as color block pairs with similar colors but different saturations (such as light red and dark red), while reducing the proportion of high-contrast color combinations (such as red and green) to more accurately detect the user's color vision condition under the influence of the disease. For color blocks related to the color range affected by glaucoma (such as colors on the blue-yellow axis, because glaucoma affects the optic nerve's transmission of color information, especially the color perception on this color axis), the wavelength range selection is further refined. For example, blue is subdivided from 450nm-490nm into two sub-ranges of 450nm-470nm and 470nm-490nm, and different color blocks are set for each sub-range to more accurately evaluate the user's color vision discrimination ability in this color area.
[0053] Taking into account the user's physiological characteristics (such as the color vision impact factor increases by 0.1 due to age, for example, at 45 years old) and living habits (such as the color vision impact factor increases by 0.05 due to long-term use of electronic devices every day), the preset color block information is optimized. Older age leads to a decrease in sensitivity to color, especially the weakening of the perception of blue and green. Therefore, different brightness and saturation combinations of these two colors are appropriately added to the preset color blocks, such as dark blue, light blue, dark green, light green and other color blocks with various variations, to improve the ability to detect subtle changes in the user's color vision. For users who use electronic devices for a long time, there is eye fatigue and a temporary decrease in color discrimination ability. Some visually soothing color combinations are added to the preset color blocks (such as light blue and light green blocks to simulate the color matching in the natural environment). At the same time, the brightness and contrast of the overall color block are appropriately reduced to avoid over-stimulating the user's eyes, so that the test process is more in line with the user's actual visual conditions and improves the accuracy of the test results.
[0054] Process the preset color block information to generate color block selection information for the target user. Design a suitable operation interface based on the user's age and cognitive ability (such as young age, 8 years old, limited cognitive ability). For child users, increase the size of the color block (such as the original color block with a side length of 30 pixels, increase it to 50 pixels) to make the color block easier to click and operate; reduce the number of color blocks that need to be selected in each test (such as from 7 to 4) to reduce the difficulty of operation; at the same time, simplify the operation process, such as only providing a simple drag color block function, and not setting up complex color adjustment buttons. In terms of color selection order, first present color block pairs with large color differences and easy to distinguish (such as red and blue). As the test progresses, gradually increase the color block pairs with smaller color differences to gradually guide child users to conduct color vision tests, improve their participation and test accuracy.
[0055] During the color block selection process, the user's operational behavior is monitored in real time. For example, information such as the speed at which the user drags the color block (such as the number of pixels dragged per second), the pause time (if staying on a color block for more than 2 seconds is considered a pause), and the accuracy of the selection (such as the color difference range from the preset correct color block) are recorded. If the user spends a long time selecting a color block (such as selecting a red block for more than 5 seconds) and operates frequently (such as adjusting the position of the red block multiple times), it means that the color is close to the user's color vision limit or the user has difficulty distinguishing this color. Based on this feedback information, the system dynamically adjusts the selection range and difficulty of subsequent color blocks. For example, for this user, the selection range of red-related colors (such as orange, purple, and other colors similar to red) is narrowed, and color blocks with more obvious color differences are added. At the same time, the difficulty of operation is reduced (such as increasing the sensitivity of dragging the slider to make color adjustments more obvious) to more accurately test the user's color vision ability and avoid inaccurate test results due to operational difficulties. At the same time, the system can provide real-time voice or text prompts to encourage users to continue operating or give operational guidance, such as "You did a good job, keep trying to adjust the color blocks to make the colors on both sides look more similar", thereby improving user experience and test results.
[0056] S105 , processing the preset color difference recognition model based on the training sample set to generate a target color difference recognition model.
[0057] In one embodiment, the training sample set is processed to generate a training set and a validation set. The training sample set is divided into a training set and a validation set by random segmentation. For example, the training sample set contains 10,000 samples, which are segmented in an 80:20 ratio, i.e., 8,000 samples are used for the training set and 2,000 samples are used for the validation set. During the segmentation process, it is ensured that the distribution ratios of various types of samples (such as different types of color vision abnormalities, different age groups, different genders, etc.) in the training set and the validation set are roughly the same to ensure that the training and validation of the model are representative. For example, in the original sample set, samples of users with red and green color blindness account for 10%, and in the divided training set and validation set, samples of users with red and green color blindness should also account for nearly 10%. If the samples have obvious stratification characteristics (such as being divided into three layers of mild, moderate, and severe according to the severity of color vision abnormality), stratified sampling can be used for segmentation. First, the samples are separated by layer, and then random sampling is performed in each layer to form the training set and the validation set. This ensures that each layer has sufficient samples to participate in the training and validation process, improving the model's ability to identify different degrees of color vision abnormalities. For example, the mild color vision abnormality layer has 3,000 samples, the moderate color vision abnormality layer has 4,000 samples, and the severe color vision abnormality layer has 3,000 samples. When dividing the training set and validation set, samples are drawn from each layer in proportion. For example, 60% (1,800 samples) of the mild color vision abnormality layer are used for the training set, and 40% (1,200 samples) are used for the validation set, and so on. This ensures that the training set and validation set can fully reflect the distribution of various characteristics of the samples.
[0058] Obtain any number of data features in the training set, and generate a sampling ratio based on the number of each data feature in the training set. Select data features related to color difference recognition from the training set, such as the color information of the color block (including color name, RGB value, HSV value, etc.), color difference value (color difference between color blocks in nanometers), user's age, gender, and whether there is a history of eye disease. For example, for a training sample containing a color block image and user information, extract the RGB value of the red color block (such as 255, 0, 0), the RGB value of the green color block (such as 0, 255, 0), and the color difference value between them (assuming it is 150nm), and record the user's age (such as 30 years old), gender (male), and history of eye disease (none) as data features. Count the number of each type of data feature in the training set. Assume that the age feature in the training set has five different values (e.g., 20-29, 30-39, 40-49, 50-59, and over 60). The number of samples for each age group is counted separately, e.g., 1500 samples for 20-29, 2000 samples for 30-39, and so on. The sampling ratio is calculated based on the preset sampling strategy. For example, if proportional sampling is used, the sampling ratio for each age group is the ratio of the number of samples in that age group to the total number of samples. For the 30-39 age group, for example, the sampling ratio = 2000 / 8000 = 0.25, indicating that during the sampling process, there is a 25% probability that samples in this age group will be selected as sampling features.
[0059] The training set is sampled based on the sampling ratio to generate a preset number of sampling features. According to the calculated sampling ratio, the training set is sampled with replacement. For example, for the above-mentioned age group of 30-39 years old, according to the sampling ratio of 0.25, each time a sample is randomly drawn from the training set, the probability of the sample in this age group being selected is 0.25. The sampling process is repeated until the preset number of sampling features is generated. Assuming that the preset number of sampling features is 1000, through multiple random samplings, 1000 sampling features are finally obtained. These sampling features include different age groups, different color combinations, different user characteristics, etc., which can better represent the overall feature distribution of the training set. During the sampling process, some combination and adjustment operations can be performed on the sampling features to increase the diversity of the samples. For example, for the sampling features of two adjacent age groups (such as 30-39 years old and 40-49 years old), some of their features can be randomly combined, such as combining the color features of the samples in the 30-39 age group with the user features of the samples in the 40-49 age group to generate new sampling features. This can simulate the color vision of users of different age groups in different color environments, enrich the diversity of sampling features, and help improve the generalization ability of the model.
[0060] Based on any data feature and each sampled feature, multiple data sets are generated, each of which contains a preset number of data samples, at least one of which includes identification information. A preset color difference recognition model is trained based on the data samples in the multiple data sets to generate a trained color difference recognition model. A data feature (e.g., a sample of a specific color combination and user information) is randomly selected from the training set and combined with each sampled feature to generate multiple data sets. Each data set contains a preset number of data samples, for example, five data samples. For example, a sample of a red-green color block combination, a female user with no history of eye disease, is used as a baseline sample. This sample is sequentially combined with 1,000 sampled features to generate 1,000 data sets. In addition to the baseline sample, each data set also contains four different samples obtained through sampling, each of which exhibits diversity in color, user characteristics, and other aspects. When constructing the data sets, ensure that at least one data sample includes identification information. This identification information is used to indicate whether the sample is a risk factor that affects the user's color difference recognition. For example, samples with severe color vision abnormalities (such as color blindness) are marked as high-risk factors (marked as 1), and samples with normal or mild color vision abnormalities are marked as low-risk factors (marked as 0). In each data set, samples containing identification information are reasonably distributed. For example, in a data set of 5 samples, 1-2 samples containing identification information are set, and a certain ratio of high-risk and low-risk samples is ensured. This allows the model to learn the characteristic differences of samples with different risk levels during training, improving its ability to judge color difference risk.
[0061] The data samples from the generated multiple data sets are input into a preset color difference recognition model for training. The model uses a deep learning architecture (such as a convolutional neural network). The color block image data in the data samples undergoes preprocessing (such as normalization and cropping) before being input into the network's input layer. Feature data such as user information is also encoded and input into the corresponding layer of the network. The model continuously adjusts network parameters through a backpropagation algorithm to minimize the error between the predicted results and the sample identification information. For example, the model predicts the degree of color vision abnormality of the sample (such as normal, mild abnormality, moderate abnormality, color blindness, etc.) based on the input color block image and user characteristics. It then compares this with the actual identification information of the sample, calculates the error, and then adjusts parameters such as the convolution kernel weights and fully connected layer weights in the network based on the error. After multiple iterative training (such as setting the number of training rounds to 100), the model's accuracy in color difference recognition is gradually improved, generating a trained color difference recognition model.
[0062] The trained color difference recognition model is processed based on the validation set to generate a validation result. If the data sample containing identification information in the validation result represents a risk factor affecting the user's color difference recognition, the trained color difference recognition model is used as the target color difference recognition model. The trained color difference recognition model is then processed using the validation set. The validation set sample data undergoes the same preprocessing as the training set and is then input into the trained model. The model's prediction results for the validation set samples are obtained, including the predicted color vision abnormality level and color difference value. For example, for a sample with a blue-yellow color patch combination in the validation set, the model predicts that the color vision abnormality level is normal and the color difference prediction value is 30nm (assuming the wavelength of the blue patch is 470nm and the wavelength of the yellow patch is 580nm, the calculated color difference is 110nm, and the model prediction error is 80nm). The model performance is evaluated based on the validation results. Evaluation metrics such as the model's precision, recall, and F1 score are calculated on the validation set to determine the model's ability to recognize different types of color vision abnormalities. For example, if the recall rate of the model for color blind samples on the validation set is low (such as only 60%, indicating that only 60% of the samples that are actually color blind are correctly identified by the model), it means that the model has deficiencies in identifying color blind samples. At the same time, check the data samples containing identification information in the verification results. If there are many high-risk samples (representing risk factors that affect user color difference recognition) that are misclassified as normal by the model, it means that the reliability of the model needs to be improved. If the model performs well in various evaluation indicators and has a high recognition accuracy rate for high-risk samples (such as reaching more than 90%), the trained color difference recognition model will be used as the target color difference recognition model for subsequent color vision tests. Otherwise, the model needs to be further optimized (such as adjusting the network structure, increasing training data, optimizing hyperparameters, etc.), and then retrained and verified until the requirements are met.
[0063] S106 : Process the preset color block information and the color block selection information of the target user based on the target color difference recognition model to generate target color block recognition information.
[0064] In one embodiment, the preset color block information and the color block selection information of the target user are processed based on the target color difference recognition model to generate the predicted value of the color difference between each color block pair, the color vision abnormality classification information and the confidence score matching the color vision abnormality classification information. Figure 3 As shown, Figure 3This is a schematic diagram of an integrated user interface for a color vision test system, covering various aspects such as test question setup, background selection, test execution area, and result judgment criteria. Specifically, the target color difference recognition model is fed with preset color patch information (e.g., a red patch with a wavelength range of 630nm-700nm and a green patch with a wavelength range of 490nm-560nm) and the target user's color patch selection information (e.g., the user adjusts the red patch to a wavelength of 650nm and the green patch to a wavelength of 520nm). The model then calculates a predicted color difference between each color patch pair. For example, for the red and green patch pair mentioned above, the model calculates a color difference prediction value of 130nm (obtained by calculating the wavelength difference between the adjusted color patches). The model employs various calculation methods, such as color space distance calculation (e.g., calculating the Euclidean distance between two colors in the CIELAB color space as a color difference prediction value), or color difference prediction models learned from large amounts of sample data (e.g., using a neural network to learn the relationship between different color patch combinations and actual color differences to predict the color difference between new color patch pairs).
[0065] Color vision abnormality classification information is generated based on the color difference prediction value and the model's correspondence between different color difference ranges and color vision abnormality types. For example, if the model sets a color difference greater than 100nm and less than 150nm to correspond to mild color vision abnormality (for the red-green color axis), the model will classify the 130nm color difference of the above-mentioned red-green color block pair as mild color vision abnormality (red-green color axis). The model is trained on a large number of samples labeled with color vision abnormality types to learn the mapping relationship between different color difference ranges and color vision abnormality degrees (such as normal, mild abnormality, moderate abnormality, color blindness, etc.), so that the color difference prediction value can be classified according to the new color block. At the same time, the model can also consider other factors, such as the user's operation trajectory and pause time during the color block selection process, to comprehensively judge the color vision abnormality classification and improve the accuracy of the classification.
[0066] While generating color vision abnormality classification information, the model assigns a confidence score to each classification result, indicating the model's confidence in the classification result. For example, if the model learns during training that its classification results are highly reliable for certain color patch combinations and user operation patterns, the corresponding confidence score will be higher. For the aforementioned case where the red-green patch pair is classified as mild color vision abnormality (red-green color axis), the model calculates a confidence score of 0.75 based on its internal calculations, indicating that the model has high confidence in this classification result, but some uncertainty still exists. The confidence score can be obtained through probabilistic calculation methods, such as calculating the posterior probability of the classification result based on Bayes' theorem as the confidence score, or through the model's accuracy statistics during training (for example, for a certain classification result, if the model's accuracy on the training set is high, the confidence score for that result will also be high in the actual prediction).
[0067] The predicted color difference between each color patch pair, the color vision abnormality classification information, and the confidence score matching the color vision abnormality classification information are processed to generate user operation features. The target user's operation time for selecting each color patch pair is recorded, such as the time from starting to adjust the color patches to completing the selection. For example, if the user takes 8 seconds to select the blue-yellow patch pair and 12 seconds to select the red-green patch pair, the longer operation time suggests that the user has difficulty distinguishing the colors of this color patch pair or is not proficient in the operation. Operation difficulty is also analyzed. Operation difficulty can be measured in various ways, such as the size of the initial color difference between the patches (the smaller the color difference, the greater the operation difficulty) and the number of adjustments made by the user (the more adjustments, the greater the difficulty). For example, for the purple-blue patch pair with a small initial color difference, the user needs to make multiple adjustments to make the colors on both sides appear consistent, indicating that the operation difficulty of this color patch pair is high. Based on the operation time and difficulty, an operation difficulty score is generated for each color block pair. For example, a color block pair with an operation time of more than 10 seconds and more than 5 adjustments is rated as high difficulty (such as score 3), an operation time of 5-10 seconds and 3-5 adjustments is rated as medium difficulty (such as score 2), and an operation time of less than 5 seconds and less than 3 adjustments is rated as low difficulty (such as score 1).
[0068] Track the user's drag trajectory while adjusting color blocks. For example, when adjusting a red block, the drag trajectory moves slowly from left to right, with multiple pauses and small adjustments in between. This indicates uncertainty in the user's color perception of red or a cautious approach to finding a suitable color match. By analyzing features such as the drag trajectory's length, direction, and pause points, we can understand the user's color perception and operational habits. Furthermore, by observing the order in which users select different colors and the frequency with which they adjust them, we can determine whether they have a color preference. For example, if a user always selects a blue-related block first and spends relatively little time adjusting on the blue block, this suggests they have a high degree of recognition for blue or prefer to start their color matching with blue. Combining these drag trajectory and color preference information, we generate an operational feature vector for each color block pair, such as [operation difficulty score, drag trajectory length, number of pauses, and color preference coefficient (e.g., a quantified value of their preference for a particular color)]. This vector is then used to generate target color block identification information, providing more information about the user's color vision based on their operational behavior.
[0069] Based on physiological characteristics, user operation characteristics are processed to generate target color patch identification information. The user's age factor (e.g., user age 55) in the target user's physiological characteristics is considered, and the user operation characteristics are adjusted based on the relationship between age and color vision changes. With age, color sensitivity decreases, particularly the ability to discriminate blue and green. If the user demonstrates high difficulty in operating the blue-green color patch pair (e.g., a difficulty rating of 3), and age factors indicate color vision decline in this color region, then the weighting of the assessment of the degree of color vision abnormality for this color patch pair is appropriately increased when generating target color patch identification information. For example, based on model predictions and operation characteristic analysis, the blue-green color patch pair was originally judged to have mild color vision abnormality (red-green color vision axis) with a confidence score of 0.7. However, taking age into account, this score is adjusted to moderate color vision abnormality (blue-green color vision axis) with a confidence score of 0.8. This indicates that after accounting for the influence of age, the user is more likely to be considered to have a more significant color vision problem in this color region, and confidence in this judgment is increased.
[0070] If the user has a systemic disease (such as diabetes), the user's operation characteristics are analyzed based on the potential impact of the disease on color vision. Diabetes affects retinal microvasculature, which in turn affects color vision. Assuming that the user exhibits some abnormalities when operating the red-orange color patch pair (such as prolonged operation time and complex dragging trajectory), combined with a history of diabetes, further analysis is conducted to determine whether these operation characteristics are consistent with disease-related color vision changes. If so, when generating the target color patch identification information, it is clearly stated that the color vision abnormality of this color patch pair is related to diabetes, and a relevant annotation is added to the color vision abnormality classification information (such as "Red-orange color patch pair color vision abnormality, affected by diabetes"). At the same time, the confidence score is adjusted based on the severity of the disease and research data on its impact on color vision. For example, if diabetes is poorly controlled and has a significant impact on color vision, the confidence score for the color vision abnormality classification for this color patch pair is increased from 0.7 to 0.9. This increases the reliability of the judgment, emphasizing its importance in subsequent diagnosis or assessment. This provides doctors and professionals with more comprehensive information on color vision status, allowing them to make comprehensive judgments and decisions based on the user's physiological characteristics and medical history.
[0071] S107: Process the target color block identification information to generate target color difference identification information.
[0072] In one embodiment, the target color block identification information is processed to generate an average color difference prediction value for the color block pairs and the majority category information in the color vision abnormality classification information. Assume that the target color block identification information contains color difference prediction values for multiple color block pairs, such as the color difference prediction value of the red-green color block pair is 120nm, the color difference prediction value of the blue-yellow color block pair is 100nm, the color difference prediction value of the orange-purple color block pair is 80nm, etc. The average value of the color difference prediction values of these color block pairs is calculated, that is, (120+100+80) / 3=100nm, and is used as the average color difference prediction value of the color block pairs. This average color difference prediction value can reflect the user's average perception of color differences during the overall color block selection process and provide a basic reference for subsequent preliminary color difference prediction. For example, if the average color difference prediction value is large, it means that the user's ability to distinguish colors is relatively weak, and it is necessary to further consider whether there is color vision abnormality in subsequent analysis.
[0073] For color vision abnormality classification information, assume that the classification results for multiple color patch pairs are: the red-green patch pair is mild color vision abnormality (red-green color vision axis), the blue-yellow patch pair is normal, and the orange-purple patch pair is mild color vision abnormality (blue-purple color vision axis). Among these classification results, mild color vision abnormality appears the most frequently (twice), so the majority category in the color vision abnormality classification information is determined to be mild color vision abnormality. By determining the majority category, we can quickly understand the user's main color vision abnormality tendency and provide a qualitative reference for preliminary color difference prediction. For example, if the majority category is mild color vision abnormality, then when generating preliminary color difference prediction information, we can focus on features and parameters related to mild color vision abnormality to further analyze the specific color difference of the user under this color vision state.
[0074] The average color difference prediction value of the color block pair and the majority category information in the color vision abnormality classification information are processed to generate preliminary color difference prediction information. Based on the calculated average color difference prediction value of the color block pair (such as 100nm mentioned above) and the determined majority category (mild color vision abnormality), the preliminary color difference prediction information is generated and adjusted. If the average color difference prediction value is close to the typical color difference range corresponding to mild color vision abnormality (assuming that the typical color difference range of mild color vision abnormality on the red-green color vision axis is 80-120nm), and the majority category is mild color vision abnormality, then it is preliminarily judged that the user is at a mild abnormal level in overall color vision, and the main affected color range is concentrated in the red-green area. At this time, the preliminary color difference prediction information can be set to have a certain degree of color difference in the red-green area, and the degree of color difference is close to the average color difference prediction value (such as about 100nm). At the same time, considering the classification of other color block pairs (such as the blue-yellow color block pair is normal, and the orange-purple color block pair is mild color vision abnormality (blue-purple vision axis)), it is also necessary to pay attention to the color vision of the blue-purple area, and appropriately mention the potential color difference problem in the preliminary color difference prediction information, but the weight is lower than that of the red-green area.
[0075] The preliminary color difference prediction information is further optimized with reference to theoretical knowledge and clinical experience related to color vision. For example, according to the color opposition theory, red-green and blue-yellow are the two main color perception axes. When color vision abnormality occurs on one axis, it will have a certain impact on the other axis. If it is determined that the user has mild color vision abnormality on the red-green axis, then in the preliminary color difference prediction information, appropriate adjustment of the color difference prediction range on the blue-yellow axis can be considered. Even if the blue-yellow color block pair is classified as normal, its color difference monitoring range can be appropriately expanded (for example, from the normal 30-50nm to 40-60nm) to more comprehensively assess the user's color vision condition. In addition, based on the clinical experience of the influence of different age groups, gender, eye disease history and other factors on color vision, if the user is elderly and has a history of mild cataracts, such people will have reduced color sensitivity in the blue-purple area. Therefore, in the preliminary color difference prediction information, further emphasis is placed on color vision in the blue-purple area, and the color difference prediction parameters in this area are appropriately adjusted to make it more consistent with the user's actual situation.
[0076] The preliminary color difference prediction information is processed based on user operation characteristics to generate target color difference identification information. This target identification color difference information is used to characterize the target user's presence of any color difference information among red, orange, yellow, green, cyan, blue, and purple. The impact of operation time and operation difficulty information in the user operation characteristics on the preliminary color difference prediction information is analyzed. Assuming that the user takes a long time (e.g., more than 10 seconds) and has a high operation difficulty (e.g., more than five adjustments) when selecting a red-green color block pair, this indicates that the user has significant difficulty distinguishing the colors of this color block pair. Combined with the preliminary color difference prediction information (e.g., a certain degree of color difference has been determined in the red-green region), the assessment of the degree of color vision abnormality in this region is further improved. For example, adjusting the color difference prediction value for the red-green region from approximately 100 nm to approximately 110 nm and simultaneously increasing the confidence level of the color vision abnormality classification in this region (e.g., from 0.7 to 0.8) indicates that the user has more significant color vision problems in this region. For color block pairs with shorter operation time and lower difficulty (such as blue-yellow color block pairs), if their preliminary color difference prediction information appears normal and the user operation characteristics also support this judgment, then the original color difference prediction and classification results can be maintained, but the monitoring frequency or weight of this area can be reduced, and more attention will be focused on the color area corresponding to the color block pairs that are difficult to operate.
[0077] Observe the user's dragging trajectory and color preference information during the color block adjustment process to further refine the target color difference recognition information. If the user's trajectory is complex and unstable when adjusting the red color block (such as multiple dragging back and forth, with many pause points), this indicates that there is a large uncertainty in the user's color perception of red. Combined with the preliminary color difference prediction information, the color vision abnormality in the red area is further refined into a specific type of color vision abnormality (such as red weakness), and clearly indicated in the target color difference recognition information. At the same time, based on the user's color preference (such as the user always selects the blue-related color block for adjustment first and the adjustment time is short), if the color difference prediction of the blue-yellow area in the preliminary color difference prediction information is close to the upper limit of the normal range, considering the user's good recognition of blue, the color difference prediction value of the blue-yellow area can be appropriately adjusted downward (such as from 40-60nm to 35-55nm) to make it more in line with the user's actual color vision performance. By integrating these user operation feature information, the final target color difference recognition information is generated. This information can more accurately reflect the user's color vision status in different color areas, including specific color difference values, color vision abnormality types and corresponding confidence levels, providing a more valuable reference basis for application scenarios such as clinical diagnosis and professional qualification assessment.
[0078] The server changes the previous detection range, which was primarily based on red, green, or yellow, and blue, to a custom division based on the color's nm value. It measures seven colors: red, orange, yellow, green, cyan, blue, and violet, comprehensively diagnosing the human eye's ability to recognize each color, thereby accurately determining the human eye's color vision ability. This breaks through the previous limitation of only providing qualitative conclusions and can display specific objective data such as the minimum recognizable color difference (e.g., 2nm) within a specific color range (e.g., red 635nm-700nm). This is defined as the minimum difference that the human eye can recognize for a single color, achieving refined color vision detection and accurately assessing the degree of color vision abnormality. Two color blocks are displayed, and the color blocks are made consistent by dragging the color bar. This method is fast and accurate, unaffected by user cognitive differences, and can effectively shorten detection time and improve detection efficiency. Testing seven colors per person takes only 5 minutes. Setting the detection background to a variety of life scenarios (static or dynamic scenes such as driving, sports, and roads) better reflects the real-life visual environment. This can detect color vision abnormalities that are missed in hospital tests and help users understand the color vision problems they face in their lives.
[0079] In one embodiment, Figure 2 As shown, the present application also provides a device for color vision testing, comprising:
[0080] Acquisition module 201 is used to acquire background image information to be checked, target user information, background adjustment information to be checked, medical history information of the target user, a preset color difference recognition model and a training sample set, wherein the background image information to be checked is a dynamic life background or a static life background, and the background adjustment information to be checked is used to represent the background information customized by the target user;
[0081] The processing module 202 is used to process the background image information to be checked and the background adjustment information to be checked to generate a color block selection influencing factor vector; process the medical record information of the target user to generate a user color block adjustment factor; process the target user information based on the color block selection influencing factor vector and the user color block adjustment factor to generate preset color block information and the color block selection information of the target user; process the preset color difference recognition model based on the training sample set to generate a target color difference recognition model; process the preset color block information and the color block selection information of the target user based on the target color difference recognition model to generate target color block recognition information; process the target color block recognition information to generate target color difference recognition information, wherein the target recognition color difference information is used to characterize the presence of any color difference information of red, orange, yellow, green, cyan, blue and purple for the target user.
[0082] Each embodiment of this application is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences from the other embodiments. In particular, the method, electronic device, electronic device, and readable storage medium embodiments for evaluating color vision testing are generally similar to the aforementioned color vision testing method embodiment, so the description is relatively simple. For related portions, reference can be made to the partial description of the aforementioned color vision testing method embodiment.
Claims
1. A method for color vision testing, characterized in that: include: Obtaining background image information to be inspected, target user information, background adjustment information to be inspected, medical history information of the target user, a preset color difference recognition model, and a training sample set, wherein the background image information to be inspected is a dynamic life background or a static life background, and the background adjustment information to be inspected is used to represent background information customized by the target user; Processing the background image information to be checked and the background adjustment information to be checked to generate a color block selection influencing factor vector, including: performing feature extraction processing on the background image information to be checked to generate color feature information, brightness feature information, and texture feature information; processing the background adjustment information to be checked to generate a feature adjustment amplitude value; and processing the color feature information, brightness feature information, and texture feature information based on the feature adjustment amplitude value to generate a color block selection influencing factor vector; Processing the target user's medical history information to generate a user color block adjustment factor includes: processing the target user's medical history information to generate eye disease characteristic information and physiological characteristic information; processing the eye disease characteristic information and the physiological characteristic information to generate a color vision influence factor and weight information matching the color vision influence factor; processing the color vision influence factor and the weight information matching the color vision influence factor to generate a color block adjustment value; processing the color block adjustment value to generate a user color block adjustment factor; the method includes a calculation formula for obtaining the color block adjustment value, and the calculation formula is: ; where n represents the number of major factor categories affecting color vision, m represents the number of subdivided factors under each major factor category, and p represents the number of special factors related to eye diseases. Indicates the category index of the main factors affecting color vision, Indicates the index of the subdivided factors under each main factor category, Represents the color vision influencing factor of the jth sub-factor in the i-th main factor, Represents the weight of the jth sub-factor in the i-th main factor, Represents the index of special factors related to eye diseases, represents the impact factor of the kth special factor, represents the weight of the kth special factor, represents the influencing factor of the tth lifestyle factor, represents the weight of the t-th lifestyle factor, represents the coefficient of individual variation; Processing the target user information based on the color block selection influencing factor vector and the user color block adjustment factor to generate preset color block information and color block selection information of the target user; Processing the preset color difference recognition model based on the training sample set to generate a target color difference recognition model; Processing the preset color block information and the color block selection information of the target user based on the target color difference recognition model to generate target color block recognition information; The target color block identification information is processed to generate target color difference identification information, wherein the target color difference identification information is used to represent that the target user has any color difference information of red, orange, yellow, green, cyan, blue, and purple.
2. The method according to claim 1, wherein The target user information is processed based on the color block selection influencing factor vector and the user color block adjustment factor to generate preset color block information and color block selection information of the target user, including: Processing the target user information to generate color vision information to be detected; Processing the color vision information to be detected based on the color block selection influencing factor vector to generate a color selection range value; Processing the color selection range value based on the user color block adjustment factor to generate preset color block information; The preset color block information is processed to generate color block selection information of the target user.
3. The method according to claim 1, wherein Processing the preset color difference recognition model based on the training sample set to generate a target color difference recognition model includes: Process the training sample set to generate a training set and a validation set; Get any number of data features in the training set; generating a sampling ratio based on the number of each data feature in the training set; Sampling the training set based on the sampling ratio to generate a preset number of sampling features; Processing any data feature and each sampling feature to generate multiple data groups, wherein each data group includes a preset number of data samples, and at least one data sample includes identification information; Training the preset color difference recognition model based on data samples in the multiple data groups to generate a trained color difference recognition model; Processing the trained color difference recognition model based on the verification set to generate a verification result; If the data sample containing identification information in the verification result represents a risk factor affecting the user's color difference recognition, the trained color difference recognition model is used as a target color difference recognition model.
4. The method according to claim 1, wherein The preset color block information and the color block selection information of the target user are processed based on the target color difference recognition model to generate target color block recognition information, including: Processing the preset color block information and the color block selection information of the target user based on the target color difference recognition model to generate a predicted value of the color difference between each color block pair, color vision abnormality classification information, and a confidence score matching the color vision abnormality classification information; Processing the predicted value of the color difference between each color block pair, the color vision abnormality classification information, and the confidence score matching the color vision abnormality classification information to generate a user operation feature; The user operation feature is processed based on the physiological feature information to generate target color block recognition information.
5. The method according to claim 4, wherein Processing the target color block identification information to generate target color difference identification information includes: Processing the target color block recognition information to generate an average color difference prediction value of the color block pair and majority category information in the color vision abnormality classification information; Processing the average color difference prediction value of the color block pair and the majority category information in the color vision abnormality classification information to generate preliminary color difference prediction information; The preliminary color difference prediction information is processed based on the user operation characteristics to generate target color difference identification information.
6. A device for color vision testing, characterized in that: For implementing the method of claim 1, the apparatus comprises: An acquisition module is configured to acquire background image information to be inspected, target user information, background adjustment information to be inspected, medical history information of the target user, a preset color difference recognition model, and a training sample set, wherein the background image information to be inspected is a dynamic life background or a static life background, and the background adjustment information to be inspected is used to represent background information customized by the target user; A processing module is used to process the background image information to be checked and the background adjustment information to be checked to generate a color block selection influencing factor vector; process the medical record information of the target user to generate a user color block adjustment factor; process the target user information based on the color block selection influencing factor vector and the user color block adjustment factor to generate preset color block information and the target user's color block selection information; process the preset color difference recognition model based on the training sample set to generate a target color difference recognition model; process the preset color block information and the target user's color block selection information based on the target color difference recognition model to generate target color block recognition information; process the target color block recognition information to generate target color difference recognition information, wherein the target color difference recognition information is used to characterize the presence of any color difference information of red, orange, yellow, green, cyan, blue, and purple for the target user.
7. An electronic device, characterized in that: include: a first processor; and a memory for storing executable instructions of the first processor; The first processor is configured to perform the color vision testing method according to any one of claims 1 to 5 by executing the executable instructions.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the second processor, the color vision testing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Systems and methods for visual field analysis
CN111587086A
System for quantitatively detecting color vision perception and identification capability and use method thereof
CN113331780A