Underwater spectrum compensation method and device, computer equipment and storage medium
By obtaining water depth values and performing smoothing filtering in the underwater spectral compensation method, determining the transparency gain factor, and generating control signals for the spectral compensation component, the problem of insufficient compensation accuracy in existing technologies is solved, achieving more accurate spectral compensation and improved visual effects.
Patent Information
- Application Number
- CN202511095319.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-25
AI Technical Summary
Existing underwater spectral compensation methods have low accuracy and cannot accurately cover the nonlinear trend of light attenuation, often resulting in overcompensation or undercompensation.
By acquiring the current water depth value and historical water depth value and performing smoothing filtering, the transparency gain factor is determined. Based on the gain factor, the control signal of the spectral compensation component is generated, and the transmittance is dynamically adjusted to match the actual underwater optical environment.
It improves the accuracy and adaptability of underwater spectral compensation, enhances underwater visual effects and spectral fidelity, and strengthens the control precision of the spectral compensation component in complex underwater environments.
Smart Images

Figure CN121010882A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of underwater optical compensation, and in particular to an underwater spectrum compensation method and device, a computer device and a storage medium. BACKGROUND
[0002] In scenarios such as diving activities, seabed exploration, underwater shooting or underwater communication, the absorption and scattering of light by water bodies can significantly distort the original spectral distribution, especially the attenuation of red light, green light and other bands at different water depths and water transparency. This spectral distortion not only affects the recognition effect of the human eye on the target object, but also interferes with the capture of target colors and details by image acquisition devices. Current underwater compensation methods mostly use optical elements with adjustable light transmittance, such as electrochromic materials, liquid crystal light control sheets, or spectrum adjustment films based on micro-voltage regulation, to compensate for the spectrum. For compensation control of the spectrum compensation component, a linear voltage control transmittance method is usually used to achieve this. This method has a less precise response characteristic and cannot accurately cover the nonlinear change trend of light attenuation. Overcompensation or undercompensation often occurs, and existing underwater spectrum compensation methods have the problem of low compensation accuracy.
[0003] Therefore, how to provide an underwater spectrum compensation method that can effectively improve the compensation accuracy has become a problem to be solved. SUMMARY
[0004] Therefore, it is necessary to provide an underwater spectrum compensation method, device, computer device and storage medium to solve the problem of low compensation accuracy of traditional underwater spectrum compensation methods.
[0005] An underwater spectrum compensation method, applied to a spectrum compensation component, includes: obtaining water transparency at a current water depth value and a historical water depth value; performing smoothing filter processing on the current water depth value based on the historical water depth value to obtain a smoothed water depth value; determining a transparency gain factor based on the water transparency; performing gain processing on the smoothed water depth value based on the transparency gain factor to obtain a target water depth value; generating a control signal for the spectrum compensation component based on the target water depth value, so that the spectrum compensation component adjusts the light transmittance of a preset spectrum band according to the control signal.
[0006] Optionally, the smoothing filter processing on the current water depth value based on the historical water depth value to obtain a smoothed water depth value includes: set a first weight corresponding to the historical water depth value and a second weight corresponding to the current water depth value; based on the historical water depth value, the first weight, the current water depth value, and the second weight, a smoothed water depth value is calculated.
[0007] Optionally, the determining a transparency gain factor based on the water transparency comprises: determining a coarse adjustment gain factor corresponding to a transparency interval to which the water transparency belongs; calculating a fine adjustment gain factor based on the water transparency and a preset adjustment coefficient, the preset adjustment coefficient being set according to a human eye light sensitivity response standard; calculating the transparency gain factor based on the coarse adjustment gain factor and the fine adjustment gain factor.
[0008] Optionally, the determining a coarse adjustment gain factor corresponding to a transparency interval to which the water transparency belongs comprises: judging an interval level to which the water transparency belongs based on a preset transparency interval table, each interval level corresponding to a coarse adjustment gain factor; determining the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs based on a correspondence between interval levels and coarse adjustment gain factors.
[0009] Optionally, the interval levels include a first level and non-first levels, the water transparency corresponding to the first level being higher than the water transparency corresponding to the non-first levels, and the determining the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs based on the correspondence between interval levels and coarse adjustment gain factors comprises: when the interval level is the first level, determining the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs as one; when the interval level is a non-first level, determining the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs as a preset value greater than one.
[0010] Optionally, the preset spectral band includes a red light band, the control signal includes a red light control voltage, and the generating the control signal of the spectral compensation component based on the target water depth value comprises: extracting an adjustment factor of a red light channel in a human eye light sensitivity response standard; calculating the red light control voltage according to a preset function relationship based on the adjustment factor of the red light channel and the target water depth value.
[0011] Optionally, the preset spectrum band includes a green light band, the control signal includes a green light control voltage, and the generating the control signal of the spectrum compensation component based on the target water depth value includes: comparing the water transparency with a preset transparency threshold; if the water transparency is lower than the preset transparency threshold, calculating the green light control voltage according to a preset function relationship based on the target water depth value; if the water transparency is not lower than the transparency threshold, the green light control voltage is zero. An underwater spectrum compensation device includes: an acquisition module configured to acquire a water transparency at a current water depth value and a historical water depth value; a filtering module configured to perform a smoothing filtering process on the current water depth value based on the historical water depth value to obtain a smoothed water depth value; a determination module configured to determine a transparency gain factor based on the water transparency; a gain module configured to perform a gain process on the smoothed water depth value based on the transparency gain factor to obtain a target water depth value; a generation module configured to generate a control signal of the spectrum compensation component based on the target water depth value, so that the spectrum compensation component adjusts a light transmittance of a preset spectrum band according to the control signal.
[0012] A computer device includes a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, and the processor executes the computer readable instructions to implement the above-mentioned underwater spectrum compensation method.
[0013] A readable storage medium having computer readable instructions stored thereon, and the computer readable instructions are executed by a processor to implement the underwater spectrum compensation method.
[0014] The underwater spectrum compensation method, device, computer device and storage medium obtain water transparency at a current water depth value and a historical water depth value; perform smoothing filtering processing on the current water depth value based on the historical water depth value to obtain a smoothed water depth value; determine a transparency gain factor based on the water transparency; perform gain processing on the smoothed water depth value based on the transparency gain factor to obtain a target water depth value; and generate a control signal of the spectrum compensation component based on the target water depth value, so that the spectrum compensation component adjusts the light transmittance of a preset spectrum band according to the control signal. By introducing water transparency as a dynamic adjustment parameter, and combining historical water depth information to perform smoothing processing on the current water depth, the stability of water depth evaluation is improved. Meanwhile, by dynamically setting the transparency gain factor and real-time updating the target water depth value, a more accurate compensation control signal that matches the actual underwater optical environment can be generated, the underwater visual effect and spectrum restoration degree are effectively improved, and the adaptability and compensation accuracy of the spectrum compensation component in a complex underwater environment are enhanced. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0016] Figure 1 is a flowchart of an underwater spectrum compensation method in an embodiment of the present application; Figure 2 is a structural diagram of an underwater spectrum compensation device in an embodiment of the present application; Figure 3 is a schematic diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0018] In an embodiment, as shown in Figure 1 , an underwater spectrum compensation method applied to a spectrum compensation component is provided, including the following steps: 101, obtaining water transparency at a current water depth value and a historical water depth value.
[0019] In the embodiments of the present application, the above-mentioned underwater spectral compensation method can be applied to a spectral compensation component, which can be an optical adjustment mechanism (for example, an electrochromic lens structure composed of an electrochromic material) integrated in diving glasses (or a wearable diving helmet, an illumination device for underwater photography), which has the ability to dynamically adjust the light transmittance according to external environmental parameters. Specifically, the current water depth value can be obtained by a pressure sensor integrated in the optical adjustment mechanism, for example, using an MS5837 depth sensor to measure the external water pressure and converting it into the actual water depth; the water transparency information can be collected by an integrated spectral sensor, for example, using an AS7341L sensor to obtain the light intensity signal of a specific wavelength, calculating the light transmittance according to the integral value of the characteristic waveband (such as green light, 525 nm) within a unit time (for example, 0.5±0.05 seconds), and then converting it to obtain the transparency index.
[0020] The historical water depth value can be formed into a sequence by periodically sampling and caching the depth measurement values at previous time points, as historical data participating in the subsequent smoothing filtering process, to provide a stable change trend reference for generating a more robust target water depth value.
[0021] In a possible embodiment, the water transparency can also be obtained by an environmental illumination sensor in combination with a standard whiteboard reflection measurement, or by an underwater camera in combination with the degree of change in image clarity to estimate the underwater visibility distance and indirectly convert the transparency. The historical water depth value can also be obtained from the trajectory recording data provided by a diving calculation table or a wireless synchronous underwater navigation device.
[0022] 102. Smoothly filtering the current water depth value based on the historical water depth value to obtain a smoothed water depth value.
[0023] In the embodiments of the present application, the first weight corresponding to the historical water depth value and the second weight corresponding to the current water depth value can be set, and the smoothing processing is realized by weighted average to obtain the smoothed water depth value, so as to reduce the interference influence of sudden abnormality in water depth sampling and improve the stability of compensation control.
[0024] In a possible embodiment, the specific way of smoothing filtering processing can also be determined according to the actual application scene, for example: When the diver is in a relatively stable observation or shooting state, the water depth changes slowly and the fluctuation is small, the sliding window average method can be used to realize the robust smoothing of continuous water depth sampling and reduce the influence of incidental jitter on the calculation result; When there is an instantaneous abnormal data point (such as a peak value caused by rapid up-and-down floating of the device), the median filtering method can be used, which has stronger robustness to mutation values and can effectively suppress the interference of incidental abnormal values on subsequent control; When the diver is continuously moving or in an environment with obvious wave disturbance, the water depth data changes frequently and has a dynamic trend. A one-dimensional Kalman filter algorithm can be used to estimate the water depth sequence based on the cooperative optimization of the current observation value and the predicted value, which helps to improve the filtering stability while maintaining real-time performance.
[0025] 103. Determine the transparency gain factor based on the transparency of the water body.
[0026] In the embodiments of the present application, a transparency grading model can be preset, for example, the transparency value is divided into several interval levels, each level corresponds to a coarse adjustment gain factor, and fine adjustment is performed based on a preset adjustment coefficient, and then the transparency gain factor is obtained by superposition. Specifically, the current transparency value can be compared with the preset transparency interval table to determine its corresponding level and call the corresponding coarse adjustment factor, and then the fine adjustment factor can be obtained by combining the current transparency value and the adjustment coefficient. Finally, the coarse adjustment and fine adjustment factors are combined through a functional relationship to obtain the transparency gain factor used for compensation control. The transparency gain factor can reflect the influence of different water quality conditions on the degree of spectral attenuation, thereby providing a precision basis for subsequent control.
[0027] In a possible embodiment, a fitting model (such as an exponential decay model or an LMS weight function) can be preset according to the nonlinear relationship between the measured transparency and the transmittance of each wave band, and the gain factor can be obtained by directly substituting the measured transparency into the function.
[0028] In a possible embodiment, the determination of the transparency gain factor can not only be based on the transparency parameter itself, but also can be combined with other underwater environmental factors for joint correction to form a "double-factor adjustment" mechanism. The mechanism introduces water temperature and suspended particle density as auxiliary factors to improve the calculation accuracy of the target water depth value by establishing the coupling relationship between temperature-transparency and particle density-transparency.
[0029] Specifically, the water temperature has an influence on the refractive index of light propagation and the motion state of particles, and the concentration of suspended particles significantly changes the scattering properties of the water body. In the gain calculation process, the corresponding temperature correction factor and particle density correction factor can be set according to the preset temperature interval and particle concentration level, and the comprehensive transparency gain factor can be obtained by multiplying the basic transparency gain factor.
[0030] For example, if the water temperature is low (such as below 10°C) or the particle concentration is high (such as more than 100 mg / L), the transparency gain factor can be increased accordingly to enhance the compensation effect; otherwise, in clear and warm water, the gain can be maintained or appropriately reduced. Through the above double-factor adjustment method, a gain calculation logic that is more consistent with the actual light attenuation characteristics can be realized, and the environmental adaptability and accuracy of spectral compensation can be improved.
[0031] 104. Gain processing the smoothed water depth value based on the transparency gain factor to obtain a target water depth value.
[0032] In the embodiments of the present application, the smoothed water depth value can be regarded as a smooth expression of the original water depth signal in the time domain, and the transparency gain factor is used to characterize the strength of spectral attenuation under the current water condition. In order to achieve a more realistic environmental perception compensation response, the smoothed water depth value can be multiplied by the transparency gain factor to obtain the target water depth value.
[0033] The above target water depth value can comprehensively reflect the dual influence of water depth change trend and spectral attenuation environment, thereby providing a more reasonable adjustment basis for subsequent spectral compensation control. For example, when the water transparency decreases to cause the light attenuation to intensify, the transparency gain factor is correspondingly amplified, thereby increasing the target water depth value and enhancing the light transmittance of the corresponding waveband for compensation.
[0034] In a possible embodiment, a nonlinear mapping relationship (such as a quadratic function, an exponential function, etc.) can also be established between the transparency gain factor and the smoothed water depth value to improve the compensation sensitivity in the high water depth / low transparency scenario.
[0035] 105. Generating a control signal of a spectral compensation component based on the target water depth value, so that the spectral compensation component adjusts the light transmittance of a preset spectral waveband according to the control signal.
[0036] In the embodiments of the present application, the spectral compensation component can include a plurality of optical filtering elements (such as electrochromic materials, liquid crystal dimming sheets, or spectral adjustment films based on micro-voltage regulation) with adjustable light transmittance, which are used to dynamically adjust the transmittance intensity of specific wavebands such as red light and green light. For example, the spectral compensation component can be an electrochromic lens structure integrated in diving goggles, which has a plurality of waveband regulation layers inside, at least including a red light layer for adjusting the red light transmittance and a green light layer for adjusting the green light transmittance. Each regulation layer is composed of electrochromic material, and the light transmittance changes with the applied driving voltage (i.e., red light control voltage, green light control voltage, etc.).
[0037] By inputting the aforementioned target water depth value into the control logic, the nonlinear function model established according to the water depth and the light attenuation law of each waveband is used to calculate the red light control voltage, the green light control voltage, etc. respectively, and these parameters are applied to the corresponding waveband dimming structure as control signals to realize real-time light transmittance adjustment.
[0038] In a possible embodiment, the generation of the control signal can also introduce a deep learning model to predict the spectral distortion characteristics of different underwater scenes, so as to intelligently generate the control signal, thereby improving the intelligence and adaptive ability of spectral compensation.
[0039] In the embodiment of the present application, the water body transparency at the current water depth value and the historical water depth value are obtained; the current water depth value is smoothed and filtered based on the historical water depth value to obtain a smoothed water depth value; a transparency gain factor is determined based on the water body transparency; the smoothed water depth value is gain-processed based on the transparency gain factor to obtain a target water depth value; and a control signal of the spectral compensation component is generated based on the target water depth value to enable the spectral compensation component to adjust the light transmittance of the preset spectral band. By introducing the water body transparency as a dynamic adjustment parameter, and combining the historical water depth information to smooth the current water depth, the stability of the water depth evaluation is improved; at the same time, by dynamically setting the transparency gain factor and real-time updating the target water depth value, a more accurate compensation control signal that matches the actual underwater optical environment can be generated, effectively improving the underwater visual effect and spectral restoration degree, and enhancing the adaptability and compensation accuracy of the spectral compensation component in complex underwater environments.
[0040] It can be understood that in the specific embodiments of the present application, data related to water depth value, water body transparency, control signal of the spectral compensation component, transparency interval table, human eye light sensitivity response standard, red light control voltage, green light control voltage, etc. When the embodiments in the present application are applied to specific products or technologies, the permission or consent of the user needs to be obtained, and the collection, use and processing of related data, the construction and use of the spectral compensation component need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0041] Optionally, in the step of smoothing and filtering the current water depth value based on the historical water depth value to obtain a smoothed water depth value, a first weight corresponding to the historical water depth value and a second weight corresponding to the current water depth value can also be set; and the smoothed water depth value is calculated based on the historical water depth value, the first weight, the current water depth value and the second weight.
[0042] In the embodiment of the present application, the first weight and the second weight can be adaptively set according to the water depth change trend of the current use environment, to improve the dynamic response performance and steady-state accuracy of the filtering process.
[0043] Specifically, when the water depth changes gently or is in a stable state, the first weight can be appropriately increased to enhance the dominance of historical data in the smoothing calculation, thereby stabilizing the output result; on the contrary, when a sharp change in water depth is detected (such as rapid diving or floating), the second weight can be appropriately increased to improve the response ability to the current value, to ensure the real-time and accuracy of the control signal.
[0044] Alternatively, a set of preset weight tables can also be set, and appropriate weight combinations are selected according to different underwater operation modes (such as sightseeing, shooting, engineering, etc.) to adapt to application requirements, for example, the first weight is set to 0.3 and the second weight is set to 0.7.
[0045] Optionally, in the step of determining the transparency gain factor based on the water transparency, the corresponding coarse adjustment gain factor can be determined based on the transparency interval to which the water transparency belongs; the fine adjustment gain factor is calculated based on the water transparency and a preset adjustment coefficient, which is obtained according to a human eye light sensitivity response standard; and the transparency gain factor is calculated based on the coarse adjustment gain factor and the fine adjustment gain factor.
[0046] In the embodiment of the present application, the acquisition process of the transparency gain factor is constructed in a hierarchical superposition manner, including two levels of coarse adjustment gain and fine adjustment gain. Among them, the coarse adjustment gain factor is used to reflect the general influence trend of transparency on light attenuation, which is determined based on the preset interval level to which the water transparency belongs. For example, the transparency can be divided into three intervals of high transparency, medium transparency and low transparency, which correspond to representative coarse adjustment factor values of 1.0, 1.2 and 1.5 respectively, to quickly complete the compensation adjustment on the main scale.
[0047] On this basis, in order to further improve the delicacy and individual adaptability of the adjustment, a fine adjustment gain factor is introduced, which is calculated based on the following manner: first, according to the relative sensitivity change trend of the LMS channel corresponding to the waveband (such as the response curve of the red light waveband in the L channel) in the human eye light sensitivity response standard (such as CIE S026), the adjustment coefficient x related to the target transparency is extracted. The adjustment coefficient represents the amplitude of the transmittance of the preset waveband that should be adjusted under the unit transparency change.
[0048] On this basis, the fine adjustment gain factor is calculated by using a linear relationship, and the formula is:
[0049] Among them, is a reference transparency value (for example, 1.0), k is the current transparency value, and x is a preset adjustment coefficient (for example, 0.15).
[0050] Finally, the coarse adjustment gain factor and the fine adjustment gain factor are multiplied or weighted and fused to obtain a comprehensive transparency gain factor, which is used for subsequent gain processing of the smoothed water depth value.
[0051] Optionally, in the step of determining the corresponding coarse adjustment gain factor based on the transparency interval to which the water transparency belongs, the interval level to which the water transparency belongs can be determined based on a preset transparency interval table, and each interval level corresponds to a coarse adjustment gain factor; and the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs is determined based on the correspondence between the interval level and the coarse adjustment gain factor.
[0052] In the embodiment of the present application, the luminance interval table can be calibrated in advance according to the actual water environment, divided into multiple grade intervals, for example, high transparency (transparency k, k≥0.6), medium transparency (transparency k, 0.4≤k<0.6), low transparency (transparency k, k<0.4), etc., each interval corresponds to a fixed coarse adjustment gain factor, which is used to reflect the overall influence degree of spectral attenuation on the visual or perception system under this transparency grade. Specifically, after the current water transparency is obtained, it can be matched and judged with the preset interval table to obtain the corresponding interval grade, and the coarse adjustment gain factor is determined by looking up the table through the corresponding relationship between the grade and the coarse adjustment gain factor. For example, if the transparency is 0.5, it belongs to the “medium transparency grade”, and the corresponding coarse adjustment gain factor is 1.1.
[0053] In a possible embodiment, in order to enhance the environmental adaptability of the present method, the transparency interval table can also be classified and set according to different water types (such as seawater, lake water, fresh water), and dynamically adjusted in combination with the scene (such as shallow water diving, deep sea shooting), so as to improve the accuracy of coarse adjustment gain matching.
[0054] Optionally, the interval grade includes a first grade and a non-first grade, the water transparency corresponding to the first grade is higher than the water transparency corresponding to the non-first grade, and in the step of determining the coarse adjustment gain factor corresponding to the interval grade to which the water transparency belongs based on the corresponding relationship between the interval grade and the coarse adjustment gain factor, when the interval grade is the first grade, the coarse adjustment gain factor corresponding to the interval grade to which the water transparency belongs is determined as one; when the interval grade is the non-first grade, the coarse adjustment gain factor corresponding to the interval grade to which the water transparency belongs is determined as a preset value greater than one.
[0055] In the embodiment of the present application, the “interval grade” can be realized by segmenting the transparency, for example, multiple transparency intervals are preset according to the measured or experimental data, such as “clear (first grade)”, “medium clear (second grade)”, “turbid (third grade)”, etc.; each grade corresponds to a specific transparency range, and a corresponding relationship with a coarse adjustment gain factor is established in advance. The lower the transparency, the stronger the corresponding light attenuation, and therefore the larger the corresponding coarse adjustment gain factor. Among them, the second grade and the third grade are non-first grades.
[0056] Specifically, when the water transparency is in the first level, it indicates that the water is optically clear, and the attenuation of red and green bands is weak, so no additional amplification is needed for the water depth value, and the coarse adjustment gain factor is set to 1; when the transparency is not in the first level, it indicates that the suspended particles or pollutants in the water increase, causing enhanced light scattering and reduced light flux, so the compensation strength needs to be improved, and the corresponding coarse adjustment gain factor can be set to a value greater than 1, for example, 1.1 for the second level, 1.2 or 1.5 for the third level, and the specific value can be calibrated by experiment or extracted from the adjustment coefficient library.
[0057] For example, the transparent range corresponding to the first level is k≥0.6, and the corresponding optical mechanism is weak scattering of clear water, and the compensation factor is set to 1.0 according to Jerlov sea water classification type I; The transparent range corresponding to the second level is 0.4≤k<0.6, and the corresponding optical mechanism is linear scattering of fine particles (d50<30um), and the compensation factor can be set to 1.10 according to the Mie scattering model; The third level corresponds to the transparent range k<0.4, and the corresponding optical mechanism is nonlinear attenuation of coarse particles, and the compensation factor can be set to 1.25 according to the empirical model α=0.115xS^1.3 provided by the Yangtze River Commission.
[0058] The transparency interval is empirically divided, and Jerlov water type, Mie scattering and other optical mechanisms are used as support; and the compensation factor corresponding to each transparency interval is set based on the calculation results of related optical models or measured calibration data, and is used for accurate matching of water scattering attenuation characteristics.
[0059] The embodiment introduces a graded coarse adjustment mechanism to ensure that no additional gain is introduced in a good water quality scenario, thereby maintaining the stability of the compensation signal, while quickly switching to an enhanced mode when the transparency decreases, improving the visual compensation effect of the wearer in a turbid environment, and achieving bidirectional optimization of precision and energy consumption.
[0060] Optionally, the preset spectral band includes a red light band, the control signal includes a red light control voltage, and in the step of generating the control signal of the spectral compensation component based on the target water depth value, an adjustment factor of a red light channel can be extracted in a human eye light sensitivity response standard; and the red light control voltage is calculated according to a preset function relationship based on the adjustment factor of the red light channel and the target water depth value.
[0061] In the embodiment of the application, the adjustment factor of the red light channel can be obtained based on the L channel response function in the CIE standard spectral sensitivity curve, specifically, the normalized coefficient of the L channel (sensitive to the red light band) is extracted from the standard LMS (Long-Medium-Short) model. The preset function relationship can adopt an exponential voltage adjustment function, for example:
[0062] wherein, is the target water depth value calculated above, is the red channel adjustment factor. This function can be fitted according to the nonlinear attenuation characteristics of red light in water, with good engineering adaptability.
[0063] In one possible embodiment, the red channel adjustment factor can also be estimated by the weighted average transmittance rate of change in the preset wavelength window (such as 620nm-750nm), or by the inverse deduction of the change ratio of the light flux of the underwater and overwater images in the actual test environment; the preset function relationship can also be changed to a piecewise linear model based on experience, or a polynomial fitting function form, to adapt to the adjustment needs of different devices or different target scenes.
[0064] Optionally, the preset spectral band includes a green light band, and the control signal includes a green light control voltage. In the step of generating the control signal of the spectral compensation component based on the target water depth value, the water body transparency and the preset transparency threshold can also be compared; if the water body transparency is lower than the preset transparency threshold, the green light control voltage is calculated based on the target water depth value according to the preset function relationship; if the water body transparency is not lower than the transparency threshold, the green light control voltage is zero.
[0065] In the embodiment of the present application, the transparency threshold can be obtained by a large amount of measured data analysis, to reflect the lower limit of the effective penetration depth of green light under certain water quality conditions. For example, when the transparency factor k is lower than 0.6 (indicating that there are more suspended solids in the water body and the scattering is enhanced), the green light signal still has high recognition value in vision and image capture, and the green light control voltage can be generated according to the following exponential function:
[0066] wherein, is the target water depth value, and if k≥0.6, it represents that the water body is relatively clear, and the natural penetration effect of green light is good, without the need for additional compensation, and the green light control voltage is set to 0 at this time.
[0067] In an alternative embodiment, the wearable underwater spectral compensation system (i.e. the spectral compensation component, such as a diving eye, a wearable diving helmet, etc.) can be controlled in a manual mode based on preset scene parameters, without the need for real-time acquisition of water depth values or transparency data. Specifically, the user can manually select the corresponding underwater scene mode through a magnetic coded knob (such as AS5600), and each mode corresponds to a set of spectral compensation parameters, including the effective water depth coefficient (d_eff coefficient), the LMS red light weight (LMS_R), and the turbidity gain factor (Intensity Gain).
[0068] In this embodiment, according to the selected mode number, the corresponding SCENE MODEL parameter group is called, and d_eff is first input into the exponential spectral compensation function to generate a red light control voltage V_r in combination with a red light weight (lms_r) factor, which is used to regulate the light transmittance of the red light channel to achieve visual adaptation in different underwater environments.
[0069] For example, in this manual control embodiment, the system is pre-set with five typical scene modes, each mode corresponding to a set of optimized spectral compensation parameters for adapting to visual distortion in different underwater environments: Mode 1 (Shallow Coral Area): The effective water depth coefficient (d_eff) is set to 1.0, the LMS red light weight (lms_r) is 0.85, and the corresponding turbidity gain (i.e. transparency gain factor) is 1.15, which is suitable for shallow sea areas with sufficient light and clear water, and the red light compensation degree is low to avoid image oversaturation.
[0070] Mode 2 (Seagrass Bed): d_eff is 1.3, lms_r is 0.88, and the corresponding turbidity gain is 1.20, which is suitable for areas with slightly turbid water and high green component proportion, and the red light transmittance is appropriately increased to enhance color balance.
[0071] Mode 3 (Wreck Exploration): d_eff is 1.8, lms_r is 0.92, and the corresponding turbidity gain is 1.25, which is suitable for scenes with mixed ambient light and significant red light attenuation at medium depth, and the red light compensation is enhanced to improve the outline clarity of underwater targets.
[0072] Mode 4 (Turbid Estuary): d_eff is 2.0, lms_r is 0.97, and the corresponding turbidity gain is 1.30, which is suitable for estuary areas with high silt content and weak red light penetration, and the system uses a strong red light compensation strategy to improve overall imaging recognition.
[0073] Mode 5 (Night Diving / Low Light Environment): d_eff is 2.2, lms_r is 1.05, and the corresponding turbidity gain is 1.35, which is suitable for extremely low light or near-night underwater working environment, and the system applies the maximum intensity of red light compensation voltage to restore the sensitivity of the human eye to the red light area and enhance the visual effect in low light conditions.
[0074] Each of the above modes can be manually selected and activated via a magnetic coding knob (such as AS5600). After reading the current mode number, the d_eff coefficient, lms_r weight value, and turbidity gain matching the mode are called to calculate and generate the corresponding red light control voltage, which is then applied to the electroluminescent layer to achieve dynamic adjustment of the transmittance of the red light channel, thereby improving the color reproduction and visual clarity of the underwater observation or imaging system in specific scenarios.
[0075] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0076] In one embodiment, an underwater spectral compensation device is provided, which corresponds one-to-one with the underwater spectral compensation method described in the above embodiments. For example... Figure 2 As shown, the underwater spectral compensation device includes an acquisition module 201, a filtering module 202, a determination module 203, a gain module 204, and a generation module 205. Detailed descriptions of each functional module are as follows: The acquisition module 201 is used to acquire the water transparency at the current water depth and the historical water depth. Filtering module 202 is used to perform smoothing filtering on the current water depth value based on the historical water depth value to obtain a smoothed water depth value; The determining module 203 is used to determine the transparency gain factor based on the transparency of the water body; Gain module 204 is used to perform gain processing on the smooth water depth value based on the transparency gain factor to obtain the target water depth value; The generation module 205 is used to generate a control signal for the spectral compensation component based on the target water depth value, so that the spectral compensation component adjusts the transmittance of a preset spectral band according to the control signal.
[0077] Optionally, the filtering module 202 is further configured to: Set a first weight corresponding to the historical water depth value and a second weight corresponding to the current water depth value; The smoothed water depth value is calculated based on the historical water depth value, the first weight, the current water depth value, and the second weight.
[0078] Optionally, the determining module 203 is further configured to: Based on the transparency range to which the water body transparency belongs, determine the corresponding coarse adjustment gain factor; Based on the water transparency and a preset adjustment coefficient, a fine-tuning gain factor is calculated. The preset adjustment coefficient is set according to the human eye light sensitivity response standard. The transparency gain factor is calculated based on the coarse adjustment gain factor and the fine adjustment gain factor.
[0079] Optionally, the determination module 203 is further configured to: determine, based on the preset transparency interval table, an interval level to which the water transparency belongs, each interval level corresponding to a coarse adjustment gain factor; determine, based on a correspondence between the interval level and the coarse adjustment gain factor, the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs.
[0080] Optionally, the interval levels include a first level and non-first levels, the water transparency corresponding to the first level being higher than the water transparency corresponding to the non-first levels, and the determination module 203 is further configured to: when the interval level is the first level, determine the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs as one; when the interval level is the non-first level, determine the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs as a preset value greater than one.
[0081] Optionally, the preset spectral band includes a red light band, the control signal includes a red light control voltage, and the generation module 205 is further configured to: extract an adjustment factor of a red light channel in a human eye light sensitivity response standard; calculate the red light control voltage according to a preset function relationship based on the adjustment factor of the red light channel and the target water depth value.
[0082] Optionally, the preset spectral band includes a green light band, the control signal includes a green light control voltage, and the generation module 205 is further configured to: perform comparison processing based on the water transparency and a preset transparency threshold value; if the water transparency is lower than the preset transparency threshold value, calculate the green light control voltage according to a preset function relationship based on the target water depth value; if the water transparency is not lower than the transparency threshold value, the green light control voltage is zero.
[0083] The specific limitations of the underwater spectral compensation device can be referred to the limitations of the underwater spectral compensation method in the foregoing, which will not be repeated here. Each module in the above underwater spectral compensation device can be realized by software, hardware, and combinations thereof, in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above modules.
[0084] In one embodiment, a computer device is provided, which can be a terminal device, and an internal structure diagram of the computer device can be as shown in Figure 3 The computer device includes a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer readable instructions. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer readable instructions are executed by the processor to implement an underwater spectral compensation method. The readable storage medium provided in the embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0085] In the embodiments of the present application, a computer device is provided, which includes a memory, a processor, and computer readable instructions stored in the memory and executable on the processor. When the processor executes the computer readable instructions, the steps of the above-described underwater spectral compensation method are implemented.
[0086] In the embodiments of the present application, a readable storage medium is provided, which stores computer readable instructions. When the computer readable instructions are executed by the processor, the steps of the above-described underwater spectral compensation method are implemented.
[0087] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by computer readable instructions instructing related hardware. The computer readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database, or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0088] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
[0089] The above examples are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. An underwater spectral compensation method, characterized in that, The method is applied to a spectral compensation component, including: Obtain water transparency at the current water depth and historical water depth values; The current water depth value is smoothed by applying a smoothing filter based on the historical water depth value to obtain a smoothed water depth value. Based on the water transparency, determine the transparency gain factor; The smooth water depth value is amplified based on the transparency gain factor to obtain the target water depth value. Based on the target water depth, a control signal is generated for the spectral compensation component, so that the spectral compensation component adjusts the transmittance of a preset spectral band according to the control signal.
2. The underwater spectral compensation method as described in claim 1, characterized in that, The step of smoothing the current water depth value based on the historical water depth value to obtain a smoothed water depth value includes: Set a first weight corresponding to the historical water depth value and a second weight corresponding to the current water depth value; The smoothed water depth value is calculated based on the historical water depth value, the first weight, the current water depth value, and the second weight.
3. The underwater spectral compensation method as described in claim 1, characterized in that, The determination of the transparency gain factor based on the water body transparency includes: Based on the transparency range to which the water body transparency belongs, determine the corresponding coarse adjustment gain factor; Based on the water transparency and a preset adjustment coefficient, a fine-tuning gain factor is calculated. The preset adjustment coefficient is set according to the human eye light sensitivity response standard. The transparency gain factor is calculated based on the coarse adjustment gain factor and the fine adjustment gain factor.
4. The underwater spectral compensation method as described in claim 3, characterized in that, The determination of the corresponding coarse-adjustment gain factor based on the transparency range to which the water body's transparency belongs includes: Based on a preset transparency range table, the water body transparency is determined to be within a certain range level, and each range level corresponds to a coarse adjustment gain factor. Based on the correspondence between the interval level and the coarse adjustment gain factor, the coarse adjustment gain factor corresponding to the interval level to which the water body transparency belongs is determined.
5. The underwater spectral compensation method as described in claim 3, characterized in that, The interval levels include a first level and non-first levels, where the water transparency corresponding to the first level is higher than that corresponding to the non-first level. Determining the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs, based on the correspondence between the interval levels and the coarse adjustment gain factor, includes: When the interval level is the first level, the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs is determined to be one; When the interval level is not the first level, the coarse adjustment gain factor corresponding to the interval level to which the water transparency belongs is determined to be a preset value greater than one.
6. The underwater spectral compensation method as described in claim 1, characterized in that, The preset spectral band includes the red light band, the control signal includes a red light control voltage, and the control signal for generating the spectral compensation component based on the target water depth value includes: The modulation factor of the red light channel was extracted from the human eye's photosensitive response standard; The red light control voltage is calculated based on the adjustment factor of the red light channel and the target water depth value according to a preset functional relationship.
7. The underwater spectral compensation method as described in claim 1, characterized in that, The preset spectral band includes the green light band, the control signal includes a green light control voltage, and the control signal for generating the spectral compensation component based on the target water depth value includes: A comparison is performed based on the water transparency and a preset transparency threshold; If the water transparency is lower than the preset transparency threshold, the green light control voltage is calculated based on the target water depth value according to a preset functional relationship. If the water transparency is not lower than the transparency threshold, then the green light control voltage is zero.
8. An underwater spectral compensation device, characterized in that, Applications in spectral compensation components include: The acquisition module is used to obtain the water transparency at the current water depth and the historical water depth. The filtering module is used to perform smoothing filtering on the current water depth value based on the historical water depth value to obtain a smoothed water depth value; A determination module is used to determine a transparency gain factor based on the transparency of the water body; A gain module is used to perform gain processing on the smoothed water depth value based on the transparency gain factor to obtain the target water depth value. The generation module is used to generate a control signal for the spectral compensation component based on the target water depth value, so that the spectral compensation component adjusts the transmittance of a preset spectral band according to the control signal.
9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, characterized in that, When the processor executes the computer-readable instructions, it implements the underwater spectral compensation method as described in any one of claims 1 to 7.
10. A readable storage medium having computer-readable instructions stored thereon, characterized in that, When the computer-readable instructions are executed by a processor, they implement the underwater spectral compensation method as described in any one of claims 1 to 7.