Bacteria microscopic image processing method based on image enhancement
Through interactive bacterial characteristics and supervised training image processing module, combined with gamma value calculation and multi-level segmentation enhancement processing, the problem of insufficient efficiency and accuracy of bacterial microscopic image processing in the prior art is solved, and high-quality microscopic enhanced image processing is achieved.
Patent Information
- Application Number
- CN202510218301.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to effectively highlight the detailed characteristics of the target bacteria, and the quality of microscopic images is limited. The traditional image segmentation method performs poorly when dealing with complex bacterial morphology, and it is easy to cause the problem of loss of image details or increasing artifacts.
Image enhancement-based bacterial microscopic image processing method is used to interact with the bacterial characteristics of the target bacteria and acquire the target microscopic images. By supervising the training image processing module, including the first enhancement processing unit and the second enhancement processing unit, pixel calculation and multi-level image segmentation enhancement and stitching are performed to determine the micro-enhanced image of the target bacteria.
Effectively improve the clarity and contrast of bacterial characteristics, obtain accurate and high-quality micro-enhanced images, solve the problem of insufficient image processing efficiency and accuracy in the prior art, and enhance the stability of micro-enhanced quality.
Smart Images

Figure CN120070220A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to a method for processing bacterial microscopic images based on image enhancement. Background Art
[0002] The processing of bacterial microscopic images occupies an important position in fields such as microbial research. Through microscopic image analysis, the morphology and characteristics of bacteria can be intuitively revealed. At the same time, due to the complex microscopic environment, image noise interference, and differences in bacterial characteristics, the difficulty of processing bacterial microscopic images is further increased.
[0003] Currently, existing microscopic image processing methods, such as simple filtering and contrast enhancement, are difficult to effectively highlight the detailed features of target bacteria and face the problem of limited microscopic image quality. In addition, traditional image segmentation and other methods perform poorly when dealing with the enhancement of microscopic image details, and problems such as loss of image details or an increase in artifacts are likely to occur.
[0004] Therefore, how to combine bacterial characteristics to perform image processing under diverse complex bacterial morphologies to improve the efficiency and accuracy of bacterial microscopic image processing and enhance the stability of the quality of microscopic image enhancement is a technical problem that urgently needs to be solved at present. Summary of the Invention
[0005] The present application provides a method for processing bacterial microscopic images based on image enhancement, which is used to solve the technical problem in the prior art of how to combine bacterial characteristics to perform image processing under diverse complex bacterial morphologies to improve the efficiency and accuracy of bacterial microscopic image processing and enhance the stability of the quality of microscopic image enhancement.
[0006] In view of the above problems, the present application provides a method for processing bacterial microscopic images based on image enhancement.
[0007] The present application provides a method for processing bacterial microscopic images based on image enhancement. The method includes: interacting with the bacterial characteristics of the target bacteria and collecting the target microscopic image; supervising and training an image processing module, where the image processing module includes a first enhancement processing unit and a second enhancement processing unit; according to the first enhancement processing unit, combining the bacterial characteristics, performing pixel calculation on the target microscopic image to determine a preprocessed image, where the pixel calculation method is gamma value calculation under bidirectional image normalization; according to the second enhancement processing unit, performing multi-level image segmentation enhancement and splicing on the preprocessed image to determine the microscopic enhanced image of the target bacteria.
[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages: A method for processing bacterial microscopic images based on image enhancement provided by an embodiment of this application interacts with the bacterial characteristics of a target bacterium and acquires a target microscopic image; supervises and trains an image processing module, where the image processing module includes a first enhancement processing unit and a second enhancement processing unit; according to the first enhancement processing unit, combining the bacterial characteristics, performs pixel calculation on the target microscopic image to determine a preprocessed image, where the pixel calculation method is gamma value calculation under image bidirectional normalization; according to the second enhancement processing unit, performs multi-level image segmentation enhancement and stitching on the preprocessed image to determine a microscopic enhanced image of the target bacterium, which is used to solve the technical problem in the prior art of how to combine bacterial characteristics to perform image processing under diverse complex bacterial morphologies, so as to improve the efficiency and accuracy of bacterial microscopic image processing and enhance the stability of microscopic image enhancement quality, and can effectively improve the clarity and contrast of bacterial features and obtain an accurate and high-quality microscopic enhanced image. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 FIG. is a schematic flowchart of a method for processing bacterial microscopic images based on image enhancement provided by this application;
[0010] Figure 2 FIG. is a schematic flowchart of iterative calculation of a normalized image in a method for processing bacterial microscopic images based on image enhancement provided by this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0011] This application provides a method for processing bacterial microscopic images based on image enhancement, interacts with the bacterial characteristics of a target bacterium, and acquires a target microscopic image; supervises and trains an image processing module, combines the bacterial characteristics, performs pixel calculation on the target microscopic image to determine a preprocessed image, and performs multi-level image segmentation enhancement and stitching on the preprocessed image to determine a microscopic enhanced image of the target bacterium, which is used to solve the technical problem in the prior art of how to combine bacterial characteristics to perform image processing under diverse complex bacterial morphologies, so as to improve the efficiency and accuracy of bacterial microscopic image processing and enhance the stability of microscopic image enhancement quality.
[0012] Embodiment: As Figure 1 shown, this application provides a method for processing bacterial microscopic images based on image enhancement, and the method includes:
[0013] S1: Interact with the bacterial characteristics of the target bacterium and acquire a target microscopic image.
[0014] In the embodiments of the present application, the target bacteria are the bacteria for which microscopic images are collected. The characteristic information of the target bacteria is obtained through the interaction of the system. The bacterial characteristics include, but are not limited to, the morphological characteristics of the bacteria (such as rod-shaped, spherical, spiral-shaped), staining characteristics (such as Gram-positive or negative), and other biological characteristics. Preferably, according to specific research needs, the bacterial characteristics can be screened, and highly relevant bacterial characteristics can be selected.
[0015] Furthermore, a high-precision microscopic imaging device is used to collect microscopic images of the target bacteria. The collected images need to have high resolution and contrast to ensure that the minute characteristics of the bacteria can be presented. Specifically, the microscopic imaging device may include an optical microscope, an electron microscope, or a fluorescence microscope, and an appropriate imaging mode and magnification are selected according to the characteristics of the target bacteria.
[0016] During the process of microscopic image collection, to ensure the collection quality, the parameters of the microscopic device need to be finely adjusted, including but not limited to illumination intensity, aperture size, focusing mode, etc. For example, for bacteria that need to observe internal structures, it is preferred to use a fluorescence microscope and match specific dyes; for larger bacterial samples in terms of morphology, a low-power lens is preferred to capture the overall image.
[0017] Preferably, during the process of collecting microscopic images of bacteria, by adjusting the microscopic collection parameters and environmental conditions, the image quality is ensured as much as possible, such as no serious artifacts, overexposure or underexposure, reducing the difficulty of subsequent image processing.
[0018] S2: Supervise and train the image processing module, where the image processing module includes a first enhancement processing unit and a second enhancement processing unit.
[0019] First, in a machine training manner, the image processing module is trained by providing labeled samples so that it can accurately extract target features from the input microscopic images. Among them, the input samples for supervised training include a large amount of labeled microscopic image data and their target output results, such as bacteria microscopic images labeled by experts and their enhanced images.
[0020] The image processing module includes a first enhancement processing unit and a second enhancement processing unit, and each unit is designed for tasks in different processing stages. Among them, the first enhancement processing unit is used to perform preliminary processing on the target microscopic image, and improve the overall quality of the image through pixel-level operations. It mainly focuses on the aspects of image brightness and contrast, and separates the bacterial target in the microscopic image from the background more clearly through two-way normalization and gamma value calculation. Taking an example, if the input microscopic image has uneven gray distribution, the first enhancement processing unit can adjust the gray distribution through gamma value correction to make the image more suitable for subsequent processing.
[0021] Map the original image sample and the preprocessed sample in the input sample to determine the first training sample pair, and perform sample supervised training under pixel iterative enhancement based on the pixel calculation formula to obtain the first enhancement processing unit.
[0022] The second enhancement processing unit is used to perform multi-level strengthening and stitching on the preprocessed image output by the first enhancement processing unit, and optimize the local detail performance of the target bacteria through layer-by-layer image processing. This unit adopts a multi-layer structure, and each processing layer has specific processing functions, such as noise reduction processing, bacteria contour enhancement, etc. In addition, the second enhancement processing unit is equipped with a layer threshold mechanism to screen out the image areas with significant defects in each layer, ensuring that the image enhancement of this layer only targets the image parts with corresponding defects and avoiding ineffective processing. For example, for the enhancement processing of the complex boundary of bacteria, the boundary area is segmented and its edge is made clearer through enhancement processing.
[0023] Similarly, after configuring the multi-level structure of the second enhancement processing unit, based on the input sample, extract the preprocessed sample and the enhanced sample and perform mapping, and perform supervised training on the multi-level structure until the convergence condition is met, that is, the difference between the output enhancement processing result and the enhanced sample is small enough, and obtain the second enhancement processing unit with training completed.
[0024] Finally, connect the second enhancement processing unit behind the first enhancement processing unit. Through the collaborative work of the first enhancement processing unit and the second enhancement processing unit, first perform the first enhancement processing of the overall brightness and contrast, and then perform the second enhancement processing of the details, so as to achieve high-quality enhancement processing of the microscopic image.
[0025] S3: According to the first enhancement processing unit, combined with the bacteria characteristics, perform pixel calculation on the target microscopic image to determine the preprocessed image, where the pixel calculation method is gamma value calculation under image bidirectional normalization.
[0026] In the embodiment of the present application, the bacteria characteristics participate in the image processing process as input parameters. The bacteria characteristics include morphological characteristics, staining characteristics, etc. These information are used to guide the selection of the pixel calculation method and the setting of parameters. For example, for Gram-negative bacteria with weak contrast, the gamma value needs to be set appropriately to enhance the brightness details of the image.
[0027] Among them, the pixel calculation adopts the gamma value calculation method under bidirectional image normalization. Through normalization processing and inverse normalization processing, the image pixel values can be mapped to a specified range to eliminate the influence of uneven gray distribution on the processing accuracy. Specifically, in this step, the original pixel values of the target microscopic image are normalized from the gray range [0, 255] to [0, 1] to provide standardized input conditions for gamma value calculation. For example, for a microscopic image containing a high-noise area, normalization processing can reduce the dynamic change range of the pixel range, thereby enhancing the effectiveness of gamma adjustment.
[0028] Among them, the gamma value is a parameter that controls the brightness and contrast of an image. By adjusting the gamma value, the gray features of bacterial targets in the image can be enhanced. Based on the normalized image, the initial gamma value is determined in combination with bacterial characteristics. For example, the gamma value range is set by analyzing the morphological characteristics of bacteria and the illumination conditions of the microscopic environment. Subsequently, gamma value transformation is performed on the normalized pixel values to generate an optimized gray image. Taking an example, if the input image has a situation where the background is too bright and the bacterial target is relatively dark, the gamma value can be set to a value less than 1 to enhance the brightness of the bacterial target and suppress background interference.
[0029] After completing the gamma value transformation, the processed image is subjected to inverse normalization operation, and the pixel range is remapped from [0, 1] back to the original gray range [0, 255]. This inverse normalization step is used to ensure that the gray values of the preprocessed image meet the input requirements of the subsequent enhancement processing unit, while retaining the optimized bacterial image features. The preprocessed image has significantly enhanced detail features.
[0030] Furthermore, pixel calculation is performed on the target microscopic image. Step S3 of this application includes:
[0031] Scanning the target microscopic image, determining the initial gamma value according to the image features and bacterial characteristics; performing pixel normalization processing on the target microscopic image to determine the normalized image, where the pixel range is normalized from [0, 255] to [0, 1]; based on the initial gamma value, performing iterative calculation on the normalized image to determine the transformed image; performing inverse normalization processing on the transformed image to determine the preprocessed image, where the pixel range is inversely normalized from [0, 1] to [0, 255].
[0032] First, scan the target microscopic image to extract its global and local image features. The main purpose of this step is to identify the characteristic information of the target bacteria in the microscopic image through image analysis techniques, including but not limited to brightness distribution, contrast, background complexity, and the gray value distribution of the bacterial region, etc. These image features are combined with bacterial characteristics (such as bacterial morphology, staining characteristics, and distribution patterns) to determine the initial gamma value. For example, for an image with low gray values and weak contrast, the initial gamma value greater than 1 can be set to enhance the brightness details.
[0033] Next, perform pixel normalization on the target microscopic image, mapping its pixel range from [0, 255] to the normalized range of [0, 1]. The normalization process adjusts the dynamic range of pixel values to make the gray distribution in the image more uniform and eliminates the gray deviation under different microscope settings. For example, if the original gray values of the input image are concentrated in the low gray range, normalization can expand it to the standard range, facilitating numerical operations in the gamma value calculation process.
[0034] Furthermore, based on the initial gamma value, perform iterative calculations on the normalized image to determine the transformed image. This process involves gradually adjusting the gray value distribution of the image, performing non-linear adjustment on each pixel value through the pixel calculation formula, and enhancing the visual features of the target bacterial region. That is, for the normalized pixel values, perform per-pixel calculations based on the initial gamma value using the pixel calculation formula. Exemplarily, if the initial gamma value is set to 1.2, the brightness of the transformed pixel will increase slightly. By setting the number of iterations or convergence conditions, ensure that the optimization effect of the gamma value transformation on the image reaches the expected level.
[0035] Finally, perform inverse normalization on the transformed image, mapping its pixel range from [0, 1] back to the original gray range of [0, 255] in reverse. The purpose of the inverse normalization step is to restore the optimized image to the standard gray range suitable for subsequent processing modules, ensuring the input consistency of subsequent algorithms. For example, if a pixel value is 0.75 in the normalized image, after inverse normalization, its corresponding gray value is restored to 168. After completing the inverse normalization process, the output preprocessed image has a significantly enhanced gray distribution and target feature clarity, providing high-quality input data support for subsequent multi-level segmentation and stitching processing.
[0036] Furthermore, as Figure 2 shown, performing iterative calculations on the normalized image, step S3 of the present application includes:
[0037] Based on the initial gamma value, perform pixel calculation on the normalized image to determine a first transformed image; scan the first transformed image. If it is in the direction of image optimization processing, adjust the initial gamma value based on a preset iteration step to determine a second gamma value; based on the second gamma value, perform pixel calculation processing on the first transformed image to determine a second transformed image and perform gamma value iterative adjustment calculation to determine the preprocessed image, where a preset number of iterations is used for constraint.
[0038] Further, for performing pixel calculation on the normalized image, step S3 of this application includes:
[0039] Obtain a pixel calculation formula: F(x, y) = s * f(x, y)^γ; where F(x, y) is the pixel value calculated at the image point (x, y), s is a constant, and s = 1, γ is the gamma value, and f(x, y) is the original pixel value at the image point (x, y).
[0040] In the embodiment of this application, based on the initial gamma value, perform pixel calculation on the normalized image. First, adjust each pixel value in the image through the gamma transformation formula to determine a first transformed image. During the gamma transformation process, the pixel calculation formula: F(x, y) = s * f(x, y)^γ is adopted to calculate the image brightness pixel by pixel.
[0041] Among them, F(x, y) is the pixel value calculated at the image point (x, y), representing the brightness of the pixel point after image enhancement processing; f(x, y) is the original pixel value of the original image at the corresponding pixel point, representing the brightness feature before image enhancement; s is a constant coefficient used to adjust the output range of the gamma transformation, and usually takes the value of 1 under standardized processing conditions to ensure the linear controllability of the overall image brightness; γ is the gamma value, which defines the degree of non - linear transformation of the pixel value and is the core parameter.
[0042] Specifically, by controlling the size of the gamma value, the dynamic adjustment of image brightness and contrast is realized. For example, when the gamma value is greater than 1, the bright area of the image is enhanced, and when the gamma value is less than 1, the dark area is highlighted to adapt to the specific feature requirements of the bacterial microscopic image.
[0043] Among them, the value of the gamma value γ directly affects the transformation result: when γ > 1, the gamma transformation compresses the bright area of the image and enhances the dark details; when γ < 1, the bright details are highlighted and the dark area is compressed. To ensure the accuracy of the transformation and the manifestation of the features of the target area, the selection of the gamma value needs to be adapted to the characteristics of the target image. For example, in the processing of bacterial microscopic images, if the brightness of the target area is low but contains rich details, a gamma value less than 1 is preferably selected to highlight the details.
[0044] During the calculation process, for each pixel, the calculated pixel value is obtained by substituting the original pixel value and the gamma value γ into the formula point by point. The point-by-point calculation ensures the fine-grained characteristics of the image transformation, enabling the enhanced image to retain more original details globally. For example, if the original pixel value is 0.8, the gamma value γ = 0.5, and the constant s = 1, the calculated enhanced pixel value is approximately 0.894.
[0045] Next, scan the first transformed image. By extracting information such as its brightness histogram, texture features, or edge contours, determine whether the current image conforms to the optimization processing direction. The image optimization processing direction refers to whether the visual quality or specific region features of the transformed image are effectively enhanced, usually determined by preset quality evaluation indicators (such as signal-to-noise ratio, contrast mean). For example, if the edge sharpness of the target bacteria region is insufficient, the gamma value needs to be adjusted to further optimize the image characteristics.
[0046] In the case where it is determined that further optimization is required, adjust the initial gamma value based on the preset iteration step to determine the second gamma value. The preset iteration step, that is, the selection of the adjustment amplitude of the gamma value per single time directly affects the speed and stability of the optimization process, and is usually set in combination with the gray distribution range of the target image. For example, if the initial gamma value is 1.2 and the step is set to 0.05, the second gamma value is adjusted to 1.25. Through the fine adjustment of the gamma value, the optimization direction can be gradually approached.
[0047] Based on the second gamma value, perform pixel calculation processing on the first transformed image, and again use the pixel calculation formula to perform per-pixel adjustment to generate the second transformed image. In this process, compare the quality changes between the first transformed image and the second transformed image to verify whether the effect of the gamma value adjustment is significant. If the detail enhancement of the target area meets the expectation, the iteration can be terminated; otherwise, continue to adjust the gamma value.
[0048] Through the iterative adjustment calculation of the gamma value, the preprocessed image is finally determined. The iterative process is restricted by the preset number of iterations to prevent the optimization direction from deviating from the target due to excessive calculation. For the result after each iteration, it can be automatically determined whether to continue processing through the image evaluation index, thereby improving the iterative efficiency. For example, the maximum number of iterations is set to 10 times. If the quality index reaches the threshold after the 6th iteration, the calculation is terminated in advance. The finally output preprocessed image has significantly enhanced brightness and contrast, and the characteristics of the bacteria target area are clear, providing a high-quality basic input for subsequent image segmentation and enhancement processing.
[0049] S4: According to the second enhancement processing unit, perform multi-level image segmentation enhancement and stitching on the preprocessed image to determine the microscopic enhanced image of the target bacteria.
[0050] In the embodiments of the present application, through the hierarchical mechanism of the second enhancement processing unit, the preprocessed image is input into a multi-level image processing structure. The second enhancement processing unit includes a plurality of fully connected image processing layers, and each image processing layer corresponds to a specific image processing method to achieve targeted enhancement processing. In addition, each image processing layer is provided with a layer threshold for screening and segmenting defective image parts at different levels to ensure that the processed image has high structural integrity and feature retention rate.
[0051] In the first image processing layer, based on the layer threshold, the preprocessed image is segmented to determine a preliminary segmentation region, including a first image part and a second image part. The first image part refers to the region with significant hierarchical defects found during the preliminary segmentation. Exemplarily, if the image processing method of the first image processing layer is edge enhancement, the first image part usually shows the part where the edge of the target bacteria is blurred or details are lost; the second image part is the region that does not require further enhancement and retains the original characteristics of the image. For the first image part, the first image processing layer uses a hierarchical enhancement method to enhance the details of specific regions based on the first image part, such as enhancing the feature contours and texture details of the bacteria, and finally generates an enhanced image of the first image processing layer.
[0052] After the processing of the first image processing layer is completed, the enhanced image is output to the second image processing layer. In the second image processing layer, according to the layer threshold, the enhanced image is further segmented based on the hierarchical processing method, and the defective regions in the enhanced image are accurately segmented and secondarily enhanced. For example, for the boundary transition region, gradient boosting and pixel interpolation algorithms are applied to achieve the smoothing and natural transition of the bacteria morphology. Subsequently, through image stitching technology, the enhanced region and the unprocessed region are fused to generate a second enhanced image.
[0053] The above process is sequentially carried out in subsequent image processing layers until all image processing layers complete the multi-level processing and optimization of the preprocessed image. The continuity of the processing results and the accumulation of the enhancement effects are ensured through the inter-layer transfer between image processing layers. Finally, the microscopic enhanced image output by the second enhancement processing unit has the characteristics of rich details, moderate contrast, and clear structure, providing high-quality data support for the microscopic analysis of the target bacteria.
[0054] In summary, by defining the image parts adjusted within the layer through the layer threshold, performing hierarchical adaptive defect enhancement processing, and performing image stitching, the enhancement effect of the microscopic image is significantly improved, ensuring that the final microscopic enhanced image can accurately display the microscopic characteristics of the target bacteria.
[0055] Furthermore, for the multi-level image segmentation enhancement and stitching of the preprocessed image, step S4 of the present application includes:
[0056] The second enhancement processing unit includes N fully-connected image processing layers. Among them, each image processing layer corresponds to an image processing method, and there is a layer threshold for each image processing layer, which is used to screen partial defective images at different levels. Based on the N image processing layers, multi-level image segmentation enhancement and splicing are performed on the preprocessed image to determine the microscopic enhanced image of the target bacteria.
[0057] Specifically, the second enhancement processing unit includes N fully-connected image processing layers. Among them, each image processing layer corresponds to a specific image processing method. These image processing layers work together to achieve multi-level enhancement and optimization of the preprocessed image. The role of each image processing layer is to perform image enhancement operations at different levels on the image. For example, noise reduction processing, edge enhancement, etc. The execution steps of each processing layer include image segmentation - enhancement processing - image splicing under the constraint of the layer threshold. The processing method of each layer is designed based on specific image features and processing objectives. By stacking different image processing methods together, the processing effect of the image can be effectively improved, the microscopic details of the bacteria can be enhanced, and an accurate microscopic enhancement effect can be achieved.
[0058] Among them, a layer threshold is set in each image processing layer, which is used to screen and control partial defective images at different levels. The so-called layer threshold refers to the standard used to determine which image areas need to be further enhanced or optimized during the image processing process. The setting of these threshold values is based on the feature analysis of the image, which can automatically identify incomplete or poor-quality areas in the image, thereby avoiding the negative impact of these areas on the final processing result. For example, when the contrast of a certain area is too low or the details are blurred, the layer threshold will determine this area as a defective area and perform corresponding enhancement processing. This process can ensure that the final image effect is more delicate and accurate, and avoid the noise or erroneously enhanced parts in the image from affecting the judgment of the bacterial morphology.
[0059] Based on the N image processing layers, where N is the total number of image processing layers, the preprocessed image undergoes multi-level image segmentation, enhancement, and splicing, and finally the microscopic enhanced image of the target bacteria is determined. Specifically, the image segmentation step divides the image area through the threshold mechanism in each image processing layer, so as to ensure that different areas in the bacterial image are properly processed and optimized. The image processing of each layer is enhanced on the basis of the previous layer to gradually improve the clarity of details and the overall quality of the image. In this process, enhancement algorithms within the layer, such as local contrast adjustment, texture enhancement, and edge sharpening, help to segment the bacterial contour and enhance each feature of the bacteria, making the enhanced effect of the bacterial image clearer and more accurate.
[0060] In this process, through the design of multiple image processing layers and the application of layer thresholds, complex microscopic images can be effectively processed, and the enhancement effects can be gradually accumulated to finally obtain accurate and high-quality microscopic enhanced images.
[0061] Furthermore, based on the N image processing layers, multi-level image segmentation enhancement and splicing are performed on the preprocessed image. Step S4 of this application includes:
[0062] Based on the first image processing layer, perform image segmentation processing and splicing based on the layer threshold, and output the first enhanced image; transfer the first enhanced image to the second image processing layer, perform image segmentation processing and splicing based on the layer threshold, and output the second enhanced image; perform inter-layer transfer and processing on the second enhanced image until the processing of the Nth image processing layer is completed, and output the microscopic enhanced image.
[0063] In the embodiment of this application, first, the first image processing layer receives the preprocessed image and performs segmentation processing on the image according to the layer threshold. The layer threshold screens specific regions in the image through a preset numerical threshold to identify useful parts and possible defect regions in the image. In this process, the regions with pixel values greater than the threshold in the image are considered useful image parts, while the regions less than the threshold may require further processing. After image segmentation, enhance the defective image parts, and then splice the enhanced image and the non-defective image parts to output the first enhanced image.
[0064] Furthermore, the first enhanced image is transferred as the input image to the second image processing layer for continued image processing. Similar to the first image processing layer, the second image processing layer uses the layer threshold to perform segmentation and splicing operations on the image again. At this time, the second image processing layer will perform further refined processing to enhance the detail features in the first enhanced image. For example, improve the noise part in the image and perform further optimization processing on the segmented regions, output the second enhanced image, and the image quality is further improved, and the bacterial features become clearer and more detailed.
[0065] Furthermore, the second enhanced image is transferred to the subsequent image processing layers. Each subsequent image processing layer continues to perform image segmentation processing and splicing operations based on the layer threshold, gradually enhancing and optimizing the image. Each image processing layer further refines the detail parts of the image on the basis of the previous layer, improving the image quality and making the bacterial features in the image clearer. During the processing, the image data between each level will be transferred and optimized with each other to ensure that the enhancement effects of the image are accumulated layer by layer, and finally accurate and high-quality microscopic enhanced images are obtained.
[0066] Further, based on the first image processing layer, perform image segmentation processing and stitching based on layer thresholds to determine the first enhanced image. Step S4 of this application includes:
[0067] Based on the layer threshold of the first image processing layer, scan and segment the preprocessed image to determine a first image part and a second image part. Among them, the first image part is the image part with hierarchical defects; for the first image part, the first image processing layer performs image enhancement processing to determine a first-level enhanced image; stitch the first-level enhanced image and the second image part to determine the first enhanced image.
[0068] In the embodiment of this application, first, the preprocessed image undergoes layer threshold processing by the first image processing layer. The layer threshold is a numerical threshold set during the image processing process and is a key parameter for distinguishing different feature regions in the image. According to the set threshold value, the pixels in the image are classified into two categories: the first image part and the second image part. The first image part includes image regions with hierarchical defects, such as these regions having noise problems or detail loss problems, etc.; the second image part is the normal part of the image and does not contain obvious defects. The purpose of this segmentation process is to provide targeted processing for subsequent image enhancement and optimization.
[0069] Furthermore, for the first image part, the first image processing layer performs image enhancement processing to determine a first-level enhanced image. For the first image part that has been segmented, this part usually contains regions with poor image quality and unclear details. Therefore, the first image processing layer performs image enhancement processing on these regions, aiming to improve their visibility, supplement missing details, and enhance the overall quality of the image. The specific threshold segmentation and image processing are defined by the enhancement method of the first image processing layer. Finally, the first image part will be transformed into a first-level enhanced image, where the details are clearer and the defects are improved, thus enhancing the quality of the image in this region.
[0070] After completing the enhancement processing of the first image part, the first-level enhanced image will be stitched with the unprocessed second image part. The purpose of stitching is to fuse the enhanced first image part and the normal second image part into a complete image, thereby forming the first enhanced image. The stitching process needs to ensure seamless connection of the two parts to avoid unnatural edge transitions or image distortion phenomena. Finally, the stitched first enhanced image is used as the output image, providing a high-quality image basis for subsequent processing, and this image contains clear bacterial features and sufficient detail information.
[0071] Through the above steps, the defects of the first image part are effectively improved, the normal part of the second image part is maintained, and the stitching of the two enhances the overall quality of the image, providing more accurate image data for bacterial analysis.
[0072] Further, after determining the microscopic enhanced image of the target bacteria, the steps of this application further include:
[0073] Perform pixel mapping on the target microscopic image and the microscopic enhanced image to determine the enhancement processing conditions; on the terminal display interface, visualize the microscopic enhanced image and the enhancement processing conditions.
[0074] Specifically, the target microscopic image is used as the original image and compared with the microscopic enhanced image after enhancement processing. In this process, through the method of pixel mapping, each pixel of the original image and the enhanced image is made to correspond one by one, and the required enhancement processing conditions are calculated based on the pixel differences between the two, that is, by analyzing the changes in the original image before and after enhancement processing, and then determining the required enhancement processing conditions. These conditions usually involve adjustments of factors such as brightness, contrast, detail enhancement, or denoising.
[0075] Further, display the microscopic enhanced image and its corresponding enhancement processing conditions on the terminal display interface. The terminal display interface can intuitively display the enhancement effect of the image and its corresponding processing conditions through functions such as image display and parameter visualization. For example, the enhancement effect can be displayed on the interface through operations such as image zooming, contrast adjustment, and brightness adjustment. In this way, the user can not only intuitively see the enhancement effect of the image but also clearly understand the specific processing conditions used to achieve this effect.
[0076] A method for processing bacterial microscopic images based on image enhancement provided by this application has the following technical effects:
[0077] 1. Through pixel calculation based on the image and combined with the pixel calculation method of gamma value adjustment, perform pixel normalization and iterative transformation on the target microscopic image, thereby optimizing the brightness and contrast of the image. The details of the image are enhanced after gamma value adjustment, effectively improving the visualization effect of the image, especially enhancing the clarity and contrast of bacterial features.
[0078] 2. Through multiple fully connected image processing layers, perform image segmentation and enhancement processing based on layer thresholds, and optimize the image layer by layer, finally outputting a high-quality microscopic enhanced image. Through hierarchical enhancement processing under threshold division, the defective parts of the current processing level are effectively improved, and the normal parts are maintained. The splicing of the two enhances the overall quality of the image. At the same time, the sequential processing between multiple levels can strengthen the details of the image at different levels, making the final image clearer, and ensuring that the enhancement effect of the image accumulates layer by layer, finally obtaining an accurate and high-quality microscopic enhanced image.
[0079] Through the foregoing detailed description of a bacterial microscopic image processing method based on image enhancement in this specification, those skilled in the art can clearly know a bacterial microscopic image processing method based on image enhancement in this embodiment. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For related parts, reference may be made to the description in the method part.
[0080] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A bacterial microscopic image processing method based on image enhancement, characterized in that: The method comprises: Interact with the bacterial characteristics of the target bacteria and collect microscopic images of the target; A supervised training image processing module, wherein the image processing module comprises a first enhancement processing unit and a second enhancement processing unit; According to the first enhancement processing unit, in combination with the bacterial characteristics, pixel calculation is performed on the target microscopic image to determine a preprocessed image, wherein the pixel calculation method is a gamma value calculation under image bidirectional normalization; According to the second enhancement processing unit, multi-level image segmentation, enhancement and splicing are performed on the pre-processed image to determine the microscopic enhanced image of the target bacteria.
2. A bacterial microscopic image processing method based on image enhancement as claimed in claim 1, characterized in that: Performing pixel calculation on the target microscopic image includes: Scanning the target microscopic image, and determining an initial gamma value according to image features and bacterial characteristics; Performing pixel normalization processing on the target microscopic image to determine a normalized image, wherein the pixel range is normalized from [0, 255] to [0, 1]; Based on the initial gamma value, iteratively calculate the normalized image to determine a transformed image; The transformed image is subjected to inverse normalization processing to determine the preprocessed image, wherein the pixel range is inversely normalized from [0, 1] to [0, 255].
3. A bacterial microscopic image processing method based on image enhancement as claimed in claim 2, characterized in that: Performing iterative calculation on the normalized image, including: Based on the initial gamma value, performing pixel calculation on the normalized image to determine a first transformed image; Scanning the first transformed image, if it is in the image optimization processing direction, adjusting the initial gamma value based on a preset iteration step length, and determining a second gamma value; Based on the second gamma value, pixel calculation processing is performed on the first transformed image to determine the second transformed image and perform gamma value iterative adjustment calculation to determine the preprocessed image, wherein a preset number of iterations is used as a constraint.
4. A bacterial microscopic image processing method based on image enhancement as claimed in claim 3, characterized in that: Performing pixel calculation on the normalized image includes: Get pixel calculation formula: F(x,y)=s*f(x,y)^γ; Wherein, F(x,y) is the calculated pixel value at the image point (x,y), s is a constant, and s=1, γ is the gamma value, and f(x,y) is the original pixel value at the image point (x,y).
5. A bacterial microscopic image processing method based on image enhancement as claimed in claim 1, characterized in that: The pre-processed image is subjected to multi-level image segmentation, enhancement and splicing, including: The second enhancement processing unit comprises N fully connected image processing layers, wherein each image processing layer corresponds to an image processing method, and each image processing layer has a layer threshold, and the layer threshold is used to screen the layer defect image part; Based on the N image processing layers, multi-level image segmentation, enhancement and splicing are performed on the pre-processed image to determine the microscopic enhanced image of the target bacteria.
6. A bacterial microscopic image processing method based on image enhancement as claimed in claim 5, characterized in that: Based on the N image processing layers, multi-level image segmentation, enhancement and splicing are performed on the pre-processed image, including: Based on the first image processing layer, performing layer threshold-based image segmentation processing and splicing, and outputting a first enhanced image; Transferring the first enhanced image to a second image processing layer, performing image segmentation processing and splicing based on layer threshold, and outputting a second enhanced image; The second enhanced image is transferred and processed between layers until the processing of the Nth image processing layer is completed, and the microscopic enhanced image is output.
7. A bacterial microscopic image processing method based on image enhancement as claimed in claim 6, characterized in that: Based on the first image processing layer, performing layer threshold-based image segmentation processing and stitching to determine a first enhanced image includes: Scan and segment the preprocessed image based on a layer threshold of the first image processing layer to determine a first image portion and a second image portion, wherein the first image portion is an image portion having a layer defect; For the first image part, the first image processing layer performs image enhancement processing to determine a layer of enhanced image; The layer of enhanced image and the second image portion are spliced to determine a first enhanced image.
8. A bacterial microscopic image processing method based on image enhancement as claimed in claim 1, characterized in that: After determining the microscopic enhanced image of the target bacteria, the following steps are performed: Performing pixel mapping on the target microscopic image and the microscopic enhanced image to determine enhancement processing conditions; The microscopic enhanced image and the enhanced processing conditions are visualized on a terminal display interface.