A method of microscope image acquisition

By using an adaptive imaging model and image restoration processing, high-quality microscope images are generated, solving the problem that existing technologies cannot adapt to environmental monitoring of complex samples and special scenarios, and achieving efficient and accurate imaging results.

CN122244860APending Publication Date: 2026-06-19海南中特环境监测技术有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
海南中特环境监测技术有限公司
Filing Date
2026-03-13
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing general-purpose microscope image acquisition methods cannot be adapted to complex samples and special scenarios in environmental monitoring, resulting in poor image quality, low efficiency, and weak stability, which cannot meet the requirements for batch delivery and data traceability of CMA reports.

Method used

Adaptive focusing and illumination parameters that match the current imaging environment are generated by an adaptive imaging model, and image restoration processing is performed in combination with environmental parameters to generate high-quality microscope images.

🎯Benefits of technology

Microscope image acquisition methods can actively adapt to environmental changes, improving the adaptability and image quality of imaging systems and meeting the needs of efficient and accurate imaging in environmental monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122244860A_ABST
    Figure CN122244860A_ABST
Patent Text Reader

Abstract

This invention relates to the field of microscopy imaging technology, and more particularly to a method for acquiring microscope images. By inputting sample type data and environmental parameters of the environmental monitoring sample into a pre-trained adaptive imaging model, the model synchronously generates adaptive focusing and illumination parameters that match the current imaging environment. The microscope's focusing position, focusing step size, and focusing range are adjusted according to the adaptive focusing parameters, and the brightness, wavelength, and illumination angle of the illumination source are adjusted according to the adaptive illumination parameters. The environmental monitoring sample is then imaged under these adjusted focusing and illumination conditions to obtain a raw microscope image. Based on the environmental parameters, image restoration processing is performed on the raw microscope image to generate a target microscope image. This method solves the problem of balancing environmental adaptability and image quality in complex environmental monitoring scenarios with existing general-purpose microscopes, improving both target image quality and image adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microscope imaging technology, and more particularly to a method for acquiring microscope images. Background Technology

[0002] Currently, with the rapid development of the environmental monitoring industry, the requirements for accuracy and efficiency in water quality, soil, and marine ecology testing are constantly increasing. Clear microscopic images are needed as the core basis for data interpretation and report generation to meet the practical needs of third-party environmental monitoring and ecological environment assessment. However, due to the complexity and diversity of environmental monitoring samples, and the special environmental characteristics of some monitoring scenarios such as high temperature, high humidity, and high salt spray, conventional imaging methods are difficult to adapt to these complex samples and special scenarios, failing to meet the basic imaging requirements of environmental monitoring. Against this backdrop, general-purpose microscopic image acquisition methods have become the widely adopted basic solution in the industry due to their ease of operation and low cost. However, this solution only meets the minimum standard of microscopic image acquisition requirements and cannot solve the adaptation problems caused by the complexity of samples and the special nature of environmental monitoring scenarios, thus failing to meet the requirements for accurate imaging.

[0003] Existing general-purpose microscope image acquisition methods are typically used for acquiring microscope images of routine laboratory samples. To adapt to various routine sample types, they usually employ fixed focusing modes and single illumination methods. They are not customized for the complex characteristics of environmental monitoring samples or the special environmental conditions of some monitoring scenarios. As a result, their adaptability and stability cannot match the actual environmental monitoring scenarios, leading to problems such as poor image quality, low efficiency, and weak stability. Ultimately, they cannot efficiently and accurately acquire microscope images of environmental samples, making it difficult to support the batch delivery and data traceability requirements of CMA (China Metrology Accreditation) reports. Summary of the Invention

[0004] This invention provides a method for acquiring microscope images, which solves the technical problem that existing general-purpose microscope image acquisition methods cannot be adapted to environmental monitoring of complex samples and special scenarios.

[0005] The first aspect of this invention provides a method for acquiring microscope images, comprising the following steps:

[0006] Acquire sample type data of the sample to be monitored and environmental parameters of the current imaging environment;

[0007] The sample type data and the environmental parameters are input into a pre-trained adaptive imaging model, and the adaptive imaging model synchronously generates adaptive focus parameters and adaptive illumination parameters that match the current imaging environment.

[0008] Adjust the microscope's focus position, focus step size, and focus range according to the adaptive focus parameters, and adjust the brightness, wavelength, and illumination angle of the illumination source according to the adaptive illumination parameters.

[0009] With the focus and illumination adjusted, images of the environmental monitoring sample are acquired to obtain raw microscope images.

[0010] Based on the environmental parameters, the original microscope image is subjected to image restoration processing to eliminate image degradation caused by the current environmental parameters and generate the target microscope image.

[0011] Optionally, the step of acquiring sample type data of the environmental monitoring sample to be tested and environmental parameters of the current imaging environment includes:

[0012] The environmental monitoring sample to be tested is placed on a multispectral sensing platform. The spectral reflectance curve of the sample is obtained by spectral scanning. The spectral reflectance curve is matched and identified with a pre-stored environmental monitoring sample spectral library to generate sample type data.

[0013] Simultaneously, temperature field distribution data, relative humidity data, and salt spray particle size distribution data of the current imaging environment are collected in real time through a temperature sensor array, humidity sensor, and laser scattering particle counter integrated around the multispectral sensing platform;

[0014] Based on the particle size distribution data of the salt spray particles, the concentration distribution data of the salt spray particles was calculated.

[0015] The environmental parameters of the current imaging environment are constructed using the temperature field distribution data, the relative humidity data, the salt spray particulate size distribution data, and the salt spray particulate concentration distribution data.

[0016] Optionally, the step of synchronously generating adaptive focus parameters and adaptive illumination parameters matching the current imaging environment through the adaptive imaging model includes:

[0017] The sample type data and the environmental parameters are normalized and embedded to generate the model input feature tensor;

[0018] The input feature tensor of the model is sequentially passed through the multi-layer feature interaction module in the adaptive imaging model. Each layer feature interaction module performs cross-modal attention calculation with environmental parameter features as queries and sample type features as keys, or performs multi-head cross-attention fusion of the two features, so that environmental parameter features and sample type features can interact bidirectionally as queries and keys, and then perform forward propagation, finally outputting high-order coupled features.

[0019] The higher-order coupling features are input into the focus parameter output head, which outputs the focus position value, focus step size value and focus range value through a fully connected layer and a regression layer to obtain adaptive focus parameters.

[0020] The higher-order coupling feature is input into the lighting parameter output head, which outputs brightness, wavelength, and illumination angle values ​​through a fully connected layer and a regression layer to obtain adaptive lighting parameters.

[0021] Optionally, the step of performing image restoration processing on the original microscope image based on the environmental parameters to eliminate image degradation caused by the current environmental parameters and generate a target microscope image includes:

[0022] Based on the temperature field distribution data and relative humidity data in the environmental parameters, the original microscope image is sequentially subjected to geometric correction and scattering correction to obtain an intermediate corrected image.

[0023] Based on the salt spray particulate matter concentration distribution data and salt spray particulate matter size distribution data in the environmental parameters, a salt spray adhesion degradation model is constructed.

[0024] The intermediate corrected image is corrected for salt spray degradation using the salt spray adhesion degradation model to generate the target microscope image.

[0025] Optionally, the step of correcting the intermediate correction image for salt spray degradation using the salt spray adhesion degradation model to generate the target microscope image includes:

[0026] The intermediate corrected image is subjected to frequency domain transformation to extract the initial amplitude spectrum and phase spectrum;

[0027] Based on the salt spray particulate matter size distribution data, the corresponding frequency domain attenuation cutoff band is selected from the preset salt spray particulate size attenuation lookup table;

[0028] Selectively enhance the high-frequency components in the initial amplitude spectrum that are located within the frequency domain attenuation cutoff band to compensate for the high-frequency loss caused by salt spray adhesion and generate the target amplitude spectrum.

[0029] The target amplitude spectrum and the phase spectrum are subjected to inverse frequency domain transformation to generate a high-frequency restored image;

[0030] The target microscope image is output by removing artifacts and noise remaining after frequency domain enhancement of the high-frequency restored image using a pre-trained lightweight convolutional neural network in an end-to-end manner.

[0031] Optionally, the method further includes:

[0032] When it is detected that the sample type data of the environmental monitoring sample to be tested is not included in the training sample set of the adaptive imaging model, or the current environmental parameters exceed the coverage of the training sample set, a model update trigger signal is generated.

[0033] Based on the model update trigger signal, historical data that meets the preset threshold in similarity with the current sample type data and current environmental parameters are selected from the pre-stored historical microscope image acquisition data, and the samples corresponding to the historical data are combined with the current environmental monitoring samples to be tested to construct an incremental training set.

[0034] Using the sample type data and environmental parameters in the incremental training set as input, and the adaptive focusing parameters and adaptive illumination parameters actually used by the corresponding samples in the incremental training set during historical acquisition as supervision targets, the adaptive imaging model is updated with gradients.

[0035] During the gradient update process, the historical importance weight of each imaging parameter is calculated, and the changes in the model parameters are weighted and constrained based on the historical importance weight to generate an updated adaptive imaging model.

[0036] The updated adaptive imaging model is used as the new adaptive imaging model, and the process jumps to the step of inputting the sample type data and the environmental parameters into the pre-trained adaptive imaging model.

[0037] A second aspect of the present invention provides a microscope image acquisition system, comprising:

[0038] The data acquisition module is used to acquire sample type data of the environmental samples to be monitored and environmental parameters of the current imaging environment;

[0039] An adaptive imaging model processing module is used to input the sample type data and the environmental parameters into a pre-trained adaptive imaging model, and to synchronously generate adaptive focusing parameters and adaptive illumination parameters that match the current imaging environment through the adaptive imaging model.

[0040] The parameter adjustment control module is used to adjust the focus position, focus step size and focus range of the microscope according to the adaptive focus parameters, and to adjust the brightness, wavelength and illumination angle of the illumination source according to the adaptive illumination parameters.

[0041] The image acquisition module is used to acquire images of the environmental monitoring sample under the adjusted focus and illumination conditions to obtain raw microscope images;

[0042] The image restoration processing module is used to perform image restoration processing on the original microscope image based on the environmental parameters, so as to eliminate image degradation caused by the current environmental parameters and generate a target microscope image.

[0043] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the microscope image acquisition method described above.

[0044] The fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the microscope image acquisition method as described above.

[0045] The fifth aspect of the present invention provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer performs the microscope image acquisition method as described above.

[0046] As can be seen from the above technical solutions, the present invention has the following advantages:

[0047] This invention inputs sample type data of the environmental monitoring sample and environmental parameters of the current imaging environment into a pre-trained adaptive imaging model. This model simultaneously generates adaptive focusing and illumination parameters that match the current imaging environment. Subsequently, the microscope's focusing position, focusing step size, and focusing range are adjusted according to the generated adaptive focusing parameters, and the brightness, wavelength, and illumination angle of the illumination source are adjusted according to the adaptive illumination parameters. Under the adjusted focusing and illumination conditions, images of the environmental monitoring sample are acquired, resulting in raw microscope images. Finally, based on the previously acquired environmental parameters, image restoration processing is performed on the raw microscope images to eliminate image degradation caused by the current environmental parameters, generating the final target microscope image. Compared to existing technologies, this invention uses environmental parameters as key input information in the imaging process and coordinates the generation of focusing and illumination parameters through a pre-trained adaptive imaging model, enabling the imaging system to actively adapt to environmental changes. Simultaneously, targeted image restoration processing is performed again using environmental parameters after image acquisition, effectively improving the quality of the final target microscope image and its adaptability to different environments. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 A flowchart illustrating the steps of a microscope image acquisition method provided in an embodiment of the present invention;

[0050] Figure 2 This is a structural block diagram of a microscope image acquisition system provided in an embodiment of the present invention;

[0051] Figure 3 This is a structural block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0052] This invention provides a microscope image acquisition method to solve the technical problem that existing general-purpose microscope image acquisition methods cannot be adapted to environmental monitoring of complex samples and special scenarios.

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be noted that in the optional embodiments of the present invention, the object information and other related data involved require the permission or consent of the object when the embodiments of the present invention are applied to specific products or technologies, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. That is to say, if the embodiments of the present invention involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations, and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required, and the embodiments also need to be implemented with the authorization and consent of the object.

[0054] Please see Figure 1 , Figure 1 This is a flowchart illustrating the steps of a microscope image acquisition method provided in an embodiment of the present invention.

[0055] The present invention provides a method for acquiring microscope images, comprising the following steps:

[0056] Step 101: Obtain the sample type data of the environmental monitoring sample to be tested and the environmental parameters of the current imaging environment.

[0057] It should be noted that environmental monitoring samples are typically characterized by complex composition and varied morphology, potentially containing liquid matrices, solid particulate matter, and biological components simultaneously. Furthermore, they are often collected in harsh environments such as outdoor locations or industrial sites. Therefore, simply acquiring image information of the sample is insufficient for high-quality imaging; it is also necessary to simultaneously acquire sample category information and on-site environmental parameters for subsequent adaptive imaging adjustments and image restoration processing. In this embodiment, step 101 aims to achieve high-precision simultaneous acquisition of sample type and environmental parameters through an integrated acquisition platform.

[0058] Further, step 101 may include the following sub-steps:

[0059] S11. Place the environmental monitoring sample to be tested on the multispectral sensing platform, obtain the spectral reflectance curve of the sample through spectral scanning, and match and identify the sample type data based on the spectral reflectance curve with the pre-stored environmental monitoring sample spectral library.

[0060] It should be noted that the environmental monitoring sample spectral library is a collection formed by pre-collecting the spectral reflectance curves of various typical environmental monitoring samples under standard conditions in an offline state, labeling each curve with its corresponding sample category, and storing them in a database after sorting and verification.

[0061] In this embodiment of the invention, the multispectral sensing platform can be configured with multiple light sources of different wavelengths and hyperspectral sensors. When a sample is placed on the platform, it is sequentially illuminated with light sources of different wavelengths, and the reflected light intensity at each wavelength is recorded, thereby generating a continuous spectral reflectance curve. This curve reflects the absorption and reflection characteristics of the sample to different wavelengths of light. Different substances, such as different types of soil, oil pollution, and algae, have unique spectral characteristics. During identification, the collected spectral reflectance curve is matched with the spectra of various standard samples pre-stored in the environmental monitoring sample spectral library for similarity, for example, by calculating the spectral angle or correlation coefficient, and the sample category corresponding to the spectrum with the highest matching degree is selected as the type data of the current sample. This embodiment uses spectral methods to identify sample types, which has the advantages of being non-contact, non-destructive, and highly accurate compared to manual visual inspection or simple image recognition.

[0062] S12. Simultaneously, temperature field distribution data, relative humidity data, and salt spray particle size distribution data of the current imaging environment are collected in real time through the temperature sensor array, humidity sensor, and laser scattering particle counter integrated around the multispectral sensing platform.

[0063] In this embodiment of the invention, to achieve spatiotemporal alignment between sample data and environmental parameters, a multispectral sensing platform is used as a core carrier, integrating various environmental sensors on its physical periphery, such as the platform base or support frame. The temperature sensor array consists of multiple high-precision temperature probes arranged in a grid pattern, used to collect temperature values ​​at different locations near the stage, thereby constructing a micro-area temperature field distribution data, rather than the temperature of a single point. This is crucial for correcting non-uniform thermal drift caused by local heat sources. A humidity sensor is used to collect relative humidity data near the stage. Specifically, this embodiment introduces a laser scattering particle counter for collecting salt spray particulate matter size distribution data. This counter is based on the principle of light scattering; when airborne particles pass through a laser beam, scattered light pulses related to particle size are generated. By analyzing the statistical characteristics of a large number of pulses, the particle size distribution can be deduced, such as the number or volume percentage of particles in different size ranges, such as 0.3-0.5 micrometers, 0.5-1.0 micrometers, etc. It should be noted that ordinary particulate matter sensors typically only output the mass concentration of PM2.5 or PM10. However, this embodiment emphasizes the collection of particle size distribution data because in subsequent image restoration processing, salt spray particles of different sizes have completely different attenuation characteristics for different spatial frequency components of the image, and accurate correction cannot be performed based solely on concentration data.

[0064] S13. Based on the particle size distribution data of salt spray particles, the concentration distribution data of salt spray particles is calculated.

[0065] In this embodiment of the invention, after obtaining the particle size distribution data, the mass concentration of different particle size ranges can be calculated by weighted integral of the number or volume of particles in each particle size range, based on the particle physics model, assuming that the particles are spherical and their average density is known, thereby obtaining the salt spray particulate matter concentration distribution data.

[0066] S14. Using temperature field distribution data, relative humidity data, salt spray particulate matter size distribution data, and salt spray particulate matter concentration distribution data, construct the environmental parameters of the current imaging environment.

[0067] In this embodiment of the invention, the collected temperature field distribution data, relative humidity data, salt spray particulate matter size distribution data, and calculated concentration distribution data are packaged together to construct a multi-dimensional environmental parameter tensor. This parameter tensor not only describes the current temperature and humidity state of the environment, but also finely characterizes the physical properties of salt spray, a key interfering factor.

[0068] Step 102: Input the sample type data and environmental parameters into the pre-trained adaptive imaging model, and generate adaptive focus parameters and adaptive illumination parameters that match the current imaging environment in a synchronous manner through the adaptive imaging model.

[0069] It should be noted that the adaptive imaging model involved here is a deep learning model that is fixed after offline training using a large amount of labeled training data, namely the sample types and environmental parameters collected in steps S11 to S13 as input and the optimal combination of imaging parameters calibrated through experiments as output. The model is iteratively optimized using a supervised learning algorithm until its performance converges. Once the model is trained, its network weights are determined and can be used in the subsequent online inference stage without retraining. In this embodiment, the core of step 102 is to use such a trained deep learning model to directly map the complex relationship between the sample and the environment to the optimal combination of imaging parameters and achieve the coordinated output of the two types of parameters. This differs from the traditional method of adjusting autofocus and autoexposure as independent modules sequentially, avoiding mutual interference between parameters, such as the need for refocusing after adjusting the illumination.

[0070] Furthermore, step 102 may include the following sub-steps:

[0071] S21. Normalize and embed the sample type data and environmental parameters to generate the model input feature tensor.

[0072] In this embodiment of the invention, sample type data is typically categorical data, such as soil and wastewater, which needs to be converted into dense numerical vectors through embedding encoding. Environmental parameters such as temperature, humidity, and salt spray particle size distribution are continuous numerical values ​​and need to be normalized to scale them to a uniform numerical range, such as 0 to 1, to eliminate the influence of different physical dimensions on model training. The encoded and normalized data are concatenated along the channel dimension to form a multi-dimensional model input feature tensor, which serves as the input to the subsequent deep network.

[0073] S22. The input feature tensor of the model is passed through the multi-layer feature interaction module in the adaptive imaging model in sequence. Each layer feature interaction module performs cross-modal attention calculation with environmental parameter features as queries and sample type features as keys, or performs multi-head cross-attention fusion of the two features, so that environmental parameter features and sample type features can interact with each other as queries and keys in a two-way manner before performing forward propagation, and finally outputs high-order coupled features.

[0074] In this embodiment of the invention, the adaptive imaging model consists of multiple stacked feature interaction modules, each designed to facilitate deep fusion between environmental parameters and sample type information. One implementation is asymmetric cross-modal attention, where environmental parameters such as humidity and salt spray concentration are external perturbation factors affecting image quality, while sample type determines the optical properties of the observed object, such as reflectivity and transmittance. During imaging, environmental perturbations affect specific types of samples; for example, high humidity has drastically different scattering effects on hydrophilic and hydrophobic samples. Therefore, the module is designed to use environmental parameter features as queries and actively focus on key information in sample type features as keys, thereby learning the complex nonlinear relationship of which sample characteristics should be emphasized under the current environmental conditions. Another implementation is multi-head cross-attention fusion, where environmental parameter features and sample type features interact bidirectionally as queries and keys. This approach offers more comprehensive interaction and is suitable for offline training or scenarios with extremely high accuracy requirements. Regardless of the method used, after multiple layers of interaction, the model ultimately outputs a high-order coupled feature that deeply fuses the information from both modalities.

[0075] S23. Input the high-order coupling features into the focus parameter output head. The focus parameter output head outputs the focus position value, focus step size value and focus range value through the fully connected layer and the regression layer to obtain the adaptive focus parameters.

[0076] In this embodiment of the invention, high-order coupling features are fed into a dedicated task branch, namely the focus parameter output head. This output head consists of several fully connected layers and a regression layer. The fully connected layers are responsible for further nonlinear transformation and dimensionality compression of the features, while the regression layer is responsible for outputting three specific continuous values: the focus position value, i.e., the theoretical position where the objective lens should move; the focus step size value, i.e., the step distance during autofocus scanning; and the focus range value, i.e., the range of autofocus search. The synergistic optimization of these three parameters enables the microscope to quickly and accurately lock the focus.

[0077] S24. Input the high-order coupling feature into the lighting parameter output head. The lighting parameter output head outputs the brightness value, wavelength value and illumination angle value through the fully connected layer and the regression layer to obtain the adaptive lighting parameters.

[0078] In this embodiment of the invention, another task branch, the illumination parameter output head, uses the same higher-order coupling feature as input to predict and output three illumination-related parameters in parallel: a brightness value for adjusting the light source drive current, a wavelength value for switching filters or adjusting the tunable light source, and an illumination angle value for driving the motor to adjust the light source support. Since the focusing and illumination parameters are synchronously generated from the same higher-order coupling feature through different output heads, the model can automatically learn the inherent correlation and synergistic relationship between the two types of parameters during training. For example, for samples with high scattering characteristics indicated by sample type data, the model may simultaneously generate a smaller focusing step size to improve focusing accuracy and a specific wavelength of illumination light to enhance penetration.

[0079] Step 103: Adjust the focus position, focus step size and focus range of the microscope according to the adaptive focus parameters, and adjust the brightness, wavelength and illumination angle of the illumination source according to the adaptive illumination parameters.

[0080] In this embodiment of the invention, after obtaining the adaptive parameters generated by the model, the control system converts these digital instructions into specific hardware actions. The focus position value, focus step size value, and focus range value are converted into drive pulse signals and sent to the piezoelectric ceramic nanostage controlling the objective lens, causing it to move precisely to the designated position and execute a preset scanning strategy. The brightness value is converted into the duty cycle of a pulse width modulation signal to adjust the current of the multi-channel LED array. The wavelength value is used to control the filter wheel or tunable laser to output light of the desired wavelength. The illumination angle value is decomposed into azimuth and elevation components, driving a stepper motor to rotate the light source support to the designated angle, so that the light illuminates the sample at the optimal angle.

[0081] Step 104: Under the adjusted focus and illumination conditions, acquire images of the environmental monitoring sample to obtain the original microscope image.

[0082] In this embodiment of the invention, once the hardware is properly adjusted, a scientific-grade CMOS or sCMOS image sensor is triggered to capture images. The sensor captures one or more frames of images with preset exposure time and gain parameters. To improve the image signal-to-noise ratio, this embodiment can also filter and fuse the continuously captured multiple frames: by calculating the inter-frame structural similarity index, high-quality frames are selected and weighted averaged to finally generate a high-quality original microscope image. It should be noted that the image at this time is still affected by environmental factors at the moment of imaging, such as thermal drift, humidity scattering, and salt spray adhesion, and exhibits varying degrees of degradation.

[0083] Step 105: Based on environmental parameters, perform image restoration processing on the original microscope image to eliminate image degradation caused by the current environmental parameters and generate the target microscope image.

[0084] Furthermore, step 105 may include the following sub-steps:

[0085] S31. Based on the temperature field distribution data and relative humidity data in the environmental parameters, the original microscope image is sequentially subjected to geometric correction and scattering correction to obtain an intermediate corrected image.

[0086] In this embodiment of the invention, a non-rigid deformation field model is first constructed using temperature field distribution data. Since thermal drift is typically non-uniform, pixel offsets differ across different regions of the image. The theoretical offset of each pixel is calculated using this model. Then, the original image is subjected to pixel-by-pixel coordinate mapping and interpolation resampling to correct the geometric deformation caused by thermal drift, resulting in a geometrically corrected image.

[0087] Next, scattering correction is performed using relative humidity data. Humidity causes scattering from tiny particles in the optical path, including the sample itself or dust in the air, resulting in image blurring. This degradation can be described by a point spread function. In this embodiment, a humidity scattering point spread function lookup table is pre-generated. This table is pre-calibrated by imaging a standard resolution plate under different humidity conditions and then calculating the point spread function. "Pre-generated" here means that the optical scattering characteristics corresponding to different relative humidities are measured through numerous experiments offline and then stored in the form of a lookup table for quick retrieval during real-time processing. During correction, the corresponding scattering point spread function is directly selected from the lookup table based on the currently acquired relative humidity data. Then, Wiener filtering or Richardson-Lucy deconvolution is applied to the geometrically corrected image to minimize the light scattering blur caused by humidity, resulting in an intermediate corrected image.

[0088] S32. Based on the concentration distribution data and particle size distribution data of salt spray particulate matter in the environmental parameters, construct a salt spray adhesion degradation model.

[0089] In this embodiment of the invention, since the degradation mechanism of salt spray on images differs from that of temperature and humidity, it mainly manifests as salt spray particles adhering to the lens or sample surface, causing local light intensity attenuation and loss of high-frequency details. This embodiment constructs a dedicated salt spray adhesion degradation model based on the concentration distribution data of salt spray particles to determine the overall intensity of attenuation and the particle size distribution data to determine the spatial frequency characteristics of attenuation. The core of this model is a frequency domain attenuation function, which describes the degree to which different spatial frequency components are attenuated by salt spray particles of different sizes.

[0090] S33. The intermediate calibration image is corrected for salt spray degradation using the salt spray adhesion degradation model to generate the target microscope image.

[0091] Furthermore, step S33 may include the following sub-steps:

[0092] S331. Perform frequency domain transformation on the intermediate correction image to extract the initial amplitude spectrum and phase spectrum.

[0093] In this embodiment of the invention, a Fourier transform is performed on the intermediate corrected image to convert it from the spatial domain to the frequency domain, resulting in a frequency domain representation composed of the intensity of each frequency component represented by the initial amplitude spectrum and the position information of each frequency component represented by the phase spectrum.

[0094] S332. Based on the particle size distribution data of salt spray particles, select the corresponding frequency domain attenuation cutoff band from the preset salt spray particle size attenuation lookup table.

[0095] In this embodiment of the invention, the pre-defined salt spray particle size attenuation lookup table refers to a multi-dimensional data table pre-constructed offline. Specifically, using Mie scattering theory, for typical salt spray particle size ranges such as 0.1 to 10 micrometers, the size is discretized into multiple particle size intervals, and the attenuation coefficients of different particle sizes for different spatial frequency light are calculated, forming a multi-dimensional lookup table containing the correspondence between particle size, frequency, and attenuation coefficient. The pre-defined characteristic of this table is that its construction process does not occupy real-time imaging resources; all complex physical calculations are completed offline, and only a simple table lookup operation is required during online application. During real-time correction, the frequency domain attenuation cutoff band matching the particle size distribution can be quickly found based on the actual salt spray particle size distribution data collected in step 101. This cutoff band is not a fixed high-frequency threshold, but a frequency range that indicates which frequency components are significantly affected by salt spray. The table lookup method avoids complex real-time Mie scattering calculations during imaging, greatly improving processing speed and meeting the needs of real-time microscope imaging.

[0096] S333: Selectively enhance the high-frequency components in the initial amplitude spectrum located within the frequency domain attenuation cutoff band to compensate for the high-frequency loss caused by salt spray adhesion and generate the target amplitude spectrum.

[0097] In this embodiment of the invention, based on the frequency domain attenuation cutoff band obtained in step S332, the algorithm processes the initial amplitude spectrum: components with frequencies below the cutoff band are retained, while high-frequency components within the cutoff band are selectively enhanced according to their attenuation level, i.e., multiplied by a compensation coefficient greater than 1. This processing method accurately compensates for the loss of high-frequency details caused by salt spray adhesion, while avoiding excessive noise enhancement.

[0098] S334. Perform inverse frequency domain transformation on the target amplitude spectrum and phase spectrum to generate a high-frequency restored image.

[0099] In this embodiment of the invention, the compensated and enhanced target amplitude spectrum is combined with the original phase spectrum, and an inverse Fourier transform is performed to convert the image back from the frequency domain to the spatial domain. Since the phase spectrum carries the structural and edge information of the image without loss, the high-frequency restored image obtained after the inverse transform has significantly improved detail clarity.

[0100] S335. Using a pre-trained lightweight convolutional neural network, artifacts and noise remaining after frequency domain enhancement of the high-frequency restored image are removed in an end-to-end manner, and the target microscope image is output.

[0101] In this embodiment of the invention, the pre-trained lightweight convolutional neural network refers to a network trained offline using a large amount of paired training data—images with artifacts and noise after frequency domain enhancement—as input and corresponding ideal clean images as output. This network undergoes supervised learning until it accurately learns the mapping relationship from the artifact-laden image to the clean image. The trained network weights are then fixed for online inference. While frequency domain enhancement compensates for high-frequency losses, it may introduce artificial artifacts such as ringing effects or amplify existing noise. Therefore, this embodiment introduces a lightweight convolutional neural network for post-processing. This network takes the high-frequency restored image as input, passes through a small number of convolutional layers, and automatically identifies and removes residual artifacts and noise generated during the enhancement process using an end-to-end learning approach, while further sharpening edges. Finally, the network outputs a clear, artifact-free final result—the target microscope image. By combining physically model-guided frequency domain enhancement with data-driven convolutional neural network artifact removal, this embodiment achieves high-quality restoration of salt spray-attached images.

[0102] Furthermore, the microscope image acquisition method provided by this invention also includes an online model update step, enabling the system to adapt to new operating conditions:

[0103] S41. When it is detected that the sample type data of the environmental monitoring sample to be tested is not included in the training sample set of the adaptive imaging model, or the current environmental parameters exceed the coverage of the training sample set, a model update trigger signal is generated.

[0104] In this embodiment of the invention, the sample types and environmental conditions for environmental monitoring are extremely variable. During operation, the system continuously monitors the sample types and environmental parameters acquired in step 101. If it is found that the currently input sample type or a certain environmental parameter, such as salt spray concentration, exceeds the coverage of the original training set, it means that the current model may not be accurate enough in predicting this new scenario. In this case, the system will automatically generate a model update trigger signal and initiate the online update process.

[0105] S42. Based on the model update trigger signal, select historical data from the pre-stored historical microscope image acquisition data that meets the preset threshold in similarity to the current sample type data and current environmental parameters, and combine the samples corresponding to the historical data with the current environmental monitoring samples to construct an incremental training set.

[0106] In this embodiment of the invention, the system maintains a historical acquisition database, storing the sample type, environmental parameters, imaging parameters, and acquired images corresponding to each successful image acquisition task. When an update is needed, the system does not simply randomly select historical data, but employs an intelligent selection strategy: it retrieves a batch of historical data most similar to the current new data in terms of sample type and environmental parameters. The preset threshold here refers to a similarity judgment standard pre-set according to the actual application scenario, such as a certain value of Euclidean distance or a certain percentage of cosine similarity, used to define which historical data are sufficiently similar to the current scene and thus can be selected into the incremental training set. These highly similar historical data are combined with the current new scene data to construct an incremental training set for incremental learning. This ensures that incremental training focuses on the knowledge gaps of the current model.

[0107] S43. Using the sample type data and environmental parameters in the incremental training set as input, and the adaptive focusing parameters and adaptive illumination parameters actually used by the corresponding samples in the incremental training set during historical acquisition as supervision targets, the adaptive imaging model is updated with gradients.

[0108] In this embodiment of the invention, the data pairs in the constructed incremental training set, i.e., the input is the sample type and environmental parameters, and the label is the imaging parameters that are actually used and verified to be effective at that time, are fed into the current adaptive imaging model, and one or more rounds of gradient descent updates are performed to enable the model to learn and adapt to the data mapping relationship in the new scenario.

[0109] S44. During the gradient update process, calculate the historical importance weight of each imaging parameter, and apply weighted constraints to the changes in model parameters based on the historical importance weight to generate the updated adaptive imaging model.

[0110] In this embodiment of the invention, during incremental learning, for each parameter in the model, a historical importance weight is calculated based on its contribution to previous tasks, i.e., historical data. Parameters with greater contributions have higher weights. During gradient updates, the algorithm imposes a constraint on the amount of parameter change: for parameters with high importance weights, the change is allowed to be very small to freeze old knowledge; for parameters with low importance weights, the change is allowed to be larger to learn new knowledge. This weighted constraint mechanism based on importance weights effectively prevents catastrophic forgetting, ensuring that the model learns to handle new scenarios while retaining knowledge of previously learned scenarios.

[0111] S45. Use the updated adaptive imaging model as the new adaptive imaging model, and jump to the step of inputting sample type data and environmental parameters into the pre-trained adaptive imaging model.

[0112] In this embodiment of the invention, the updated model is immediately deployed in subsequent imaging tasks, replacing the original old model. The entire system possesses a closed-loop, continuously self-optimizing capability, enabling it to continuously improve its imaging performance and robustness in complex and variable environments over time.

[0113] Please see Figure 2 , Figure 2 This is a structural block diagram of a microscope image acquisition system provided in an embodiment of the present invention.

[0114] The present invention provides a microscope image acquisition system, comprising:

[0115] The data acquisition module 201 is used to acquire sample type data of the environmental monitoring sample to be tested and environmental parameters of the current imaging environment;

[0116] The adaptive imaging model processing module 202 is used to input sample type data and environmental parameters into a pre-trained adaptive imaging model, and to synchronously generate adaptive focusing parameters and adaptive illumination parameters that match the current imaging environment through the adaptive imaging model.

[0117] The parameter adjustment control module 203 is used to adjust the focus position, focus step size and focus range of the microscope according to the adaptive focus parameters, and to adjust the brightness, wavelength and illumination angle of the illumination source according to the adaptive illumination parameters.

[0118] The image acquisition module 204 is used to acquire images of environmental monitoring samples under the adjusted focus and illumination conditions to obtain raw microscope images.

[0119] The image restoration processing module 205 is used to perform image restoration processing on the original microscope image based on environmental parameters, so as to eliminate image degradation caused by the current environmental parameters and generate a target microscope image.

[0120] The specific implementation of this microscope image acquisition system is basically the same as the specific embodiment of the microscope image acquisition method described above, and will not be repeated here.

[0121] Please see Figure 3 , Figure 3 This is a structural block diagram of an electronic device provided in an embodiment of the present invention.

[0122] An electronic device according to an embodiment of the present invention includes: a memory 301 and a processor 302. The memory 301 stores a computer program. When the computer program is executed by the processor 302, the processor 302 performs a microscope image acquisition method as described in any of the above embodiments.

[0123] Memory 301 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Memory 301 has storage space 303 for program code 313 for performing any of the method steps described above. For example, storage space 303 for program code may include various program codes 313 for implementing the various steps in the methods described above. These program codes may be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, CDs, memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When run by a computing processing device, this code causes the computing processing device to perform the various steps in the methods described above. These program codes may be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, CDs, memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When this code is run by a computing device, it causes the computing device to perform the various steps in the microscope image acquisition method described above.

[0124] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the microscope image acquisition method as described in any of the above embodiments.

[0125] This invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the microscope image acquisition method as described in any of the above embodiments.

[0126] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0127] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0129] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0130] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0131] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for acquiring microscope images, characterized in that, Includes the following steps: Acquire sample type data of the sample to be monitored and environmental parameters of the current imaging environment; The sample type data and the environmental parameters are input into a pre-trained adaptive imaging model, which then synchronously generates adaptive focus parameters and adaptive illumination parameters that match the current imaging environment. Adjust the microscope's focus position, focus step size, and focus range according to the adaptive focus parameters, and adjust the brightness, wavelength, and illumination angle of the illumination source according to the adaptive illumination parameters. With the focus and illumination conditions adjusted, images of the environmental monitoring sample are acquired to obtain raw microscope images; Based on the environmental parameters, the original microscope image is subjected to image restoration processing to eliminate image degradation caused by the current environmental parameters and generate the target microscope image.

2. The microscope image acquisition method according to claim 1, characterized in that, The steps of acquiring sample type data of the environmental monitoring sample to be tested and environmental parameters of the current imaging environment include: The environmental monitoring sample to be tested is placed on a multispectral sensing platform. The spectral reflectance curve of the sample is obtained by spectral scanning. The spectral reflectance curve is matched and identified with a pre-stored environmental monitoring sample spectral library to generate sample type data. Simultaneously, temperature field distribution data, relative humidity data, and salt spray particle size distribution data of the current imaging environment are collected in real time through a temperature sensor array, humidity sensor, and laser scattering particle counter integrated around the multispectral sensing platform; Based on the particle size distribution data of the salt spray particles, the concentration distribution data of the salt spray particles was calculated. The environmental parameters of the current imaging environment are constructed using the temperature field distribution data, the relative humidity data, the salt spray particulate size distribution data, and the salt spray particulate concentration distribution data.

3. The microscope image acquisition method according to claim 1, characterized in that, The step of synchronously generating adaptive focus parameters and adaptive illumination parameters that match the current imaging environment through the adaptive imaging model includes: The sample type data and the environmental parameters are normalized and embedded to generate the model input feature tensor; The input feature tensor of the model is sequentially passed through the multi-layer feature interaction module in the adaptive imaging model. Each layer feature interaction module performs cross-modal attention calculation with environmental parameter features as queries and sample type features as keys, or performs multi-head cross-attention fusion of the two features, so that environmental parameter features and sample type features can interact bidirectionally as queries and keys, and then perform forward propagation, finally outputting high-order coupled features. The higher-order coupling features are input into the focus parameter output head, which outputs the focus position value, focus step size value and focus range value through a fully connected layer and a regression layer to obtain adaptive focus parameters. The higher-order coupling feature is input into the lighting parameter output head, which outputs brightness, wavelength, and illumination angle values ​​through a fully connected layer and a regression layer to obtain adaptive lighting parameters.

4. The microscope image acquisition method according to claim 1, characterized in that, The step of performing image restoration processing on the original microscope image based on the environmental parameters to eliminate image degradation caused by the current environmental parameters and generate a target microscope image includes: Based on the temperature field distribution data and relative humidity data in the environmental parameters, the original microscope image is sequentially subjected to geometric correction and scattering correction to obtain an intermediate corrected image. Based on the salt spray particulate matter concentration distribution data and salt spray particulate matter size distribution data in the environmental parameters, a salt spray adhesion degradation model is constructed. The intermediate corrected image is corrected for salt spray degradation using the salt spray adhesion degradation model to generate the target microscope image.

5. The microscope image acquisition method according to claim 4, characterized in that, The step of correcting the intermediate correction image for salt spray degradation using the salt spray adhesion degradation model to generate the target microscope image includes: The intermediate corrected image is subjected to frequency domain transformation to extract the initial amplitude spectrum and phase spectrum; Based on the salt spray particulate matter size distribution data, the corresponding frequency domain attenuation cutoff band is selected from the preset salt spray particulate size attenuation lookup table; Selectively enhance the high-frequency components in the initial amplitude spectrum that are located within the frequency domain attenuation cutoff band to compensate for the high-frequency loss caused by salt spray adhesion and generate the target amplitude spectrum. The target amplitude spectrum and the phase spectrum are subjected to inverse frequency domain transformation to generate a high-frequency restored image; The target microscope image is output by removing artifacts and noise remaining after frequency domain enhancement of the high-frequency restored image using a pre-trained lightweight convolutional neural network in an end-to-end manner.

6. The microscope image acquisition method according to claim 1, characterized in that, The method further includes: When it is detected that the sample type data of the environmental monitoring sample to be tested is not included in the training sample set of the adaptive imaging model, or the current environmental parameters exceed the coverage of the training sample set, a model update trigger signal is generated. Based on the model update trigger signal, historical data that meets the preset threshold in similarity with the current sample type data and current environmental parameters are selected from the pre-stored historical microscope image acquisition data, and the samples corresponding to the historical data are combined with the current environmental monitoring samples to be tested to construct an incremental training set. Using the sample type data and environmental parameters in the incremental training set as input, and the adaptive focusing parameters and adaptive illumination parameters actually used by the corresponding samples in the incremental training set during historical acquisition as supervision targets, the adaptive imaging model is updated with gradients. During the gradient update process, the historical importance weight of each imaging parameter is calculated, and the changes in the model parameters are weighted and constrained based on the historical importance weight to generate an updated adaptive imaging model. The updated adaptive imaging model is used as the new adaptive imaging model, and the process jumps to the step of inputting the sample type data and the environmental parameters into the pre-trained adaptive imaging model.

7. A microscope image acquisition system, characterized in that, include: The data acquisition module is used to acquire sample type data of the environmental samples to be monitored and environmental parameters of the current imaging environment; An adaptive imaging model processing module is used to input the sample type data and the environmental parameters into a pre-trained adaptive imaging model, and to synchronously generate adaptive focusing parameters and adaptive illumination parameters that match the current imaging environment through the adaptive imaging model. The parameter adjustment control module is used to adjust the focus position, focus step size and focus range of the microscope according to the adaptive focus parameters, and to adjust the brightness, wavelength and illumination angle of the illumination source according to the adaptive illumination parameters. The image acquisition module is used to acquire images of the environmental monitoring sample under the adjusted focus and illumination conditions to obtain raw microscope images; The image restoration processing module is used to perform image restoration processing on the original microscope image based on the environmental parameters, so as to eliminate image degradation caused by the current environmental parameters and generate a target microscope image.

8. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the microscope image acquisition method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the microscope image acquisition method as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, wherein when the program instructions are executed by a computer, the computer performs the microscope image acquisition method as described in any one of claims 1-6.