An underwater algae identification method and system based on polarization filtering and light field imaging
By combining polarization filtering and optical field imaging in a coordinated design, along with an improved optical field frequency domain refocusing and a multi-scale Retinex enhancement model, the problem of high-fidelity acquisition and accurate quantification of floc morphology characteristics under high turbidity water quality was solved, enabling refined control of water treatment processes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU QIANJIA TECH CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies cannot achieve high-fidelity acquisition and accurate quantification of alum floc morphology characteristics under high turbidity and dynamic water quality conditions. The imaging quality deteriorates and the fractal dimension calculation error is large, which cannot meet the accuracy requirements of water treatment process control.
By employing a collaborative design of polarization filtering and light field imaging, and integrating polarization filter lenses with microlens arrays, combined with an improved light field frequency domain refocusing method and a multi-scale Retinex enhancement model, image enhancement and fractal dimension calculation are performed to achieve high-fidelity image acquisition and accurate quantization.
In high-turbidity environments, it significantly improves the contrast and edge sharpness of floc images, reduces artifacts and phase distortion in refocused images, ensures the accuracy and stability of fractal dimension calculation, and supports the fine-tuning of water treatment processes.
Smart Images

Figure CN121811228B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an underwater alum flower identification method and system based on polarization filtering and light field imaging. Background Technology
[0002] In water treatment processes, the morphological characteristics of flocs (flocculated aggregates formed by colloid destabilization and flocculation during coagulation) are the core basis for evaluating coagulation effects, optimizing dosing parameters, and achieving refined water quality control.
[0003] Existing technologies attempt to introduce optical imaging techniques into water treatment scenarios to achieve in-situ, real-time visual monitoring of underwater flocs. However, the underwater environment has complex characteristics such as high scattering, strong absorption, uneven illumination, and interference from suspended particles, leading to severe degradation in image quality.
[0004] First, while conventional high-definition camera systems (such as 4-megapixel industrial cameras with supplementary lighting) can acquire basic images, they are easily affected by Mie scattering and backscattering in turbid water, resulting in significantly reduced image contrast, blurred edges of flocs, and loss of internal structural details, making it difficult to support subsequent accurate segmentation and morphology quantification. Some technologies introduce single-channel polarization filtering, which can suppress some scattered light under certain conditions, but because a dynamic correlation model between polarization parameters and water optical properties (such as scattering coefficient and particle size) has not been established, the filtering effect is highly dependent on empirical settings. When faced with fluctuations in water quality, a single polarization mode cannot simultaneously address the depth of scattering suppression and the signal-to-noise ratio.
[0005] While existing light field cameras (based on microlens arrays) support digital refocusing, their core frequency domain refocusing algorithm inevitably introduces spectral leakage and phase distortion during slice reconstruction due to non-integer coordinate interpolation. This results in ringing artifacts and edge blurring in the refocused image, severely compromising the fidelity of the subtle texture of alum flocs. At the same time, existing light field systems cannot utilize polarization information to further suppress water scattering noise, leading to a sharp decline in imaging quality under high turbidity conditions.
[0006] In the image post-processing stage, although some solutions use the Retinex method to enhance contrast or calculate the fractal dimension through box counting to quantify the alum flower structure, the existing Retinex method is prone to over-enhancing details or amplifying background noise due to the single scale selection and the fact that the post-processing strategy is not optimized for the low contrast and weak texture characteristics of alum flowers. Furthermore, the fractal dimension calculation is highly sensitive to the quality of the input image, and the cumulative error of the aforementioned imaging and enhancement stages will directly lead to statistical deviation in grid coverage, causing the fractal dimension results to be distorted and losing their value for process guidance. Summary of the Invention
[0007] The purpose of this invention is to address the technical problem that existing technologies cannot achieve high-fidelity acquisition and accurate quantification of alum floc morphology characteristics under high turbidity and dynamic water quality conditions, and to provide an underwater alum floc identification method based on polarization filtering and light field imaging.
[0008] To achieve the above-mentioned objectives, the embodiments of the present invention provide the following technical solutions:
[0009] A method for identifying underwater alum flowers using polarization filtering and light field imaging includes the following sub-steps:
[0010] Underwater cameras were installed in sedimentation tanks and pre-sedimentation tanks to acquire raw four-dimensional light field data of the transmittance of the mud-water interface and floc images.
[0011] The raw four-dimensional light field data from the underwater camera is converted into polarized four-dimensional light field data using a polarization-filtered light field camera.
[0012] An improved optical field frequency domain refocusing method is used to refocus the original polarization-filtered optical field data to obtain a refocused two-dimensional image.
[0013] The multi-scale retinex enhancement model performs Gaussian blurring, normalization, Gamma correction, linear adjustment, and top-hat transformation on the refocused 2D image to form an enhanced image;
[0014] The enhanced image is converted to grayscale and Gaussian filtered to smooth the noise. The image with smoothed noise is then subjected to OTSU threshold segmentation to extract the target set.
[0015] By using box counting to cover the target set, and deriving the fitted line from the theoretical fractal dimension of alum flowers, the fractal dimension of alum flowers is obtained.
[0016] However, to address the problem that existing technologies cannot achieve high-fidelity acquisition and accurate quantification of alum floc morphology characteristics under high turbidity and dynamic water quality conditions, this invention integrates polarization filter lenses and microlens arrays at the optical level. During the initial four-dimensional light field data acquisition stage, it simultaneously suppresses backscattered light and records four-dimensional information on the light field angle and space, effectively filtering out Mie scattering and background stray light caused by suspended particles in the water, thus improving the contrast of alum floc edges. An improved light field frequency domain refocusing method is introduced into the four-dimensional light field spectrum to smooth the spectral edges and eliminate spectral leakage and phase distortion introduced by traditional linear interpolation. The multi-scale Retinex enhancement model, while suppressing background noise amplification, enhances the internal texture gradient of alum flocs, solving the problem of existing technologies being unable to achieve high-fidelity acquisition and accurate quantification of alum floc morphology characteristics under high turbidity and dynamic water quality conditions.
[0017] Compared with existing technologies, the beneficial effects of this invention are as follows: Through the synergistic optical design of polarization filtering and light field imaging, backscattering and Mie scattering interference from water bodies are suppressed at the acquisition source, providing a high-fidelity image foundation for subsequent morphology quantization; the introduction of dual-domain Gaussian window spectral shaping and truncated sinc interpolation kernel improves the refocusing position accuracy without hardware modifications, eliminating ringing artifacts and phase distortion caused by traditional linear interpolation; the multi-scale Retinex enhancement model accurately adapts to the low contrast and multi-scale texture characteristics of alum flowers, completely preserving the texture information required for fractal dimension calculation while avoiding noise amplification, and combined with box counting linear fitting, reducing the fractal dimension estimation error.
[0018] Furthermore, an underwater alum floc identification method based on polarization filtering and light field imaging, wherein acquiring the transmittance of the mud-water interface and the original four-dimensional light field data of the alum floc image includes the following sub-steps:
[0019] The first underwater camera and array lights are set in the water collection tank at the end of the pre-sedimentation tank, and the first underwater camera acquires the mud-water interface.
[0020] Select the area in the mud-water interface where the number of pixels is greater than the set threshold, and calculate the light transmittance.
[0021] The second and third underwater cameras were placed in the middle of the sedimentation tank to collect raw four-dimensional light field data of different floc images.
[0022] In the above scheme, the technical solution of multi-camera collaborative acquisition of the original four-dimensional light field data of the floc image by clearly defining the light transmittance monitoring area of the mud-water interface and the floc image solves the technical problem that conventional underwater camera systems are affected by Mie scattering and backscattering light interference, which leads to significant attenuation of floc image contrast, blurred edges, loss of internal texture details, and consequently large errors in subsequent segmentation and morphology quantization (such as fractal dimension), which cannot meet the accuracy requirements of water treatment process control. This invention deploys a first underwater camera and array lamps at the end of the pre-sedimentation tank's water collection trough, specifically for calculating the transmittance of the mud-water interface. It pre-defines regions of interest where pixels exceed a set threshold, achieving stable quantification of the interface state. Simultaneously, a second and third underwater camera are deployed in the middle of the sedimentation tank to collect raw four-dimensional light field data of alum flocs from different depths and perspectives, forming a spatially and angularly redundant light field information acquisition system. This allows the subsequent polarization filtering module to implement differentiated scattering suppression for different water quality areas, and the light field refocusing module to accurately reconstruct the three-dimensional floc structure of alum flocs from the multi-view raw data. This ensures high image contrast, edge sharpness, and internal texture fidelity from the source, providing a high-quality data foundation for multi-scale Retinex enhancement, threshold segmentation, and fractal dimension calculation. This significantly improves the accuracy of alum floc morphology recognition and the real-time response capability of process control.
[0023] Furthermore, an underwater alum flower identification method based on polarization filtering and light field imaging involves applying a windowed Gaussian function to the original light field data to form windowed data; the dual-domain Gaussian function includes a spatial domain Gaussian window function and an angular domain Gaussian window function.
[0024] The windowed data is then transformed into optical field spectrum data using Fourier transform.
[0025] The normalized sinc interpolation of the truncation radius is performed on the light field spectrum data to obtain the two-dimensional spectrum of the refocused image;
[0026] The two-dimensional spectrum of the refocused image is transformed into a refocused two-dimensional image through inverse Fourier transform.
[0027] In the aforementioned scheme, by clearly defining the complete refocusing technical path of dual-domain Gaussian function windowing preprocessing, four-dimensional Fourier transform, truncation radius normalized sinc interpolation, and inverse Fourier transform, the technical problem of insufficient refocusing accuracy caused by the inevitable introduction of spectral leakage and phase distortion due to non-integer coordinate linear interpolation in slice reconstruction in existing frequency domain refocusing methods is solved. This results in ringing artifacts and edge blurring in the refocused image, severely compromising the fidelity of the weak flocculent structure. This invention constructs a cascaded windowing mechanism of spatial domain Gaussian window functions and angular domain Gaussian window functions, applying smoothing suppression to the spatial and angular spectral edges of the original light field data before the four-dimensional Fourier transform. This fundamentally cuts off the high-frequency ringing propagation path, ensuring the sharpness of the weak flocculent edges and the continuity of internal texture at the frequency domain processing level. This provides a high-fidelity refocused image foundation for subsequent multi-scale Retinex enhancement and fractal dimension calculation.
[0028] Furthermore, in an underwater alum flower identification method based on polarization filtering and light field imaging, the improved light field frequency domain refocusing method is expressed as follows:
[0029] ;
[0030] in, This is four-dimensional optical field data with polarization filtering. This represents the discrete spatial coordinate index of the microlens array plane. This is the discrete angular coordinate index for the sub-aperture image. For spatial domain Gaussian window functions, It is a Gaussian window function in the angle domain. This is the four-dimensional light field data after dual-domain Gaussian window processing. For along four-dimensional coordinates Perform the Discrete Fourier Transform operation. This is the transformed four-dimensional light field spectrum. Spatial frequency coordinates For angular frequency coordinates, For the two-dimensional spectrum of the refocused image, Spatial frequency coordinates and To find the range of summation, , It is an angular frequency coordinate. The integer index obtained by rounding down the theoretical slice position on the axis. and The theoretical slice location, This is the depth scaling factor. , The focal length of the microlens array. It is an angular frequency coordinate. The integer index obtained by rounding down the theoretical slice position on the axis. and This is the decimal offset between the theoretical slice position and the integer index. , , For the normalized sinc interpolation kernel, To calculate the offset between the summation range and the integer index, For along the spatial frequency coordinates Perform the inverse discrete Fourier transform operation. To refocus a two-dimensional image, This is the discrete spatial coordinate index of the image plane.
[0031] In the above scheme, the improved optical field frequency domain refocusing method solves the technical problems of edge blurring and artifacts in the refocused image of the traditional optical field frequency domain refocusing method. The present invention applies Gaussian window functions to the spatial domain and angular domain of the original optical field data after polarization filtering for preprocessing, which effectively smooths the discontinuity of the four-dimensional spectrum edge and suppresses the Gibbs ringing effect from the source. In the frequency domain slicing reconstruction stage, a normalized sinc interpolation kernel with a truncation radius of 2 pixels is used to replace linear interpolation. The sinc interpolation kernel approximates the ideal low-pass reconstruction characteristics at the theoretical level, which significantly reduces spectral leakage and phase distortion, and substantially improves the edge sharpness and high-frequency detail preservation of the refocused two-dimensional image. Since the interpolation neighborhood is strictly limited to a 5×5 pixel range, the computational cost is controllable, and the synergistic optimization of refocused image quality and processing efficiency is achieved.
[0032] Furthermore, an underwater alum flower identification method based on polarization filtering and light field imaging, wherein the multi-scale retinex enhancement model performs Gaussian blurring, normalization, Gamma correction, linear adjustment, and top-hat transformation on the refocused two-dimensional image, includes the following sub-steps:
[0033] The preprocessing module converts the refocused 2D image into a floating-point format. If the downsampling rate is less than 1, it performs downsampling in the floating-point domain. The downsampled small-sized image is then output to the parallel multi-scale processing module. If the downsampling rate is greater than 1, the image with the original size is output to the multi-scale processing module.
[0034] The multi-scale processing module processes wrap functions of different scales in parallel, performs Gaussian blurring through the wrap functions, performs logarithmic transformation on the original logarithmic image and the blurred result, subtracts the transformed images to obtain reflection components of different scales, and fuses the reflection components of different scales to output to the upsampling module.
[0035] If the preprocessing module performs downsampling, the upsampling module will upsample the multi-scale fused reflection components to restore the image size and output it to the combined enhancement module; otherwise, the upsampling module will not perform any processing and will output it to the combined enhancement module.
[0036] The combined enhancement module normalizes the fused reflection components and then performs Gamma correction. The image, linearly adjusted by Gamma correction, is then enhanced by top-hat transformation, and the enhanced image is output.
[0037] In the above scheme, by clearly defining the complete technical path of preprocessing downsampling, parallel multi-scale wrap function fusion, upsampling recovery and combined enhancement (normalization, Gamma correction, linear adjustment, top-hat transformation), the technical problems of fixed scale parameters in the general single-scale Retinex method and the post-processing strategy not being adapted to the low contrast and weak texture characteristics of fractal flowers are easily caused by over-enhancement of details or amplification of background noise, which further aggravates the statistical bias of fractal dimension calculation. This invention first employs floating-point downsampling and upsampling mechanisms to fully preserve the high-frequency details and textures of alum flocs while ensuring real-time processing at high frame rates. It then constructs a parallel processing architecture using small, medium, and large-scale Gaussian surround functions (σsmall < σmedium < σlarge), corresponding to fine texture preservation, local illumination equalization, and global background estimation, respectively. By extracting reflection components at each scale through logarithmic difference and employing mean-weighted fusion, it achieves precise removal of illumination components and adaptive enhancement of reflection components. The combined enhancement module sequentially applies min-max normalization to the fused reflection components to unify the dynamic range, Gamma correction to darken highlights and brighten shadows, and gain shift to adjust overall brightness and contrast. Finally, a top-hat transformation selectively enhances the edges and internal micropore structures of alum flocs. This invention provides a high signal-to-noise ratio and clear texture enhancement base for subsequent threshold segmentation and morphological quantization.
[0038] Furthermore, in an underwater alum flower identification method based on polarization filtering and light field imaging, the formula for Gaussian blurring using a wraparound function is as follows:
[0039] ;
[0040] in, For the reflection component at scale k, The original logarithmic image, Let be the logarithm of the fuzzy results at scale k. The fuzzy result at scale k, Let k be a Gaussian wrapping function. For operations on refocused 2D images, k = small, medium, large.
[0041] In the above scheme, the refocused two-dimensional image is clearly defined as the sole input source of the multi-scale Retinex enhancement model. The physical mapping relationship between the small, medium, and large-scale Gaussian wrapping functions and the multi-level floc structure of alum flocs is systematically defined. The small scale corresponds to the fine floc texture and edges, the medium scale corresponds to the medium-scale floc contour, and the large scale corresponds to the global background illumination estimation. At the same time, the mathematical meaning and data flow of each variable in the calculation formula of the reflection component are strictly standardized. This solves the technical problems of existing Retinex enhancement methods in alum floc recognition applications, such as the ambiguous definition of dependent variables, lack of physical basis for scale parameter selection, unclear mapping path from the refocused image to the reflection component, resulting in blind multi-scale fusion weights, large fluctuations in enhancement effect with working conditions, and inconsistent fractal dimension calculation benchmarks. This invention uses a high-fidelity image output after polarization filtering and improved frequency domain refocusing to establish subsequent logarithmic transformation, Gaussian blurring, and difference operations on a reproducible and traceable numerical benchmark. Furthermore, it correlates the three-scale Gaussian kernel standard deviation with the actual particle size distribution range of alum flocs, so that the reflection component at each scale can be physically and interpretably stripped of the corresponding scale's illumination inhomogeneity and scattering interference. The resulting multi-scale reflection component not only fully preserves the morphological characteristics of all flocs from sub-millimeter-scale fine flocs to centimeter-scale large flocs, but also provides a dynamically stable and physically meaningful input for subsequent normalization, Gamma correction, and top-hat transformation.
[0042] Furthermore, a method for identifying alum flowers underwater using polarization filtering and light field imaging, wherein obtaining the fractal dimension of the alum flowers includes the following sub-steps:
[0043] For side length is Given a square grid covering a target set A, count the number of grid cells that contain at least one foreground pixel. Thus, the theoretical definition of the fractal dimension of alum flowers is obtained;
[0044] Select a set of scales sorted from largest to smallest ,use Given a square grid of a certain size with sides covering the target set A, count the number of grid cells that contain at least one foreground pixel. For each scale Calculate the fitting points respectively;
[0045] All fitted points The alum flower is fitted to a straight line using the least squares method, and the fractal dimension is obtained from the slope of the straight line.
[0046] In the above scheme, by clearly defining the source and binarization standard of the target set, the proportional decrease rule of the scale sequence, the starting position and edge processing criteria of the grid coverage, the grid counting method with at least one foreground pixel, and the complete fractal dimension calculation process of least squares linear fitting to calculate the slope, the technical problems of existing floc morphology quantification methods, such as ambiguous fractal dimension calculation steps, strong randomness in scale selection, inconsistent grid division, and coarse fitting methods, which lead to poor repeatability of fractal dimension results, low correlation with the actual flocculation state of floc, and inability to be used as a reliable quantitative indicator for sedimentation tank process control, are solved. This invention uniquely locks the target set to a high-confidence binary image of floc after OTSU double-threshold segmentation and refined region extraction, ensuring the purity and reproducibility of the fractal dimension calculation basis. It constructs a counting protocol with a proportionally decreasing scale sequence of standardized grids, starting from the top left corner of the image and covering all non-overlapping areas, uniformly discarding or padding incomplete grids at the edges, ensuring strict scale invariance for grid cell counts at each scale. Finally, by performing least-squares linear regression on the fitted point set, the slope of the fitted line is directly mapped to the fractal dimension of the floc, providing a long-term, stable, and physically interpretable numerical basis for optimizing flocculant dosage and controlling the sludge discharge cycle in sedimentation tanks from a morphological quantification perspective.
[0047] Furthermore, in an underwater alum flower identification method based on polarization filtering and light field imaging, the formula for fitting a straight line using the least squares method is as follows:
[0048] ;
[0049] in, Let be the fractal dimension of the alum flower, and C be the intercept of the fitted line, used for calibration but not involved in dimension estimation. For a side length of The number of grid cells containing at least one foreground pixel. The side length of the covering grid.
[0050] In the above scheme, by clearly defining the physical meaning and mathematical role of each variable in the least squares fitting formula, the fractal dimension of alum floc is defined as the slope of the fitted line. The intercept is only used for line calibration and is explicitly excluded from dimension estimation. Simultaneously, the independent and dependent variables are standardized. This solves the technical problem in existing fractal dimension calculation methods where the fitting formula lacks constraints, leading to drastic fluctuations in the dimension calculation results for the same alum floc sample, weak correlation with the actual flocculation state, and inability to serve as a reliable quantitative indicator for sedimentation tank process control. This invention, by locking the fractal dimension as the sole output of the linear regression slope, cuts off any potential interference from the intercept on dimension estimation and forces the use of the least squares method for optimal linear approximation of the fitted point set. This fundamentally ensures the high repeatability and strong comparability of the alum floc fractal dimension under different turbidity conditions and different imaging batches, making the fractal dimension a truly quantitative physical indicator for characterizing alum floc density, floc size distribution, and sedimentation performance. This provides a long-term, stable, and physically interpretable numerical basis for the refined control of water treatment processes.
[0051] Furthermore, an underwater alum flower identification method based on polarization filtering and light field imaging, wherein the target set is extracted from the noise-smoothed image using OTSU thresholding, includes the following sub-steps:
[0052] The image with smoothed noise is then subjected to OTSU thresholding to extract the target set;
[0053] The image after Gaussian filtering is subjected to a second OTSU threshold segmentation using a second threshold to extract high-confidence target regions.
[0054] Perform a logical intersection operation on the binarized first target set and the binarized second target set;
[0055] The target set is obtained by performing morphological processing of the intersection region by closing and opening operations.
[0056] An underwater alum flower identification system based on polarization filtering and light field imaging includes a data acquisition module, a polarization filtering module, a refocusing module, a multi-scale retinex enhancement model, a target extraction module, and a module for calculating the fractal dimension of alum flowers.
[0057] The data acquisition module is used to set up an underwater camera in the sedimentation tank and pre-sedimentation tank to acquire the light transmittance of the mud-water interface and the original four-dimensional light field data of the floc image.
[0058] The polarization filtering module is used to convert the raw four-dimensional light field data of the underwater camera into polarization-filtered four-dimensional light field data through the polarization-filtered light field camera.
[0059] The refocusing module refocuses the original light field data after polarization filtering using an improved light field frequency domain refocusing method to obtain a refocused two-dimensional image.
[0060] The multi-scale retinex enhancement model is used to perform Gaussian blurring, normalization, Gamma correction, linear adjustment, and top-hat transformation on the refocused two-dimensional image to form an enhanced image;
[0061] The target extraction module is used to convert the enhanced image to grayscale and smooth the noise using Gaussian filtering. The image with smoothed noise is then subjected to OTSU threshold segmentation to extract the target set.
[0062] The module for calculating the fractal dimension of alum flowers is used to cover the target set using the box counting method, and to derive the fitted line from the theoretical fractal dimension of alum flowers to obtain the fractal dimension of alum flowers.
[0063] In the aforementioned scheme, by hardware-level co-integrating the polarization filter lens and the microlens array at the optical acquisition layer, polarization modulation and light field angle sampling are synchronously completed within the same optical path. At the system architecture level, the refocusing module, multi-scale retinex enhancement model, target extraction module, and fractal dimension calculation module are connected in series as a fully closed-loop processing link with strictly aligned input and output interfaces. Data formats are unified and parameter transmission is standardized among modules. This solves the technical problems in existing technologies where polarization filtering and light field imaging functions are isolated and not co-designed at the optical acquisition layer. Furthermore, the image enhancement, threshold segmentation, and fractal dimension calculation stages are disconnected, leading to progressively accumulating errors and resulting in low overall system reliability and difficulty in adapting to dynamic water quality conditions. This invention, through a dual mechanism of optical layer co-integration and algorithm layer closed-loop coupling, establishes an end-to-end precise mapping relationship between the four-dimensional light field data acquired at the front end and the back-end refocusing, enhancement, segmentation, and quantization stages. This effectively blocks the error propagation path across modules, significantly improving the operational stability and reproducibility of quantization results in the floc identification system under high turbidity conditions. Attached Figure Description
[0064] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 This is a flowchart of an underwater alum flower identification method based on polarization filtering and light field imaging.
[0066] Figure 2 A structural diagram showing the installation location of the underwater camera.
[0067] Figure 3 This is a structural diagram of the array lights built into the water collection tank.
[0068] Figure 4 This is a diagram showing the internal structure of the first underwater camera in the water collection tank.
[0069] Figure 5 This is a schematic diagram of the structure of a region where the number of pixels exceeds a set threshold.
[0070] Figure 6 This is a schematic diagram of the front structure of an underwater camera.
[0071] Figure 7 This is a schematic diagram of the rear structure of an underwater camera.
[0072] Figure 8 This is a schematic diagram illustrating the principle of polarization filtering and optical field imaging detection.
[0073] Figure 9 The flowchart is for a multi-scale retinex enhancement model.
[0074] Figure 10 This is a transformation diagram of the alum flower image after processing.
[0075] Figure 11 The graph shows the calculated fractal dimension of alum flowers.
[0076] In the diagram, 1-first underwater camera, 2-second underwater camera, 3-third underwater camera, 4-array light, 5-first coagulant dosing point, 6-second coagulant dosing point, 7-sedimentation tank, 8-pre-sedimentation tank, 9-collection trough, 10-source water inlet.
[0077] 11-Front cover plate, 12-Scraper bar, 13-Front mounting ring, 14-Transparent glass, 15-Polarizing filter light field camera, 16-First U-shaped bracket, 17-Second U-shaped bracket, 18-First housing, 19-Second housing, 20-Sealing tube, 21-Rear cover plate. Detailed Implementation
[0078] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0079] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance, or suggesting any such actual relationship or order between these entities or operations. Additionally, the terms "connected," "linked," etc., can refer to a direct connection between elements or an indirect connection via other elements.
[0080] This invention is achieved through the following technical solutions, such as... Figure 1 As shown, an underwater alum flower identification method based on polarization filtering and light field imaging includes the following steps:
[0081] S1: Set up an underwater camera in sedimentation tank 7 and pre-sedimentation tank 8 to acquire the light transmittance of the mud-water interface and the raw four-dimensional light field data of floc images.
[0082] The underwater cameras include a first underwater camera 1, a second underwater camera 2, and a third underwater camera 3.
[0083] like Figure 2 As shown, S11: The first underwater camera 1 and the array light 4 are set in the water collection tank 9 at the end of the pre-sedimentation tank 8, and the first underwater camera 1 acquires the mud-water interface.
[0084] like Figure 3-4 As shown, the array lights 4 are spaced above the first underwater camera 1, and the first underwater camera 1 is located at the bottom center of the water collection tank 9.
[0085] like Figure 5 As shown, S12: Select the area in the mud-water interface where the number of pixels is greater than the set threshold, and calculate the transmittance using the following formula:
[0086]
[0087] in, Light transmittance.
[0088] It is important to note that a threshold is set to distinguish between clear water pixels and cement pixels.
[0089] In existing technologies, such as Figure 2 As shown, water flows from the source water inlet 10 into the buffer zone, and then enters the pre-sedimentation tank 8 along the direction of the dashed arrow. The experimental setup is based on the different properties of the source water in the water plant. ,like Then there is no need to add the first coagulant at point 5 and the second coagulant at point 6. Then, the first coagulant is added at point 5, and the second coagulant is added at point 6, until... .
[0090] in, This is the transmittance threshold.
[0091] The first coagulant dosing point 5 is set in the pre-sedimentation tank 8, and the second coagulant dosing point 6 is set in the sedimentation tank 7.
[0092] S13: Set the second underwater camera 2 and the third underwater camera 3 in the middle of the sedimentation tank 7 to collect raw four-dimensional light field data of different floc images.
[0093] In this embodiment, the second underwater camera 2 and the third underwater camera 3 are set opposite each other. The specific positions are adjusted according to the actual situation of different water treatment plants. Through symmetrical distribution and interval installation, the second underwater camera 2 and the third underwater camera 3 can respectively collect different alum floc images.
[0094] like Figure 6-7 As shown, the underwater camera includes a front cover plate 11, a scraper 12, a front mounting ring 13, a transparent glass 14, a polarizing filter light field camera 15, a first U-shaped bracket 16, a second U-shaped bracket 17, a first housing 18, a second housing 19, a sealing tube 20, and a rear cover plate 21.
[0095] The front cover plate 11 and the second housing 19 are connected by screws. The second housing 19 has a built-in waterproof sealing ring, and the internal gaps are coated with waterproof glue. The scraper 12 and the second housing 19 are connected by a built-in motor. The scraper 12 periodically removes the deposits on the transparent glass 14 to ensure clear images taken by the polarization filter light field camera 15. The transparent glass 14 is built into the mounting ring 13, which is connected to the first housing 18 by screws. The polarization filter light field camera 15 is built into the first housing 18. The first U-shaped bracket 16 is fixed to the first housing 18 by bolts, and the second U-shaped bracket 17 is fixed to the second housing 19 by bolts. The second U-shaped bracket 17 fixes the first housing 18 and the second housing 19. The sealing tube 20 is connected to the rear cover plate 21 by hollow bolts.
[0096] S2: Convert the raw four-dimensional light field data of the underwater camera into polarized filtered four-dimensional light field data using a polarization-filtered light field camera.
[0097] like Figure 8As shown, the principle of polarization filtering and light field imaging detection is as follows: the detection field of view is the imaging range covered by the lens of the polarization-filtered light field camera 15, which determines the observable water area; underwater alum flowers, as the detection target, are suspended within the detection field of view, and the light reflected from them enters the focal plane. The plane converges the image of the underwater alum flowers to form a real image plane. Below the focal plane of the polarization filter lens, the polarization state of the incident light is modulated to suppress backscattered light from the water body and improve the target contrast. The microlens array is placed at the focal plane to demultiplex light from different directions to different pixel areas of the detector plane, completing the sampling of the four-dimensional light field. The detector plane is located on the focal plane of the microlens array. After polarization modulation and angle demultiplexing of the four-dimensional light field data, the refocusing plane calculates the four-dimensional light field data collected by the detector through the light field frequency domain refocusing method to synthesize a clear image.
[0098] In existing technologies, the traditional optical field frequency domain refocusing method involves the following steps: The original four-dimensional optical field data undergoes a discrete Fourier transform along four-dimensional coordinates to form a four-dimensional optical field spectrum; frequency domain linear interpolation is then performed on the four-dimensional optical field spectrum to obtain the traditional refocused image's two-dimensional spectrum; finally, an inverse discrete Fourier transform is performed along two-dimensional coordinates on the traditional refocused image's two-dimensional spectrum to obtain the traditional refocused two-dimensional image. The formula is as follows:
[0099] ;
[0100] in, This is the original four-dimensional light field data. This represents the discrete spatial coordinate index of the microlens array plane. This is the discrete angular coordinate index for the sub-aperture image. For along four-dimensional coordinates Perform the Discrete Fourier Transform operation. The four-dimensional light field spectrum, Spatial frequency coordinates For angular frequency coordinates, This is the depth scaling factor. , The focal length of the microlens array. This is a linear interpolation operation used to estimate the coordinate positions in the spectrum. For traditional refocusing images, two-dimensional spectrum. Spatial frequency coordinates For along the spatial frequency coordinates Perform the inverse discrete Fourier transform operation. For traditional refocused two-dimensional images, This is the discrete spatial coordinate index of the image plane.
[0101] It should be noted that the sub-aperture image is a pieced-together image obtained by digital decoding of the detector plane.
[0102] However, the traditional optical field frequency domain refocusing method inevitably introduces spectral leakage and phase distortion during the frequency domain slicing process due to linear interpolation, which leads to technical problems such as edge blurring and artifacts in the refocused image. Therefore, the optical field frequency domain refocusing method is improved.
[0103] S3: The original light field data after polarization filtering is refocused by an improved light field frequency domain refocusing method to obtain a refocused two-dimensional image;
[0104] The steps of the improved optical field frequency domain refocusing method are as follows:
[0105] S31: The original light field data is windowed using a dual-domain Gaussian function to form windowed data; the dual-domain Gaussian function includes a spatial domain Gaussian window function and an angular domain Gaussian window function.
[0106] S32: The windowed data is transformed into optical field spectrum data through Fourier transform;
[0107] S33: Perform normalized sinc interpolation on the truncation radius of the light field spectrum data to obtain the two-dimensional spectrum of the refocused image;
[0108] S34: The two-dimensional spectrum of the refocused image is transformed into a refocused two-dimensional image through inverse Fourier transform.
[0109] The specific steps of S31-S34 are as follows: The original four-dimensional light field data is smoothed by a Gaussian window function in the spatial domain to suppress Gibbs ringing, and then the angular dimension spectrum is smoothed by a Gaussian window function in the angular domain to form four-dimensional light field data after dual-domain Gaussian window processing. The formula is:
[0110] ;
[0111] in, This is four-dimensional optical field data with polarization filtering. This represents the discrete spatial coordinate index of the microlens array plane. This is the discrete angular coordinate index for the sub-aperture image. For spatial domain Gaussian window functions, It is a Gaussian window function in the angle domain. The four-dimensional light field data after dual-domain Gaussian window processing;
[0112] The four-dimensional light field data processed by dual-domain Gaussian windowing is subjected to a discrete Fourier transform along the four-dimensional coordinates to form the transformed four-dimensional light field spectrum, as shown in the formula:
[0113] ;
[0114] in, For along four-dimensional coordinates Perform the Discrete Fourier Transform operation. This is the transformed four-dimensional light field spectrum. Spatial frequency coordinates Angular frequency coordinates;
[0115] The transformed four-dimensional light field spectrum is summed to form a 5×5 neighborhood, achieving spectrum reconstruction with a truncation radius of 2 pixels. Normalized sinc interpolation is then performed to obtain the two-dimensional spectrum of the refocused image, as shown in the formula:
[0116] ;
[0117] in, For the two-dimensional spectrum of the refocused image, Spatial frequency coordinates and To find the range of summation, , It is an angular frequency coordinate. The integer index obtained by rounding down the theoretical slice position on the axis. and The theoretical slice location, This is the depth scaling factor. , The focal length of the microlens array. It is an angular frequency coordinate. The integer index obtained by rounding down the theoretical slice position on the axis. and This is the decimal offset between the theoretical slice position and the integer index. , , For the normalized sinc interpolation kernel, The offset between the summation range and the integer index;
[0118] Performing an inverse discrete Fourier transform along two-dimensional coordinates on the two-dimensional spectrum of the refocused image yields the refocused two-dimensional image, as shown in the formula:
[0119] ;
[0120] in, For along the spatial frequency coordinates Perform the inverse discrete Fourier transform operation. To refocus a two-dimensional image, This is the discrete spatial coordinate index of the image plane.
[0121] In the above scheme, the improved optical field frequency domain refocusing method solves the technical problems of edge blurring and artifacts in the refocused image of the traditional optical field frequency domain refocusing method. The present invention applies Gaussian window functions to the spatial domain and angular domain of the original optical field data after polarization filtering for preprocessing, which effectively smooths the discontinuity of the four-dimensional spectrum edge and suppresses the Gibbs ringing effect from the source. In the frequency domain slicing reconstruction stage, a normalized sinc interpolation kernel with a truncation radius of 2 pixels is used to replace linear interpolation. The sinc interpolation kernel approximates the ideal low-pass reconstruction characteristics at the theoretical level, which significantly reduces spectral leakage and phase distortion, and substantially improves the edge sharpness and high-frequency detail preservation of the refocused two-dimensional image. Since the interpolation neighborhood is strictly limited to a 5×5 pixel range, the computational cost is controllable, and the synergistic optimization of refocused image quality and processing efficiency is achieved.
[0122] like Figure 9 As shown, S4: The multi-scale retinex enhancement model performs Gaussian blurring, normalization, Gamma correction, linear adjustment, and top-hat transformation on the refocused 2D image to form the enhanced image.
[0123] The multi-scale Retinex enhancement model includes a preprocessing module, a parallel multi-scale processing module, an upsampling module, and a combined enhancement module;
[0124] S41: The preprocessing module converts the refocused 2D image into a floating-point format. If the downsampling rate is less than 1, it performs downsampling in the floating-point domain. The downsampled small-sized image is output to the parallel multi-scale processing module. If the downsampling rate is greater than 1, the image with the original size is output to the multi-scale processing module.
[0125] It is important to note that floating-point format guarantees computational precision, while downsampling reduces the size (e.g., downsampling to the original value). Figure 1 / 2) Reduce computational complexity by setting the sampling rate to a user-configurable parameter, such as 0.5.
[0126] S42: The multi-scale processing module processes wrapping functions of different scales in parallel, performs Gaussian blurring through the wrapping function, performs logarithmic transformation on the original logarithmic image and the blurred result, subtracts the transformed images to obtain reflection components of different scales, and fuses the reflection components of different scales to output to the upsampling module.
[0127] Specifically, S421: Set three Gaussian kernels with different standard deviations. These correspond to wrapping functions at small, medium, and large scales, respectively. For a Gaussian blur at scale k, take the logarithm of the blur result, and subtract the logarithm of the blur result from the logarithmic image of the refocused 2D image to obtain the reflection component at scale k. The formula is:
[0128] ;
[0129] in, For the reflection component at scale k, The original logarithmic image, Let be the logarithm of the fuzzy results at scale k. The fuzzy result at scale k, Let k be a Gaussian wrapping function. For operations on refocusing two-dimensional images, k = small, medium, large;
[0130] It is important to note that Gaussian kernel blur has a small radius and is sensitive to image details. The Gaussian kernel width is medium, balancing detail and overall lighting. Gaussian kernel blur has a large radius and is sensitive to the overall lighting / haze of the image.
[0131] S422: The reflection components at each scale are weighted and integrated through average fusion (mean value) to obtain the multi-scale fused reflection components, as shown in the formula:
[0132] ;
[0133] in, For multi-scale fused reflection components, For small-scale reflection components, For the mesoscale reflection component, This refers to the large-scale reflection component.
[0134] It is important to note that by using average fusion for weighted integration, the reflection components of multi-scale fusion retain image details while also taking into account illumination balance.
[0135] S43: If the preprocessing module performs downsampling, the upsampling module will upsample the multi-scale fused reflection components to restore the image size and output it to the combined enhancement module; otherwise, the upsampling module will not perform any processing and will output it to the combined enhancement module.
[0136] S44: The combined enhancement module normalizes the fused reflection components and then performs Gamma correction. The image linearly adjusted by Gamma correction is enhanced by top-hat transformation, and the enhanced image is output.
[0137] S441: The combined enhancement module normalizes the fused reflection components using the following formula:
[0138] ;
[0139] in, The normalized reflection component, This represents the reflection component after fusion.
[0140] S442: Perform Gamma correction on the normalized reflection component, using the following formula:
[0141] ;
[0142] in, , Image corrected for Gamma.
[0143] It is important to note that Gamma correction introduces nonlinear enhancement to the normalized reflection component, thereby improving midtone contrast. It can slightly darken highlights and brighten shadows.
[0144] S443: Performs linear adjustment on the Gamma-corrected image and outputs it to the top-hat transform module. The formula is:
[0145] ;
[0146] in, For linearly adjusted images, For gain factor, This is for brightness offset.
[0147] In the embodiments, , , Used to control the overall brightness and contrast of an image.
[0148] S444: The top-hat transform module enhances local details, highlights weak structures, and outputs an enhanced image. The formula is:
[0149] ;
[0150] in, For the enhanced image, For corrosion operation, For expansion operation, for Circular structural elements.
[0151] Through the above scheme, the present invention effectively enhances images with uneven illumination and low contrast. It is applicable to industrial visual scenes with weak textures and non-uniform backgrounds such as alum flowers obtained by polarization filtering and light field imaging, further improving the accuracy of subsequent segmentation and feature extraction, and providing a high-quality image input foundation for the accurate calculation of fractal dimension index.
[0152] S5: The enhanced image is converted to grayscale and Gaussian filtered to smooth the noise. The image with smoothed noise is then subjected to OTSU threshold segmentation to extract the target set.
[0153] S51: Convert the enhanced image to a single-channel grayscale image. The grayscale image is then convolved with a Gaussian kernel using the following formula:
[0154] ;
[0155] in, This is the image after Gaussian filtering. The standard deviation controls the width of the Gaussian distribution. represents the coordinate index of the discrete x-axis of the image plane. This is the coordinate index of the y-axis in the discrete space of the image plane.
[0156] S52: Perform the first OTSU thresholding on the Gaussian-filtered image using the first threshold to initially separate the target region and the background. The formula is:
[0157] ;
[0158] in, For binarizing the first target set, This is the image after Gaussian filtering. This is the first threshold.
[0159] S53: Perform a second OTSU thresholding on the Gaussian-filtered image using the second threshold to extract high-confidence target regions. The formula is as follows:
[0160] ;
[0161] in, To binarize the second target set, This is the second threshold.
[0162] In the embodiments, such as Figure 10 As shown, The Gaussian distribution has a moderate width, and the Gaussian filter removes high-frequency noise. The grayscale range is (0, 255). , .
[0163] S54: Perform a logical intersection operation on the binarized first target set and the binarized second target set, with the following formula:
[0164] ;
[0165] in, For logical intersection operation, This is the intersection region.
[0166] The above method preserves pixels that were initially identified as targets and then confirmed with high confidence in the intersection region, significantly improving the accuracy of target detection.
[0167] S55: Perform morphological processing of the intersection region using the closing-opening operation to obtain the target set, as shown in the formula:
[0168] ;
[0169] Where A is the target set, for Rectangular structural elements, It is the intersection set.
[0170] S6: Using box counting to cover the target set, the fitted line is derived from the theoretical fractal dimension of the alum flower, and the fractal dimension of the alum flower is obtained.
[0171] S61: For side length of Given a square grid covering a target set A, count the number of grid cells that contain at least one foreground pixel. The theoretical definition of the fractal dimension of *Alum ferruginosa* is obtained, and the formula is:
[0172] ;
[0173] Where D is the theoretical fractal dimension of the alum flower.
[0174] S62: Select a set of scales sorted from largest to smallest. (For example, 16, 8, 4, 2, 1 pixels), using Given a square grid of a certain size with sides covering the target set A, count the number of grid cells that contain at least one foreground pixel. For each scale Calculate the fitting points separately, using the following formula:
[0175] ;
[0176] in, To fit the coordinates of the point on the x-axis, The coordinates of the fitted point on the y-axis;
[0177] S63: Put all fitted points The alum flower fractal dimension is obtained by fitting a straight line using the least squares method and then using the slope of the line. The formula is as follows:
[0178] ;
[0179] in, Let be the fractal dimension of the alum flower, and C be the intercept of the fitted line, used for calibration but not involved in dimension estimation. For a side length of The number of grid cells containing at least one foreground pixel. The side length of the covering grid.
[0180] It is important to note that the theoretical fractal dimension of alum flowers is essentially a limit concept, while in practice... Since it is impossible to take the limit, it is possible to use a set of discrete scales. The fractal dimension of the alum flower is obtained by fitting a linear relationship, and the selected scale... That is, the side length of the square grid, such as Figure 11 As shown, the calculated fractal dimension of the alum flower is the slope of a straight line. .
[0181] In the embodiments, the morphological characteristics of the floc image are quantified based on the fractal dimension of the floc, and the amount of coagulant to be added is determined, as shown in Table 1.
[0182] Table 1: Determining the amount of coagulant to be added based on the fractal dimension of alum floc.
[0183]
[0184] It should be noted that the floc fractal dimension range in the table needs to be defined based on the actual floc images obtained by the water plant. If the floc fractal dimension of the water plant is greater than 1.6 over time, it indicates that the coagulant dosage is too high and the dosage needs to be reduced appropriately.
[0185] Ultimately, the transmittance is used as the basic criterion to determine whether the second coagulant dosing point 6 needs to be activated. Under the premise of ensuring that the transmittance meets the requirements, the fractal dimension is used as the basis for fine control to prevent over-addition.
[0186] In the embodiment, according to the parameters set in the experiment By monitoring the light transmittance index fractal dimension index of alum flowers Dynamically control the dosage of coagulant:
[0187] 1. When If the dosage is insufficient, the dosage at the second coagulant addition point 6 should be increased until the dosage is reached. ;
[0188] 2. When Then, further judgment should be made based on the above table. Value: If This indicates that the coagulant dosage is too low, and the dosage at either the first coagulant dosing point 5 or the second coagulant dosing point 6 needs to be increased; if The dosage of coagulant should be moderate, keeping the dosage at the first coagulant injection point 5 and the second coagulant injection point 6 unchanged; if This indicates that there is sufficient coagulant, but the floc structure is poor. The dosage at the first coagulant dosing point 5 should be appropriately reduced to improve the flocculation effect.
[0189] Among them, the first coagulant dosing point 5 is the main pre-dosing point, which undertakes the main coagulation function, and the second coagulant dosing point 6 is a supplementary dosing point, which is added when the main dosing dosage is insufficient.
[0190] It should be noted that the specific methods by which each module performs operations in the system described in the above embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0191] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for underwater alum floc identification using polarization filtering and light field imaging, characterized in that, Includes the following sub-steps: Underwater cameras were installed in sedimentation tanks and pre-sedimentation tanks to acquire raw four-dimensional light field data of the transmittance of the mud-water interface and floc images. The raw four-dimensional light field data from the underwater camera is converted into polarized four-dimensional light field data using a polarization-filtered light field camera. An improved optical field frequency domain refocusing method is used to refocus the original polarization-filtered optical field data to obtain a refocused two-dimensional image. The multi-scale retinex enhancement model performs Gaussian blurring, normalization, Gamma correction, linear adjustment, and top-hat transformation on the refocused 2D image to form an enhanced image; The enhanced image is converted to grayscale and Gaussian filtered to smooth the noise. The image with smoothed noise is then subjected to OTSU threshold segmentation to extract the target set. By using box counting to cover the target set, and deriving the fitted line from the theoretical fractal dimension of alum flowers, the fractal dimension of alum flowers is obtained. The improved optical field frequency domain refocusing method includes the following sub-steps: The original light field data is windowed using a dual-domain Gaussian function to form windowed data; the dual-domain Gaussian function includes a spatial domain Gaussian window function and an angular domain Gaussian window function. The windowed data is then transformed into optical field spectrum data using Fourier transform. The normalized sinc interpolation of the truncation radius is performed on the light field spectrum data to obtain the two-dimensional spectrum of the refocused image; The two-dimensional spectrum of the refocused image is transformed into a refocused two-dimensional image through inverse Fourier transform.
2. The underwater alum flower identification method based on polarization filtering and light field imaging according to claim 1, characterized in that, The process of obtaining the transmittance of the mud-water interface and the raw four-dimensional light field data of the floc image includes the following sub-steps: The first underwater camera and array lights are set in the water collection tank at the end of the pre-sedimentation tank, and the first underwater camera acquires the mud-water interface. Select the area in the mud-water interface where the number of pixels is greater than the set threshold, and calculate the light transmittance. The second and third underwater cameras were placed in the middle of the sedimentation tank to collect raw four-dimensional light field data of different floc images.
3. The underwater alum flower identification method based on polarization filtering and light field imaging according to claim 1, characterized in that, The improved optical field frequency domain refocusing method is expressed in the following formula: ; in, This is four-dimensional optical field data with polarization filtering. This represents the discrete spatial coordinate index of the microlens array plane. This is the discrete angular coordinate index for the sub-aperture image. For spatial domain Gaussian window functions, It is a Gaussian window function in the angle domain. This is the four-dimensional light field data after dual-domain Gaussian window processing. For along four-dimensional coordinates Perform the Discrete Fourier Transform operation. This is the transformed four-dimensional light field spectrum. Spatial frequency coordinates For angular frequency coordinates, For the two-dimensional spectrum of the refocused image, Spatial frequency coordinates and To find the range of summation, , It is an angular frequency coordinate. The integer index obtained by rounding down the theoretical slice position on the axis. and The theoretical slice location, This is the depth scaling factor. , The focal length of the microlens array. It is an angular frequency coordinate. The integer index obtained by rounding down the theoretical slice position on the axis. and This is the fractional offset between the theoretical slice position and the integer index. , , For the normalized sinc interpolation kernel, To calculate the offset between the summation range and the integer index, For along the spatial frequency coordinates Perform the inverse discrete Fourier transform operation. To refocus a two-dimensional image, This is the discrete spatial coordinate index of the image plane.
4. The underwater alum flower identification method based on polarization filtering and light field imaging according to claim 1, characterized in that, The multi-scale retinex enhancement model performs Gaussian blurring, normalization, Gamma correction, linear adjustment, and top-hat transformation on the refocused 2D image, including the following sub-steps: The preprocessing module converts the refocused 2D image into a floating-point format. If the downsampling rate is less than 1, it performs downsampling in the floating-point domain. The downsampled small-sized image is then output to the parallel multi-scale processing module. If the downsampling rate is greater than 1, the image with the original size is output to the multi-scale processing module. The multi-scale processing module processes wrap functions of different scales in parallel, performs Gaussian blurring through the wrap functions, performs logarithmic transformation on the original logarithmic image and the blurred result, subtracts the transformed images to obtain reflection components of different scales, and fuses the reflection components of different scales to output to the upsampling module. If the preprocessing module performs downsampling, the upsampling module will upsample the multi-scale fused reflection components to restore the image size and output it to the combined enhancement module; otherwise, the upsampling module will not perform any processing and will output it to the combined enhancement module. The combined enhancement module normalizes the fused reflection components and then performs Gamma correction. The image, linearly adjusted by Gamma correction, is then enhanced by top-hat transformation, and the enhanced image is output.
5. The underwater alum flower identification method based on polarization filtering and light field imaging according to claim 4, characterized in that, The formula for Gaussian blurring using the wrap function is as follows: ; in, For the reflection component at scale k, The original logarithmic image, Let be the logarithm of the fuzzy results at scale k. The fuzzy result at scale k, Let k be a Gaussian wrapping function. For operations on refocused 2D images, k = small, medium, large.
6. The underwater alum flower identification method based on polarization filtering and light field imaging according to claim 1, characterized in that, The process of obtaining the fractal dimension of alum flowers includes the following sub-steps: For side length is Given a square grid covering a target set A, count the number of grid cells that contain at least one foreground pixel. Thus, the theoretical definition of the fractal dimension of alum flowers is obtained; Select a set of scales sorted from largest to smallest ,use Given a square grid of a certain size with sides covering the target set A, count the number of grid cells that contain at least one foreground pixel. For each scale Calculate the fitting points respectively; All fitted points The alum flower is fitted to a straight line using the least squares method, and the fractal dimension is obtained from the slope of the straight line.
7. The underwater alum flower identification method based on polarization filtering and light field imaging according to claim 6, characterized in that, The formula for fitting a straight line using the least squares method is: ; in, Let be the fractal dimension of the alum flower, and C be the intercept of the fitted line, used for calibration but not involved in dimension estimation. For a side length of The number of grid cells containing at least one foreground pixel. The side length of the covering grid.
8. The underwater alum floc identification method based on polarization filtering and light field imaging according to claim 1, characterized in that, The extraction of the target set from the image with smoothed noise through OTSU thresholding includes the following sub-steps: The image with smoothed noise is then subjected to OTSU thresholding to extract the target set; The image after Gaussian filtering is subjected to a second OTSU threshold segmentation using a second threshold to extract high-confidence target regions. Perform a logical intersection operation on the binarized first target set and the binarized second target set; The target set is obtained by performing morphological processing of the intersection region by closing and opening operations.
9. An underwater alum floc identification system based on polarization filtering and light field imaging, used to implement the underwater alum floc identification method based on polarization filtering and light field imaging as described in any one of claims 1-8, characterized in that, It includes a data acquisition module, a polarization filtering module, a refocusing module, a multi-scale retinex enhancement model, a target extraction module, and a module for calculating the fractal dimension of alum flowers; The data acquisition module is used to set up an underwater camera in the sedimentation tank and pre-sedimentation tank to acquire the light transmittance of the mud-water interface and the original four-dimensional light field data of the floc image. The polarization filtering module is used to convert the raw four-dimensional light field data of the underwater camera into polarization-filtered four-dimensional light field data through the polarization-filtered light field camera. The refocusing module refocuses the original light field data after polarization filtering using an improved light field frequency domain refocusing method to obtain a refocused two-dimensional image. The multi-scale retinex enhancement model is used to perform Gaussian blurring, normalization, Gamma correction, linear adjustment, and top-hat transformation on the refocused two-dimensional image to form an enhanced image; The target extraction module is used to convert the enhanced image to grayscale and smooth the noise using Gaussian filtering. The image with smoothed noise is then subjected to OTSU threshold segmentation to extract the target set. The module for calculating the fractal dimension of alum flowers is used to cover the target set using the box counting method, and to derive the fitted line from the theoretical fractal dimension of alum flowers to obtain the fractal dimension of alum flowers.