Plankton image enhancement method based on deep learning model
By employing a three-level scale resolution and phase calibration of a deep learning model, combined with texture and color feature optimization, the shortcomings of texture resolution and color restoration in plankton image enhancement are addressed. This achieves efficient image processing and natural transitions, thereby improving the overall image quality and application effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FIRST INSTITUTE OF OCEANOGRAPHY MNR
- Filing Date
- 2025-12-18
- Publication Date
- 2026-04-28
AI Technical Summary
Existing plankton image enhancement techniques struggle to achieve accurate multi-scale texture analysis and lack effective phase calibration and feature optimization, resulting in low recognition and processing efficiency in densely textured areas. In terms of color restoration, they fail to establish a precise correspondence between pigment spectral absorption characteristics and color channels, leading to monotonous color levels in pigment areas. In overall processing, the fusion of texture and color areas lacks precise coordinate matching, resulting in abrupt transitions between enhanced and original areas, which damages image integrity and harmony.
A deep learning-based approach is employed to extract the spatial arrangement features of plankton texture and the spectral absorption features of chlorophyll-dominated pigment regions through three-level scale analysis. Pixel-by-pixel phase alignment calibration and feature overlay optimization are then performed. By precisely matching the coordinate matrices of the texture optimization region and the color calibration region, dynamic weight adjustment of the color channels is established, achieving precise fusion and natural transition between texture and color.
It achieves clear and regular texture features and true color reproduction in plankton images, improves texture recognition and color differentiation, ensures the overall coordination and integrity of the image, and meets the high-quality application requirements of subsequent morphological recognition and species classification.
Smart Images

Figure CN121937320A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method for enhancing planktonic images based on a deep learning model. Background Technology
[0002] The shell and flagellar textures of plankton, along with the chlorophyll-dominated pigment distribution, are core indicators for species identification and ecological monitoring. Plankton images serve as crucial carriers for these feature analyses, and their texture clarity, color fidelity, and overall consistency directly determine the accuracy of subsequent applications. Existing plankton image enhancement technologies have significant shortcomings: In texture processing, accurate multi-scale texture resolution is difficult, and effective phase calibration and feature optimization mechanisms are lacking, leading to the loss of detailed information or disordered arrangement of shell and flagellar textures, low recognition of densely textured areas, and low processing efficiency. In color restoration, the lack of precise correspondence between pigment spectral absorption characteristics and color channels, coupled with fixed weight adjustments, results in monotonous color levels in pigmented areas, failing to match the natural physiological characteristics of organisms and exhibiting insufficient color differentiation. In overall processing, the fusion of texture and color regions lacks precise coordinate matching, resulting in abrupt transitions between enhanced and original regions, disrupting image integrity and consistency, and failing to meet the high-quality application requirements of subsequent morphological recognition and species classification. Summary of the Invention
[0003] Therefore, it is necessary to provide a plankton image enhancement method based on a deep learning model to solve at least one of the above-mentioned technical problems.
[0004] To achieve the above objectives, a plankton image enhancement method based on a deep learning model is proposed, the method comprising the following steps: Step S1: Obtain the original image of the plankton to be enhanced; Step S2: Analyze the original image using a preset deep learning model to extract the spatial arrangement features of the planktonic shell texture and flagella formation, as well as the spectral absorption features of the chlorophyll-dominated pigment region. Step S3: Locate the texture-dense region based on the texture space arrangement features, perform pixel-by-pixel phase alignment calibration on the texture-dense region, and optimize the texture features of the texture-dense region by feature superposition to form a texture optimization region; establish the correspondence between the spectral absorption features of the pigment region and the color channels in the original image, and dynamically allocate channel weights to adjust the color ratio according to the correspondence to form a color calibration region; Step S4: Perform feature fusion between the texture optimization area and the color calibration area, and then perform edge smoothing with the unprocessed area of the original image to output the plankton-enhanced image.
[0005] The beneficial effects of this invention are: First, relying on the three-level scale analysis and periodic detection capabilities of deep learning models, it can not only completely preserve the overall texture distribution of planktonic shell patterns and flagella, but also accurately extract detailed information; combined with pixel-by-pixel phase alignment calibration and feature overlay optimization, the arrangement pattern of texture-dense areas is clearer and more regular, improving the recognizability of texture features, while achieving efficient texture optimization.
[0006] Second, by analyzing the correspondence between spectral absorption characteristics and color channels, and then dynamically allocating channel weights, the color levels of chlorophyll-dominated pigment regions are made more distinct; at the same time, the color range thresholds of different pigment types are matched so that the color ratios perfectly match the natural physiological characteristics of plankton, restoring their true color attributes and improving the color differentiation between pigment regions and surrounding tissues.
[0007] Third, by accurately matching the coordinate matrices of the texture optimization region and the color calibration region, the consistency of feature fusion is ensured; at the same time, the boundary line is identified and a distance gradient mapping is constructed, making the edge transition between the enhanced region and the original unprocessed region more natural. This not only preserves the basic information of the original image, but also makes the enhanced image more coordinated and complete as a whole, which can meet the high-quality requirements of subsequent applications such as morphological recognition and species classification. Attached Figure Description
[0008] Figure 1 This is a flowchart illustrating the steps of a plankton image enhancement method based on a deep learning model. Figure 2 This is a schematic diagram showing the detailed texture information of planktonic organisms; Figure 3 A comparison image of plankton before and after enhancement; The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0009] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present 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.
[0010] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.
[0011] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0012] To achieve the above objectives, please refer to Figures 1 to 3 A method for enhancing planktonic images based on a deep learning model, the method comprising the following steps: Preferably, step S1: acquire the original image of the plankton to be enhanced; In this embodiment, a high-definition microscopic imaging system was used to acquire images of planktonic samples. The samples were placed on standard glass slides, and the ambient temperature was stabilized at 25℃±0.5℃ using a temperature control device. The image sensor of the imaging system adopted a progressive scan mode, with a scan rate set to 30 frames / second, an exposure time adjusted to 8ms, and a sensitivity set to ISO100. During the acquisition process, uniform illumination was provided by an LED cold light source with a wavelength range of 450nm-650nm and an adjustable light intensity range of 0-1000 lux. The angle between the light source and the glass slide was fixed at 45°, and the light intensity was adjusted to 600 lux. After acquisition, the original images were stored in TIFF format on a storage device with a bit depth of 16 bits, a multi-channel color mode, and a pixel value range of 0-65535 for each channel. The storage path was uniformly named according to the naming rule of "sample number-acquisition time-magnification".
[0013] It should be noted that the parameter settings mentioned above in this embodiment are for reference only, and can be adjusted adaptively according to the actual collection environment, plankton sample type and imaging requirements.
[0014] Preferably, step S2: the original image is analyzed by a preset deep learning model to extract the spatial arrangement features of the planktonic shell texture and flagella formation periodic texture, as well as the spectral absorption features of the chlorophyll-dominated pigment region. Please see Figure 2 The specific steps for forming the periodic texture spatial arrangement features in step S2 are as follows: The original image is processed by a deep learning model using a three-level scale analysis process. The first level of analysis is to identify the overall texture distribution of the image, the second level of analysis is to identify the scale contours in the shell texture and flagella, and the third level of analysis is to extract texture detail information. The texture information obtained from the three-level analysis is superimposed according to the scale level to form a multi-scale texture set; By using the periodic detection unit built into the deep learning model, each pixel group in the multi-scale texture set is periodically determined, and texture information that continuously satisfies the preset arrangement rules is retained to form texture space arrangement features.
[0015] In this embodiment, a three-level scale analysis process is performed on the original image. The first level of analysis reduces the dimensionality of the original image by setting a downsampling ratio of 2. At the same time, a 5×5 filter window is used to smooth the dimensionality-reduced image. The weights in the filter window are assigned according to a Gaussian distribution and the standard deviation is set to 1.0 to preserve the overall texture distribution of the image. In one embodiment, the second-level analysis is based on the image processed by the first level, and continues to reduce the dimensionality by using a 2x downsampling ratio, focusing on the mesoscale contours of shell texture and flagella. A 3×3 filtering window is used to perform mean calculation, and each pixel in the window has a weight of 1 / 9 to eliminate local noise interference. The third-level analysis performs a 2x downsampling on the image processed by the second level again to extract texture detail information. A 2×2 filtering window is used to select the maximum value in the local area to preserve texture peak features. In another embodiment, the texture information of each scale obtained by the three-level analysis is superimposed in order from coarse to fine. The texture information of the second and third levels of analysis is scaled to the original image size by bilinear interpolation. When interpolating, the gray value of the four neighboring pixels around the target pixel is used as the basis, and the target pixel value is calculated according to the distance weight. The interpolation step size is set to 1 pixel to form a multi-scale texture set. In another embodiment, the multi-scale texture set is processed by the built-in periodic detection unit, and the set is divided into pixel groups of 3×3 pixels. The judgment condition is that the similarity of the gray value change curves of adjacent pixel groups is not less than 0.8 and the number of consecutive repetitions reaches 3. Each pixel group is checked for conformity one by one, and the texture information that continuously meets the judgment condition is retained, and finally the texture space arrangement feature data that is completely consistent with the original image size is formed.
[0016] It should be noted that the deep learning model used in this embodiment is a dual-branch parallel feature extraction network, where the texture spatial arrangement feature extraction branch contains two core units: a three-scale parsing module and a periodicity detection module. The three-scale parsing module consists of three cascaded downsampling sub-modules, each integrating a downsampling layer and a filtering layer to sequentially realize multi-scale texture parsing of the original image; the periodicity detection module is connected to the output of the three-scale parsing module, receives the multi-scale texture set, and completes the periodicity determination. The input of the entire model is the original image of plankton, and the output is texture spatial arrangement feature data with the same size as the original image.
[0017] Optionally, the extraction of the spectral absorption characteristics of the chlorophyll-dominated pigment region in step S2 specifically involves: Spectral absorption characteristics data of chlorophyll in plankton were obtained, and pigment-adaptive grayscale ranges were set based on the spectral absorption characteristics data. The deep learning model traverses the original image, marks all pixels in the original image whose gray values are within the preset pigment matching gray range, and connects adjacent marked pixels to form candidate pigment regions. Each candidate pigment region is divided into a fixed-size grid. The pixel values in the spectral band at the center of each grid are extracted and arranged in order of grid coordinates in the image to form a spectral absorption feature dataset.
[0018] In this embodiment, spectral absorption characteristics of chlorophyll in plankton at 430nm-450nm (blue-violet band) and 640nm-660nm (red band) are obtained. The gray value range corresponding to the chlorophyll absorption peak in the data is statistically analyzed, and the pigment-adaptive gray value range is set to 120-200. Each pixel of the original image is traversed, and the gray value of each pixel is read one by one. All pixels with gray values in the range of 120-200 are marked as pigment candidate pixels. The pigment candidate pixels are processed by 8-neighborhood connectivity. The connectivity condition is that the difference in gray values between adjacent pixels does not exceed 10. The set of continuous pixels that meet the connectivity condition is defined as the candidate pigment region, and each candidate pigment region is assigned a unique identifier number.
[0019] In another embodiment, each candidate pigment region is divided into a fixed-size grid of 8×8 pixels. If the edge of a candidate pigment region is less than 8×8 pixels, an incomplete grid is divided with the region edge as the boundary. The coordinate information of each grid is recorded, and the light intensity values of the pixel at the center of each grid in the 430nm-450nm and 640nm-660nm bands are extracted. The dual-band light intensity values of each grid are arranged in ascending order of row coordinates and column coordinates in the original image to form a spectral absorption feature dataset with a dimension of (number of candidate pigment regions × number of grids × 2).
[0020] Of particular importance, step S2 also includes feature extraction using a dual-branch parallel structure of a deep learning model: The first branch processes the texture space arrangement features using a process of three-level scale analysis, multi-scale superposition, and periodic determination. The second branch constructs a spectral absorption feature dataset by following the steps of grayscale interval filtering, region connectivity, fixed-size grid division, and feature value extraction. The two branches share the pixel coordinate information of the original image. During the extraction process, after each processing step is completed, the current result is fed back to the shared feature layer. By comparing the correlation between the results of the two branches and the pixels of the original image through the cross-validation unit, the extraction results that deviate from the pixel coordinate correspondence are corrected.
[0021] In this embodiment, a dual-branch parallel structure is used for feature extraction. The first branch processes the texture spatial arrangement features according to the process of three-level scale analysis, multi-scale superposition, and periodic judgment. The three-level scale analysis uses a 2x downsampling ratio with a 5×5 Gaussian filter (standard deviation 1.0), a 2x downsampling ratio with a 3×3 mean filter, and a 2x downsampling ratio with a 2×2 maximum filter, respectively. Multi-scale superposition uses bilinear interpolation (step size 1 pixel) to scale the texture information of each scale to the original image size. The periodic judgment is based on 3×3 pixel groups, a similarity threshold of 0.8, and three consecutive repetitions. The second branch constructs a spectral absorption structure according to the steps of gray-level interval filtering, region connectivity, fixed-size grid division, and feature value extraction. The feature dataset is collected, with the grayscale range set to 120-200. Region connectivity is achieved using an 8-neighbor method with a grayscale difference threshold of 10 between adjacent pixels. The grid size is 8×8 pixels. Feature numerical extraction focuses on dual-band light intensity of 430nm-450nm and 640nm-660nm. The two branches share the pixel coordinate information of the original image, and the shared range covers the row and column coordinate data of the entire image. During the extraction process, after each processing step is completed (scale analysis, multi-scale superposition, and periodic judgment in the first branch, and grayscale filtering, region connectivity, grid division, and numerical extraction in the second branch), the output result of the current step is fed back to the shared feature layer in real time. The shared feature layer stores the mapping relationship between the results of each step and the corresponding pixel coordinates. It should be noted that the cross-validation unit performs correlation comparison on the results of the two branches. During the verification, the pixel coordinates of the original image are used as the reference to calculate the overlap between the pixel coordinates corresponding to the texture features of the first branch and the pixel coordinates corresponding to the pigment region of the second branch. The overlap threshold is set to 95%. For pixel results with an overlap of less than 95%, the effective results of adjacent pixels are referenced based on the mapping relationship stored in the shared feature layer to ensure that the output results of the two branches are consistent with the pixel coordinates of the original image.
[0022] Preferably, step S3: locate the texture-dense region based on the texture space arrangement features, perform pixel-by-pixel phase alignment calibration on the texture-dense region, and optimize the texture features of the texture-dense region by feature superposition to form a texture optimization region; establish the correspondence between the spectral absorption features of the pigment region and the color channels in the original image, and dynamically allocate channel weights to adjust the color ratio according to the correspondence to form a color calibration region; Optionally, locating texture-dense regions based on texture spatial arrangement features in step S3 includes: Based on the texture space arrangement features, the number of texture elements in each standard pixel block is calculated, and the texture element density of each pixel block is statistically analyzed. Set a texture density threshold, mark pixel blocks with texture element density higher than the texture density threshold as preliminary dense blocks, and merge adjacent preliminary dense blocks to form a preliminary texture dense region; By using a deep learning model to track edge pixels in the initial region, edge pixels that do not conform to the texture distribution pattern of the central region are removed, thus determining the final texture-dense region.
[0023] In this embodiment, based on the extracted texture space arrangement features, standard pixel blocks are divided into 6×6 pixel blocks. All standard pixel blocks are traversed, and the number of texture elements in each pixel block that satisfy the periodic arrangement pattern is counted. The texture element density of each pixel block is calculated by dividing the number of texture elements by the total number of pixels in the standard pixel block (36). It should be noted that the texture density threshold is set to 0.6. Standard pixel blocks with a calculated texture element density higher than 0.6 are marked as preliminary dense blocks. The 4-neighborhood connectivity judgment method is used to merge all preliminary dense blocks. The judgment condition is that any two preliminary dense blocks have directly adjacent pixel edges in the vertical and horizontal directions. Preliminary dense blocks that meet this condition are integrated into a continuous region to form a preliminary texture dense region. In one embodiment, the edge pixels of the initial texture-dense region are tracked, and all pixels on the region boundary are extracted as edge pixels. The geometric center of each initial texture-dense region is taken as the origin, and a 3×3 pixel range around the origin is selected as the central reference region. Three feature parameters are extracted from the central reference region: the arrangement direction of texture elements (quantized in 0°-360° angle), the repetition interval (quantized in pixels), and the gray value change period. In another embodiment, the deviation values of the texture arrangement direction, repetition interval, and gray value change period corresponding to each edge pixel from the feature parameters of the central reference region are calculated. The allowable range for the direction deviation is set to ±15°, the allowable range for the repetition interval deviation is set to ±1 pixel, and the allowable range for the gray value change period deviation is set to ±2 periods. If all three deviation values are within the allowable range, the matching degree is determined to meet the requirements. If any deviation value exceeds the allowable range, the matching degree is determined to not meet the requirements. All edge pixels that do not meet the matching degree requirements are removed, and pixels that meet the matching degree requirements and pixels in the central region are retained. Finally, a final texture-dense region with regular boundaries and consistent texture arrangement is determined.
[0024] Optionally, step S3, which involves pixel-by-pixel phase alignment calibration of texture-dense regions, includes: Within a dense texture region, select the reference pixel group with the most uniform distribution of texture elements and extract the phase parameters of the reference pixel group; A two-dimensional phase coordinate system is established with the center pixel of the reference pixel group as the origin, and the phase difference between each other pixel in the texture-dense region and the center pixel of the reference pixel group is calculated. Sort by the absolute value of the phase difference, and adjust the phase parameter of each pixel in turn to keep the phase difference between each pixel and the reference pixel group within the allowable phase deviation range.
[0025] In this embodiment, within the finally determined dense texture area, multiple candidate pixel groups are divided into 4×4 pixel groups. The variance of grayscale values of all texture elements in each candidate pixel group is calculated. The candidate pixel group with the smallest grayscale variance (not exceeding 15) is selected as the reference pixel group with the most uniform distribution of texture elements. The phase parameter of each pixel in the reference pixel group is read, and the phase parameter is represented by an angle value of 0-2π. A two-dimensional rectangular phase coordinate system is established with the geometric center pixel of the reference pixel group as the origin, where the horizontal direction is the X-axis and the vertical direction is the Y-axis, and the coordinate unit is pixels. The phase coordinates of the center pixel of the reference pixel group are set to (0,0), and its phase parameter is set as the reference phase value. The algorithm iterates through all remaining pixels within a dense texture area, calculates the X-axis and Y-axis offsets of each pixel relative to the origin using coordinates, and calculates the phase difference between each pixel and the center pixel of the reference pixel group. It then sorts the phase differences of all pixels in ascending order of absolute value and adjusts the phase parameters of each pixel sequentially according to the sorting results. The adjustment is based on the reference phase value, and the phase angle of the pixel is gradually corrected according to the positive and negative directions of the phase difference. The allowable phase deviation range is set to ±0.1π. After each adjustment, the phase difference between the pixel and the center pixel of the reference pixel group is recalculated until the phase difference of all pixels is within ±0.1π, thus completing the pixel-by-pixel phase alignment calibration.
[0026] Optionally, the optimization of texture features in densely textured regions through feature overlay in step S3 specifically involves: Extract the portion of the texture space arrangement features corresponding to the texture-dense region and perform pixel-by-pixel matching with the phase-aligned and calibrated texture information; The optimization result of each pixel is obtained by weighted calculation of the original texture feature value and the calibrated texture feature value. The weight is set according to the texture density level of the pixel's location, and different density levels correspond to preset weight ratios. Optimized texture features are generated, which correspond to texture optimization regions.
[0027] In this embodiment, the texture feature portion that completely corresponds to the coordinates of the final dense texture region in the acquired texture space arrangement features is extracted, and the original texture feature portion is matched one by one with the phase-aligned and calibrated texture information according to the pixel coordinates to ensure that the original texture feature value at each coordinate position corresponds one-to-one with the calibrated texture feature value. It should be noted that the texture-dense areas are divided into three levels according to the texture element density. The first level is between 0.6 and 0.7, the second level is between 0.7 and 0.8, and the third level is above 0.8. The preset weight ratio of the original texture feature value for the first level is 0.4 and the weight ratio of the calibrated texture feature value is 0.6. The weight ratio of the original texture feature value for the second level is 0.3 and the weight ratio of the calibrated texture feature value is 0.7. The weight ratio of the original texture feature value for the third level is 0.2 and the weight ratio of the calibrated texture feature value is 0.8. For each pixel, the corresponding weight ratio is selected according to the texture density level of its location, and the following formula is used for calculation: Optimized texture feature value = Original texture feature value × Original weight ratio of corresponding level + Calibrated texture feature value × Calibrated weight ratio of corresponding level. After traversing all pixels and completing the calculation, the optimized texture feature values of all pixels are integrated to generate optimized texture features with the same size as the texture-dense region, thus forming the texture optimization region.
[0028] Optionally, establishing the correspondence between the spectral absorption characteristics of the pigment region and the color channels in the original image in step S3 includes: Spectral absorption features are analyzed using deep learning models to identify peak values and corresponding band positions in the spectral absorption features. Associate the band position corresponding to each peak value with each color channel of the original image, and record the interval in each color channel that coincides with the peak band position; Valid associations are selected based on the effective length of overlapping intervals, and the main color channel corresponding to each peak value is determined, forming a correspondence system between bands and channels.
[0029] In this embodiment, the constructed spectral absorption feature dataset is analyzed, and the light intensity values of each candidate pigment region in the dataset in the 430nm-450nm and 640nm-660nm bands are traversed. The peak determination condition is set as the light intensity value at a certain band position is higher than the light intensity values of the three adjacent band positions before and after it by 1.2 times. The peak values and corresponding precise band positions of each candidate pigment region in the two bands that meet the condition are identified. The band position corresponding to the peak in the 430nm-450nm band is recorded as peak band one, and the band position corresponding to the peak in the 640nm-660nm band is recorded as peak band two. In one embodiment, the original image is set with three color channels: a blue channel (band range 420nm-470nm), a green channel (band range 500nm-570nm), and a red channel (band range 620nm-680nm). The precise band position of peak band one is compared with the band range of the three color channels one by one, and the interval in the blue channel that coincides with peak band one is calculated and recorded. The precise band position of peak band two is compared with the band range of the three color channels one by one, and the interval in the red channel that coincides with peak band two is calculated and recorded. In another embodiment, the effective length criterion for overlapping intervals is set as not less than 5nm. The lengths of the recorded overlapping intervals are measured and verified. The overlapping interval lengths of the blue channel and peak band 1, and the overlapping interval lengths of the red channel and peak band 2 both meet the criterion. These two sets of effective associations are selected, and the main color channel corresponding to peak band 1 is determined to be the blue channel, and the main color channel corresponding to peak band 2 is determined to be the red channel. The two sets of correspondences are integrated to form a complete band and channel correspondence system.
[0030] Optionally, step S3, which dynamically allocates channel weights and adjusts the color ratio based on the corresponding relationship, includes: Based on the established correspondence system, the spectral absorption feature values of each pixel within the pigment region are extracted; Intensity levels are divided according to spectral absorption intensity, and a basic weight for the main color channel and a supplementary weight for the auxiliary color channel are set for each intensity level; the basic weight is positively correlated with the intensity level, and the supplementary weight is negatively correlated with the intensity level. Based on the intensity level of the spectral absorption characteristic value of each pixel, the corresponding basic weight and supplementary weight are allocated to the corresponding color channel, and the output ratio of each color channel is adjusted.
[0031] In this embodiment, based on the established band-channel correspondence system, the spectral absorption feature values of all pixels within each candidate pigment region are extracted in the 430nm-450nm band (corresponding to the blue primary color channel) and the 640nm-660nm band (corresponding to the red primary color channel). The spectral absorption feature value of each pixel is presented in the form of a combination of dual-band values. Three intensity levels are defined based on the sum of the spectral absorption feature values: the first intensity level is in the range of 0-0.4, the second intensity level is in the range of 0.4-0.7, and the third intensity level is in the range of 0.7-1.0. The intensity level is set with a base weight of 0.5 for the blue primary color channel, a base weight of 0.4 for the red primary color channel, and a supplementary weight of 0.1 for the auxiliary color channel (green channel). The second intensity level is set with a base weight of 0.6 for the blue primary color channel, a base weight of 0.5 for the red primary color channel, and a supplementary weight of 0.08 for the auxiliary color channel. The third intensity level is set with a base weight of 0.7 for the blue primary color channel, a base weight of 0.6 for the red primary color channel, and a supplementary weight of 0.05 for the auxiliary color channel. The base weights of the primary color channels increase sequentially with the intensity level, while the supplementary weights of the auxiliary color channels decrease sequentially with the intensity level. In one embodiment, all pixels within each candidate pigment region are traversed, the sum of the dual-band spectral absorption characteristic values of each pixel is calculated, its intensity level is determined, the basic weight corresponding to the level is allocated to the blue main color channel and the red main color channel, and the supplementary weight is allocated to the green channel, adjusted according to the following rules: the final output value of each color channel = the original channel value × the corresponding weight; the output ratio of the three color channel values of each pixel ensures that the color ratio of each pixel is adapted to its own spectral absorption intensity.
[0032] Most importantly, step S3, after adjusting the color ratio, includes: To obtain the natural color attributes of planktonic pigments and determine the differences in spectral absorption characteristics among different planktonic pigments; Based on the natural color attributes of planktonic pigments and combined with the differences in spectral absorption characteristics of different planktonic pigments, the effective range of values for each color channel is set according to pigment type, and different range thresholds are assigned to different pigment types for the same color channel. Traverse all pixels within the pigment region, identify the pigment type of each pixel through a deep learning model, and simultaneously detect the values of each color channel of each pixel one by one. If a color channel value is detected to exceed the valid range of the pigment type of the pixel, first calculate the difference ratio between the excess part and the range boundary, then adaptively adjust the compression coefficient according to the difference ratio, and perform gradient compression on the excess value according to the compression coefficient so that the compressed value fits the natural transition of the range boundary. After adjusting the channel values of all pixels, the adjusted pixels are rearranged according to the pixel coordinates of the original image. A deep learning model is used to check the pixel consistency of the rearranged area, correct the pixel positions of the coordinate offset, and form a color calibration area.
[0033] In this embodiment, the natural color attributes of three typical pigments in plankton—chlorophyll a, chlorophyll b, and carotenoids—were obtained, clarifying the differences in spectral absorption characteristics: chlorophyll a has the strongest absorption in the 640nm-660nm band and appears blue-green; chlorophyll b has stronger absorption in the 450nm-480nm band and appears yellow-green; and carotenoids have significant absorption in the 400nm-500nm band and appear orange-yellow. In another embodiment, based on the differences in natural color attributes and spectral absorption characteristics, the effective range of values for each color channel is set according to pigment type. Specifically, the effective range of values for the blue channel (420nm-470nm band) is set as 100-200 for chlorophyll a, 120-220 for chlorophyll b, and 80-180 for carotenoids; the effective range of values for the green channel (500nm-570nm band) is set as 150-250 for chlorophyll a, 180-280 for chlorophyll b, and 60-160 for carotenoids; and the effective range of values for the red channel (620nm-680nm band) is set as 80-180 for chlorophyll a, 60-160 for chlorophyll b, and 120-220 for carotenoids. The threshold range of the same color channel is set differently depending on the pigment type. It should be noted that, by traversing all pixels within all candidate pigment regions, the pigment type of each pixel is identified by comparing the dual-band (430nm-450nm, 640nm-660nm) spectral absorption feature values of the pixels with the pigment type feature library. Simultaneously, the blue, green, and red channel values of each pixel are read and detected one by one. If a color channel value is detected to be outside the valid range of the pigment type to which the pixel belongs, the difference between the value exceeding the range and the range boundary is first calculated. Then, the difference is divided by the total length of the range (upper limit value - lower limit value) to obtain the difference ratio. When the difference ratio is in the range of 0-0.3, the compression coefficient is set to 0.8; when the difference ratio is in the range of 0.3-0.6, the compression coefficient is set to 0.6; and when the difference ratio is in the range of 0.6-1.0, the compression coefficient is set to 0.4. The excess value is gradient compressed using the following formula: Compressed value = Interval boundary value + (Excess value - Interval boundary value) × Compression coefficient; For example, the blue channel value of a chlorophyll a pixel is 230, exceeding the upper limit of its corresponding valid value range (100-200) by 30. The total length of this range is 100, and the difference ratio is 30 / 100 = 0.3. With a compression factor of 0.8, the compressed value is 200 + (230-200) × 0.8 = 224. Similarly, the red channel value of a carotenoid pixel is 250, exceeding the upper limit of its corresponding valid value range (120-220) by 30. The total length of this range is 100, and the difference ratio is 0.3. With a compression factor of 0.8, the compressed value is 22. 0 + (250-220) × 0.8 = 244, so that the compressed value and the interval boundary form a natural transition; after the channel values of all pixels are adjusted, the adjusted pixels are rearranged in ascending order of row coordinates and column coordinates of the original image. The pixel consistency is checked by comparing the deviation value of the adjusted coordinates of each pixel with the original coordinates. The allowable range of coordinate deviation is set to ±1 pixel. For pixels whose deviation value exceeds the allowable range, the position is corrected by referring to the coordinate distribution within the adjacent 3×3 pixel range to ensure that all pixel coordinates correspond completely with the original image, and finally the color calibration area is formed.
[0034] Preferably, step S4: feature fusion is performed between the texture optimization region and the color calibration region, and then edge transition smoothing is performed between the texture optimization region and the unprocessed region of the original image to output the plankton-enhanced image.
[0035] Optionally, the feature fusion of the texture optimization region and the color calibration region in step S4 specifically involves: The texture coordinate matrix of the texture optimization region and the color coordinate matrix of the color calibration region are extracted by a deep learning model so that the coordinate dimensions of the texture coordinate matrix and the color coordinate matrix are perfectly matched. Extract the texture parameters of the texture optimization area and the color parameters of the color calibration area one by one according to pixel coordinates, and combine the texture parameters and color parameters corresponding to each coordinate to form the fusion parameters for that coordinate; The fusion parameters of all coordinates are arranged according to the coordinate distribution of the original image to generate the fused target region.
[0036] In this embodiment, the texture coordinate matrix of the texture optimization region and the color coordinate matrix of the color calibration region are extracted. The texture coordinate matrix is stored in a three-dimensional form (row coordinates, column coordinates, texture feature values), and the color coordinate matrix is stored in a four-dimensional form (row coordinates, column coordinates, blue channel values, green channel values, red channel values). The coordinate dimensions are normalized to ensure that the row coordinate range and column coordinate range of the two matrices are consistent with the original image (row coordinates 0-5119, column coordinates 0-3839), ensuring that the coordinate dimensions are completely matched. In one embodiment, each pixel coordinate is traversed sequentially according to row coordinates from 0 to 5119 and column coordinates from 0 to 3839. The texture feature value (range 0-1.0) of the texture optimization area under that coordinate is extracted. Simultaneously, the blue channel value, green channel value, and red channel value (each channel range 0-255) of the corresponding coordinate of the color calibration area are extracted. The texture feature value and the three color channel values are combined in the order of (texture feature value, blue channel value, green channel value, red channel value) to form a unique four-dimensional fusion parameter corresponding to each coordinate. In another embodiment, the four-dimensional fusion parameters of all pixel coordinates are arranged sequentially according to the row and column coordinate distribution order of the original image to construct a fusion parameter matrix (dimension 5120×3840×4) with the same size as the original image. Coordinate mapping verification is used to ensure that the storage location of each fusion parameter corresponds one-to-one with the pixel coordinates of the original image, thereby generating the fused target region.
[0037] Optionally, the edge transition smoothing in step S4 with the unprocessed area of the original image includes: The boundary line between the fused target region and the unprocessed region of the original image is identified by a deep learning model, and a transition region is formed by extending along the boundary line to both sides. Extract the fusion parameters of the target region side pixels and the original parameters of the unprocessed region side pixels within the transition region, and construct a distance gradient mapping value based on the distance between the pixels within the transition region and the boundary line; The pixel parameters are fused according to the distance gradient mapping value. The parameters at the boundary are fused at the same ratio. The proportion of the corresponding parameters is gradually increased towards both sides. The parameters of each pixel in the transition area are fused by gradient, and finally a complete plankton enhancement image is output.
[0038] In this embodiment, by comparing the differences in pixel parameters between the fused target region and the unprocessed region of the original image, the rows and columns of pixels with abrupt parameter changes are identified as the boundary line. The boundary line extends 10 pixels towards both the target region and the unprocessed region, forming a transition region with a total width of 20 pixels. The row and column coordinate ranges of the transition region remain consistent with the original image. The four-dimensional fusion parameters (texture feature value, blue channel value, green channel value, red channel value) of the pixels on the target region side and the original parameters (original texture value, original blue channel value, original green channel value, original red channel value) of the pixels on the unprocessed region side are extracted within the transition region. Using the boundary line as a reference, the vertical distance (in pixels) from each pixel in the transition region to the boundary line is calculated. The distance gradient mapping value is constructed using the following formula: Distance gradient mapping value = 1 - (distance from pixel to boundary line / width of one side of the transition region). For example, the width of one side of the transition region is 10 pixels. The distance of a certain pixel from the boundary line is 3 pixels, and its distance gradient mapping value = 1 - (3 / 10) = 0.7. The distance gradient mapping value of the pixel on the target region side increases linearly from 0.5 to 1.0 as it moves away from the boundary line, while the distance gradient mapping value of the pixel on the unprocessed region side decreases linearly from 0.5 to 0.0 as it moves away from the boundary line. The pixel parameters are allocated according to the distance gradient mapping value. The proportion of fused parameters of the pixels on the target region side is equal to its distance gradient mapping value, and the proportion of original parameters of the pixels on the unprocessed region side is equal to 1 minus the distance gradient mapping value. The distance gradient mapping value at the boundary line is 0.5, and the parameters on both sides are fused in a 1:1 ratio. Gradient fusion calculation is performed on each parameter of each pixel in the transition region. The texture parameter fusion formula is: fused texture value = target region texture feature value × mapping value + original texture value × (1 - mapping value). For example, the texture feature value of a pixel in the target area is 0.8, the original texture value of the corresponding unprocessed pixel is 0.3, and the distance gradient mapping value of this pixel is 0.7. The fused texture value = 0.8 × 0.7 + 0.3 × (1 - 0.7) = 0.56 + 0.09 = 0.65; the color channel parameter fusion formula is: fused channel value = target area channel value × mapping value + original channel value × (1 - mapping value); For example, the blue channel value of a pixel in the target area is 220, the original blue channel value of the corresponding unprocessed pixel is 180, the distance gradient mapping value of this pixel is 0.6, and the fused blue channel value = 220 × 0.6 + 180 × (1 - 0.6) = 132 + 72 = 204. After all parameters are calculated, the pixel data of the transition area, the fused target area, and the unprocessed area of the original image are integrated to form a complete image data with the same size as the original image (5120 × 3840 pixels), which is stored in TIFF format, and finally the complete plankton-enhanced image is output.
[0039] Please see Figure 3 The image shows a comparison before and after enhancement of the plankton image: The image above shows the original form of plankton, but the shell texture details are blurry (such as the texture of the shell edge is not clear), the pigment area (the dark egg-shaped structure inside the body) is dull and has a single layer, and the overall texture and color recognition is low. The image below is an enhanced image. The enhancement process, based on the method described in this application, specifically involves three-level scale resolution and phase alignment calibration. This results in clearer shell texture details (such as fine edge texture) and more regular flagellar texture arrangement. Based on the spectral absorption characteristics of chlorophyll, the color of the pigment region (ovoid structure) is adjusted to the natural color range corresponding to chlorophyll, giving it a more vivid green gradation. Simultaneously, channel weight allocation makes the color transition between the pigment region and surrounding tissues more natural. The enhanced image retains the original morphology of the plankton while improving detail recognition through texture optimization and color calibration, without any additional redundant elements.
[0040] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of the equivalents of the application be incorporated into the invention.
[0041] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. A method for enhancing planktonic images based on a deep learning model, characterized in that, Includes the following steps: Step S1: Obtain the original image of the plankton to be enhanced; Step S2: Analyze the original image using a preset deep learning model to extract the spatial arrangement features of the planktonic shell texture and flagella formation, as well as the spectral absorption features of the chlorophyll-dominated pigment region. Step S3: Locate the texture-dense region based on the texture space arrangement features, perform pixel-by-pixel phase alignment calibration on the texture-dense region, and optimize the texture features of the texture-dense region by feature superposition to form a texture optimization region; establish the correspondence between the spectral absorption features of the pigment region and the color channels in the original image, and dynamically allocate channel weights to adjust the color ratio according to the correspondence to form a color calibration region; Step S4: Perform feature fusion between the texture optimization area and the color calibration area, and then perform edge smoothing with the unprocessed area of the original image to output the plankton-enhanced image.
2. The plankton image enhancement method based on a deep learning model according to claim 1, characterized in that, The specific steps in step S2 to form the periodic texture spatial arrangement features are as follows: The original image is processed by a three-level scale analysis using a deep learning model. The first level of analysis is to identify the overall texture distribution of the image, the second level of analysis is to identify the scale contours in the shell texture and flagella, and the third level of analysis is to extract texture detail information. The texture information obtained from the three-level analysis is superimposed according to the scale level to form a multi-scale texture set; By using the periodic detection unit built into the deep learning model, each pixel group in the multi-scale texture set is periodically determined, and texture information that continuously satisfies the preset arrangement rules is retained to form texture space arrangement features.
3. The plankton image enhancement method based on a deep learning model according to claim 1, characterized in that, The extraction of spectral absorption characteristics of the chlorophyll-dominated pigment region in step S2 is specifically as follows: Spectral absorption characteristics data of chlorophyll in plankton were obtained, and pigment-adaptive grayscale ranges were set based on the spectral absorption characteristics data. The deep learning model traverses the original image, marks all pixels in the original image whose gray values are within the preset pigment matching gray range, and connects adjacent marked pixels to form candidate pigment regions. Each candidate pigment region is divided into a fixed-size grid. The pixel values in the spectral band at the center of each grid are extracted and arranged in order of grid coordinates in the image to form a spectral absorption feature dataset.
4. The plankton image enhancement method based on a deep learning model according to claim 1, characterized in that, Step S3, which involves locating dense texture regions based on texture space arrangement features, includes: Based on the texture space arrangement features, the number of texture elements in each standard pixel block is calculated, and the texture element density of each pixel block is statistically analyzed. Set a texture density threshold, mark pixel blocks with texture element density higher than the texture density threshold as preliminary dense blocks, and merge adjacent preliminary dense blocks to form a preliminary texture dense region; By using a deep learning model to track edge pixels in the initial region, edge pixels that do not conform to the texture distribution pattern of the central region are removed, thus determining the final texture-dense region.
5. The plankton image enhancement method based on a deep learning model according to claim 1, characterized in that, Step S3, which involves pixel-by-pixel phase alignment calibration of texture-dense regions, includes: Within a dense texture region, select the reference pixel group with the most uniform distribution of texture elements and extract the phase parameters of the reference pixel group; A two-dimensional phase coordinate system is established with the center pixel of the reference pixel group as the origin, and the phase difference between each other pixel in the texture-dense region and the center pixel of the reference pixel group is calculated. Sort by the absolute value of the phase difference, and adjust the phase parameter of each pixel in turn to keep the phase difference between each pixel and the reference pixel group within the allowable phase deviation range.
6. The plankton image enhancement method based on a deep learning model according to claim 5, characterized in that, In step S3, optimizing the texture features of densely textured regions through feature overlay specifically involves: Extract the portion of the texture space arrangement features corresponding to the texture-dense region and perform pixel-by-pixel matching with the phase-aligned and calibrated texture information; The optimization result of each pixel is obtained by weighted calculation of the original texture feature value and the calibrated texture feature value. The weight is set according to the texture density level of the pixel's location, and different density levels correspond to preset weight ratios. Optimized texture features are generated, which correspond to texture optimization regions.
7. The plankton image enhancement method based on a deep learning model according to claim 1, characterized in that, Step S3, establishing the correspondence between the spectral absorption characteristics of the pigment region and the color channels in the original image, includes: Spectral absorption features are analyzed using deep learning models to identify peak values and corresponding band positions in the spectral absorption features. Associate the band position corresponding to each peak value with each color channel of the original image, and record the interval in each color channel that coincides with the peak band position; Valid associations are selected based on the effective length of overlapping intervals, and the main color channel corresponding to each peak value is determined, forming a correspondence system between bands and channels.
8. The plankton image enhancement method based on a deep learning model according to claim 7, characterized in that, Step S3, which dynamically allocates channel weights and adjusts the color ratio based on the corresponding relationship, includes: Based on the established correspondence system, the spectral absorption feature values of each pixel within the pigment region are extracted; Intensity levels are divided according to spectral absorption intensity, and a basic weight for the main color channel and a supplementary weight for the auxiliary color channel are set for each intensity level; the basic weight is positively correlated with the intensity level, and the supplementary weight is negatively correlated with the intensity level. Based on the intensity level of the spectral absorption characteristic value of each pixel, the corresponding basic weight and supplementary weight are allocated to the corresponding color channel, and the output ratio of each color channel is adjusted.
9. The plankton image enhancement method based on a deep learning model according to claim 1, characterized in that, In step S4, feature fusion is performed between the texture optimization region and the color calibration region as follows: The texture coordinate matrix of the texture optimization region and the color coordinate matrix of the color calibration region are extracted by a deep learning model so that the coordinate dimensions of the texture coordinate matrix and the color coordinate matrix are perfectly matched. Extract the texture parameters of the texture optimization area and the color parameters of the color calibration area one by one according to pixel coordinates, and combine the texture parameters and color parameters corresponding to each coordinate to form the fusion parameters for that coordinate; The fusion parameters of all coordinates are arranged according to the coordinate distribution of the original image to generate the fused target region.
10. The plankton image enhancement method based on a deep learning model according to claim 9, characterized in that, Step S4, which involves smoothing the edge transition between the original image and the unprocessed area, includes: The boundary line between the fused target region and the unprocessed region of the original image is identified by a deep learning model, and a transition region is formed by extending along the boundary line to both sides. Extract the fusion parameters of the target region side pixels and the original parameters of the unprocessed region side pixels within the transition region, and construct a distance gradient mapping value based on the distance between the pixels within the transition region and the boundary line; The pixel parameters are fused according to the distance gradient mapping value. The parameters at the boundary are fused at the same ratio. The proportion of the corresponding parameters is gradually increased towards both sides. The parameters of each pixel in the transition area are fused by gradient, and finally a complete plankton enhancement image is output.
Citation Information
Patent Citations
Historical defective fresco digital restoration system based on AI
CN120894265A
Gardening product fungal disease image recognition system and method thereof
CN121074874A
Sensor-synchronized spectrally-structured-light imaging
US20160187199A1