A method and system for analyzing Helicobacter pylori bacterial culture images

The method and system automate Helicobacter pylori bacterial image analysis using machine vision, addressing human intervention issues with improved efficiency and reliability.

CN118172608BInactive Publication Date: 2024-12-13QINGDAO CENT HOSPITAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410441817.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing methods for analyzing Helicobacter pylori bacterial images rely on human intervention, leading to unstable and inconsistent results and prolonged analysis times.

Method used

A method and system for analyzing Helicobacter pylori bacterial culture images using machine vision technology, involving image collection, adjustment, bacteria positioning, feature extraction, and classification, utilizing high-definition microscopy, edge detection, multi-level color space conversion, and machine learning algorithms.

Benefits of technology

Automates the analysis process, reducing subjective bias and labor costs while significantly shortening analysis time and improving efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118172608B_ABST
    Figure CN118172608B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of digital image processing, and in particular to a method and system for analyzing Helicobacter pylori bacterial culture images. The method comprises the following steps: acquiring Helicobacter pylori culture images through a high-definition microscopic image collector to obtain Helicobacter pylori culture image data; adjusting culture medium parameters of the Helicobacter pylori culture image data to obtain Helicobacter pylori culture image adjustment data; performing bacterial positioning on the Helicobacter pylori culture image adjustment data to obtain bacterial positioning data; performing feature extraction on the Helicobacter pylori culture image adjustment data according to the bacterial positioning data to obtain Helicobacter pylori culture image feature data; classifying and identifying the Helicobacter pylori culture image feature data to obtain Helicobacter pylori identification data, so as to perform Helicobacter pylori bacterial culture image analysis operations. The present invention can accurately describe image information and improve the accuracy of analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital image processing, and in particular to a method and system for analyzing Helicobacter pylori bacterial culture images. Background Art

[0002] Bacterial culture image analysis method refers to the use of human intervention or biomedical engineering to perform bacterial culture image analysis operations. This analysis method and method often rely on human judgment and the duration of biological reactions. The former has the risk of unstable and inconsistent results, while the latter causes the analysis method to take too long.

[0003] Machine vision is a technology and method that uses computers and corresponding algorithms to simulate the process of human vision, enabling computers to understand, analyze and interpret digital images or videos. Its goal is to enable computers to obtain a high-level understanding so that they can automatically process and understand visual data, just like the human visual system. How to combine the Helicobacter pylori bacterial culture image analysis method with machine vision technology has become a problem. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a Helicobacter pylori bacterial culture image analysis method and system to solve at least one of the above technical problems.

[0005] The present application provides a method for analyzing Helicobacter pylori bacterial culture images, comprising the following steps:

[0006] Step S1: collecting Helicobacter pylori culture images by a high-definition microscopic image collector to obtain Helicobacter pylori culture image data;

[0007] Step S2: adjusting culture medium parameters of Helicobacter pylori culture image data to obtain Helicobacter pylori culture image adjustment data;

[0008] Step S3: performing bacteria positioning on the Helicobacter pylori culture image adjustment data to obtain bacteria positioning data;

[0009] Step S4: extracting features from the Helicobacter pylori culture image adjustment data according to the bacteria positioning data to obtain Helicobacter pylori culture image feature data;

[0010] Step S5: classify and identify the Helicobacter pylori culture image feature data to obtain Helicobacter pylori identification data for performing Helicobacter pylori bacterial culture image analysis operations.

[0011] In the present invention, the high-definition microscopic image collected by step S1, combined with the culture medium parameter adjustment in step S2 and the bacteria positioning in step S3, can effectively obtain Helicobacter pylori culture image data and accurately locate the position of Helicobacter pylori. In traditional culture image analysis, professionals are often required to manually observe and analyze images, which is prone to subjective judgment bias. The present invention can automatically extract various feature information from the image, so that relevant practitioners can more clearly see the distribution of bacteria on the culture medium. Traditional analysis methods require practitioners / users to spend a lot of time and energy to observe and analyze images, and are inefficient. The processing of the present invention can greatly shorten the analysis time and reduce labor costs. This is like introducing a "machine assistant" that can quickly and accurately complete a large amount of image processing work, freeing up relevant manual workers. The present invention realizes automated analysis and recognition of images, greatly improving the efficiency and reliability of analysis.

[0012] Preferably, step S1 specifically includes:

[0013] Step S11: collecting data of the bacterial culture medium through a high-definition microscopic image collector and converting the digital image to obtain bacterial culture medium image data;

[0014] Step S12: performing edge detection on the bacterial culture medium image data to obtain image edge detection data;

[0015] Step S13: performing image segmentation on the bacterial culture medium image data according to the image edge detection data to obtain bacterial culture medium image segmentation data;

[0016] Step S14: performing multi-level color space conversion according to the bacterial culture medium image segmentation data to obtain multi-level color space conversion data;

[0017] Step S15: merging the multi-level color space conversion data and the bacterial culture medium image data to obtain Helicobacter pylori culture image data.

[0018] In the present invention, the image data of the bacterial culture medium is obtained by a high-definition microscopic image collector, and digital image conversion is performed to convert the image data into digital form, providing a data basis for subsequent analysis and processing of the image. Edge detection of the bacterial culture medium image can effectively extract the edge information of the object in the image and help segment the bacteria from the background. Image segmentation is performed based on the edge detection data to segment the image into different regions, which helps to separate the bacteria from the background and provide a clear target area. Multi-level color space conversion can extract information from different color channels in the image, thereby increasing the ability to describe the morphology and structure of the bacteria and helping to analyze the characteristics of the bacteria. By merging the multi-level color space conversion data with the original bacterial culture medium image data, information at different levels can be integrated together, thereby improving the comprehensive analysis capability of Helicobacter pylori and helping to understand the morphological characteristics and distribution of Helicobacter pylori.

[0019] Preferably, the multi-level color space conversion data includes nonlinear color space conversion data and multi-channel conversion fusion data, and step S14 is specifically as follows:

[0020] Step S141: performing color complexity calculation on the bacterial culture medium image region data in the bacterial culture medium image segmentation data to obtain bacterial culture medium color complexity data;

[0021] Step S142: determining whether the color complexity data of the bacterial culture medium is greater than or equal to a preset color complexity threshold data;

[0022] Step S143: when it is determined that the bacterial culture medium color complexity data is greater than or equal to the preset color complexity threshold data, a nonlinear color space conversion is performed on the bacterial culture medium image segmentation data to obtain nonlinear color space conversion data;

[0023] Step S144: when it is determined that the color complexity data of the bacterial culture medium is less than the preset color complexity threshold data, color gamut conversion is performed on the bacterial culture medium image segmentation data to obtain bacterial culture medium image color gamut conversion data;

[0024] Step S145: performing Lad color conversion on the bacterial culture medium image segmentation data to obtain Lad color conversion data of the bacterial culture medium image;

[0025] Step S146: performing multi-channel conversion fusion on the bacterial culture medium image segmentation data, the bacterial culture medium image color gamut conversion data and the bacterial culture medium image Lad color conversion data to obtain multi-channel conversion fusion data.

[0026] In the present invention, by calculating the color complexity of the bacterial culture medium image area, the diversity and richness of the colors in the image can be evaluated, which helps to determine whether nonlinear color space conversion is needed. According to the preset color complexity threshold, the color complexity data is judged to determine whether nonlinear color space conversion is needed, and the color space conversion strategy is dynamically adjusted according to the characteristics of the image, thereby improving the intelligence and adaptability of image processing. For image areas with high color complexity, the nonlinear color space conversion technology can better retain the color details and richness of the image, which helps to improve the color expression and authenticity of the image. For image areas with low color complexity, the color gamut conversion technology can simplify the color structure of the image, reduce the number and range of colors, and help to improve the clarity and contrast of the image. Lad color conversion is a transformation method based on Lab color space, which can keep the color information of the image unchanged, while enhancing the contrast and color saturation of the image, which helps to highlight the characteristics of the bacterial culture medium. Multi-channel fusion of different color space conversion results can make full use of the information of each color channel, improve the expression and richness of the image, and help to describe the morphology and structure of the bacterial culture medium.

[0027] Preferably, step S143 is specifically:

[0028] When it is determined that the bacterial culture medium color complexity data is greater than or equal to the preset color complexity threshold data, nonlinear mapping curve data is generated according to the bacterial culture medium color complexity data;

[0029] The bacterial culture medium image region data corresponding to the bacterial culture medium color complexity data is converted into a color space according to the nonlinear mapping curve data to obtain nonlinear color space conversion data.

[0030] In the present invention, by generating nonlinear mapping curve data according to the color complexity data of the bacterial culture medium, the color space conversion method can be dynamically adjusted according to the specific color characteristics of the image, so as to better retain the color details and richness in the image, and improve the accuracy and adaptability of image processing. According to the generated nonlinear mapping curve data, the color space conversion of the bacterial culture medium image area data can effectively adjust the color distribution and hue of the image, making it more suitable for subsequent analysis and recognition. The present invention can highlight the characteristics of the bacterial culture medium, improve the clarity and contrast of the image, and facilitate the recognition and analysis of bacteria.

[0031] Preferably, step S2 specifically includes:

[0032] Step S21: performing image parameter analysis on the Helicobacter pylori culture image data to obtain image parameter analysis data;

[0033] Step S22: performing histogram equalization on the Helicobacter pylori culture image data according to the image parameter analysis data to obtain image grayscale adjustment data;

[0034] Step S23: performing smoothing processing on the image grayscale adjustment data to obtain image smoothing processing data;

[0035] Step S24: performing color adjustment on the image smoothing data according to the image parameter analysis data to obtain image color adjustment data;

[0036] Step S25: performing morphological calculation on the image color adjustment data to obtain Helicobacter pylori culture image adjustment data.

[0037] In the present invention, by performing image parameter analysis on Helicobacter pylori culture image data, the characteristics and attributes of the image, such as brightness, contrast, color distribution, etc., can be deeply understood. Performing histogram equalization on the image can enhance the contrast and clarity of the image, making the image more vivid and clear, helping to highlight the characteristics and details of Helicobacter pylori, and improving the visual effect of the image. Smoothing can remove noise and unnecessary details in the image, making the image smoother and continuous, helping to reduce interference and errors in subsequent processing, and improving the stability and reliability of image processing. Performing color adjustment on the image according to the image parameter analysis data can optimize the color performance of the image, making it more real and natural, helping to improve the observer's cognition and understanding of the image, so as to better analyze the morphology and characteristics of Helicobacter pylori. Through morphological calculation, morphological operations can be performed on the image, such as corrosion, expansion, etc., which can adjust the morphological structure of the image, highlight or weaken specific areas in the image, help to better highlight the morphological characteristics of Helicobacter pylori, and improve the accuracy and efficiency of image analysis.

[0038] Preferably, step S25 is specifically:

[0039] Using a preset bacterial image morphology adjustment parameter recognition model to recognize the image color adjustment data, and obtaining the image morphology adjustment parameter data;

[0040] Performing morphological calculation on the image color adjustment data according to the image morphology adjustment parameter data to obtain Helicobacter pylori culture image adjustment data;

[0041] The steps of constructing the preset bacterial image morphology adjustment parameter recognition model include the following steps:

[0042] Obtain historical cell culture image data and historical morphological description data;

[0043] Generate morphology adjustment parameters according to historical morphology description data to obtain historical morphology adjustment parameter data;

[0044] Perform convolution calculation and self-attention calculation on the historical cell culture image data to obtain the convolution layer data of the historical cell culture image;

[0045] Perform activation layer calculation on the convolution layer data of the historical cell culture image to obtain activation layer data of the historical cell culture image;

[0046] Performing weighted calculation on the convolutional layer data of the historical cell culture images according to the activation layer data of the historical cell culture images to obtain the convolutional layer weighted data of the historical cell culture images;

[0047] Performing pooling layer calculation on the weighted data of the convolution layer of the historical cell culture image to obtain the pooling layer data of the historical cell culture image;

[0048] Performing full connection layer calculation on the pooling layer data of the historical cell culture image to obtain the full connection layer data of the historical cell culture image;

[0049] The model was constructed based on the fully connected layer data of historical cell culture images, and a bacterial image morphology adjustment parameter recognition model was obtained.

[0050] In the present invention, by using a preset bacterial image morphology adjustment parameter recognition model to identify image color adjustment data, the image morphology can be automatically adjusted according to the preset parameter model, the efficiency and accuracy of image processing can be improved, and the need for manual intervention can be reduced. By using historical cell culture image data and corresponding morphological description data, the association between image morphology and description can be established. According to the historical morphological description data, morphological adjustment parameter data is generated to provide training samples and labels for the model. By performing convolution, self-attention, activation, weighting, pooling and other calculations on the historical cell culture image data, the image feature representation is obtained, and a recognition model is constructed to automatically identify suitable morphological adjustment parameters according to the characteristics of the image, so as to realize intelligent adjustment of the image. Compared with traditional convolutional layer calculations, the self-attention calculation introduced in the present invention can better mine the feature information in the historical cell culture images, improve the extraction efficiency and accuracy of image features, and thus have a better effect on image analysis and recognition tasks.

[0051] Preferably, step S3 specifically includes:

[0052] Performing cluster calculation on the Helicobacter pylori culture image adjustment data to obtain Helicobacter pylori culture image cluster data;

[0053] performing edge segmentation on the Helicobacter pylori culture image adjustment data according to the Helicobacter pylori culture image clustering data to obtain the Helicobacter pylori culture image edge segmentation data;

[0054] Perform edge gradient calculation on the edge segmentation data of the Helicobacter pylori culture image to obtain edge gradient data;

[0055] The edge segmentation data of the Helicobacter pylori culture image is screened according to the edge gradient data to obtain the edge screening data of the Helicobacter pylori culture image;

[0056] Perform opening and closing calculation and overlap area screening based on the Helicobacter pylori culture image edge screening data to obtain Helicobacter pylori culture image screening data;

[0057] The positioning data is generated based on the Helicobacter pylori culture image screening data to obtain the bacterial positioning data.

[0058] In the present invention, by clustering calculation of Helicobacter pylori culture image adjustment data, similar pixels in the image can be aggregated together, thereby discovering the potential cluster structure in the image, which is helpful to identify the main area of ​​Helicobacter pylori bacteria and reduce the amount of calculation in the subsequent processing steps. According to the Helicobacter pylori culture image clustering data, edge segmentation can be performed, and the Helicobacter pylori in the image can be effectively separated from the background, and the contour information of Helicobacter pylori can be extracted. By calculating the edge gradient data, the intensity and direction of the Helicobacter pylori edge can be quantified, and the edge information can be further enhanced. According to the edge gradient data, screening can be performed to remove unnecessary edge information in the image, thereby improving the clarity and accuracy of the Helicobacter pylori edge. At the same time, opening and closing calculations and overlapping area screening can further optimize the continuity and integrity of the edge. According to the Helicobacter pylori culture image screening data, positioning data is generated, and the accurate position and morphological characteristics of Helicobacter pylori in the image can be determined.

[0059] Preferably, step S4 is specifically:

[0060] Step S41: extracting bacteria images from Helicobacter pylori culture image adjustment data according to bacteria positioning data to obtain bacteria image data;

[0061] Step S42: performing local binarization calculation on the bacterial image data to obtain local binarization data of the bacterial image;

[0062] Step S43: Calculate the grayscale distribution of the local binary data of the bacterial image to obtain texture feature data of the bacterial image;

[0063] Step S44: performing frequency domain extraction on the bacterial image data to obtain frequency domain feature data of the bacterial image;

[0064] Step S45: integrating the bacterial image frequency domain feature data and the bacterial image texture feature data to obtain Helicobacter pylori culture image feature data.

[0065] According to the present invention, the Helicobacter pylori culture image adjustment data is extracted according to the bacteria positioning data, so that Helicobacter pylori can be separated from the whole image, reducing the scope of subsequent processing, which is conducive to improving processing efficiency and accuracy. By performing local binarization calculation on the bacteria image data, the outline and detail features of the bacteria can be better highlighted, the contrast of the image can be enhanced, and the subsequent extraction of texture features and frequency domain features can be facilitated. Grayscale distribution calculation is performed on the local binarization data of the bacteria image, and the texture features of the bacteria image can be obtained, such as information such as the thickness and density of the texture, which are of great significance for the identification and classification of Helicobacter pylori. By performing frequency domain extraction on the bacteria image data, the frequency domain features of the bacteria image can be obtained, such as information such as spectrum distribution and frequency components, which can provide important information related to the morphology and structure of the bacteria, and are conducive to the feature extraction and classification of Helicobacter pylori. The frequency domain feature data of the bacteria image and the texture feature data are integrated to obtain the comprehensive feature data of the Helicobacter pylori culture image, which is conducive to improving the accurate identification and analysis of Helicobacter pylori.

[0066] Preferably, the bacterial image frequency domain feature data includes the bacterial image Gaussian frequency domain feature data and the bacterial image local frequency domain feature data, and step S44 is specifically as follows:

[0067] The bacterial image data is subjected to frequency domain extraction through a Gaussian filter to obtain Gaussian frequency domain feature data of the bacterial image;

[0068] The bacterial image data is subjected to wavelet transform to obtain the local frequency domain feature data of the bacterial image.

[0069] In the present invention, frequency domain extraction of bacterial image data is performed by using a Gaussian filter, and the change information of different frequencies in the image can be captured, and the Gaussian frequency domain feature data of the bacterial image can be obtained, which can provide the overall frequency domain structure and distribution of the bacterial image, and help to identify the overall features and patterns in the image. Frequency domain extraction of bacterial image data is performed by wavelet transform, and the image can be decomposed into frequency domain components of different scales to obtain local frequency domain feature data of the bacterial image. These data can provide information about the local structure and details of the bacterial image, and help to capture the local features and texture information of the bacteria. Integrating Gaussian frequency domain feature data and local frequency domain feature data into bacterial image feature data can make the feature description more diverse, thereby improving the characterization ability of bacterial images, and helping to improve the accuracy and robustness of feature extraction and classification and recognition of bacteria. Gaussian frequency domain features and local frequency domain features reflect the global and local information of the image, take into account the feature changes of different scales and spatial ranges, help to improve the understanding and analysis ability of bacterial images, and enhance the robustness and reliability of image features.

[0070] Preferably, a Helicobacter pylori bacterial culture image analysis system is used to perform the Helicobacter pylori bacterial culture image analysis method as described above, and the Helicobacter pylori bacterial culture image analysis system comprises:

[0071] A Helicobacter pylori culture image acquisition module is used to acquire Helicobacter pylori culture images through a high-definition microscopic image acquisition device to obtain Helicobacter pylori culture image data;

[0072] A culture medium parameter adjustment module is used to adjust the culture medium parameters of the Helicobacter pylori culture image data to obtain Helicobacter pylori culture image adjustment data;

[0073] A bacteria positioning module is used to perform bacteria positioning on the Helicobacter pylori culture image adjustment data to obtain bacteria positioning data;

[0074] A Helicobacter pylori culture image feature extraction module is used to extract features from Helicobacter pylori culture image adjustment data according to bacteria positioning data to obtain Helicobacter pylori culture image feature data;

[0075] The Helicobacter pylori recognition module is used to classify and recognize the characteristic data of Helicobacter pylori culture images to obtain Helicobacter pylori recognition data for performing Helicobacter pylori bacterial culture image analysis operations.

[0076] The beneficial effect of the present invention is that the present invention can effectively obtain Helicobacter pylori culture image data and accurately locate the position of Helicobacter pylori. In traditional culture image analysis, professionals are often required to manually observe and analyze images, which is prone to subjective judgment bias. The present invention can automatically extract feature information from the image, so that relevant practitioners can more clearly see the distribution of bacteria on the culture medium. The traditional analysis method requires practitioners / users to spend a lot of time and energy to observe and analyze images, which is inefficient. The processing of the present invention can greatly shorten the analysis time and reduce labor costs. This is like introducing a "machine assistant" that can quickly and accurately complete a large amount of image processing work, freeing up relevant manual workers. The present invention realizes automated analysis and recognition of images, greatly improving the efficiency and reliability of analysis. The present invention realizes a refined analysis technology solution from image acquisition to analysis and recognition, improves the efficiency and accuracy of analysis, reduces the interference of human factors, provides more reliable support at the information technology level, and at the same time overcomes the shortcomings of traditional methods in efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting implementations made with reference to the following drawings:

[0078] Figure 1A flowchart showing a method for analyzing Helicobacter pylori bacterial culture images according to an embodiment of the present invention is provided;

[0079] Figure 2 A flowchart showing the steps of a Helicobacter pylori culture image acquisition method according to an embodiment is shown;

[0080] Figure 3 A flowchart showing the steps of a multi-level color space conversion method according to an embodiment is shown;

[0081] Figure 4 A flow chart showing the steps of a method for adjusting parameters of a culture medium for Helicobacter pylori culture images according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0082] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0083] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0084] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0085] See also Figures 1 to 4 The present application provides a method for analyzing Helicobacter pylori bacterial culture images, comprising the following steps:

[0086] Step S1: collecting Helicobacter pylori culture images by a high-definition microscopic image collector to obtain Helicobacter pylori culture image data;

[0087] Specifically, a high-definition microscopic image collector is set up in the laboratory to ensure that it can capture high-quality bacterial culture images. The cultured Helicobacter pylori sample is placed under a microscope and photographed by the microscopic image collector. The collected image data is saved and archived in the corresponding database or electronic database using the corresponding software or equipment.

[0088] Step S2: adjusting culture medium parameters of Helicobacter pylori culture image data to obtain Helicobacter pylori culture image adjustment data;

[0089] Specifically, the collected images are preprocessed using image processing software, including adjusting parameters such as brightness, contrast, and hue to ensure image quality. According to experimental conditions and requirements, the images are further processed by color correction or image noise removal to optimize image quality and clarity.

[0090] Step S3: performing bacteria positioning on the Helicobacter pylori culture image adjustment data to obtain bacteria positioning data;

[0091] Specifically, an edge filter is constructed according to preset edge operator parameters to obtain edge filter data, and the edge filter data is used to perform edge filtering calculation on the Helicobacter pylori culture image adjustment data to obtain edge filtering data; edge gradient calculation is performed according to the edge filtering data to obtain bacterial edge gradient data; and the bacterial edge gradient data is compared with the preset bacterial edge gradient data to obtain bacterial positioning data.

[0092] Step S4: extracting features from the Helicobacter pylori culture image adjustment data according to the bacteria positioning data to obtain Helicobacter pylori culture image feature data;

[0093] Specifically, based on the results of bacterial positioning, image processing technology or deep learning methods are used to extract the morphology, texture, color and other features of Helicobacter pylori bacteria. Various feature descriptors or feature extraction algorithms are used to convert the extracted features into feature vectors or feature maps to represent the feature information of each bacterium.

[0094] Step S5: classify and identify the Helicobacter pylori culture image feature data to obtain Helicobacter pylori identification data for performing Helicobacter pylori bacterial culture image analysis operations.

[0095] Specifically, a machine learning algorithm (such as support vector machine, random forest, etc.) or a deep learning model (such as convolutional neural network) is used to train and classify the extracted feature data. The Helicobacter pylori culture image feature data is divided into a training set and a test set, the classification model is trained with the training set, and the model performance is evaluated with the test set. The new Helicobacter pylori culture image feature data is classified and identified to obtain the Helicobacter pylori identification result, so as to perform the Helicobacter pylori bacterial culture image analysis operation.

[0096] In the present invention, the high-definition microscopic image collected by step S1, combined with the culture medium parameter adjustment in step S2 and the bacteria positioning in step S3, can effectively obtain Helicobacter pylori culture image data and accurately locate the position of Helicobacter pylori. In traditional culture image analysis, professionals are often required to manually observe and analyze images, which is prone to subjective judgment bias. The present invention can automatically extract various feature information from the image, so that relevant practitioners can more clearly see the distribution of bacteria on the culture medium. Traditional analysis methods require practitioners / users to spend a lot of time and energy to observe and analyze images, and are inefficient. The processing of the present invention can greatly shorten the analysis time and reduce labor costs. This is like introducing a "machine assistant" that can quickly and accurately complete a large amount of image processing work, freeing up relevant manual workers. The present invention realizes automated analysis and recognition of images, greatly improving the efficiency and reliability of analysis.

[0097] Preferably, step S1 specifically includes:

[0098] Step S11: collecting data of the bacterial culture medium through a high-definition microscopic image collector and converting the digital image to obtain bacterial culture medium image data;

[0099] Specifically, a high-definition microscope device is used to place the bacterial culture medium under the microscope. Microscope parameters are adjusted to obtain a clear image, and the image is captured by a high-definition microscopic image collector. The captured image is digitized and converted into a digital image data format that can be recognized by a computer.

[0100] Step S12: performing edge detection on the bacterial culture medium image data to obtain image edge detection data;

[0101] Specifically, an edge detection algorithm (such as Sobel, Canny, etc.) is used to process the bacterial culture medium image. The edge information in the image is detected according to the rate of change of the pixel value in the image. The edge detection result is converted into a binary image, in which the edge position is white and the other areas are black.

[0102] Step S13: performing image segmentation on the bacterial culture medium image data according to the image edge detection data to obtain bacterial culture medium image segmentation data;

[0103] Specifically, based on the edge detection result, a segmentation algorithm (such as threshold segmentation, region growing, etc.) is used to segment the image into different regions. The bacterial region in the bacterial culture medium image is separated from the background to obtain bacterial culture medium image segmentation data.

[0104] Step S14: performing multi-level color space conversion according to the bacterial culture medium image segmentation data to obtain multi-level color space conversion data;

[0105] Specifically, the segmented bacterial culture image data is converted to different color spaces (such as RGB, HSV, Lab, etc.). Each color channel is processed, such as enhancing contrast, adjusting brightness, etc., to obtain richer color information. Combining information from different color spaces, multi-level color space conversion data is generated.

[0106] Step S15: merging the multi-level color space conversion data and the bacterial culture medium image data to obtain Helicobacter pylori culture image data.

[0107] Specifically, the data after multi-level color space conversion is merged with the original bacterial culture medium image data to ensure that the merged data can retain information such as the location, morphology and color of the bacteria, and obtain complete Helicobacter pylori culture image data.

[0108] In the present invention, the image data of the bacterial culture medium is obtained by a high-definition microscopic image collector, and digital image conversion is performed to convert the image data into digital form, providing a data basis for subsequent analysis and processing of the image. Edge detection of the bacterial culture medium image can effectively extract the edge information of the object in the image and help segment the bacteria from the background. Image segmentation is performed based on the edge detection data to segment the image into different regions, which helps to separate the bacteria from the background and provide a clear target area. Multi-level color space conversion can extract information from different color channels in the image, thereby increasing the ability to describe the morphology and structure of the bacteria and helping to analyze the characteristics of the bacteria. By merging the multi-level color space conversion data with the original bacterial culture medium image data, information at different levels can be integrated together, thereby improving the comprehensive analysis capability of Helicobacter pylori and helping to understand the morphological characteristics and distribution of Helicobacter pylori.

[0109] Preferably, the multi-level color space conversion data includes nonlinear color space conversion data and multi-channel conversion fusion data, and step S14 is specifically as follows:

[0110] Step S141: performing color complexity calculation on the bacterial culture medium image region data in the bacterial culture medium image segmentation data to obtain bacterial culture medium color complexity data;

[0111] Specifically, the segmented regions of the bacterial culture medium image are traversed, and the pixel colors in each region are statistically analyzed. A certain measurement method (such as the variance of the color histogram, entropy, etc.) is used to measure the color complexity. The calculated color complexity data is used as one of the features of the bacterial culture medium.

[0112] Step S142: determining whether the color complexity data of the bacterial culture medium is greater than or equal to a preset color complexity threshold data;

[0113] Specifically, a threshold is set as a limit for judging the color complexity of the bacterial culture medium, and the calculated color complexity data are compared to determine whether it exceeds or reaches the set threshold.

[0114] Step S143: when it is determined that the bacterial culture medium color complexity data is greater than or equal to the preset color complexity threshold data, a nonlinear color space conversion is performed on the bacterial culture medium image segmentation data to obtain nonlinear color space conversion data;

[0115] Specifically, the bacterial culture medium image segmentation data is processed using a nonlinear color space conversion method (such as Log, Gamma correction, etc.), and the color value of the pixel is adjusted to enhance the contrast and brightness of the bacterial culture medium image, making the bacteria easier to distinguish.

[0116] Step S144: when it is determined that the color complexity data of the bacterial culture medium is less than the preset color complexity threshold data, color gamut conversion is performed on the bacterial culture medium image segmentation data to obtain bacterial culture medium image color gamut conversion data;

[0117] Specifically, the color space conversion method (such as RGB to HSV conversion) is applied to process the bacterial culture image segmentation data. The values ​​of the color channels are adjusted to change the hue and saturation of the bacterial culture image in order to better highlight the characteristics of the bacteria. The RGB (red, green, blue) color space is one of the most common color representation methods. It uses three components to describe the colors in the image, representing the intensity or brightness of red, green, and blue respectively. The RGB color space is commonly used in devices such as color displays and digital cameras. The HSV (hue, saturation, value) color space uses a more intuitive way to describe color, dividing the attributes of color into three dimensions: hue, saturation, and value. Hue represents the basic color attribute of color, saturation represents the purity or vividness of color, and value represents the brightness or grayscale of color.

[0118] Specifically, given an RGB color, where R, G, and B represent the pixel values ​​of the red, green, and blue channels, respectively, the value range is usually 0 to 255. Calculate the maximum value max(R, G, B) and the minimum value min(R, G, B) in the RGB color. If the maximum value is equal to the minimum value, that is, max(R, G, B) = min(R, G, B), it means that the RGB color is grayscale and the hue cannot be defined. Usually, the hue is set to 0. Otherwise, calculate the hue based on the components in RGB: If the maximum value is red (that is, R is the maximum value), the hue If the maximum value is green (i.e. G is the maximum value), the hue If the maximum value is blue (i.e. B is the maximum value), Where H is the hue data, R is the red channel pixel value data, G is the green channel pixel value data, and B is the blue channel pixel value data. According to the calculation results, if H<0, add 360 to ensure that the hue value range is between 0 and 360 degrees. If the maximum value is 0, the saturation is 0, otherwise, the saturation is Brightness V=max(R,G,B).

[0119] Step S145: performing Lad color conversion on the bacterial culture medium image segmentation data to obtain Lad color conversion data of the bacterial culture medium image;

[0120] Specifically, the Lad color model is used to transform the bacterial culture image segmentation data. The values ​​of the L, a, and b channels are adjusted to change the color appearance of the bacterial culture image, making it more suitable for subsequent analysis and processing. In the Lad color model, the color of each pixel is represented by three components, namely: brightness (L), red-green color (a), and blue-yellow color (b). These three components describe the brightness of the color and the two opposing dimensions of the color, respectively. Brightness (L) indicates the brightness of the color, red-green color (a) indicates the position of the color between red and green, positive values ​​indicate reddish, negative values ​​indicate greenish, and blue-yellow color (b) indicates the position of the color between blue and yellow, positive values ​​indicate yellowish, and negative values ​​indicate bluish.

[0121] Specifically, the brightness component indicates the brightness of the color, and its value range is 0 to 100. In the Lad color model, the calculation formula for brightness is a linear transformation in the RGB color space: L = 0.299 × R + 0.587 × G + 0.114 × B, where L is the brightness data, R is the red channel pixel value data, G is the green channel pixel value data, and B is the blue channel pixel value data. The red-green color component indicates the position of the color between red and green. A positive value indicates a reddish color, and a negative value indicates a greenish color. The calculation formula is: a is the red-green color component data. The blue-yellow color component indicates the position of the color between blue and yellow. Positive values ​​indicate yellowish color and negative values ​​indicate bluish color. The calculation formula is: b is the blue-yellow component data.

[0122] Step S146: performing multi-channel conversion fusion on the bacterial culture medium image segmentation data, the bacterial culture medium image color gamut conversion data and the bacterial culture medium image Lad color conversion data to obtain multi-channel conversion fusion data.

[0123] Specifically, the data converted in different color spaces are merged into a multi-channel image, and a weighted average or fusion method (such as a fusion method based on deep learning) is used to obtain the final multi-channel converted fusion data.

[0124] Specifically, there are three sets of data, namely, bacterial culture image segmentation data (Segmentation), bacterial culture image color space conversion data (ColorSpaceConversion), and bacterial culture image Lad color conversion data (LadConversion). Each set of data is a two-dimensional matrix, represented by M S , M C , M L , each data is an m×n matrix. Combining these three sets of data into a multi-channel image can get a m×n×3 three-dimensional matrix, represented as M N The merging process can stack each set of data as a channel, such as M N (x,y,1)=M S (x,y),M N (x,y,2)=M C (x,y),M N (x,y,3)=M L (x,y),M N (x,y,1) is M N The first channel data in M N (x,y,2) is M N The second channel data in M N (x,y,2) is M N The third channel data in the matrix, x is the matrix horizontal coordinate data, y is the matrix vertical coordinate data. Or use weighted average, that is, weighted average of the pixel values ​​of each channel, and adjust the weight as needed to achieve the best effect, such as using the same weight to fuse the three channels. x is the matrix horizontal coordinate data, and y is the matrix vertical coordinate data.

[0125] In the present invention, by calculating the color complexity of the bacterial culture medium image area, the diversity and richness of the colors in the image can be evaluated, which helps to determine whether nonlinear color space conversion is needed. According to the preset color complexity threshold, the color complexity data is judged to determine whether nonlinear color space conversion is needed, and the color space conversion strategy is dynamically adjusted according to the characteristics of the image, thereby improving the intelligence and adaptability of image processing. For image areas with high color complexity, the nonlinear color space conversion technology can better retain the color details and richness of the image, which helps to improve the color expression and authenticity of the image. For image areas with low color complexity, the color gamut conversion technology can simplify the color structure of the image, reduce the number and range of colors, and help to improve the clarity and contrast of the image. Lad color conversion is a transformation method based on Lab color space, which can keep the color information of the image unchanged, while enhancing the contrast and color saturation of the image, which helps to highlight the characteristics of the bacterial culture medium. Multi-channel fusion of different color space conversion results can make full use of the information of each color channel, improve the expression and richness of the image, and help to describe the morphology and structure of the bacterial culture medium.

[0126] Preferably, step S143 is specifically:

[0127] When it is determined that the bacterial culture medium color complexity data is greater than or equal to the preset color complexity threshold data, nonlinear mapping curve data is generated according to the bacterial culture medium color complexity data;

[0128] Specifically, a color complexity threshold is set, for example, an appropriate threshold is determined based on prior knowledge or sample analysis to determine whether the color complexity is higher than expected. The color complexity of the bacterial culture medium image is calculated, for example, by counting the number of different colors in the image, the degree of color change, etc. to obtain color complexity data. The calculated color complexity data is compared with a preset threshold to determine whether the conditions for nonlinear color space conversion are met. Based on the color complexity data, an appropriate nonlinear mapping function is designed or selected, such as a logarithmic function, an exponential function, an S-curve function, etc. According to the selected nonlinear mapping function, the color complexity data is mapped to the corresponding nonlinear mapping curve data for subsequent color space conversion.

[0129] The bacterial culture medium image region data corresponding to the bacterial culture medium color complexity data is converted into a color space according to the nonlinear mapping curve data to obtain nonlinear color space conversion data.

[0130] Specifically, the color data of the bacterial culture medium image area is converted through a nonlinear mapping curve to adjust the color distribution and enhance the image's contrast, brightness or color saturation and other features. The color value of each pixel can be adjusted according to the mapping curve in a pixel-by-pixel manner, or the image can be divided into regions for processing to achieve a more sophisticated color space conversion.

[0131] In the present invention, by generating nonlinear mapping curve data according to the color complexity data of the bacterial culture medium, the color space conversion method can be dynamically adjusted according to the specific color characteristics of the image, so as to better retain the color details and richness in the image, and improve the accuracy and adaptability of image processing. According to the generated nonlinear mapping curve data, the color space conversion of the bacterial culture medium image area data can effectively adjust the color distribution and hue of the image, making it more suitable for subsequent analysis and recognition. The present invention can highlight the characteristics of the bacterial culture medium, improve the clarity and contrast of the image, and facilitate the recognition and analysis of bacteria.

[0132] Preferably, step S2 specifically includes:

[0133] Step S21: performing image parameter analysis on the Helicobacter pylori culture image data to obtain image parameter analysis data;

[0134] Specifically, the image is analyzed to extract statistical features of the image, such as average brightness, contrast, color distribution, etc. Parameters such as the histogram, grayscale mean, and grayscale variance of the image can be calculated to describe the overall characteristics of the image.

[0135] Specifically, the histogram of the image is calculated, that is, the pixel values ​​of the image are counted according to the brightness level. The histogram can reflect the distribution of pixels of different brightness levels in the image. The histogram can be calculated using the functions provided by the image processing library (such as OpenCV). Calculating the grayscale mean and grayscale variance of an image is an image parameter analysis method. The grayscale mean represents the overall brightness level of the image, while the grayscale variance reflects the contrast of the image. The grayscale mean can be calculated by averaging all the pixel values ​​of the image. The grayscale variance is the sum of the squares of the difference between each pixel value and the mean and then taking the average.

[0136] Specifically, use an image processing library or programming language (such as OpenCV and Matplotlib in Python) to load image data. Preprocess the image, such as converting it to a grayscale image (if it is not a grayscale image). To calculate the histogram, you can use the cv2.calcHist function provided by OpenCV. To calculate the grayscale mean and variance, you can use the NumPy library to operate on the image array. If it is a color image, you can calculate the mean and variance of the RGB channels separately.

[0137] Step S22: performing histogram equalization on the Helicobacter pylori culture image data according to the image parameter analysis data to obtain image grayscale adjustment data;

[0138] Specifically, according to the grayscale distribution characteristics of the image, the histogram equalization algorithm is used to adjust the grayscale of the image to enhance the contrast and brightness of the image. The histogram equalization process includes calculating the cumulative distribution function of the image and mapping the pixel values ​​according to the cumulative distribution function to achieve grayscale equalization.

[0139] Specifically, based on the calculated grayscale histogram, the cumulative distribution function (CDF) is calculated. CDF represents the cumulative distribution of pixels of each grayscale level in the entire image. The calculated CDF is used to map the grayscale values ​​of the original image to achieve histogram equalization. The mapping rule is to map the original grayscale level to the new grayscale level so that the cumulative distribution of the image is more uniform. import cv2; import numpy as np # read the original image image = cv2.imread('original_image.jpg', cv2.IMREAD_GRAYSCALE) # calculate the histogram of the original image hist, bins = np.hi stogram(image.flatten(), 256, [0, 256]) # calculate the cumulative distribution function (CDF) cdf = hist.cumsum() # normalize the CDF cdf_normalized = cdf * hist.max() / cdf.max() # use linear interpolation to calculate the mapping table cdf_m = np.ma.masked_equal(cdf, 0); cdf_m = (cdf_m-cdf_m.min()) * 255 / (cdf_m.ma x()-cdf_m.min()); cdf = np.ma.filled(cdf_m,0).astype('uint8'); #Apply the mapped pixel values ​​to the original image equalized_image = cdf[image] #Display the original image and the equalized image cv2.ims how('Original Image',image); cv2.imshow('Equalized Image',equalized_image); cv2.waitKey(0); cv2.destroyAllWindows(). By performing CDF mapping on the grayscale value of each pixel, the equalized image can be obtained.

[0140] Step S23: performing smoothing processing on the image grayscale adjustment data to obtain image smoothing processing data;

[0141] Specifically, an image smoothing filter, such as a Gaussian filter, a median filter, etc., is used to smooth the image and remove noise and unnecessary details in the image.

[0142] Step S24: performing color adjustment on the image smoothing data according to the image parameter analysis data to obtain image color adjustment data;

[0143] Specifically, according to the results of image parameter analysis (collecting color distribution feature data, and performing similarity calculation and confidence calculation based on the color distribution feature data and the preset standard color distribution feature data), the color distribution of the image is adjusted to make the image more consistent with the expected color characteristics. Color balance, color scale adjustment and other technologies can be used to adjust the color of the image to enhance the visual effect of the image. For example, the color intensity of the red, green and blue channels is controlled separately. Increasing the channel gain will enhance the intensity of the corresponding color, while reducing it will weaken it. The parameter value range is between 0.0 and 2.0, 1.0 means unchanged, less than 1.0 means weakened, and greater than 1.0 means enhanced. Control the color shift of the overall image so that the image as a whole tends to warm tones (such as red tones) or cool tones (such as blue tones). This is achieved by increasing or decreasing the values ​​of the red and blue channels. Increasing the value of the red channel will make the image as a whole tend to warm tones, and increasing the value of the blue channel will make the image as a whole tend to cool tones.

[0144] Step S25: performing morphological calculation on the image color adjustment data to obtain Helicobacter pylori culture image adjustment data.

[0145] Specifically, morphological operations such as corrosion, expansion, opening operation, closing operation, etc. are used to perform morphological processing on the image to change the morphological structure and characteristics of the image, reduce the imperfect details caused by the above or highlight the detailed expression of bacteria.

[0146] In the present invention, by performing image parameter analysis on Helicobacter pylori culture image data, the characteristics and attributes of the image, such as brightness, contrast, color distribution, etc., can be deeply understood. Performing histogram equalization on the image can enhance the contrast and clarity of the image, making the image more vivid and clear, helping to highlight the characteristics and details of Helicobacter pylori, and improving the visual effect of the image. Smoothing can remove noise and unnecessary details in the image, making the image smoother and continuous, helping to reduce interference and errors in subsequent processing, and improving the stability and reliability of image processing. Performing color adjustment on the image according to the image parameter analysis data can optimize the color performance of the image, making it more real and natural, helping to improve the observer's cognition and understanding of the image, so as to better analyze the morphology and characteristics of Helicobacter pylori. Through morphological calculation, morphological operations can be performed on the image, such as corrosion, expansion, etc., which can adjust the morphological structure of the image, highlight or weaken specific areas in the image, help to better highlight the morphological characteristics of Helicobacter pylori, and improve the accuracy and efficiency of image analysis.

[0147] Preferably, step S25 is specifically:

[0148] Using a preset bacterial image morphology adjustment parameter recognition model to recognize the image color adjustment data, and obtaining the image morphology adjustment parameter data;

[0149] Specifically, a trained morphology adjustment parameter recognition model, such as a deep learning model, is used to recognize the input image color adjustment data to obtain the morphology adjustment parameter data. The morphology adjustment parameter recognition model can be a model built based on a deep learning architecture such as a convolutional neural network (CNN) or a recurrent neural network (RNN).

[0150] Performing morphological calculation on the image color adjustment data according to the image morphology adjustment parameter data to obtain Helicobacter pylori culture image adjustment data;

[0151] Specifically, according to the morphological adjustment parameter data obtained by recognition, combined with the image color adjustment data, morphological processing is performed on the image using morphological operations (such as corrosion, expansion, opening operation, closing operation, etc.) to achieve the expected adjustment effect. Morphological calculation can adjust parameters according to the morphological adjustment parameter data or apply different morphological operations to obtain the best image adjustment result.

[0152] The steps of constructing the preset bacterial image morphology adjustment parameter recognition model include the following steps:

[0153] Obtain historical cell culture image data and historical morphological description data;

[0154] Specifically, historical cell culture image data and its corresponding morphological description data are obtained, and the morphological description data may include information such as morphological characteristics, size, shape, etc. of the bacteria.

[0155] Generate morphology adjustment parameters according to historical morphology description data to obtain historical morphology adjustment parameter data;

[0156] Specifically, according to the historical morphological description data, based on the rule engine method, historical morphological adjustment parameter data is generated. For example, for the size of bacteria, a rule can be set: if the size of the bacteria exceeds the mean in the historical data, the size adjustment parameter of the bacteria is increased; if the size of the bacteria is less than the mean in the historical data, the size adjustment parameter of the bacteria is decreased. If the shape size exceeds the mean in the historical data, the shape size adjustment parameter is increased; if the shape size is less than the mean in the historical data, the shape size adjustment parameter is decreased. The texture parameters are adjusted according to the complexity of the texture. If the texture complexity is high, the texture parameters are increased to highlight the texture features; if the texture complexity is low, the texture parameters are decreased to reduce the intensity of the texture features. The texture direction is aligned with the expected main direction to highlight or smooth the texture features.

[0157] Perform convolution calculation and self-attention calculation on the historical cell culture image data to obtain the convolution layer data of the historical cell culture image;

[0158] Specifically, a convolutional neural network (CNN) or other deep learning models are constructed to perform feature extraction and learning on the historical cell culture image data to obtain data such as the convolution layer and activation layer of the historical cell culture images.

[0159] Perform activation layer calculation on the convolution layer data of the historical cell culture image to obtain activation layer data of the historical cell culture image;

[0160] Specifically, ReLU (rectified linear unit) is used as the activation function, and its mathematical expression is: For example, for the input convolutional layer data Z, the activation layer data A is calculated as follows: A=ReLU(Z).

[0161] Performing weighted calculation on the convolutional layer data of the historical cell culture images according to the activation layer data of the historical cell culture images to obtain the convolutional layer weighted data of the historical cell culture images;

[0162] Specifically, the activation layer data is weighted and adjusted by multiplying it by a predefined weight parameter. There is a weight matrix W, and the weighted data Z' is calculated as follows: Z ′ =W×A.

[0163] Performing pooling layer calculation on the weighted data of the convolution layer of the historical cell culture image to obtain the pooling layer data of the historical cell culture image;

[0164] Specifically, the weighted data is pooled to reduce the dimension of the data and retain the most important features, including maximum pooling and average pooling. ′ , perform the maximum pooling operation and take the maximum value in the window as the pooled value.

[0165] Performing full connection layer calculation on the pooling layer data of the historical cell culture image to obtain the full connection layer data of the historical cell culture image;

[0166] Specifically, the data obtained by the pooling layer is expanded into a one-dimensional vector and input into the fully connected layer of the neural network for calculation. Assume that the weight matrix W of a fully connected layer is fc , then the output Z of the fully connected layer fc The calculation of Z is as follows: fc =W fc ×f(P)+b fc , f(P) is the pooling layer data after the expansion operation, b fc It is the bias data of the fully connected layer.

[0167] The model was constructed based on the fully connected layer data of historical cell culture images, and a bacterial image morphology adjustment parameter recognition model was obtained.

[0168] Specifically, according to the convolution layer and activation layer data of the historical cell culture images, the model structure is designed, including the convolution layer, the pooling layer, the fully connected layer, etc., to build a morphological adjustment parameter recognition model. The morphological adjustment parameter recognition model is trained, and the model is evaluated and tuned (the tuning method is to optimize the model through the back propagation algorithm and the optimizer (such as stochastic gradient descent, Adam, etc.)) to obtain a model with high accuracy and strong generalization ability.

[0169] In the present invention, by using a preset bacterial image morphology adjustment parameter recognition model to identify image color adjustment data, the image morphology can be automatically adjusted according to the preset parameter model, the efficiency and accuracy of image processing can be improved, and the need for manual intervention can be reduced. By using historical cell culture image data and corresponding morphological description data, the association between image morphology and description can be established. According to the historical morphological description data, morphological adjustment parameter data is generated to provide training samples and labels for the model. By performing convolution, self-attention, activation, weighting, pooling and other calculations on the historical cell culture image data, the image feature representation is obtained, and a recognition model is constructed to automatically identify suitable morphological adjustment parameters according to the characteristics of the image, so as to realize intelligent adjustment of the image. Compared with traditional convolutional layer calculations, the self-attention calculation introduced in the present invention can better mine the feature information in the historical cell culture images, improve the extraction efficiency and accuracy of image features, and thus have a better effect on image analysis and recognition tasks.

[0170] Preferably, step S3 specifically includes:

[0171] Performing cluster calculation on the Helicobacter pylori culture image adjustment data to obtain Helicobacter pylori culture image cluster data;

[0172] Specifically, clustering algorithms such as K-means, MeanShift, etc. are used to cluster image pixels and classify similar pixels into the same category to obtain different structures or regions in the image. The clustering results can be classified according to the color, brightness and other characteristics of the pixels to distinguish different bacterial regions or background regions.

[0173] performing edge segmentation on the Helicobacter pylori culture image adjustment data according to the Helicobacter pylori culture image clustering data to obtain the Helicobacter pylori culture image edge segmentation data;

[0174] Specifically, based on the clustering results, an edge detection algorithm (such as Canny edge detection, Sobel operator, etc.) is used to perform edge detection on the image to obtain the edge contour of the bacterial region. After edge detection, a binary edge image of the bacterial region can be obtained.

[0175] Perform edge gradient calculation on the edge segmentation data of the Helicobacter pylori culture image to obtain edge gradient data;

[0176] Specifically, based on edge segmentation, a gradient operator (such as Sobel, Prewitt, etc.) is used to calculate the gradient of the image to obtain edge gradient information. The edge gradient information can characterize the intensity and direction of the image edge.

[0177] The edge segmentation data of the Helicobacter pylori culture image is screened according to the edge gradient data to obtain the edge screening data of the Helicobacter pylori culture image;

[0178] Specifically, according to the edge gradient information, the edge points are screened and filtered to exclude low-gradient or noise points and retain edge pixels with high gradient.

[0179] Perform opening and closing calculation and overlap area screening based on the Helicobacter pylori culture image edge screening data to obtain Helicobacter pylori culture image screening data;

[0180] Specifically, morphological opening and closing operations are used to dilate and erode local areas of the image to fill or remove pixels in a specific area.

[0181] The positioning data is generated based on the Helicobacter pylori culture image screening data to obtain the bacterial positioning data.

[0182] Specifically, based on the filtered image data, the location information of the bacterial area, including the center coordinates of the bacteria, the area size, etc., is extracted as the positioning data of the bacteria.

[0183] In the present invention, by clustering calculation of Helicobacter pylori culture image adjustment data, similar pixels in the image can be aggregated together, thereby discovering the potential cluster structure in the image, which is helpful to identify the main area of ​​Helicobacter pylori bacteria and reduce the amount of calculation in the subsequent processing steps. According to the Helicobacter pylori culture image clustering data, edge segmentation can be performed, and the Helicobacter pylori in the image can be effectively separated from the background, and the contour information of Helicobacter pylori can be extracted. By calculating the edge gradient data, the intensity and direction of the Helicobacter pylori edge can be quantified, and the edge information can be further enhanced. According to the edge gradient data, screening can be performed to remove unnecessary edge information in the image, thereby improving the clarity and accuracy of the Helicobacter pylori edge. At the same time, opening and closing calculations and overlapping area screening can further optimize the continuity and integrity of the edge. According to the Helicobacter pylori culture image screening data, positioning data is generated, and the accurate position and morphological characteristics of Helicobacter pylori in the image can be determined.

[0184] Preferably, step S4 is specifically:

[0185] Step S41: extracting bacteria images from Helicobacter pylori culture image adjustment data according to bacteria positioning data to obtain bacteria image data;

[0186] Specifically, according to the bacterial location data, the area where the bacteria are located is extracted from the original Helicobacter pylori culture image, which can be a rectangular, circular or irregular area. Using the extracted bacterial area, the corresponding bacterial image is cut out from the original image for subsequent feature extraction and analysis.

[0187] Step S42: performing local binarization calculation on the bacterial image data to obtain local binarization data of the bacterial image;

[0188] Specifically, the bacterial image is divided into local regions, and each local region is binarized to convert the pixel value to 0 or 255 to highlight the edges and features of bacteria. The binarization method based on local neighborhood is used to determine the binarization threshold of each region according to the statistical information of local pixels.

[0189] Step S43: Calculate the grayscale distribution of the local binary data of the bacterial image to obtain texture feature data of the bacterial image;

[0190] Specifically, for each local binary bacterial image region, its grayscale distribution characteristics are calculated, including statistical quantities such as mean, variance, skewness, kurtosis, etc. By analyzing the grayscale distribution characteristics, the texture information of the bacterial image, such as the granularity and uniformity of the bacteria, is described.

[0191] Step S44: performing frequency domain extraction on the bacterial image data to obtain frequency domain feature data of the bacterial image;

[0192] Specifically, the extracted bacterial image is subjected to Fourier transform to convert the image into the frequency domain space. In the frequency domain space, the frequency component information of the bacterial image is extracted, including features such as frequency spectrum and amplitude spectrum, to describe the periodicity and structural characteristics of the bacterial image.

[0193] Step S45: integrating the bacterial image frequency domain feature data and the bacterial image texture feature data to obtain Helicobacter pylori culture image feature data.

[0194] Specifically, the frequency domain feature data and the texture feature data are combined into a feature vector as a comprehensive feature of the Helicobacter pylori culture image.

[0195] According to the present invention, the Helicobacter pylori culture image adjustment data is extracted according to the bacteria positioning data, so that Helicobacter pylori can be separated from the whole image, reducing the scope of subsequent processing, which is conducive to improving processing efficiency and accuracy. By performing local binarization calculation on the bacteria image data, the outline and detail features of the bacteria can be better highlighted, the contrast of the image can be enhanced, and the subsequent extraction of texture features and frequency domain features can be facilitated. Grayscale distribution calculation is performed on the local binarization data of the bacteria image, and the texture features of the bacteria image can be obtained, such as information such as the thickness and density of the texture, which are of great significance for the identification and classification of Helicobacter pylori. By performing frequency domain extraction on the bacteria image data, the frequency domain features of the bacteria image can be obtained, such as information such as spectrum distribution and frequency components, which can provide important information related to the morphology and structure of the bacteria, and are conducive to the feature extraction and classification of Helicobacter pylori. The frequency domain feature data of the bacteria image and the texture feature data are integrated to obtain the comprehensive feature data of the Helicobacter pylori culture image, which is conducive to improving the accurate identification and analysis of Helicobacter pylori.

[0196] Preferably, the bacterial image frequency domain feature data includes the bacterial image Gaussian frequency domain feature data and the bacterial image local frequency domain feature data, and step S44 is specifically as follows:

[0197] The bacterial image data is subjected to frequency domain extraction through a Gaussian filter to obtain Gaussian frequency domain feature data of the bacterial image;

[0198] Specifically, a two-dimensional discrete Fourier transform (DFT) is used to transform the bacterial image into a frequency domain space. A Gaussian filter is applied in the frequency domain space to enhance or suppress components of different frequencies. Based on the frequency domain image after Gaussian filtering, information within a specific frequency range is extracted as Gaussian frequency domain feature data of the bacterial image.

[0199] The bacterial image data is subjected to wavelet transform to obtain the local frequency domain feature data of the bacterial image.

[0200] Specifically, the bacterial image is subjected to wavelet transform, and the image is decomposed into wavelet coefficients of different scales and directions. In the frequency domain space, local frequency domain features of different scales and directions are extracted to describe the local structural information of the image in spatial frequency. By analyzing the wavelet coefficients, the local frequency domain feature data of the bacterial image can be obtained to describe its details and texture features.

[0201] In the present invention, frequency domain extraction of bacterial image data is performed by using a Gaussian filter, and the change information of different frequencies in the image can be captured, and the Gaussian frequency domain feature data of the bacterial image can be obtained, which can provide the overall frequency domain structure and distribution of the bacterial image, and help to identify the overall features and patterns in the image. Frequency domain extraction of bacterial image data is performed by wavelet transform, and the image can be decomposed into frequency domain components of different scales to obtain local frequency domain feature data of the bacterial image. These data can provide information about the local structure and details of the bacterial image, and help to capture the local features and texture information of the bacteria. Integrating Gaussian frequency domain feature data and local frequency domain feature data into bacterial image feature data can make the feature description more diverse, thereby improving the characterization ability of bacterial images, and helping to improve the accuracy and robustness of feature extraction and classification and recognition of bacteria. Gaussian frequency domain features and local frequency domain features reflect the global and local information of the image, take into account the feature changes of different scales and spatial ranges, help to improve the understanding and analysis ability of bacterial images, and enhance the robustness and reliability of image features.

[0202] Preferably, a Helicobacter pylori bacterial culture image analysis system is used to perform the Helicobacter pylori bacterial culture image analysis method as described above, and the Helicobacter pylori bacterial culture image analysis system comprises:

[0203] A Helicobacter pylori culture image acquisition module is used to acquire Helicobacter pylori culture images through a high-definition microscopic image acquisition device to obtain Helicobacter pylori culture image data;

[0204] A culture medium parameter adjustment module is used to adjust the culture medium parameters of the Helicobacter pylori culture image data to obtain Helicobacter pylori culture image adjustment data;

[0205] A bacteria positioning module is used to perform bacteria positioning on the Helicobacter pylori culture image adjustment data to obtain bacteria positioning data;

[0206] A Helicobacter pylori culture image feature extraction module is used to extract features from Helicobacter pylori culture image adjustment data according to bacteria positioning data to obtain Helicobacter pylori culture image feature data;

[0207] The Helicobacter pylori recognition module is used to classify and recognize the characteristic data of Helicobacter pylori culture images to obtain Helicobacter pylori recognition data for performing Helicobacter pylori bacterial culture image analysis operations.

[0208] The beneficial effect of the present invention is that the present invention can effectively obtain Helicobacter pylori culture image data and accurately locate the position of Helicobacter pylori. In traditional culture image analysis, professionals are often required to manually observe and analyze images, which is prone to subjective judgment bias. The present invention can automatically extract feature information from the image, so that relevant practitioners can more clearly see the distribution of bacteria on the culture medium. The traditional analysis method requires practitioners / users to spend a lot of time and energy to observe and analyze images, which is inefficient. The processing of the present invention can greatly shorten the analysis time and reduce labor costs. This is like introducing a "machine assistant" that can quickly and accurately complete a large amount of image processing work, freeing up relevant manual workers. The present invention realizes automated analysis and recognition of images, greatly improving the efficiency and reliability of analysis. The present invention realizes a refined analysis technology solution from image acquisition to analysis and recognition, improves the efficiency and accuracy of analysis, reduces the interference of human factors, provides more reliable support at the information technology level, and at the same time overcomes the shortcomings of traditional methods in efficiency and accuracy.

[0209] Therefore, from any point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the attached application documents rather than the above description, and it is intended that all changes falling within the meaning and scope of equivalent elements of the application documents are included in the present invention.

[0210] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for analyzing Helicobacter pylori bacterial culture images, It is characterized in that The following steps are involved: Step S1: collecting Helicobacter pylori culture images by a high-definition microscopic image collector to obtain Helicobacter pylori culture image data; Step S2: adjusting culture medium parameters of Helicobacter pylori culture image data to obtain Helicobacter pylori culture image adjustment data; Step S3: performing bacteria positioning on the Helicobacter pylori culture image adjustment data to obtain bacteria positioning data; Step S4: extracting features from the Helicobacter pylori culture image adjustment data according to the bacteria positioning data to obtain Helicobacter pylori culture image feature data; Step S5: classify and identify the Helicobacter pylori culture image feature data to obtain Helicobacter pylori identification data for performing Helicobacter pylori bacterial culture image analysis operations.

2. The method according to claim 1, It is characterized in that Step S1 is specifically as follows: Step S11: collecting data of the bacterial culture medium through a high-definition microscopic image collector and converting the digital image to obtain bacterial culture medium image data; Step S12: performing edge detection on the bacterial culture medium image data to obtain image edge detection data; Step S13: performing image segmentation on the bacterial culture medium image data according to the image edge detection data to obtain bacterial culture medium image segmentation data; Step S14: performing multi-level color space conversion according to the bacterial culture medium image segmentation data to obtain multi-level color space conversion data; Step S15: merging the multi-level color space conversion data and the bacterial culture medium image data to obtain Helicobacter pylori culture image data.

3. The method according to claim 2, It is characterized in that The multi-level color space conversion data includes nonlinear color space conversion data and multi-channel conversion fusion data. Step S14 is specifically as follows: Step S141: performing color complexity calculation on the bacterial culture medium image segmentation data to obtain bacterial culture medium color complexity data; Step S142: determining whether the color complexity data of the bacterial culture medium is greater than or equal to a preset color complexity threshold data; Step S143: when it is determined that the bacterial culture medium color complexity data is greater than or equal to the preset color complexity threshold data, a nonlinear color space conversion is performed on the bacterial culture medium image segmentation data to obtain nonlinear color space conversion data; Step S144: when it is determined that the color complexity data of the bacterial culture medium is less than the preset color complexity threshold data, color gamut conversion is performed on the bacterial culture medium image segmentation data to obtain bacterial culture medium image color gamut conversion data; Step S145: performing Lad color conversion on the bacterial culture medium image segmentation data to obtain Lad color conversion data of the bacterial culture medium image; Step S146: performing multi-channel conversion fusion on the bacterial culture medium image segmentation data, the bacterial culture medium image color gamut conversion data and the bacterial culture medium image Lad color conversion data to obtain multi-channel conversion fusion data.

4. The method according to claim 3, It is characterized in that Step S143 is specifically as follows: When it is determined that the bacterial culture medium color complexity data is greater than or equal to the preset color complexity threshold data, nonlinear mapping curve data is generated according to the bacterial culture medium color complexity data; The bacterial culture medium image segmentation data corresponding to the bacterial culture medium color complexity data is converted into a color space according to the nonlinear mapping curve data to obtain nonlinear color space conversion data.

5. The method according to claim 1, It is characterized in that Step S2 is specifically as follows: Step S21: performing image parameter analysis on the Helicobacter pylori culture image data to obtain image parameter analysis data; Step S22: performing histogram equalization on the Helicobacter pylori culture image data according to the image parameter analysis data to obtain image grayscale adjustment data; Step S23: performing smoothing processing on the image grayscale adjustment data to obtain image smoothing processing data; Step S24: performing color adjustment on the image smoothing data according to the image parameter analysis data to obtain image color adjustment data; Step S25: performing morphological calculation on the image color adjustment data to obtain Helicobacter pylori culture image adjustment data.

6. The method according to claim 5, It is characterized in that Step S25 is specifically as follows: Using a preset bacterial image morphology adjustment parameter recognition model to recognize the image color adjustment data, and obtaining the image morphology adjustment parameter data; Performing morphological calculation on the image color adjustment data according to the image morphology adjustment parameter data to obtain Helicobacter pylori culture image adjustment data; The steps of constructing the preset bacterial image morphology adjustment parameter recognition model include the following steps: Obtain historical cell culture image data and historical morphological description data; Generate morphology adjustment parameters according to historical morphology description data to obtain historical morphology adjustment parameter data; Perform convolution calculation and self-attention calculation on the historical cell culture image data to obtain the convolution layer data of the historical cell culture image; Perform activation layer calculation on the convolution layer data of the historical cell culture image to obtain activation layer data of the historical cell culture image; Performing weighted calculation on the convolutional layer data of the historical cell culture images according to the activation layer data of the historical cell culture images to obtain the convolutional layer weighted data of the historical cell culture images; Performing pooling layer calculation on the weighted data of the convolution layer of the historical cell culture image to obtain the pooling layer data of the historical cell culture image; Performing full connection layer calculation on the pooling layer data of the historical cell culture image to obtain the full connection layer data of the historical cell culture image; The model was constructed based on the fully connected layer data of historical cell culture images, and a bacterial image morphology adjustment parameter recognition model was obtained.

7. The method according to claim 1, It is characterized in that Step S3 is specifically as follows: Performing cluster calculation on the Helicobacter pylori culture image adjustment data to obtain Helicobacter pylori culture image cluster data; performing edge segmentation on the Helicobacter pylori culture image adjustment data according to the Helicobacter pylori culture image clustering data to obtain the Helicobacter pylori culture image edge segmentation data; Perform edge gradient calculation on the edge segmentation data of the Helicobacter pylori culture image to obtain edge gradient data; The edge segmentation data of the Helicobacter pylori culture image is screened according to the edge gradient data to obtain the edge screening data of the Helicobacter pylori culture image; Perform opening and closing calculation and overlap area screening based on the Helicobacter pylori culture image edge screening data to obtain Helicobacter pylori culture image screening data; The positioning data is generated based on the Helicobacter pylori culture image screening data to obtain the bacterial positioning data.

8. The method according to claim 1, It is characterized in that Step S4 is specifically as follows: Step S41: extracting bacteria images from Helicobacter pylori culture image adjustment data according to bacteria positioning data to obtain bacteria image data; Step S42: performing local binarization calculation on the bacterial image data to obtain local binarization data of the bacterial image; Step S43: Calculate the grayscale distribution of the local binary data of the bacterial image to obtain texture feature data of the bacterial image; Step S44: performing frequency domain extraction on the bacterial image data to obtain frequency domain feature data of the bacterial image; Step S45: integrating the bacterial image frequency domain feature data and the bacterial image texture feature data to obtain Helicobacter pylori culture image feature data.

9. The method according to claim 8, It is characterized in that The bacterial image frequency domain feature data includes the bacterial image Gaussian frequency domain feature data and the bacterial image local frequency domain feature data. Step S44 is specifically as follows: The bacterial image data is subjected to frequency domain extraction through a Gaussian filter to obtain Gaussian frequency domain feature data of the bacterial image; The bacterial image data is subjected to wavelet transform to obtain the local frequency domain feature data of the bacterial image.

10. A bacterial culture image analysis system for Helicobacter pylori, It is characterized in that For executing the Helicobacter pylori bacterial culture image analysis method as claimed in claim 1, the Helicobacter pylori bacterial culture image analysis system comprises: A Helicobacter pylori culture image acquisition module is used to acquire Helicobacter pylori culture images through a high-definition microscopic image acquisition device to obtain Helicobacter pylori culture image data; A culture medium parameter adjustment module is used to adjust the culture medium parameters of the Helicobacter pylori culture image data to obtain Helicobacter pylori culture image adjustment data; A bacteria positioning module is used to perform bacteria positioning on the Helicobacter pylori culture image adjustment data to obtain bacteria positioning data; A Helicobacter pylori culture image feature extraction module is used to extract features from Helicobacter pylori culture image adjustment data according to bacteria positioning data to obtain Helicobacter pylori culture image feature data; The Helicobacter pylori recognition module is used to classify and recognize the characteristic data of Helicobacter pylori culture images to obtain Helicobacter pylori recognition data for performing Helicobacter pylori bacterial culture image analysis operations.

Citation Information

Patent Citations

  • Helicobacter pylori auxiliary detection system and detection device

    CN113989284A

  • Method and device for identifying infection state of helicobacter pylori based on gastroscope image

    CN117671573A