Imaging parameter optimization method based on double-target joint quantification and double-target quantifying device
Patent Information
- Application Number
- CN202611451466.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-10-27
AI Technical Summary
1.本发明通过采用棋盘格与浮游生物标本双靶协同标定体系,改善了传统单一工业靶标与实景成像脱节的缺陷,通过光学靶标建立标准化量化基准,借助生物标本靶标贴合真实监测场景,可精准识别水体浑浊引发的纹理退化、轮廓弱化问题,让标定结果既符合光学精度要求,又适配浮游生物实际成像需求,大幅提升标定的针对性与实用性。
Smart Images

Figure CN122990447A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of underwater optical detection technology, specifically to an imaging parameter optimization method and a dual-target calibration device based on dual-target joint quantization. Background Technology
[0002] Underwater dark-field imaging is a key technology for in-situ monitoring of plankton and observation of the morphology of micro aquatic organisms. Dark-field imaging relies on a side ring light source to suppress direct stray light from the water body and highlight the outline and fine texture of plankton. However, the turbidity of natural water bodies varies greatly, and the scattering effect of suspended particles in clear water, low turbidity, medium turbidity and high turbidity water bodies is significantly different. This can easily cause a decrease in the signal-to-noise ratio of the image, blurring of biological textures and attenuation of image contrast. Conventional fixed imaging parameters cannot be adapted to the variable water bodies.
[0003] Traditional underwater dark-field imaging relies on operators repeatedly adjusting key parameters such as exposure, light source brightness, gain, and contrast based on their experience. Because of significant differences in turbidity between natural water bodies, obtaining images of plankton in different water bodies requires manual parameter readjustment. Furthermore, underwater imaging calibration commonly uses checkerboard-style industrial standard targets, which can only perform general optical corrections such as sharpness and geometric distortion. However, the texture, structure, and light transmission characteristics of regular geometric targets differ significantly from the translucent and irregular microscopic morphology of real plankton. Relying on a single industrial target cannot match the actual imaging characteristics of the fine textures and weak contours of plankton.
[0004] Meanwhile, current imaging optimization algorithms mostly adopt fixed step-size iteration and single index evaluation strategies, failing to distinguish between optical imaging indicators and plankton real-world imaging indicators. This makes it difficult to complete multi-dimensional imaging degradation quantification, resulting in optimization objectives that cannot take into account both the system's optical accuracy and the actual imaging effect of plankton. The optimization direction is singular and difficult to adapt to the imaging optimization needs of water bodies with multi-gradient turbidity.
[0005] In summary, existing methods for optimizing underwater plankton dark-field imaging suffer from limitations such as a single target calibration system, reliance on manual adjustment of imaging parameters, and the adaptability of quantitative optimization algorithms. Traditional techniques struggle to meet the shallow depth-of-field calibration requirements of telecentric lenses, failing to balance optical calibration accuracy with real-world plankton imaging performance. Furthermore, they cannot achieve self-optimization of imaging parameters for waters with varying turbidity levels, resulting in limited overall calibration accuracy and imaging optimization effectiveness. Consequently, they fall short of meeting the practical needs for high-precision, standardized in-situ plankton imaging monitoring in diverse natural water bodies. Summary of the Invention
[0006] The purpose of this application is to provide an imaging parameter optimization method and a dual-target calibration device based on dual-target joint quantization, in order to solve the problems of single-target calibration distortion, insufficient target adjustment accuracy, low efficiency of manual adjustment of imaging parameters, poor convergence performance of fixed step size optimization, and inability to quickly adapt to imaging in water bodies with different turbidity in the prior art.
[0007] The objective of this application can be achieved through the following technical solutions: An imaging parameter optimization method based on dual-target joint quantization includes the following steps: S1. In a clear water reference environment and a turbid water body, simultaneously acquire clear water reference imaging and turbidity degradation imaging containing checkerboard optical targets and planktonic specimen targets within the same field of view, and perform preprocessing to generate checkerboard standard target images and planktonic specimen target images respectively. S2. Extract optical performance features from checkerboard standard target images and extract real-scene image features from planktonic specimen target images to calculate the comprehensive score of optical performance features and the comprehensive score of real-scene image features, and perform weighted fusion to calculate the comprehensive score of imaging. S3. Obtain the optimal baseline score based on the comprehensive score of the clear water baseline imaging, calculate the difference between the optimal baseline score and the comprehensive score of the real-time turbidity degradation imaging, and obtain the current water body imaging degradation deviation. S4. Establish the mapping relationship between imaging degradation deviation and parameter adjustment step size to output dynamic iteration step size. At the same time, calculate the individual deviation between the current feature value and the corresponding optimal benchmark value. Determine the current degradation type based on the feature with the largest individual deviation and perform targeted optimization on the parameters of the imaging device. Among them, the optimal reference value of each feature is obtained based on the feature values of the clear water reference imaging. Each feature includes various optical performance features and various real scene image features. The maximum single deviation is the feature with the largest deviation among the differences between each feature value and the corresponding optimal reference value. S5. Determine whether the updated imaging degradation deviation after performing target parameter optimization is less than the preset minimum critical threshold. If the imaging degradation deviation is less than the minimum critical threshold and the difference between the imaging degradation deviations of two adjacent iterations falls within the preset convergence threshold range, then terminate the iteration and save the parameters; otherwise, return to step S4. If the iteration count reaches the preset limit and the iteration does not terminate, return to step S1.
[0008] Preferably, the specific steps of step S1 are as follows: In both standard, non-degradable clear water and turbid water environments, the mechanical installation position of the underwater dark field imaging equipment, the focal length of the telecentric lens, and the initial imaging parameters are kept constant. The checkerboard optical target and planktonic specimen target, placed in the same field of view, were simultaneously acquired using underwater dark-field imaging equipment to obtain multiple sets of clear water baseline images and turbidity degradation images. For both clear water baseline imaging and turbidity degradation imaging, grayscale conversion, background noise removal, Gaussian smoothing filtering, and region of interest cropping preprocessing are performed sequentially to extract and generate independent checkerboard standard target images and planktonic specimen target images.
[0009] Preferably, the optical performance characteristics include signal-to-noise ratio, edge sharpness, and corner integrity, while the real-scene image characteristics include contour integrity, texture sharpness, and subject contrast.
[0010] Preferably, the specific steps of step S2 are as follows: Based on checkerboard standard target images, the signal-to-noise ratio is calculated using the gray-level statistical features of the effective signal region and the background noise region. ; The Sobel operator is used to solve the horizontal and vertical pixel gradients, and the edge sharpness is quantized by the global gradient mean. ; The corner integrity is calculated by the ratio of the actual number of detected corners to the total theoretical number of corners. ; Based on target images of planktonic specimens, the organisms were segmented using OTSU binarization, and the area and perimeter of the effective contours were extracted. A circular metric was used to quantify the integrity of the contours. ; Texture richness is characterized by the neighborhood local variance method, and texture sharpness is calculated by global averaging. The calculation formula is as follows: ; In the above formula, Indicates texture sharpness; These represent the width and height of the target image of the planktonic specimen, respectively. This represents the average gray level of a local neighborhood. This represents the squared mean of the gray levels in the local neighborhood. Binary segmentation was used to distinguish between the biological foreground region and the water background region, and the subject contrast was calculated based on the difference in the mean grayscale values of the two types of regions. ; The Min-Max linear normalization algorithm is used to normalize the optical performance features and the real-scene image features respectively, and uniformly map them to the preset standard value range. Based on the normalized optical performance characteristics and real-scene image characteristics, a comprehensive score for both characteristics is calculated using the following formula: ; ; In the above formula, This represents the overall score of optical performance characteristics; This represents the signal-to-noise ratio after dimensionless representation. This indicates the edge sharpness after dimensionless scaling. Indicates the integrity of the corner point after dimensionless transformation; This represents the comprehensive score of real-scene image features; Indicates the completeness of the contour after dimensionless transformation; This indicates the texture sharpness after dimensionless transformation; This represents the dimensional contrast of the main subject. The comprehensive score of the imaging is calculated by weighting and fusing the normalized comprehensive score of optical performance characteristics and the comprehensive score of real-scene image features based on preset optical weight parameters and real-scene weight parameters for the plankton monitoring scenario. The calculation formula is as follows: ; In the above formula, This represents the overall score of the imaging. Indicates the optical weighting parameter; This represents the real-world weighting parameter.
[0011] The overall imaging score includes the overall score of the clear water benchmark imaging and the overall score of the real-time turbidity degradation imaging. The overall score of the clear water benchmark imaging is calculated by weighted fusion of the overall score of the optical performance characteristics corresponding to the clear water benchmark imaging and the overall score of the real-time turbidity degradation imaging. The overall score of the real-time turbidity degradation imaging is calculated by weighted fusion of the overall score of the optical performance characteristics corresponding to the real-time turbidity degradation imaging and the overall score of the real-time turbidity degradation imaging. The optimal benchmark score is obtained by calculating the arithmetic mean of the overall imaging scores of multiple sets of clear water benchmark imaging.
[0012] Preferably, in step S4, the imaging degradation bias is established. The specific steps for mapping the parameter adjustment step size to output the dynamic iteration step size are as follows: Preset two-level critical thresholds ,and The imaging degradation deviation is divided into three ranges; when When the image is determined to be in a slightly degraded imaging range, corresponding to low turbidity / clear water bodies, the first iteration step size instruction is generated. when When the condition is determined to be in the moderate imaging degradation range, corresponding to the medium turbidity water body, a second iteration step size instruction greater than the first iteration step size is generated; when When the area is identified as a severely degraded imaging region, corresponding to a highly turbid water body, a third iteration step size instruction greater than the second iteration step size is generated.
[0013] Preferably, in step S4, determining the current dominant degradation type and issuing targeted optimization instructions specifically includes: If the signal-to-noise ratio deviation is determined to be the largest single deviation, then the dominant degradation type is identified as noise-type degradation, and the analog gain and adaptive noise reduction coefficient of the camera are adjusted accordingly. If the deviation in edge sharpness or corner integrity is determined to be the largest single deviation, then the dominant degradation type is identified as optical edge and geometric degradation, and the brightness of the ring light source and the camera's exposure time are adjusted first. If the texture sharpness deviation is determined to be the largest single deviation, then the dominant degradation type is identified as micro-detail degradation, and the light source uniformity of the ring light source and the short exposure parameters of the camera are adjusted accordingly. If the deviation in outline integrity or subject contrast is determined to be the largest single deviation, then the dominant degradation type is identified as image layer degradation, and the dynamic contrast and grayscale stretching parameters of the image are adjusted.
[0014] An electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements an imaging parameter optimization method based on dual-target joint quantization.
[0015] The present invention also provides a dual-target calibration device, including a dual-station support base, wherein two slide fixing baffles are movably connected inside the dual-station support base, for making the checkerboard standard slide and the planktonic specimen appear in the same imaging view scene; The external thread of the dual-station bearing base is connected to a two-stage threaded adapter cylinder, and the external thread of the two-stage threaded adapter cylinder is connected to an equipment connection base. An underwater dark-field imaging chamber is installed on the top of the device connection base, and a telecentric lens is fixedly connected to the middle of the underwater dark-field imaging chamber.
[0016] Preferably, the outer periphery of the dual-station bearing base is provided with fine external threads, and the outer periphery of the two-stage threaded transition cylinder is provided with coarse external threads.
[0017] The beneficial effects of this invention are: 1. This invention improves upon the shortcomings of traditional single industrial targets being disconnected from real-world imaging by employing a dual-target collaborative calibration system of checkerboard grid and plankton specimens. By establishing a standardized quantitative benchmark through optical targets and using biological specimen targets to fit the real monitoring scenario, it can accurately identify texture degradation and contour weakening caused by water turbidity. This ensures that the calibration results meet both optical accuracy requirements and are adapted to the actual imaging needs of plankton, significantly improving the targeting and practicality of the calibration.
[0018] 2. This invention effectively improves the stability and adaptability of multi-turbidity water imaging optimization by employing dual-feature weighted quantization evaluation and an adaptive variable step-size iterative algorithm. It solves the problems of slow convergence and parameter oscillation in high turbidity and over-adjustment in low turbidity of traditional fixed step-size algorithms. This invention can dynamically adjust the iteration intensity according to the imaging deviation, specifically repair various image degradation problems, and take into account both the optical imaging accuracy of the equipment and the imaging effect of plankton details. It can be adapted to various natural water conditions such as clear water, low turbidity, medium turbidity, and high turbidity, and significantly improves the imaging quality of microscopic details of plankton in complex water environments.
[0019] 3. This invention replaces the traditional manual experience-based parameter adjustment mode by constructing a fully automatic closed-loop parameter optimization mechanism. This avoids the drawbacks of traditional techniques, which require repeated manual parameter adjustments for different water conditions due to the large differences in turbidity in natural water bodies. These techniques are time-consuming, labor-intensive, subjective, and lack standardization. This invention can autonomously optimize imaging parameters based on the degradation characteristics of water imaging without manual intervention, effectively reducing the difficulty and workload of field operation and achieving standardization and unification of planktonic imaging parameter configuration.
[0020] 4. This invention also employs a two-stage, coarse-fine threaded adjustment structure, overcoming the shortcomings of traditional calibration targets such as poor positioning stability, lack of precise fine-tuning capability, and inability to adapt to shallow depth-of-field imaging with telecentric lenses. The coarse thread enables rapid alignment over a wide range, while the fine thread achieves millimeter-level precise distance adjustment, stably constraining the dual targets within the lens's effective depth of field, avoiding calibration problems such as focus deviation, blurring, and loss of depth of field. Simultaneously, the split structure is suitable for installation in sealed imaging chambers, ensuring high calibration repeatability and stable mechanical reference, effectively improving the overall accuracy and reliability of planktonic imaging calibration.
[0021] Of course, any product implementing this application does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart of an imaging parameter optimization method based on dual-target joint quantization according to the present invention.
[0024] Figure 2 This is a schematic diagram of the dual-position support base structure of a dual-target calibration device according to the present invention.
[0025] Figure 3 This is a schematic diagram of the assembly of a dual-target calibration device according to the present invention.
[0026] Figure 4 This is an exploded view of a dual-target calibration device according to the present invention.
[0027] Figure 5 This is a schematic diagram of the equipment connection base structure of a dual-target calibration device according to the present invention.
[0028] The components include: 1. Dual-station support base; 2. Plate mounting and fixing baffle; 3. Two-stage threaded adapter cylinder; 4. Equipment connection base; 5. Underwater dark field imaging chamber; and 6. Telecentric lens. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0030] Example 1 To address the problems of existing technologies, such as single-target calibration distortion, insufficient target adjustment precision, low efficiency of manual imaging parameter adjustment, poor convergence performance of fixed-step-size optimization, and inability to rapidly adapt to imaging in water bodies with varying turbidity, please refer to... Figure 1 As shown, this invention provides an imaging parameter optimization method based on dual-target joint quantization, specifically including the following steps: S1. To avoid the situation where a single checkerboard pattern can only achieve conventional optical geometric correction and cannot replicate the translucent and irregular microscopic imaging characteristics of plankton, an underwater dark-field imaging device with fixed initial parameters is used. This device includes at least a camera, a telecentric lens, and a ring light source. Simultaneously, in both clear water and turbid water environments, clear water baseline images and turbidity degradation images of the checkerboard optical target and the plankton specimen target are acquired within the same field of view. Preprocessing operations are then performed on the clear water baseline and turbidity degradation images, respectively, to extract and generate checkerboard standard target images and plankton specimen target images.
[0031] In this embodiment, the specific steps of step S1 are as follows: Clean water environment was selected as the standard non-degradation reference water condition, as well as turbid water environment. The mechanical installation position of the underwater dark field imaging equipment, the focal length of the telecentric lens and the initial imaging parameters were kept fixed in order to construct a global non-degradation optical reference benchmark and biological scene verification true value.
[0032] Underwater dark-field imaging equipment was used to simultaneously collect images of checkerboard optical targets and planktonic specimen targets placed in the same field of view, obtaining multiple sets of clear water baseline images and turbidity degradation images to realistically characterize the exponential attenuation of light energy and backscattering interference caused by suspended particles in the water.
[0033] For both clear water baseline imaging and turbidity degradation imaging, grayscale conversion, background noise removal, Gaussian smoothing filtering, and Region of Interest (ROI) cropping preprocessing are performed sequentially to ensure consistent processing rules for all samples. This effectively reduces random light scattering interference from suspended impurities in the non-working area. Then, based on the pre-calibrated absolute pixel coordinates of the target boundary, a coordinate domain matrix cropping is performed on the filtered image using a two-dimensional spatial cropping window. Independent checkerboard standard target images and plankton specimen target images are cropped and generated to eliminate stray light across the water medium and unify the pixel boundary size of feature extraction, thus achieving physical spatial decoupling of the dual-target light field signals under the same field of view.
[0034] S2. For clear water benchmark imaging and turbidity degradation imaging, optical performance features are extracted based on checkerboard standard target images to characterize the inherent optical performance of the imaging device. The optical performance features include signal-to-noise ratio, edge sharpness, and corner integrity. Real-world image features are extracted based on plankton specimen target images to characterize water scattering and light attenuation degradation. The real-world image features include contour integrity, texture sharpness, and subject contrast. The optical performance features and real-world image features are normalized and uniformly mapped to a preset standard value range. Then, the comprehensive score of optical performance features and the comprehensive score of real-scene image features are calculated by arithmetic mean. Based on the preset optical weight parameters and biological real-scene weight parameters for the plankton monitoring scenario, the comprehensive scores of each normalized feature are weighted and fused to calculate the comprehensive score of the current imaging.
[0035] In this embodiment, the specific steps of step S2 are as follows: Based on checkerboard standard target images, the signal-to-noise ratio (SNR) is calculated using the gray-level statistical features of the effective signal region and the background noise region to quantify the image noise level, thereby evaluating imaging degradation caused by circuit noise, uneven illumination, and stray water noise. The calculation formula is as follows: ; In the above formula, Indicates the signal-to-noise ratio; The average grayscale value of pixels representing the effective signal region of the target image; The signal-to-noise ratio (SNR) represents the standard deviation of pixel grayscale values in the pure background area. The higher the SNR value, the lower the proportion of image noise, the higher the image cleanliness, and the more stable the optical imaging quality.
[0036] The Sobel operator is used to solve the horizontal and vertical pixel gradients. The global gradient mean is used to quantize the edge sharpness, which characterizes the sharpness of the target edge and reflects the focusing accuracy, optical distortion, and water blur degradation. The calculation formula is as follows: ; In the above formula, This indicates edge sharpness. The higher the edge sharpness value, the sharper the image edges and the better the focusing effect. These represent the width and height of the checkerboard-patterned target image, respectively. These represent the horizontal gradient value and the vertical gradient value, respectively.
[0037] The corner integrity is calculated by comparing the actual number of detected corners with the theoretical total number. This ratio is used to quantify the completeness of checkerboard feature detection and to evaluate feature loss caused by geometric distortion, defocus, and perspective shift. The calculation formula is as follows: ; In the above formula, Indicates the integrity of corner points. ∈[0,1], the closer the corner integrity is to 1, the smaller the optical distortion and the higher the imaging accuracy; Indicates the actual number of corner points detected; This represents the theoretical total number of angle points.
[0038] Based on target images of planktonic specimens, the organisms were segmented using OTSU binarization, and the area and perimeter of the effective contours were extracted. A circularity metric was used to evaluate the integrity of the contours caused by water turbidity, resulting in blurred, broken, or incomplete outlines. The calculation formula is as follows: ; In the above formula, Indicates the degree of completeness of the outline. The value range is (0,1]. The closer the value is to 1, the higher the closure of the biological outline and the less incomplete and blurred it is. Represents the pixel area of the organism's main outline; It represents the perimeter of the main outline of an organism.
[0039] Texture richness is characterized using a neighborhood local variance method (e.g., the 5×5 neighborhood local variance method), and texture sharpness, used to quantify the degree of blurring and degradation of planktonic microtextures, is calculated by global averaging. The calculation formula is as follows: ; In the above formula, Indicates texture sharpness; the richer the image texture and the sharper the details, the higher the texture sharpness value and the less texture degradation. These represent the width and height of the target image of the planktonic specimen, respectively. This represents the average gray level of a local neighborhood. This represents the mean squared gray level of the local neighborhood. for The square of.
[0040] Binary segmentation is used to distinguish the foreground from the background. The difference in the mean grayscale values of the two regions is used to characterize the subject contrast, which quantifies the difference in grayscale levels between biological targets and the water background. This evaluates the image graying and loss of detail caused by water attenuation. The calculation formula is as follows: ; In the above formula, This indicates the subject contrast. The higher the subject contrast, the lower the turbidity of the water, and the clearer the target layer. This represents the average grayscale value of the foreground region of the organism. This represents the average grayscale value of the background area of the water body.
[0041] The Min-Max linear normalization algorithm is used to normalize the optical performance features and the real-world image features respectively, mapping them uniformly to a preset standard numerical range, specifically [0,1]. The calculation formula is as follows: ; In the above formula, This represents the normalized feature values. By using upper and lower limit truncation constraints, it is ensured that all index results stably fall within the [0,1] interval. The closer the value is to 1, the better the imaging quality of the corresponding dimension. Represents the original calculated value of a single feature; This represents the maximum and minimum values of this feature across the entire turbidity gradient sample set from clear water to turbidity. Based on the normalized optical performance characteristics and real-scene image characteristics, a comprehensive score for both characteristics is calculated using the following formula: ; ; In the above formula, This represents the overall score of optical performance characteristics; This represents the comprehensive score of real-scene image features; This represents the signal-to-noise ratio after dimensionless representation. This indicates the edge sharpness after dimensionless scaling. Indicates the integrity of the corner point after dimensionless transformation; Indicates the completeness of the contour after dimensionless transformation; This indicates the texture sharpness after dimensionless transformation; This represents the subject contrast after dimensionless scaling.
[0042] The comprehensive score of the imaging is calculated by weighting and fusing the normalized comprehensive score of optical performance features and the comprehensive score of real-scene image features based on preset optical weight parameters and real-scene weight parameters for the plankton monitoring scenario. The calculation formula is as follows: ; In the above formula, This represents the overall score of the imaging. Indicates the optical weighting parameter; Represents the real-scene weighting parameter. Set optical weight parameters Biological weight parameters Prioritize the reproduction of biological details while constraining the optical accuracy of the system; This represents the overall score of optical performance characteristics; This represents the comprehensive score of the features of the real-scene image.
[0043] Specifically, the overall imaging score includes the overall score of the clear water baseline imaging and the overall score of the real-time turbidity degradation imaging; the overall score of the clear water baseline imaging is calculated by weighted fusion of the overall score of the optical performance characteristics corresponding to the clear water baseline imaging and the overall score of the real-scene image features; the overall score of the real-time turbidity degradation imaging is calculated by weighted fusion of the overall score of the optical performance characteristics corresponding to the real-scene image features.
[0044] S3. The average score of multiple sets of clear water benchmark images is used as the optimal benchmark score. The difference between the optimal benchmark score and the current real-time turbidity degradation image is used to calculate the current water body imaging degradation deviation, thereby improving the sensitivity to the disturbance of invisible suspended particles.
[0045] In this embodiment, the specific steps of step S3 are as follows: To quantify the degree of water image degradation and provide a quantitative basis for iterative parameter tuning, this invention uses clear water without degradation as the optimal benchmark. The optimal benchmark score is obtained by calculating the arithmetic mean of the comprehensive imaging scores from multiple sets of clear water benchmark images. The optimal benchmark score characterizes the true value of the ideal imaging quality limit of the underwater dark-field imaging device in a non-scattering physical environment. Combined with the comprehensive score of real-time turbidity degradation imaging, the imaging degradation deviation is calculated using the following formula: ; In the above formula, The image degradation deviation indicates the severity of degradation problems caused by water turbidity, such as loss of texture, incomplete outline, and decreased contrast. The smaller the image degradation deviation, the closer the current imaging state is to the optimal baseline. Indicates the optimal benchmark score; This represents the overall score for real-time turbidity degradation imaging.
[0046] S4. To address the issues of slow convergence and parameter oscillation in high turbidity and over-adjustment in low turbidity of traditional fixed-step-size algorithms, a mapping relationship between imaging degradation deviation and parameter adjustment step size is established to output a dynamic iterative step size. Simultaneously, the individual deviations of each feature value from its corresponding optimal baseline value are calculated. The optimal baseline is obtained based on the feature values of each feature under clear water without degradation conditions, including optical performance features and real-world image features.
[0047] The current dominant degradation type is determined based on the feature with the largest single deviation. The largest single deviation is the feature with the largest deviation among the differences between each feature value and the corresponding optimal benchmark value. Closed-loop control commands are then generated to perform targeted optimization on the underlying physical parameters of the equipment.
[0048] In this embodiment, the specific steps for establishing the mapping relationship between imaging degradation deviation and parameter adjustment step size to output the dynamic iteration step size are as follows: By presetting two levels of critical thresholds ,and The imaging degradation deviation is divided into three levels of differentiated optimization intervals, and the corresponding iteration step size is matched to achieve hierarchical differentiated optimization. when When the image is in a slightly degraded imaging range, corresponding to low turbidity / clear water bodies, a fine small amplitude of 1% to 3% is generated as the first iteration step size instruction to slightly correct imaging parameters, repair minor noise and contrast deviations, lock in the optimal imaging state, and avoid loss of details due to over-adjustment. when When the image is determined to be in the moderate imaging degradation range, corresponding to medium turbidity water, a moderate amplitude of 5% to 10% is generated when the degradation is moderate. This is a second iteration step size instruction that is larger than the first iteration step size, taking into account both convergence speed and adjustment accuracy. It steadily corrects the imaging degradation caused by conventional water scattering and is suitable for most field conditions. when When the image is determined to be in a severely degraded imaging range, corresponding to a highly turbid water body, a large step size of 15% to 25% is generated when the image is severely degraded. This is a third iteration step size instruction that is larger than the second iteration step size. This quickly compensates for the blurring, low contrast, and high noise problems caused by strong scattering and strong attenuation in highly turbid water bodies, and shortens the iteration convergence cycle.
[0049] Alternatively, a monotonically positive correlation mapping relationship can be constructed between imaging degradation bias and iteration step size. The larger the bias, the larger the iteration step size; the smaller the bias, the finer the iteration step size. The core mapping formula is as follows: ; In the above formula, This indicates the step size for adjusting parameters in a single iteration, including exposure time, light source parameters, camera gain, noise reduction coefficient, contrast, and grayscale stretching parameters. This represents a monotonically increasing mapping function with imaging degradation bias as the independent variable, enabling adaptive logic that achieves rapid convergence for severe degradation and fine-tuning for mild degradation.
[0050] In this embodiment, the deviations of various optical performance characteristics and real-scene image characteristics under the current water body from the corresponding optimal benchmark values are calculated. Specifically, the deviations of the six characteristics (normalized signal-to-noise ratio, edge sharpness, corner integrity, contour integrity, texture sharpness, and subject contrast) from the corresponding optimal benchmark values are calculated to obtain the individual deviations. This process identifies the dominant degradation type of the image and establishes a one-to-one correspondence between defects and imaging parameters to achieve precise compensation and on-demand parameter adjustment.
[0051] The dominant degradation type in the current turbid water environment is determined based on the single deviation with the largest amplitude, and a closed-loop control command is generated accordingly to perform targeted optimization of the underlying physical parameters of the underwater dark field imaging equipment.
[0052] Targeted optimization instructions issued for the dominant degradation type specifically include: If the signal-to-noise ratio deviation is determined to be the largest single deviation, the dominant degradation type is identified as noise-type degradation. The analog gain and adaptive noise reduction coefficient of the camera are then finely adjusted to suppress stray noise in the water and sensor noise while preserving biological details, thereby improving image purity. If the deviation in edge sharpness or corner integrity is determined to be the largest single deviation, then the dominant degradation type is identified as optical edge and geometric degradation. The brightness of the ring light source and the camera's exposure time are adjusted first to compensate for the light attenuation of the water body, enhance the image edge gradient and feature integrity, and correct optical blurring and distortion defects. If the texture sharpness deviation is determined to be the largest single deviation, the dominant degradation type is identified as micro-detail degradation. The uniformity of the ring light source and the short exposure parameters of the camera are then adjusted in a targeted manner to suppress stray light diffusion interference and enhance the fine texture of planktonic organisms. If the deviation in outline integrity or subject contrast is determined to be the largest single deviation, then the dominant degradation type is identified as image layer degradation. The dynamic contrast and grayscale stretching parameters of the image are adjusted to increase the grayscale difference between the biological target and the water background, so as to solve the problems of image graying and outline submersion.
[0053] S5. After performing targeted physical parameter optimization, extract the updated imaging degradation deviation again and determine whether the imaging degradation deviation is less than the preset minimum critical threshold. If yes, and the difference between the imaging degradation deviations of two adjacent iterations falls within the preset convergence threshold range, then terminate the iteration and save the current parameters. If no, or the difference between the imaging degradation deviations of two adjacent iterations does not fall within the preset convergence threshold range, then return to step S4. If the number of iterations reaches the preset upper limit and the above convergence condition is still not met, then return to step S1.
[0054] In this embodiment, the specific steps of step S5 are as follows: S51. Control the underwater dark-field imaging device to re-acquire turbidity degradation images based on the currently adjusted physical parameters, so as to update the imaging degradation deviation of the current iteration and retrieve the imaging degradation deviation of the previous iteration. The difference between the imaging degradation deviations of the current iteration and the previous iteration is used to calculate the difference between the imaging degradation deviations of the current iteration and the previous iteration. Determine whether the imaging degradation deviation of the current iteration is less than the preset minimum critical threshold; If the imaging degradation deviation of the current iteration is less than the preset minimum critical threshold, and the difference between the imaging degradation deviations of two adjacent iterations falls within the preset convergence threshold range, then the iteration termination command is triggered, and the current imaging parameters are fixed to maintain the current field of view observation. If the imaging degradation deviation of the current iteration is not less than the preset minimum critical threshold, or the difference between the imaging degradation deviations of two adjacent iterations does not fall within the preset convergence threshold range, then return to step S4. If the above convergence condition is not met even after the number of iterations reaches the preset upper limit (set to 20 times), i.e. the termination of iteration instruction is not triggered, then return to step S1.
[0055] Example 2 Existing underwater dark-field imaging features extremely shallow depth of field, requiring extremely high precision in the target's axial working distance and focus position. Traditional targets lack graded, adjustable precision adjustment mechanisms, making it impossible to achieve rapid alignment and millimeter-level fine-tuning of the imaging distance. This makes it difficult to stably maintain the target within the lens's effective depth of field, easily leading to problems such as focus deviation, blurring, and loss of depth of field. Ultimately, this results in large calibration errors and low reliability of imaging quantification results, failing to meet the requirements for high-precision planktonic imaging calibration.
[0056] To address the shortcomings of traditional calibration targets, such as poor target positioning stability, lack of precise fine-tuning capabilities, and inability to adapt to shallow depth-of-field imaging with telecentric lenses, and to improve the overall accuracy and reliability of planktonic imaging calibration, please refer to [link to relevant documentation]. Figures 2-5As shown, the present invention also provides a dual-target calibration device, which adopts a three-stage split thread assembly structure. During assembly and debugging, there is no need to modify the original optical path structure of the equipment, thereby achieving the effects of convenient operation and high positioning accuracy.
[0057] Specifically, the device includes a dual-station support base 1, which has two sets of independent slots inside. When acquiring images, the checkerboard standard slide and the solidified planktonic specimen are respectively inserted into the two sets of independent slots of the dual-station support base 1. Then, two slide fixing baffles 2 are connected to the dual-station support base 1 by bolts, thereby fixing the checkerboard standard slide and the planktonic specimen, so that the checkerboard standard slide and the planktonic specimen appear in the same imaging view scene.
[0058] The outer periphery of the dual-station bearing base 1 is provided with a precision fine-tooth external thread. The dual-station bearing base 1 is screwed into the fine-tooth internal thread inside the two-stage threaded adapter cylinder 3 through the external precision fine-tooth external thread. The two-stage threaded adapter cylinder 3 is then screwed into the coarse-tooth internal thread of the equipment connecting base 4 through the coarse-tooth external thread on its outer wall.
[0059] Finally, the upper coaxial mounting of the equipment connecting base 4 is fixedly installed on the bottom of the underwater dark field imaging chamber 5. The telecentric lens 6 is fixedly connected to the middle of the underwater dark field imaging chamber 5. During use, the axial distance between the two-stage threaded adapter cylinder 3 and the end face of the lens is quickly adjusted by taking advantage of the large pitch and wide adjustment range of the coarse external thread, so as to achieve coarse alignment of the target installation position and quickly adjust the initial position of the target to the vicinity of the lens depth of field.
[0060] By utilizing the micro-stroke rotation characteristics of the precision fine-tooth external thread, the dual-position support base 1 is rotated slightly to achieve millimeter-level vertical lifting and lowering fine adjustment of the target. During the fine adjustment, the imaging screen is observed in real time until the corner points of the checkerboard are clear and without blurring, and the texture and outline of the planktonic specimen are complete and clear. This confirms that the two targets are completely within the extremely shallow effective depth of field of the telecentric lens, and the mechanical structure will not be modified in subsequent optimization processes.
[0061] The above description is merely an example and illustration of the concept of this application. Those skilled in the art can make various modifications or additions to the specific embodiments described or use similar methods to replace them, as long as they do not deviate from the inventive concept or exceed the scope defined in the claims, they should all fall within the protection scope of this application.
Claims
1. A method for optimizing imaging parameters based on dual-target joint quantization, characterized in that, include: S1. In a clear water reference environment and a turbid water body, simultaneously acquire clear water reference imaging and turbidity degradation imaging containing checkerboard optical targets and planktonic specimen targets within the same field of view, and perform preprocessing to generate checkerboard standard target images and planktonic specimen target images respectively. S2. Extract optical performance features from checkerboard standard target images and extract real-scene image features from planktonic specimen target images to calculate the comprehensive score of optical performance features and the comprehensive score of real-scene image features, and perform weighted fusion to calculate the comprehensive score of imaging. S3. Obtain the optimal baseline score based on the comprehensive score of the clear water baseline imaging, calculate the difference between the optimal baseline score and the comprehensive score of the real-time turbidity degradation imaging, and obtain the current water body imaging degradation deviation. S4. Establish the mapping relationship between imaging degradation deviation and parameter adjustment step size to output dynamic iteration step size. At the same time, calculate the individual deviation between the current feature value and the corresponding optimal benchmark value. Determine the current degradation type based on the feature with the largest individual deviation and perform targeted optimization on the parameters of the imaging device. S5. If the difference between the updated imaging degradation deviation after performing target parameter optimization and the preset minimum critical threshold deviation falls within the preset convergence threshold range, then terminate the iteration and save the parameters; otherwise, return to step S4. If the iteration count reaches the preset limit and the iteration does not terminate, return to step S1.
2. The imaging parameter optimization method based on dual-target joint quantization according to claim 1, characterized in that, The specific steps of step S1 are as follows: In both standard, non-degradable clear water and turbid water environments, the mechanical installation position of the underwater dark field imaging equipment, the focal length of the telecentric lens, and the initial imaging parameters are kept constant. The checkerboard optical target and planktonic specimen target, placed in the same field of view, were simultaneously acquired using underwater dark-field imaging equipment to obtain multiple sets of clear water baseline images and turbidity degradation images. For both clear water baseline imaging and turbidity degradation imaging, grayscale conversion, background noise removal, Gaussian smoothing filtering, and region of interest cropping preprocessing are performed sequentially to extract and generate independent checkerboard standard target images and planktonic specimen target images.
3. The imaging parameter optimization method based on dual-target joint quantization according to claim 1, characterized in that, The optical performance characteristics include signal-to-noise ratio, edge sharpness, and corner integrity, while the real-world image characteristics include outline integrity, texture sharpness, and subject contrast.
4. The imaging parameter optimization method based on dual-target joint quantization according to claim 3, characterized in that, The specific steps of step S2 are as follows: Based on checkerboard standard target images, the signal-to-noise ratio is calculated using the gray-level statistical features of the effective signal region and the background noise region. The Sobel operator is used to solve the horizontal and vertical pixel gradients, and the edge sharpness is quantized by the global gradient mean. The corner integrity is calculated by the ratio of the actual number of detected corners to the theoretical total number of corners. ; Based on target images of planktonic specimens, the organisms were segmented using OTSU binarization, and the area and perimeter of the effective contours were extracted. A circular metric was used to quantify the integrity of the contours. Texture richness is characterized using the neighborhood local variance method, and texture sharpness is calculated by averaging across the entire area. Binary segmentation is used to distinguish between the biological foreground region and the water background region, and the subject contrast is calculated based on the difference in the mean grayscale values of the two types of regions. ; The Min-Max linear normalization algorithm is used to normalize the optical performance features and the real-scene image features respectively, and uniformly map them to the preset standard value range. Based on the normalized optical performance characteristics and real-scene image characteristics, a comprehensive score for both characteristics is calculated using the following formula: In the above formula, This represents the overall score of optical performance characteristics; This represents the signal-to-noise ratio after dimensionless representation. This indicates the edge sharpness after dimensionless scaling. Indicates the integrity of the corner point after dimensionless transformation; This represents the comprehensive score of real-scene image features; Indicates the completeness of the contour after dimensionless transformation; This indicates the texture sharpness after dimensionless transformation; This represents the contrast of the main subject after dimensionalization.
5. The imaging parameter optimization method based on dual-target joint quantization according to claim 4, characterized in that, The comprehensive score of the imaging is calculated by weighting and fusing the normalized comprehensive score of optical performance characteristics and the comprehensive score of real-scene image features based on preset optical weight parameters and real-scene weight parameters for the plankton monitoring scenario. The calculation formula is as follows: In the above formula, This represents the overall score of the imaging. Indicates the optical weighting parameter; Indicates the real-scene weighting parameter; The overall imaging score includes the overall score of the clear water benchmark imaging and the overall score of the real-time turbidity degradation imaging. The overall score of the clear water benchmark imaging is calculated by weighted fusion of the overall score of the optical performance characteristics corresponding to the clear water benchmark imaging and the overall score of the real-world image features. The overall score of the real-time turbidity degradation imaging is calculated by weighted fusion of the overall score of the optical performance characteristics corresponding to the real-world image features. The optimal benchmark score is obtained by calculating the arithmetic mean of the overall imaging scores of multiple sets of clear water benchmark imaging.
6. The imaging parameter optimization method based on dual-target joint quantization according to claim 1, characterized in that, In step S4, the imaging degradation bias is established. The specific steps for mapping the parameter adjustment step size to output the dynamic iteration step size are as follows: Preset two-level critical thresholds ,and The imaging degradation deviation is divided into three ranges; when When the image is determined to be in a slightly degraded imaging range, corresponding to low turbidity / clear water bodies, the first iteration step size instruction is generated. when When the condition is determined to be in the moderate imaging degradation range, corresponding to the medium turbidity water body, a second iteration step size instruction greater than the first iteration step size is generated; when When the area is identified as a severely degraded imaging region, corresponding to a highly turbid water body, a third iteration step size instruction greater than the second iteration step size is generated.
7. The imaging parameter optimization method based on dual-target joint quantization according to claim 3, characterized in that, In step S4, the optimal reference value of each feature is obtained based on the feature values of the clear water reference imaging. Each feature includes various optical performance features and various real scene image features. The maximum single deviation is the feature with the largest deviation among the differences between each feature value and the corresponding optimal reference value. Determining the current dominant degradation type and issuing targeted optimization instructions specifically includes: If the signal-to-noise ratio deviation is determined to be the largest single deviation, then the dominant degradation type is identified as noise-type degradation, and the camera's analog gain and adaptive noise reduction coefficient are adjusted. If the deviation in edge sharpness or corner integrity is determined to be the largest single deviation, then the dominant degradation type is identified as optical edge and geometric degradation, and the brightness of the ring light source and the camera's exposure time are adjusted. If the texture sharpness deviation is determined to be the largest single deviation, then the dominant degradation type is identified as micro-detail degradation, and the light source uniformity of the ring light source and the short exposure parameters of the camera are adjusted. If the deviation in outline integrity or subject contrast is determined to be the largest single deviation, then the dominant degradation type is identified as image layer degradation, and the dynamic contrast and grayscale stretching parameters of the image are adjusted.
8. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the imaging parameter optimization method based on dual-target joint quantization as described in any one of claims 1-7.
9. A dual-target calibration device, based on the imaging parameter optimization method based on dual-target joint quantization as described in any one of claims 1-7, characterized in that, Includes a dual-position support base (1), wherein two slide fixing baffles (2) are movably connected inside the dual-position support base (1) to make the checkerboard standard slide and the planktonic specimen appear in the same imaging view scene; The external thread of the dual-station bearing base (1) is connected to a two-stage threaded adapter cylinder (3), and the external thread of the two-stage threaded adapter cylinder (3) is connected to an equipment connection base (4). The underwater dark field imaging chamber (5) is installed on the top of the device connection base (4), and a telecentric lens (6) is fixedly connected to the middle of the underwater dark field imaging chamber (5).
10. The dual-target calibration device according to claim 9, characterized in that, The outer periphery of the dual-station bearing base (1) is provided with fine external threads, and the outer periphery of the two-stage threaded adapter cylinder (3) is provided with coarse external threads.