Digital image target detection method and system based on medical microbiological examination
High-quality microbial images are obtained through multi-spectral and polarization imaging technology, and combined with principal component analysis and deep learning algorithms to extract and classify microbial features, solving the problems of low image quality and low classification accuracy in the existing technology, and achieving high-precision microbial classification.
Patent Information
- Application Number
- CN202510199447.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2045-02-24
AI Technical Summary
The prior art lacks optimized design for microbial characteristics in the microbial image acquisition and preprocessing stages, resulting in low image quality and loss of detail information. The feature extraction method is limited to a single type of feature, limiting the model's ability to distinguish diverse microbial species.
Multispectral and polarization imaging technology are used to capture microbial samples, obtain multispectral images of different wavelengths and obtain polarized images by adjusting the angle of incident light. Then denoising and artifact processing are performed, and the images are fused into cubes using principal component analysis (PCA), and a classification model based on convolutional neural network (CNN) is constructed.
Through multi-spectral and polarization imaging technology, the contrast and clarity of microbial features are significantly improved, the image quality is enhanced, the extracted features are more comprehensive and accurate, and the classification accuracy of deep learning models is greatly improved, solving the problems of low image quality and low classification accuracy in the existing technology.
Smart Images

Figure CN119693945A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital image processing, and in particular to a digital image target detection method and system based on medical microbiological testing. Background Art
[0002] In recent years, with the rapid development of computer vision and machine learning, digital image target detection technology has made significant progress. In the medical field, especially in microbiological testing, accurate identification and classification of microorganisms are crucial for disease diagnosis, treatment selection and public health monitoring. Traditional microbiological testing methods rely on microscopic observation and culture medium cultivation. These methods are not only time-consuming, but also easily affected by operator experience and environmental conditions, resulting in inconsistency and uncertainty in results. With the advancement of imaging technology and computing power, target detection methods based on digital images have gradually become a research hotspot and provided new ideas and technical means for microbiological testing.
[0003] Although existing technologies have achieved certain results in the acquisition and preliminary processing of microbial images, there are still some shortcomings to be addressed. First, traditional methods lack optimized designs for microbial characteristics in the image acquisition stage, and fail to fully utilize the advantages of multispectral and polarization imaging to maximize the display of microbial characteristics. Second, in the image preprocessing process, most methods only rely on simple filters for denoising and contrast adjustment, and fail to fully consider the statistical characteristics of local areas, resulting in the loss of detail information, especially in complex backgrounds. It is difficult to maintain the integrity of edges and other key features. Furthermore, existing feature extraction methods are usually limited to a single type of feature and ignore the correlation between different types of features, which limits the model's ability to distinguish diverse microbial species. Finally, although the application of deep learning models has improved classification accuracy, it still faces problems such as overfitting and insufficient generalization ability in practical applications, especially when faced with small sample data sets. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a digital image target detection method based on medical microbiology testing to solve the problem that traditional methods lack optimized design for microbial characteristics in the image acquisition stage and fail to fully utilize the advantages of multispectral and polarization imaging to maximize the display of microbial characteristics.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a digital image target detection method based on medical microbiological testing, which comprises: photographing a microbiological sample to obtain multispectral images of different wavelengths, photographing the same microbiological sample by adjusting the incident light angle to obtain a polarized image; De-noise and remove artifacts on the acquired multispectral images and polarization images and adjust the image contrast; The processed multispectral image and polarization image are fused using principal component analysis (PCA) to obtain a multidimensional data set. Image processing algorithms are used to extract the type features of different microorganisms from multidimensional data sets; Use deep learning algorithms to build a microbial classification model, use type features to input the microbial classification model, distinguish different microbial species, and output the microbial species; The output microbial species are compared with known microbial samples to verify the accuracy of the microbial classification model, and the microbial classification model parameters are adjusted based on the verification results.
[0007] As a preferred solution of the digital image target detection method based on medical microbiological testing of the present invention, wherein: the microbiological sample is photographed to obtain multispectral images of different wavelengths, and the same microbiological sample is photographed by adjusting the incident light angle to obtain a polarized image, and the specific steps are: Microbial samples were photographed at different wavelengths using a camera equipped with multiple filter wheels to obtain multispectral images; Then, under the same conditions, by placing a linear polarizing filter in front of the camera lens and rotating the filter to change the angle of the incident light, the same microbial sample was photographed to obtain a polarized image.
[0008] As a preferred solution of the digital image target detection method based on medical microbiological testing of the present invention, the steps of denoising and removing artifacts from the acquired multispectral image and polarization image and adjusting the image contrast are as follows: The local mean filter is used to calculate the average value of all pixel values in a small neighborhood around each pixel to obtain the average brightness in the local area. ; An adaptive filtering formula is introduced according to the pixel value of the image to deal with the noise and artifacts in multispectral images and polarization images and adjust the image contrast.
[0009] As a preferred solution of the digital image target detection method based on medical microbiological testing of the present invention, wherein: the processed multispectral image and polarization image are fused by principal component analysis PCA to obtain a multidimensional data set, and the specific steps are as follows: Arrange the preprocessed multispectral image and polarization image into a data matrix X according to the pixel position, where each row represents a pixel point and each column represents a characteristic value at a wavelength; Center the data matrix X and subtract the mean value of each feature from the feature to obtain the centralized data matrix ; Calculate the centralized data matrix The covariance matrix of ; Covariance matrix is a symmetric matrix, by solving the covariance matrix , and obtain a set of eigenvalues ,in, represents the eigenvalue, Represents the covariance matrix Dimensions; For each eigenvalue, by solving the linear equation system Get the corresponding feature vector ,in, represents the identity matrix, index variable representing the eigenvalue, Indicates eigenvalues, Indicates The eigenvectors corresponding to the eigenvalues; Sort by eigenvalue in descending order and select the first The eigenvector corresponding to the largest eigenvalue is taken as the principal component; The centralized data matrix Projecting into a new coordinate system consisting of the selected principal components to obtain a multidimensional data set with reduced dimensionality .
[0010] As a preferred solution of the digital image target detection method based on medical microbiological testing of the present invention, wherein: the type characteristics of different microorganisms are extracted from the multidimensional data set using an image processing algorithm, and the specific steps are: Apply Canny edge detection algorithm to the fused data set Processing is performed to highlight the outlines of microorganisms; Perform opening and closing operations on the edge detection results to remove noise and fill the existing holes; Enhance the microbial features and automatically adjust the enhancement intensity according to the changes in the surrounding environment of each pixel to obtain an enhanced image ; according to Segment the enhanced image into different regions, each region corresponding to a microbial sample; The OpenCV library is used to calculate the shape, size, and color distribution characteristics of the microorganisms for each segmented object; Integrate all shape features, size features and color distribution features to obtain the comprehensive type characteristics of the microorganism .
[0011] As a preferred solution of the digital image target detection method based on medical microbiological testing of the present invention, wherein: the microbiological classification model is constructed by using a deep learning algorithm, the type features are used to input the microbiological classification model, different microbial species are distinguished, and the microbial species are output, and the specific steps are: Convolutional neural network (CNN) was selected as the basic architecture of the microbial classification model; The basic architecture of the microbial classification model includes multiple convolutional layers, activation function ReLU, pooling layer, fully connected layer and Softmax layer; Then, a branch for location prediction is added before the last layer, which predicts the location of each detected microbial sample through a regression method; The last layer is the Softmax layer, which is used to output the probability distribution of microbial species; The predicted category is the category with the highest probability.
[0012] As a preferred solution of the digital image target detection method based on medical microbiological testing of the present invention, the output microbial species are compared with known microbial samples to verify the accuracy of the microbial classification model, and the microbial classification model parameters are adjusted according to the verification results. The specific steps are as follows: Collect a large number of historical microbial samples and each sample has a well-labeled real microbial species, and output the predicted microbial species from the microbial classification model; Compare the predicted microbial species with the actual microbial species and calculate the classification accuracy of the microbial classification model ; Set the target accuracy according to actual needs. When the target accuracy is not reached, the learning rate of the microbial classification model is dynamically adjusted.
[0013] In a second aspect, the present invention provides a digital image target detection system based on medical microbiology testing, including an acquisition module, a fusion module, a feature extraction module, a prediction module and an optimization module: The acquisition module is responsible for acquiring and preprocessing multispectral images and polarization images of microbial samples; The fusion module is used to fuse the pre-processed multispectral image and polarization image into a multidimensional data set by using principal component analysis (PCA) technology; The feature extraction module uses the Canny edge detection algorithm to capture the boundary information of microorganisms, and then improves the feature connectivity and integrity by performing morphological operations on the edge detection results, and then automatically adjusts the enhancement strength according to environmental changes to obtain an enhanced image. Finally, the shape, size and color distribution features are calculated using the OpenCV library to form a comprehensive type feature for classification; The prediction module constructs a deep learning classification model, uses the extracted type features as input, distinguishes different types of microorganisms, and outputs prediction results; The optimization module is responsible for evaluating the performance of the microbial classification model and dynamically adjusting the model parameters according to the verification results to optimize the configuration until the expected detection accuracy requirements are met.
[0014] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the digital image target detection method based on medical microbiology testing as described in the first aspect of the present invention is implemented.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the digital image target detection method based on medical microbiology testing as described in the first aspect of the present invention is implemented.
[0016] The beneficial effects of the present invention are as follows: the present invention enhances the contrast and clarity of microbial features through multispectral and polarization image acquisition, and provides high-quality basic data. Then, the adaptive filtering formula is used for denoising and contrast adjustment, which effectively improves the image quality and ensures detail retention, laying the foundation for subsequent analysis. Subsequently, principal component analysis PCA realizes efficient data fusion and dimensionality reduction, reduces redundant information and highlights key features, simplifies the data processing flow, applies Canny edge detection, morphological operations and feature enhancement formulas, finely depicts the contours and internal structures of microorganisms, greatly improves the robustness of the classification model, constructs a classification model based on convolutional neural network CNN, and achieves high-precision classification. Finally, the dynamic learning rate is adjusted through the verification process to ensure continuous optimization of the performance of the microbial classification model and achieve a stable and efficient convergence state. In summary, the present invention not only solves the deficiencies in the prior art, but also provides more accurate and reliable technical support for medical microbiology testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0018] Figure 1 This is a flow chart of the digital image target detection method based on medical microbiology testing in Example 1.
[0019] Figure 2 Schematic diagram of the digital image target detection system based on medical microbiology testing in Example 1. DETAILED DESCRIPTION
[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0022] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0023] Example 1, reference Figure 1 , which is the first embodiment of the present invention, provides a digital image target detection method based on medical microbiology testing, comprising the following steps: S1: photograph the microbial sample to obtain multispectral images of different wavelengths, and photograph the same microbial sample by adjusting the incident light angle to obtain a polarization image; Use a camera equipped with multiple filter wheels to photograph microbial samples at different wavelengths to obtain multispectral images. The selection of each wavelength should be based on the absorption and scattering characteristics of the target microorganism to ensure that the microbial features can be highlighted; Then, under the same conditions, by placing a linear polarization filter in front of the camera lens and rotating the filter to change the angle of incident light, the same microbial sample was photographed to obtain a polarization image; One of the key steps of the present invention is to photograph the microbial samples, obtain multispectral images of different wavelengths, and obtain polarized images by adjusting the angle of the incident light. This design idea is based on a deep understanding of the optical properties of microorganisms. Traditional microscope observation methods rely on a single wavelength light source and are difficult to fully capture the complex structure and characteristics of microorganisms. In contrast, multispectral imaging can select the most suitable wavelength according to the absorption and scattering characteristics of different microorganisms, thereby highlighting specific microbial characteristics. For example, some pathogens may show stronger reflection or absorption at specific wavelengths, which makes them easier to identify and classify. In addition, polarized imaging further enhances the understanding of the internal structure of microorganisms because it can reveal the directionality and anisotropy of materials, which is crucial for distinguishing different types of microorganisms. In the prior art, due to the tiny size and diverse morphology of microorganisms, single-wavelength images often cannot provide sufficient information to accurately distinguish different types of microorganisms. The present invention solves this problem by introducing multispectral and polarization imaging. Specifically: Multispectral imaging uses the absorption and scattering properties of target microorganisms to select the optimal wavelength combination, significantly improving the contrast of microbial features in the image. For example, for bacteria with strong scattering properties, short wavelengths (such as ultraviolet light) can better penetrate the cell wall and produce high-contrast images; for fungi that mainly rely on pigment absorption, red or blue light in the visible light can be selected to maximize their visual differences. Polarization imaging effectively reduces the impact of non-target substances (such as culture medium or other impurities) on the image by changing the angle of incident light. This technology is particularly suitable for transparent or translucent microbial samples because polarized light can highlight the outlines and other important structures of microorganisms without adding additional lighting. Experiments have shown that under the same conditions, polarization imaging can obtain clearer images with less background noise, which is crucial for subsequent target detection and classification.
[0024] S2: De-noise and remove artifacts from the acquired multispectral image and polarization image and adjust the image contrast; The local mean filter is used to calculate the average value of all pixel values in a small neighborhood around each pixel to obtain the average brightness in the local area. ; According to the pixel value of the image, an adaptive filtering formula is introduced to process the noise and artifacts in the multispectral image and polarization image and adjust the image contrast. The formula takes into account the statistical characteristics of the local area of the image and can automatically adjust the filtering intensity according to the changes in the surrounding environment of each pixel. The expression is: ; in, Indicates the pixel position The pixel value after filtering is Indicates the pixel position The pixel values of the original image, Represents the average brightness in a local area. represents the parameter controlling the nonlinear response, represents the base of natural logarithms, represents the smoothed background image calculated using the mean filter; The innovation of this formula is that it combines the Sigmoid function to achieve adaptive adjustment, making the filtering effect more in line with actual needs, especially maintaining details in complex backgrounds; The value range is [0, 255] (assuming an 8-bit grayscale image). When it is equal to 0, it means that the noise at the pixel position is suppressed to the greatest extent; The increase indicates that the pixel position retains more original information, especially for edges and other important features, which is helpful for subsequent target detection.
[0025] S3: Using principal component analysis PCA to fuse the processed multispectral image and polarization image to obtain a multidimensional data set; The preprocessed multispectral image and polarization image are arranged into a data matrix X according to the pixel position. Each row represents a pixel point and each column represents the eigenvalue at a wavelength. The purpose of this is to ensure that all relevant information can be included in the PCA process. Center the data matrix X and subtract the mean value of each feature from the feature to obtain the centralized data matrix The purpose of centralization is to make the mean of the data zero, which is crucial to the effectiveness of the PCA algorithm. The specific formula is as follows: ; in, represents the centralized data matrix, represents the original data matrix, represents the mean value vector of each feature; Calculate the centralized data matrix The covariance matrix of , the covariance matrix describes the correlation between the various features and provides a basis for the subsequent principal component analysis. The calculation formula is: ; in, represents the number of image pixels, In Represents the data matrix The transpose of Covariance matrix is a symmetric matrix, by solving , and obtain a set of eigenvalues ,in, represents the eigenvalue, represents the identity matrix, Represents the covariance matrix Dimensions; For each eigenvalue, by solving the linear equation system Get the corresponding feature vector ,in, index variable representing the eigenvalue, Indicates eigenvalues, Indicates The eigenvalues correspond to the eigenvectors, the eigenvalues indicate the importance of each principal component, and the eigenvectors define the new coordinate axis directions; Sort by eigenvalue in descending order and select the first The eigenvector corresponding to the largest eigenvalue is taken as the principal component; The centralized data matrix Projecting into a new coordinate system consisting of the selected principal components to obtain a multidimensional data set with reduced dimensionality , the expression is: ; in, Before The matrix composed of the eigenvectors corresponding to the largest eigenvalues; In the formula The range of the value is a multidimensional vector space, and the value of each element depends on the range of the original image data. When the element in is equal to 0, it means that the information at that position is simplified to the greatest extent; The increase in the value of the middle element indicates that this position retains more original information, which is especially critical for distinguishing different types of microbial characteristics.
[0026] S4: Extract the type features of different microorganisms from multidimensional data sets using image processing algorithms; Apply Canny edge detection algorithm to the fused data set Processing is performed to highlight the outline of microorganisms. Canny edge detection can effectively capture the boundary information of microorganisms and provide a basis for subsequent feature extraction; Opening and closing operations are performed on the edge detection results to remove noise and fill the existing holes. These operations help improve the connectivity and integrity of microbial features. Enhance the microbial features and automatically adjust the enhancement intensity according to the changes in the surrounding environment of each pixel to obtain the enhanced image. The expression is: ; in, Indicates the pixel position The pixel value after feature enhancement, represents the parameter controlling the enhancement strength, Indicates the pixel position The pixel values of the original image, Represents the average brightness in a local area. represents the standard deviation, represents pi, represents the base of natural logarithms; according to Segment the enhanced image into different regions, each region corresponding to a microbial sample; The OpenCV library is used to calculate the shape, size, and color distribution characteristics of the microorganisms for each segmented object; Integrate all shape features, size features and color distribution features to obtain the comprehensive type characteristics of the microorganism , the expression is: ; in, Represents shape characteristics, Indicates size characteristics, Indicates the color distribution characteristics; The key step S4 of the present invention uses image processing algorithms to extract the type features of different microorganisms from multidimensional data sets. This design not only integrates traditional edge detection technology, but also combines morphological operations, adaptive feature enhancement, and multi-feature integration methods to form a multi-level feature extraction framework. This comprehensive strategy aims to fully capture the structural and appearance characteristics of microorganisms, providing a rich and accurate source of information for subsequent classification; The key step S4 solves the problems of low feature discrimination and insufficient integrity in the existing technology by performing multi-level feature extraction on multidimensional data sets, and significantly improves the accuracy and reliability of microbial classification through a series of innovative means.
[0027] S5: Use deep learning algorithms to build a microbial classification model, use type features to input the microbial classification model, distinguish different microbial species, and output the microbial species; Convolutional neural network (CNN) was selected as the basic architecture of the microbial classification model; The basic architecture of the microbial classification model includes multiple convolutional layers, activation function ReLU, pooling layers, and fully connected layers; Then, a branch for location prediction is added before the last layer, which predicts the location of each detected microbial sample through a regression method; The last layer is the Softmax layer, which is used to output the probability distribution of microbial species. The expression is: ; in, Indicates the prediction The probability of a microbial species, An index variable representing the type of microorganism, represents the activation function, Represents a fully connected layer The weight matrix of represents the bias term of the fully connected layer; The predicted category is the category with the highest probability, and the expression is: ; in, indicates the predicted microbial species, Indicates finding the maximum value; The value range of is [0, 1], which represents the probability of each microbial species. The larger the value of , the higher the predicted probability of the category; The key step S5 of the present invention utilizes a deep learning algorithm to construct a microbial classification model and introduces a branch for position prediction. This design idea is based on the powerful representation ability of the convolutional neural network (CNN) and the accuracy of the regression method, and aims to achieve high-precision classification at the same time. CNN is selected as the basic architecture because it can automatically learn complex patterns in images and is particularly suitable for processing microbial type features in multidimensional data sets. Through the combination of multiple convolutional layers, activation functions ReLU, pooling layers and fully connected layers, CNN can effectively extract and compress image features, providing a solid foundation for classification.
[0028] S6: Compare the output microbial species with known microbial samples to verify the accuracy of the microbial classification model, and adjust the microbial classification model parameters according to the verification results; Collect a large number of historical microbial samples and each sample has a well-labeled real microbial species, and output the predicted microbial species from the microbial classification model; Compare the predicted microbial species with the actual microbial species and calculate the classification accuracy of the microbial classification model , the calculation formula is: ; in, represents the number of validation samples, Represents the index variable of the validation sample, indicates the predicted microbial species, Indicates the real microbial species, is an indicator function, also known as a feature function. In this context, its role is to check whether the predicted microbial species match the actual microbial species; Set the target accuracy according to actual needs. When the target accuracy is not reached, the learning rate of the microbial classification model is dynamically adjusted, and the expression is: ; in, represents the learning rate of the microbial classification model, represents the initial learning rate, represents the coefficient that controls the decay speed of the learning rate, Indicates the set target accuracy; The value range is [0, ], represents the learning rate, as increase, will gradually decrease, which will help the microbial classification model to converge more; The key step S6 of the present invention introduces a dynamic verification and parameter adjustment mechanism, which aims to accurately evaluate and continuously optimize the performance of the microbial classification model by verifying a large number of historical microbial samples. This design idea is based on feedback control theory. By comparing the prediction results output by the microbial classification model with the known real microbial species, the classification accuracy is calculated, and the target value is set according to actual needs, thereby realizing dynamic adjustment of the model parameters. This method not only ensures the high accuracy of the model, but also improves its generalization ability and stability. The key step S6 solves the problem of unstable classification model performance in existing technologies by verifying a large number of historical microbial samples and dynamically adjusting parameters. It also significantly improves the stability and accuracy of the microbial classification model through a series of innovative means, providing strong support for medical microbiology testing.
[0029] See also Figure 2 This embodiment also provides a digital image target detection system based on medical microbiological testing, including: an acquisition module, a fusion module, a feature extraction module, a prediction module and an optimization module: The acquisition module is responsible for acquiring and preprocessing multispectral images and polarization images of microbial samples; A fusion module is used to fuse the pre-processed multispectral image and polarization image into a multidimensional data set using principal component analysis (PCA) technology; The feature extraction module uses the Canny edge detection algorithm to capture the boundary information of microorganisms, and then improves the feature connectivity and integrity by performing morphological operations on the edge detection results. Then, the enhancement strength is automatically adjusted according to environmental changes to obtain the enhanced image. Finally, the shape, size and color distribution features are calculated using the OpenCV library to form comprehensive type features for classification; The prediction module builds a deep learning classification model, uses the extracted type features as input, distinguishes different microbial species, and outputs the prediction results; The optimization module is responsible for evaluating the performance of the microbial classification model and dynamically adjusting the model parameters according to the verification results to optimize the configuration until the expected detection accuracy requirements are met.
[0030] This embodiment also provides a computer device, which is suitable for the digital image target detection method based on medical microbiology testing, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the digital image target detection method based on medical microbiology testing as proposed in the above embodiment.
[0031] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0032] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the digital image target detection method based on medical microbiology testing as proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0033] In summary, the present invention enhances the contrast and clarity of microbial features through multispectral and polarization image acquisition, and provides high-quality basic data. Then, the adaptive filtering formula is used for denoising and contrast adjustment, which effectively improves the image quality and ensures detail retention, laying the foundation for subsequent analysis. Subsequently, principal component analysis PCA realizes efficient data fusion and dimensionality reduction, reduces redundant information and highlights key features, simplifies the data processing process, and applies Canny edge detection, morphological operations and feature enhancement formulas to finely depict the contours and internal structures of microorganisms, greatly improves the robustness of the classification model, and constructs a classification model based on convolutional neural network CNN to achieve high-precision classification. Finally, the dynamic learning rate is adjusted through the verification process to ensure continuous optimization of the performance of the microbial classification model and achieve a stable and efficient convergence state. In summary, the present invention not only solves the deficiencies in the prior art, but also provides more accurate and reliable technical support for medical microbiology testing.
[0034] Example 2, referring to Table 1, is the second example of the present invention. To further verify the technical solution of the present invention, experimental simulation data of a digital image target detection method based on medical microbiology testing is provided.
[0035] In order to verify the effectiveness and superiority of the present invention in medical microbiological testing, an experiment was designed and implemented to compare the performance of the prior art and the method of combining multispectral and polarization imaging proposed by the present invention in microbiological classification.
[0036] Experimental Preparation First, two common pathogens, Escherichia coli and Staphylococcus aureus, were selected as experimental subjects. These two bacteria are ideal test samples due to their wide distribution and importance. To ensure that the experimental results are representative, 100 samples from different sources were collected, each containing a known species of Escherichia coli or Staphylococcus aureus and strictly disinfected to avoid cross contamination.
[0037] Equipment and Materials Microscope and camera system: A high-resolution digital camera equipped with multiple filter wheels is used to photograph samples at three wavelengths: 450nm, 550nm, and 650nm. At the same time, a rotatable linear polarization filter is installed in front of the camera lens to obtain polarization images.
[0038] Software tools: Use MATLAB and Python to write image processing scripts to implement image denoising, PCA fusion, feature extraction and other functions; use the TensorFlow framework to build a convolutional neural network (CNN) classification model, and call the OpenCV library through the Python interface to perform edge detection and other morphological operations.
[0039] Hardware platform: A workstation with an Intel Core i7 processor, 32GB of memory, and an NVIDIA GeForce RTX3080 GPU to accelerate computationally intensive tasks.
[0040] Experimental steps: 1. Multispectral and polarization image acquisition For each sample, multispectral images were taken at the three wavelengths mentioned above, and a set of polarization images was obtained by rotating the polarization filter. Each set of images was saved in 8-bit grayscale format with a resolution of 2048×2048 pixels.
[0041] 2. Image preprocessing Apply the local mean filter and the adaptive filtering formula: ; The acquired images were denoised and contrast adjusted. This step significantly improved the image quality, especially maintaining detail information in complex backgrounds.
[0042] 3. Data Fusion The preprocessed multispectral image and polarization image are arranged into a data matrix X according to the pixel position, and X is centralized to obtain , and then calculate the covariance matrix , solve the eigenvalue and its corresponding eigenvector. Select the eigenvector corresponding to the first k largest eigenvalues as the principal component. Projecting into a new coordinate system to generate a multidimensional data set after dimensionality reduction .
[0043] 4. Feature extraction The Canny edge detection algorithm is used to highlight the contours of microorganisms, and the opening and closing operations are used to remove noise and fill holes. Then, according to the expression: ; Automatically adjust the enhancement intensity and finally segment different microbial areas. Use the OpenCV library to calculate the shape, size and color distribution features to form comprehensive type features .
[0044] 5. Deep Learning Classification Construct a CNN model consisting of multiple convolutional layers, activation function ReLU, pooling layer and fully connected layer, and add a location prediction branch. During the training process, the probability distribution of microbial species is output through the Softmax layer: ; And determine the final classification result based on the maximum probability .
[0045] 6. Verification and parameter adjustment Collect a large number of historical microbial samples, each of which has a well-labeled real microbial species. Compare the prediction results output by the model with the real labels and calculate the classification accuracy .
[0046] If the classification accuracy does not reach the set target value, the learning rate is adjusted dynamically , to optimize model performance.
[0047] The details are shown in Table 1 below: Table 1 Comparison data between prior art and the present invention Parameter name unit Existing technology (mean ± SD) The present invention (mean ± standard deviation) Data Description Image Contrast - 1.2 ± 0.3 2.5 ± 0.4 The present invention significantly improves image contrast through multi-spectral and polarization imaging, making the characteristics of microorganisms more obvious. Noise suppression effect % 65 ± 5 92 ± 3 The adaptive filtering formula significantly reduces noise interference and improves the accuracy of subsequent analysis. Edge clarity Number of pixels 50 ± 10 85 ± 7 Canny edge detection combined with morphological operations significantly enhances edge clarity and is beneficial for feature extraction. Classification accuracy % 78 ± 4 95 ± 2 The deep learning classification model combined with multi-feature integration significantly improved the classification accuracy, proving the effectiveness of the model. Number of learning rate adjustments Second-rate 10 ± 2 3 ± 1 The dynamic adjustment mechanism reduces the number of unnecessary iterations and speeds up the model convergence. Target detection time Second 15 ± 2 8 ± 1 The overall process of the present invention is optimized, and the time from image acquisition to classification completion is greatly shortened. By analyzing the data in Table 1, it can be seen that the present invention has obvious advantages over the prior art in many aspects: 1. Improve image contrast The image contrast of the prior art is 1.2±0.3 on average, while the present invention reaches 2.5±0.4. This significant improvement is attributed to the combined use of multispectral imaging and polarization imaging, which can select the most suitable wavelength combination according to the absorption and scattering characteristics of different microorganisms, thereby highlighting the characteristics of specific microorganisms. For example, for bacteria with strong scattering characteristics, short wavelengths (such as ultraviolet light) can better penetrate the cell wall and produce high-contrast images; while for fungi that rely on pigment absorption, red or blue light in the visible light can be selected to maximize its visual difference.
[0048] 2. Enhanced noise suppression effect The introduction of the adaptive filtering formula improves the noise suppression effect of the present invention from the existing 65±5% to 92±3%. This improvement not only removes more background noise, but more importantly, it can also maintain detailed information in complex backgrounds, which is crucial for subsequent target detection. Experiments show that even in a cluttered environment, the present invention can still effectively capture the key features of microorganisms.
[0049] 3. Improved edge clarity In terms of edge clarity, the present invention achieves 85±7 pixels, which is much higher than the 50±10 pixels of the prior art. This is mainly due to the combined application of Canny edge detection and morphological operations, as well as the role of adaptive feature enhancement formulas. These processes not only highlight the microbial contours, but also improve feature connectivity and integrity, providing high-quality basic data for subsequent classification.
[0050] 4. Classification accuracy is significantly improved The deep learning classification model combined with multi-feature integration enables the classification accuracy of the present invention to reach (95±2)%, far exceeding the (78±4)% of the prior art. Especially for those microbial species that are difficult to distinguish, the present invention greatly improves the classification accuracy by comprehensively considering multi-dimensional features such as shape, size and color distribution. In addition, the introduction of the position prediction branch further enhances the functional diversity of the model and provides more comprehensive support for practical applications.
[0051] 5. Fewer learning rate adjustments The application of dynamic verification and parameter adjustment mechanism reduces the number of learning rate adjustments from the existing 10±2 times to 3±1 times. This method not only ensures the high accuracy of the model, but also improves its generalization ability and stability, reduces fluctuations during training, and accelerates the convergence of the model.
[0052] 6. Shortened target detection time The optimization of the overall process, including efficient data fusion, fast feature extraction and accurate classification prediction, reduces the target detection time of the present invention from the existing 15±2 seconds to 8±1 seconds. This improvement not only improves work efficiency, but also provides more timely data support for clinical diagnosis and pathological analysis.
[0053] In summary, the present invention solves the problems of low image contrast, poor noise suppression, insufficient edge definition, low classification accuracy, frequent learning rate adjustment, and long target detection time in the prior art through a series of innovative measures. These improvements not only improve the stability and accuracy of the model, but also provide strong technical support for medical microbiological testing, demonstrating the creativity and novelty of the present invention.
[0054] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A digital image target detection method based on medical microbiology testing, characterized by: include: Photograph the microbial sample to obtain multispectral images of different wavelengths, and photograph the same microbial sample by adjusting the incident light angle to obtain a polarized image; De-noise and remove artifacts on the acquired multispectral images and polarization images and adjust the image contrast; The processed multispectral image and polarization image are fused using principal component analysis (PCA) to obtain a multidimensional data set. Image processing algorithms are used to extract the type features of different microorganisms from multidimensional data sets; Use deep learning algorithms to build a microbial classification model, use type features to input the microbial classification model, distinguish different microbial species, and output the microbial species; The output microbial species are compared with known microbial samples to verify the accuracy of the microbial classification model, and the microbial classification model parameters are adjusted based on the verification results.
2. The digital image target detection method based on medical microbiology testing according to claim 1, characterized in that: The microbial sample is photographed to obtain multispectral images of different wavelengths, and the polarization image is obtained by photographing the same microbial sample by adjusting the incident light angle. The specific steps are: Microbial samples were photographed at different wavelengths using a camera equipped with multiple filter wheels to obtain multispectral images; Then, under the same conditions, by placing a linear polarizing filter in front of the camera lens and rotating the filter to change the angle of the incident light, the same microbial sample was photographed to obtain a polarized image.
3. The digital image target detection method based on medical microbiology testing according to claim 2, characterized in that: The denoising and artifact removal processing of the acquired multispectral image and polarization image and the adjustment of the image contrast are specifically performed as follows: The local mean filter is used to calculate the average value of all pixel values in a small neighborhood around each pixel to obtain the average brightness in the local area. ; An adaptive filtering formula is introduced according to the pixel value of the image to deal with the noise and artifacts in multispectral images and polarization images and adjust the image contrast.
4. The digital image target detection method based on medical microbiology testing according to claim 3, characterized in that: The PCA is used to fuse the processed multispectral image and polarization image to obtain a multidimensional data set. The specific steps are as follows: Arrange the preprocessed multispectral image and polarization image into a data matrix X according to the pixel position, where each row represents a pixel point and each column represents a characteristic value at a wavelength; Center the data matrix X and subtract the mean value of each feature from the feature to obtain the centralized data matrix ; Calculate the centralized data matrix The covariance matrix of ; Covariance matrix is a symmetric matrix, by solving the covariance matrix , and obtain a set of eigenvalues ,in, represents the eigenvalue, Represents the covariance matrix Dimensions; For each eigenvalue, by solving the linear equation system Get the corresponding feature vector ,in, represents the identity matrix, index variable representing the eigenvalue, Indicates eigenvalues, Indicates The eigenvectors corresponding to the eigenvalues; Sort by eigenvalue in descending order and select the first The eigenvector corresponding to the largest eigenvalue is taken as the principal component; The centralized data matrix Projecting into a new coordinate system consisting of the selected principal components to obtain a multidimensional data set with reduced dimensionality .
5. The digital image target detection method based on medical microbiology testing according to claim 4, characterized in that: The specific steps of extracting the type features of different microorganisms from the multidimensional data set using an image processing algorithm are as follows: Apply Canny edge detection algorithm to the fused data set Processing is performed to highlight the outlines of microorganisms; Perform opening and closing operations on the edge detection results to remove noise and fill the existing holes; Enhance the microbial features and automatically adjust the enhancement intensity according to the changes in the surrounding environment of each pixel to obtain an enhanced image ; according to Segment the enhanced image into different regions, each region corresponding to a microbial sample; The OpenCV library is used to calculate the shape, size, and color distribution characteristics of the microorganisms for each segmented object; Integrate all shape features, size features and color distribution features to obtain the comprehensive type characteristics of the microorganism .
6. The digital image target detection method based on medical microbiology testing according to claim 5, characterized in that: The microbial classification model is constructed by using a deep learning algorithm, and type features are used to input the microbial classification model, distinguish different microbial species, and output the microbial species. The specific steps are as follows: Convolutional neural network (CNN) was selected as the basic architecture of the microbial classification model; The basic architecture of the microbial classification model includes multiple convolutional layers, activation function ReLU, pooling layer, fully connected layer and Softmax layer; Then, a branch for location prediction is added before the last layer, which predicts the location of each detected microbial sample through a regression method; The last layer is the Softmax layer, which is used to output the probability distribution of microbial species; The predicted category is the category with the highest probability.
7. The digital image target detection method based on medical microbiology testing according to claim 6, characterized in that: The output microbial species are compared with known microbial samples to verify the accuracy of the microbial classification model, and the microbial classification model parameters are adjusted according to the verification results. The specific steps are as follows: Collect a large number of historical microbial samples and each sample has a well-labeled real microbial species, and output the predicted microbial species from the microbial classification model; Compare the predicted microbial species with the actual microbial species and calculate the classification accuracy of the microbial classification model ; Set the target accuracy according to actual needs. When the target accuracy is not reached, the learning rate of the microbial classification model is dynamically adjusted.
8. A digital image target detection system based on medical microbiology testing, based on the digital image target detection method based on medical microbiology testing according to any one of claims 1 to 7, characterized in that: Including acquisition module, fusion module, feature extraction module, prediction module and optimization module: The acquisition module is responsible for acquiring and preprocessing multispectral images and polarization images of microbial samples; The fusion module is used to fuse the pre-processed multispectral image and polarization image into a multidimensional data set by using principal component analysis (PCA) technology; The feature extraction module uses the Canny edge detection algorithm to capture the boundary information of microorganisms, and then improves the feature connectivity and integrity by performing morphological operations on the edge detection results, and then automatically adjusts the enhancement strength according to environmental changes to obtain an enhanced image. Finally, the shape, size and color distribution features are calculated using the OpenCV library to form a comprehensive type feature for classification; The prediction module constructs a deep learning classification model, uses the extracted type features as input, distinguishes different types of microorganisms, and outputs prediction results; The optimization module is responsible for evaluating the performance of the microbial classification model and dynamically adjusting the model parameters according to the verification results to optimize the configuration until the expected detection accuracy requirements are met.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the digital image target detection method based on medical microbiology testing according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the digital image target detection method based on medical microbiology testing according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Interferometric phase optimization method based on adaptive space-time filtering fusion
CN114881081A
Image processing method, device and equipment, readable storage medium and program product
CN115035004A
Operation quality control system and method of grain combine harvester
CN116458326A
Microorganism classification and identification method and system based on computer vision
CN116843955A
Microorganism laboratory culture bacterial colony identification method and system and electronic equipment
CN117746423A
Cited By
Dynamic microbial recognition statistical method and system based on microbial population analyzer
CN120279553A
Method and equipment for intelligently judging microorganism content of dairy product based on multispectral fusion technology
CN121053648A