Slit lamp original image processing method and similarity-based prediction model application method
Through the combination of image segmentation and prediction model, the problems of insufficient image quality and low processing efficiency in the prior art are solved, and the precise extraction of the iris region and background optimization processing are realized, the recognition accuracy and processing efficiency are improved, and the visual fatigue of doctors is reduced.
Patent Information
- Application Number
- CN202411866527.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Existing slit lamp original image processing methods cannot fully solve the problem of image quality, especially in contrast, clarity and doctor visual fatigue, and lack the ability to distinguish the iris and background areas, resulting in image distortion or loss of information.
The mask is generated by image segmentation, and the preset iris image prediction model is used for prediction, and the image fusion is combined with the original image and the predicted image to achieve accurate extraction of the iris region and optimized background processing.
It improves the recognition accuracy and processing efficiency of iris images, reduces visual fatigue of doctors, and improves the application potential of images in automatic recognition and analysis.
Smart Images

Figure CN119338844B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of slit lamp equipment, and in particular to a slit lamp original image processing method and a similarity-based prediction model application method. Background Art
[0002] In the field of medical diagnosis and biometrics, slit lamp imaging technology is a commonly used method for examining the iris area of the eye. Traditional slit lamp original image processing methods usually include basic image enhancement and noise reduction techniques, but these methods often cannot fully solve the problem of image quality, especially in terms of image contrast, clarity, and doctors' visual fatigue. Unprocessed original images or images that have undergone routine industry processing, such as basic histogram equalization and filtering, can provide a certain degree of visual improvement, but are often not enough to support high-precision iris analysis, and long-term observation of these images can easily cause doctors' eye fatigue.
[0003] With the development of image processing technology, especially the application of deep learning in image recognition and processing, it has become possible to automatically and intelligently process slit lamp images. However, existing image processing methods often lack the ability to distinguish between the iris area and the background area, which may introduce unnecessary image distortion or information loss while improving image quality.
[0004] In addition, when processing images of different qualities or conditions, existing technologies often require manual adjustment of parameters or selection of different processing strategies, which not only reduces processing efficiency but also increases the complexity of operation. For doctors, such manual intervention is not only time-consuming, but also may lead to inconsistent processing results.
[0005] The present invention aims to solve the above problems by improving the recognition accuracy, processing efficiency and visual comfort of images, reducing the visual fatigue of doctors, and improving the application potential of images in automatic recognition and analysis through image segmentation, prediction models, intelligent selection of prediction modes and comprehensive image processing technology. Summary of the invention
[0006] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a slit lamp original image processing method to solve one or more problems in the prior art.
[0007] To achieve the above object, the technical solution of the present invention is as follows:
[0008] A slit lamp original image processing method comprises the following steps:
[0009] Receive the original image of the eye iris area captured by the camera device.
[0010] The original image is segmented and a mask is generated.
[0011] Use the preset iris image prediction model to make predictions and output the predicted image.
[0012] Fusion of multiple images.
[0013] Output iris image.
[0014] In the above technical solution, by receiving the original image and performing segmentation processing to generate a mask, the iris area can be accurately identified and separated, providing an accurate target area for subsequent image processing. Using a preset iris image prediction model for prediction can improve the recognition accuracy and processing efficiency of the iris image. Fusion of multiple images and output of the iris image helps to improve the quality and usability of the final image.
[0015] The image is segmented and the mask generated includes:
[0016] Use statistical methods to segment images.
[0017] Define the iris area as the foreground and the rest of the area as the background. Define the foreground pixels as 1 and the background pixels as 0. The output is a mask.
[0018] Define the iris area as the background and the rest of the area as the foreground. Define the foreground pixels as 0 and the background pixels as 1. The output is the inverse mask.
[0019] In the above technical solution, the image is segmented and a mask and its inverse mask are generated using a statistical method, which can control the image processing process more finely and ensure that the iris area and the background area are more clearly distinguished, thereby improving the accuracy of image processing.
[0020] Fusion of multiple images involves the following steps:
[0021] The original image and the mask are bitwise ANDed to filter out the pixels in the iris area corresponding to the mask in the original image, and output as the first image.
[0022] The predicted image and the inverse mask are bitwise ANDed, pixels in the predicted image corresponding to the background area of the inverse mask are filtered out, and the pixels are output as the second image.
[0023] The first image is added to the second image to obtain an iris image.
[0024] In the above technical solution, by filtering out pixels in a specific area through a bitwise AND operation and adding these images, the advantages of the original image and the predicted image can be effectively combined to achieve accurate extraction of the iris area and optimized processing of the background.
[0025] The image processing method also includes constructing and training an iris image prediction model, which specifically includes the following steps:
[0026] Initialize the operating environment and import the existing iris sample image.
[0027] Compile the model, specifying the optimizer, loss function, and evaluation metric.
[0028] Read a sample image, resize it, and convert it to the format required for model input.
[0029] Train the model, specifying the number of training rounds, batch size, and validation set ratio.
[0030] Save the trained model.
[0031] In the above technical solution, the iris image prediction model is constructed and trained to realize the automatic and intelligent processing of iris images and improve the accuracy and reliability of iris recognition. The model performance can be further optimized by adjusting the model parameters and the training process.
[0032] Using the model to make predictions involves the following steps:
[0033] Load a preset model.
[0034] Input the sample image or original image into the model and make predictions.
[0035] Get the predicted image.
[0036] In the above technical solution, using the model for prediction can quickly generate a predicted image, providing a basis for subsequent image fusion and processing. This method can reduce manual intervention and improve processing speed and accuracy.
[0037] The image processing method further includes preprocessing the original image, which specifically includes the following steps:
[0038] The original image is read and converted into a grayscale image.
[0039] The local contrast of the image is enhanced through the histogram equalization method.
[0040] The image is denoised using a filtering algorithm.
[0041] In the above technical solution, preprocessing of the original image, such as conversion into a grayscale image, histogram equalization and filtering noise reduction, can improve the quality of the image, enhance the local contrast of the image, and provide a clearer image basis for subsequent image segmentation and prediction.
[0042] Fusion of multiple images also includes post-processing, which specifically includes the following steps:
[0043] The image obtained by adding the first image and the second image is normalized, and pixel values exceeding the image bit range are mapped into a preset bit range.
[0044] Enhance the contrast of the entire image.
[0045] Noise reduction.
[0046] Image sharpening.
[0047] In the above technical solution, the image quality can be further improved through post-processing steps such as normalization, contrast enhancement, noise reduction and image sharpening, ensuring that the output iris image reaches the best state in terms of visual effect and analysis accuracy.
[0048] In order to achieve a complete technical effect, the second technical solution of the present invention is: a prediction model application method based on similarity, comprising the following steps:
[0049] Based on the similarity between the original image and the sample image, a prediction model is applied.
[0050] The original image and the mask are bitwise ANDed to filter out the pixels in the iris area corresponding to the mask in the original image, and output as the first image.
[0051] The predicted image and the inverse mask are bitwise ANDed, pixels in the predicted image corresponding to the background area of the inverse mask are filtered out, and the pixels are output as the second image.
[0052] The first image is added to the second image to obtain an iris image.
[0053] In the above technical solution, by applying the prediction model based on the similarity between the original image and the sample image, the most appropriate image processing strategy can be flexibly selected, so that the best iris image processing effect can be obtained in different situations.
[0054] The prediction mode includes a first prediction mode and a second prediction mode:
[0055] In the first prediction mode, the predicted image is defined as the prediction result of the original image.
[0056] In the second prediction mode, the predicted image is defined as the average of the prediction results based on the sample image set.
[0057] In the above technical solution, two prediction modes are provided, and the prediction results of the original image or the sample image can be selected according to the actual situation, which increases the adaptability and flexibility of the processing method and helps to obtain high-quality and more accurate iris images in different situations.
[0058] Based on the similarity between the original image and the sample image, applying the prediction model includes the following steps:
[0059] Using the hash algorithm, hash values are calculated for the original image and a set of training sample images respectively.
[0060] Calculate the Hamming distance to obtain the Hamming distance between the original image and the average hash value of the sample image, which is defined as the first Hamming distance. And obtain the average value of the Hamming distances between different sample images, which is defined as the second Hamming distance.
[0061] The scenarios whose first Hamming distance is lower than the second Hamming distance are defined as high similarity, otherwise they are defined as low similarity.
[0062] Based on the low similarity, the first prediction mode is applied.
[0063] Based on the high similarity, the second prediction mode is applied.
[0064] In the above technical solution, by using the hash algorithm to calculate the Hamming distance to determine the image similarity, and selecting the prediction mode accordingly, the intelligent selection of the image processing strategy can be achieved, and the error rate of the image is reduced in the first prediction mode, and the accuracy of iris image processing is improved. In the second prediction mode, the sample image is directly used for prediction, which shortens the overall image processing time.
[0065] Compared with the prior art, the beneficial technical effects of the present invention are as follows:
[0066] (I) By generating masks and inverse masks through image segmentation and then combining the original image with the predicted image for image reconstruction, the accurate extraction of the iris area and the optimized processing of the background are achieved. This is different from the overall image processing method that may be used in the prior art, and improves the recognition accuracy and processing efficiency of iris images.
[0067] (ii) By using a preset iris image prediction model for prediction and combining the technical features of model training and parameter optimization, this solution can automatically and intelligently process iris images, thereby improving the accuracy and reliability of iris recognition, which is difficult to achieve with existing technologies that rely on manual adjustments and experience.
[0068] (III) Based on the prediction model applied based on the similarity between the original image and the sample image, combined with the technical features of hash algorithm and Hamming distance calculation, this solution can intelligently select the most appropriate image processing strategy, so as to obtain the best iris image processing effect in different situations. This usually requires manual intervention and multiple attempts in the existing technology.
[0069] (iv) By enhancing the image quality through preprocessing steps and combining the normalization, contrast enhancement and image sharpening in post-processing, this solution can ensure that the image input to the prediction model has higher clarity and contrast, thereby improving the visual effect and analysis accuracy of the final iris image, which often requires additional image optimization steps in the existing technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a schematic flow chart of the slit lamp original image processing method of the present invention.
[0071] Figure 2 It is a logical schematic diagram of the similarity-based prediction model application method in the present invention. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical scheme and advantages of the present invention more clear, the slit lamp original image processing method proposed by the present invention is further described in detail below in combination with the accompanying drawings and exemplary descriptions. It should be noted that the structure, proportion, size, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. Any modification of the structure, change of the proportional relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0073] Application Overview
[0074] In the field of medical diagnosis and biometrics, slit lamp imaging technology is a common method for examining the iris area of the eye. In the face of the technical problems solved in this solution, the industry's conventional processing methods usually include basic image enhancement and noise reduction techniques. Although these methods can improve image quality to a certain extent, they often cannot fully solve the problems of insufficient image contrast, low clarity, and doctor's visual fatigue. Unprocessed original images or images that have undergone conventional industry processing, such as basic histogram equalization and filtering, can provide a certain degree of visual improvement, but are often not enough to support high-precision iris analysis, and long-term observation of these images can easily cause doctor's eye fatigue.
[0075] In addition, existing image processing techniques are also insufficient in accurately identifying the iris area and processing the background area, which limits the potential of images in automatic recognition and analysis applications. Conventional solutions usually lack the ability to distinguish between the iris area and the background area, which may introduce unnecessary image distortion or information loss while improving image quality.
[0076] When processing images of different qualities or conditions, existing technologies often require manual adjustment of parameters or selection of different processing strategies, which not only reduces processing efficiency but also increases the complexity of operation. For doctors, such manual intervention is not only time-consuming but also may lead to inconsistent processing results.
[0077] In summary, existing slit lamp image processing methods have multiple deficiencies and defects, including limited image quality improvement, low processing efficiency, high operational complexity, and lack of automated and intelligent processing capabilities. These problems not only affect the accuracy of iris image analysis, but also increase the workload of doctors, limiting the application potential of slit lamp imaging technology in medical diagnosis and biometrics. This scheme aims to overcome these deficiencies by introducing advanced image segmentation, prediction models, and prediction modes, and provide a more efficient, accurate, and user-friendly slit lamp image processing method.
[0078] The present invention proposes a slit lamp original image processing method and a similarity-based prediction model application method. Through the technical means of the present invention, not only the recognition accuracy of the image can be improved, but also the visual fatigue of doctors when observing the image for a long time can be reduced. This method is particularly suitable for the demand for high-precision iris images in the medical field, and can significantly improve the accuracy and efficiency of diagnosis.
[0079] like Figure 1 As shown, the specific implementation of the slit lamp original image processing method is as follows.
[0080] Image acquisition:
[0081] First, the original images of the iris area of the eye are collected by high-resolution cameras. These images usually contain detailed textures and features of the iris, but they may also contain noise and uneven lighting, which will affect the accuracy of subsequent analysis. The quality of the collected images directly affects the final processing results. Therefore, high-resolution cameras are used to ensure that the images contain enough details so that the subsequent processing steps can more accurately identify and analyze iris features.
[0082] Image preprocessing:
[0083] The collected original image is first preprocessed to improve the image quality and prepare for the subsequent segmentation and prediction steps. The preprocessing step includes converting the original image into a grayscale image, which helps to simplify the image data and reduce the computational complexity. Next, the local contrast of the image is enhanced by the CLAHE (contrast limited adaptive histogram equalization) algorithm, which can effectively improve the visual effect of the image and make the texture of the iris clearer. For example, the CLAHE algorithm can use the parameters clipLimit=2.0 and tileGridSize=(8, 8), which are only used as examples to illustrate the application of the algorithm and are not used to limit the scope of protection of the present invention. Finally, the Gaussian filtering algorithm is applied to the image for denoising to reduce the random noise in the image and improve the smoothness of the image. The preprocessing step is critical because it provides a high-quality image foundation for subsequent image segmentation and feature extraction, thereby improving the accuracy and reliability of the entire processing flow.
[0084] Image Segmentation:
[0085] The preprocessed image will be segmented to generate a mask. This step uses statistical methods to segment the image, defining the iris area as the foreground and the rest of the area as the background. When generating the mask, the foreground pixels are defined as 1 and the background pixels are defined as 0. In addition, an inverse mask is defined, that is, the iris area is defined as the background, the rest of the area is defined as the foreground, the foreground pixels are 0, and the background pixels are 1. This step is critical because it directly affects the effect of subsequent image fusion. Through accurate image segmentation, it can ensure that the iris area is accurately identified and isolated, providing accurate area positioning for subsequent image analysis and processing.
[0086] Model training:
[0087] Before implementing the present invention, it is necessary to build and train an iris image prediction model. This includes initializing the operating environment and importing existing iris sample images. These sample images should cover iris features under different lighting conditions and different individuals to ensure the generalization ability of the model. When compiling the model, specify the optimizer, loss function, and evaluation index. For example, the Adam optimizer and sparse classification cross entropy loss function can be used. Then, read the sample image, resize it, and convert it to the format required for model input. During the model training process, specify the number of training rounds, batch size, and validation set ratio. For example, epochs=10 and batch_size=32 can be set. These parameters are only used as examples to illustrate the model training process and are not used to limit the scope of protection of the present invention. Through the training of deep learning models, it is possible to achieve automated and intelligent processing of iris images and improve the accuracy and reliability of iris recognition.
[0088] Model predictions:
[0089] Use the trained model to predict the image and output the predicted image.
[0090] In order to ensure that the processing from the original image to the slit lamp to finally present the iris image has both high accuracy and short time, the application of prediction model is the core link.
[0091] The final iris image is obtained based on the prediction results of the sample image to ensure the consistency and quality of the image. However, given that there may be significant differences between the sample image and the original image, directly applying the prediction results of the sample image may introduce large errors when the similarity is low, affecting the accuracy of the final image. To meet this challenge, the present invention proposes an intelligent prediction mode selection mechanism based on similarity evaluation.
[0092] like Figure 2As shown, the specific implementation of the similarity-based prediction model application method is as follows.
[0093] The mechanism first uses a hash algorithm to calculate hash values for the original image and the training sample image, and measures the similarity between them through the Hamming distance. Based on the comparison results of the Hamming distance, the present invention defines two prediction modes:
[0094] First prediction mode: When the similarity between the original image and the sample image is low, that is, the first Hamming distance is higher than the second Hamming distance, the first prediction mode is used. This mode is directly based on the original image for prediction, so as to reduce the error rate in the image processing process and improve the accuracy of iris image processing. This mode is particularly suitable for situations where the original image and the sample image are significantly different, and can effectively reduce the error introduced by the mismatch of the sample image, thus ensuring the authenticity and reliability of the final image.
[0095] Second prediction mode: When the similarity between the original image and the sample image is high, that is, the first Hamming distance is lower than or equal to the second Hamming distance, the second prediction mode is used. This mode directly uses the average value of the prediction results of the sample image to shorten the overall image processing time. Since the sample image is of high quality and similar to the original image, this mode can quickly generate high-quality prediction results and improve processing efficiency.
[0096] The core advantage of the intelligent prediction mode selection mechanism of the present invention is that the first prediction mode can reduce the error rate of the image and improve the accuracy of iris image processing; while the second prediction mode shortens the overall image processing time by directly using sample images for prediction. This flexible mode selection not only improves the adaptability and flexibility of image processing, but also optimizes the processing flow and improves work efficiency while ensuring image quality. Through this technical solution, the present invention can flexibly select the most appropriate prediction mode in different situations, significantly improve the recognition accuracy and processing efficiency of iris images, reduce doctors' visual fatigue, and improve the accuracy and efficiency of diagnosis.
[0097] Image fusion and post-processing:
[0098] The step of fusing multiple images includes performing a bitwise AND operation on the original image and the mask, filtering out the pixels of the iris area corresponding to the mask in the original image, and outputting them as the first image. At the same time, performing a bitwise AND operation on the predicted image and the inverse mask, filtering out the pixels of the background area corresponding to the inverse mask in the predicted image, and outputting them as the second image. Finally, the first image and the second image are added to obtain the final iris image. After the image fusion, a post-processing step is also included to further improve the image quality. The post-processing includes normalizing the fused image and mapping the pixel values that exceed the image bit range to a preset bit range. In addition, the steps of enhancing the contrast of the entire image, reducing noise and sharpening the image are also included, which ensure that the final output iris image is visually clearer and more accurate. Through image fusion and post-processing, the present invention can effectively integrate the advantages of the original image and the predicted image, generate a high-quality iris image, and provide a reliable basis for subsequent iris analysis and recognition.
[0099] Through the above steps, the present invention can effectively process slit lamp images, improve the quality and recognition accuracy of iris images, and reduce the visual fatigue of doctors when observing images for a long time. This method not only improves the automation and intelligence level of image processing, but also provides more reliable technical support for the fields of medical diagnosis and biometrics. It should be noted that all specific parameters and examples mentioned in this specification are only used to illustrate the embodiments of the present invention and are not used to further limit the scope of protection of the present invention.
[0100] Specific working process
[0101] Receive the original image of the iris area of the eyeball captured by the camera device. Preprocess the original image, including converting the image into a grayscale image, applying the CLAHE algorithm to enhance the local contrast, and using the Gaussian filter algorithm to perform noise reduction. Perform segmentation on the preprocessed image, using statistical methods to segment the image into the iris area as the foreground and the rest of the area as the background, generate a mask and a reverse mask, where the foreground pixel is defined as 1 and the background pixel is defined as 0.
[0102] Build and train an iris image prediction model, initialize the operating environment, import iris sample images, compile the model and specify the optimizer, loss function and evaluation metric. Read the sample image and resize it, convert it to the format required for model input, train the model and save it. Use the trained model to make predictions, load the preset model, input the sample image or the original image into the model, and obtain the predicted image.
[0103] The prediction mode is selected based on the similarity between the original image and the sample image. The hash value is calculated using a hash algorithm, the Hamming distance is calculated, low similarity and high similarity are defined based on the Hamming distance, and the first prediction mode or the second prediction mode is selected accordingly. The original image and the mask are bitwise ANDed, and the pixels in the iris area corresponding to the mask in the original image are filtered out and output as the first image. The predicted image and the inverse mask are bitwise ANDed, and the pixels in the background area corresponding to the inverse mask in the predicted image are filtered out and output as the second image. The first image is added to the second image to obtain the iris image.
[0104] Post-processing includes normalizing the fused image, mapping pixel values that exceed the image bit range to a preset bit range, enhancing the contrast of the entire image, performing noise reduction and image sharpening, and outputting the final iris image.
[0105] The various technical features described in the above exemplary embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the various technical features in the above exemplary embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A slit lamp original image processing method, characterized in that: The following steps are involved: Receiving an original image of the iris area of the eyeball collected by a camera device; The original image is segmented to generate a mask; the iris area is defined as the foreground, the rest of the area is defined as the background, the foreground pixels are defined as 1, the background pixels are defined as 0, and the output is a mask; the iris area is defined as the background, the rest of the area is defined as the foreground, the foreground pixels are defined as 0, the background pixels are defined as 1, and the output is an inverse mask; Using a preset iris image prediction model to make predictions, inputting a sample image or an original image into the model and making predictions, and outputting a predicted image; wherein the prediction mode includes a first prediction mode and a second prediction mode: in the first prediction mode, the predicted image is defined as the prediction result of the original image; in the second prediction mode, the predicted image is defined as the average of the prediction results based on the sample image set; Fusion of multiple images; wherein, based on the similarity between the original image and the sample image, a prediction mode is applied; the original image and the mask are bitwise ANDed, pixels of the iris region corresponding to the mask in the original image are screened out, and the pixels are output as a first image; the predicted image and the inverse mask are bitwise ANDed, pixels of the background region corresponding to the inverse mask in the predicted image are screened out, and the pixels are output as a second image; The first image is added to the second image to output an iris image.
2. The slit lamp original image processing method according to claim 1, characterized in that: Applying the prediction model involves the following steps: Use the hash algorithm to calculate hash values for the original image and a set of training sample images respectively; Calculate the Hamming distance to obtain the Hamming distance between the original image and the average hash value of the sample image, which is defined as the first Hamming distance; and obtain the average value of the Hamming distances between different sample images, which is defined as the second Hamming distance; The scenarios whose first Hamming distance is lower than the second Hamming distance are defined as high similarity, otherwise as low similarity; Based on the low similarity, a first prediction mode is applied; Based on the high similarity, the second prediction mode is applied.
3. The slit lamp original image processing method according to claim 1, characterized in that: The image processing method also includes building and training an iris image prediction model, which specifically includes the following steps: initializing the operating environment and importing existing iris sample images; compiling the model, specifying the optimizer, loss function, and evaluation indicators; reading the sample image, resizing it, and converting it into the format required for model input; training the model, specifying the number of training rounds, batch size, and validation set ratio; and saving the trained model.
4. The slit lamp original image processing method according to claim 1, characterized in that: The image processing method also includes preprocessing the original image, which specifically includes the following steps: reading the original image and converting the original image into a grayscale image; enhancing the local contrast of the image by a histogram equalization method; and performing noise reduction processing on the image by a filtering algorithm.
5. The slit lamp original image processing method according to claim 1, characterized in that: The fusion of multiple images also includes post-processing, which specifically includes the following steps: normalizing the image obtained by adding the first image and the second image, mapping the pixel values that exceed the image bit range to a preset bit range; enhancing the contrast of the entire image; reducing noise; and sharpening the image.
6. A similarity-based prediction model application method, characterized in that: A slit lamp original image processing method applied to any one of claims 1-5.
Citation Information
Patent Citations
Hand segmentation method based on multi-clue fusion
CN114862894A
Eye movement tracking method and device fused with iris segmentation, equipment and storage medium
CN118314618A