Laser line extraction method and system
By performing de-turbidity pretreatment and scattering suppression on underwater images, combined with lightweight convolution and attention modules, the accuracy and robustness of laser line extraction in the prior art are solved, and high-precision laser line center positioning is achieved, and the stability and efficiency of underwater measurement are improved.
Patent Information
- Application Number
- CN202510528129.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
The existing underwater laser line extraction methods are difficult to extract laser lines stably and with high accuracy in high turbidity and multi-interference scenarios, and cannot meet the real-time and accurate measurement requirements in complex underwater environments.
By performing de-turbidity pretreatment on the original underwater image, including multi-scale light estimation, reflection component extraction, color gain and underwater color cast compensation, de-turbidity enhancement images are obtained; then scattering suppression and laser line segmentation are performed, and laser line probability maps are generated using lightweight convolution and attention modules; finally, subpixel center positioning is performed to obtain high-precision laser line center coordinates.
It realizes high-precision, low computational volume, and strong robust laser line extraction in complex underwater environments, significantly improving anti-interference ability and computing efficiency, and improving the performance of the laser scanning system.
Smart Images

Figure CN120451392A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of underwater three-dimensional reconstruction and measurement, and in particular to a laser line extraction method and system. Background Art
[0002] Extracting underwater laser lines in turbid water environments remains a critical step in 3D reconstruction and measurement. Existing techniques often employ classic image processing algorithms, including edge detection, threshold segmentation, and morphological operations. These methods achieve relatively good results in clear water or laboratory environments. However, when water turbidity increases or ambient light conditions change, traditional methods often face significant noise interference and optical scattering. First, suspended particles in the water scatter the laser beam, creating a large number of random bright spots or shadows in the image, reducing the overall signal-to-noise ratio. Traditional edge detection and threshold segmentation methods struggle to accurately distinguish the laser line from the background. Second, the absorption and attenuation of laser energy by the water causes uneven brightness or low intensity of the laser streaks in the image, significantly complicating morphological operations and threshold selection, and prone to missed or false detections. Furthermore, some complex environments often involve water disturbances or air bubbles, which can cause significant fluctuations in the shape and position of the laser streaks in the image sequence. Traditional static algorithms lack sufficient robustness for localization and tracking.
[0003] To address these issues, some researchers have attempted to enhance the contrast and continuity of laser lines by integrating various preprocessing techniques. For example, median filtering or directional filtering is used to suppress scattered noise, combined with a local adaptive threshold method to correct for uneven brightness distribution, and then refined using morphological operations to obtain a more stable laser centerline. However, these methods remain sensitive to factors such as water turbidity, laser divergence angle, and suspended particle distribution, lacking versatility in diverse environments. Some studies have explored deep learning methods, training convolutional neural networks to automatically identify laser streak regions. However, the effectiveness of deep learning relies heavily on a sufficient and diverse underwater annotated dataset. The high cost of data collection and annotation in turbid water environments results in insufficient generalization of the model in practical applications. Overall, existing underwater laser line extraction technologies are unable to extract laser lines stably and accurately in high-turbidity and high-interference scenarios, making them difficult to meet the requirements of real-time and precise measurement in complex underwater environments. Summary of the Invention
[0004] Based on this, it is necessary to provide a laser line extraction method and system based on the above technical problems, which can obtain high-quality laser lines.
[0005] In a first aspect, an embodiment of the present application provides a laser line extraction method, the method comprising:
[0006] Acquire original underwater images;
[0007] Perform de-turbidity preprocessing on the original underwater image to obtain a de-turbidity enhanced image;
[0008] Perform scattering suppression and laser line segmentation on the de-hazy enhanced image to obtain a laser line probability map;
[0009] Sub-pixel center positioning is performed on the laser line probability map to obtain high-precision laser line center coordinates.
[0010] In one embodiment, performing de-turbidity preprocessing on the original underwater image to obtain a de-turbidity enhanced image includes:
[0011] Multi-scale illumination estimation is performed on the original underwater image to obtain the illumination component; the reflection component is extracted based on the illumination component to obtain a preliminary de-illuminated or scattered image; color gain and underwater color cast compensation are performed on the de-illuminated or scattered image to obtain a gain-compensated image; and histogram redistribution is performed on the gain-compensated image to obtain a de-turbidity enhanced image.
[0012] In one embodiment, multi-scale illumination estimation is performed on the original underwater image to obtain illumination components, including:
[0013] The original underwater image is subjected to Gaussian smoothing of several different scales to obtain smoothing results of each scale; the smoothing results of each scale are weighted or optimized to obtain the illumination component.
[0014] In one embodiment, extracting the reflection component based on the illumination component to obtain a preliminary de-illumination or scattering image includes:
[0015] Based on the original underwater image, the illumination component is divided into blocks or pixel-level division to obtain the reflection component; the reflection component is clipped for outliers to obtain a preliminary de-illumination or scattering image.
[0016] In one embodiment, performing color gain and underwater color cast compensation on a de-illuminated or scattered image to obtain a gain-compensated image includes:
[0017] The method comprises analyzing a color histogram of the de-illuminated or scattered image to identify typical blue-green or yellow-brown color casts; calculating gain coefficients for the RGB three channels based on statistical or empirical parameters; and applying the gain coefficients to the RGB three channels in the de-illuminated or scattered image to perform color gain and underwater color cast compensation to obtain a gain-compensated image.
[0018] In one embodiment, performing histogram redistribution on the gain-compensated image to obtain a de-hazy enhanced image includes:
[0019] The brightness distribution of the gain-compensated image is calculated; based on the brightness distribution, histogram stretching or equalization is performed on the RGB three channels to control the brightness within a reasonable range to obtain an enhanced image.
[0020] In one embodiment, performing scatter suppression and laser line segmentation on the de-hazed enhanced image to obtain a laser line probability map includes:
[0021] The dehazed and enhanced image is input into the encoder module for multi-layer lightweight convolution downsampling to obtain a deep feature image; the deep feature map is input into the scatter suppression attention module for adaptive weight adjustment to obtain an image removed from scattering interference; the image removed from scattering interference is input into the decoder module for multiple upsampling and bilinear interpolation to obtain a laser line probability map.
[0022] In a second aspect, an embodiment of the present application provides a laser scanning system, the system comprising:
[0023] An acquisition module, used to acquire original underwater images;
[0024] A preprocessing module is used to perform de-turbidity preprocessing on the original underwater image to obtain a de-turbidity enhanced image;
[0025] A deep network segmentation module performs scattering suppression and laser line segmentation on the de-hazed and enhanced image to obtain a laser line probability map;
[0026] The center positioning module performs sub-pixel center positioning on the laser line probability map to obtain the center coordinates of the laser line.
[0027] The output module transmits the center coordinates of the laser line to a surveying, navigation or storage system.
[0028] In one embodiment, the pre-processing module includes:
[0029] The illumination estimation module performs multi-scale illumination estimation on the original underwater image to obtain illumination components;
[0030] A reflection component extraction module extracts the reflection component based on the illumination component to obtain a preliminary de-illumination or scattering image;
[0031] a gain and compensation module, performing color gain and underwater color cast compensation on the de-illuminated or scattered image to obtain a gain-compensated image;
[0032] The redistribution module performs histogram redistribution on the gain-compensated image to obtain a de-turbidity enhanced image.
[0033] In one embodiment, the deep network segmentation module includes:
[0034] The encoder module performs multi-layer lightweight convolution downsampling on the de-hazed enhancement image to obtain a deep feature image;
[0035] An attention module adaptively adjusts the weights of the deep feature map to obtain an image with scattered interference removed;
[0036] The decoder module performs multiple upsampling and bilinear interpolation on the image with the scattered interference removed to obtain a laser line probability map.
[0037] Compared to related technologies, the laser line extraction method and system provided in the embodiments of this application de-turbidity the original underwater image to obtain a de-turbidity enhanced image, eliminating background noise and the effects of non-uniform illumination and effectively enhancing the contrast of laser streaks. Furthermore, scatter suppression and laser line segmentation are performed on the de-turbidity enhanced image to obtain a laser line probability map, which suppresses interference from underwater scattered light spots, noise points, and other factors, enhancing the characteristics of laser streaks. Furthermore, sub-pixel center positioning is performed on the laser line probability map to obtain high-precision laser line center coordinates. By performing de-turbidity processing, scatter suppression, laser line segmentation, and sub-pixel center extraction, this scheme overcomes the limitations of existing underwater laser line extraction methods, achieving the goals of high precision, low computational effort, and strong robustness, significantly improving anti-interference capabilities, computational efficiency, and accuracy stability.
[0038] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0040] Figure 1 This is a flow chart of a laser line extraction method provided in an embodiment of the present application;
[0041] Figure 2 This is a flow chart of a de-turbidity pretreatment method provided in the examples of the present application;
[0042] Figure 3 is a flow chart of a scattering suppression and laser line segmentation method provided in an embodiment of the present application;
[0043] Figure 4 This is a flow chart of another laser line extraction method provided in an embodiment of the present application;
[0044] Figure 5 This is a structural block diagram of a laser scanning system provided in an embodiment of the present application;
[0045] Figure 6 This is a structural block diagram of a preprocessing module provided in an embodiment of the present application;
[0046] Figure 7 This is a structural block diagram of a deep network segmentation module provided in an embodiment of the present application;
[0047] Figure 8 This is a structural block diagram of another deep network segmentation module provided in an embodiment of the present application;
[0048] Figure 9 This is a structural block diagram of another deep network segmentation module provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is described and illustrated below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely used to explain this application and are not intended to limit this application. Based on the embodiments provided in this application, all other embodiments obtained by those of ordinary skill in the art without making any creative efforts are within the scope of protection of this application.
[0050] Obviously, the drawings described below are merely examples or embodiments of the present application. Those skilled in the art can, without inventive effort, apply the present application to other similar scenarios based on these drawings. Furthermore, it is also understood that, although the effort involved in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, changes in design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as an insufficiency of the content disclosed in this application.
[0051] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments unless there is a conflict.
[0052] Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by a person of ordinary skill in the technical field to which this application belongs. The words "one", "a", "the" and the like used in this application do not indicate a limit on quantity and may indicate the singular or plural. The terms "include", "comprise", "have" and any variations thereof used in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units that are inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The word "multiple" used in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0053] This embodiment provides a laser line extraction method. Figure 1 is a flow chart of the laser line extraction method according to an embodiment of the present application. Figure 1 As shown, the process includes the following steps:
[0054] Step S101: Acquire an original underwater image.
[0055] Specifically, a green laser and an underwater camera are set up to obtain original underwater images; wherein the collected images are laser fringe patterns.
[0056] Step S102 : performing de-turbidity preprocessing on the original underwater image to obtain a de-turbidity enhanced image.
[0057] Step S103 : performing scattering suppression and laser line segmentation on the de-hazed and enhanced image to obtain a laser line probability map.
[0058] Step S104 , performing sub-pixel center positioning on the laser line probability map to obtain the laser line center coordinates.
[0059] Specifically, the sub-pixel center positioning method based on the Steger algorithm calculates the Hessian matrix, extracts the minimum eigenvalue direction, and performs quadratic fitting to achieve high-precision laser line center calculation.
[0060] The above-mentioned laser line extraction method de-hazes the original underwater image to produce a de-haze enhanced image, eliminating background noise and the effects of non-uniform illumination and effectively enhancing the contrast of laser streaks. Furthermore, scatter suppression and laser line segmentation are performed on the de-haze enhanced image to produce a laser line probability map, suppressing interference from underwater scattered light spots and noise points and enhancing the laser streak characteristics. Furthermore, sub-pixel center positioning is performed on the laser line probability map to obtain high-precision laser line center coordinates. By performing de-haze, scatter suppression, laser line segmentation, and sub-pixel center extraction, this scheme overcomes the limitations of existing underwater laser line extraction methods, achieving high precision, low computational effort, and strong robustness, significantly improving anti-interference capabilities, computational efficiency, and accuracy stability.
[0061] Based on the above embodiment, the present embodiment explains the above embodiment S102 in detail. Specifically, the present embodiment involves the process of de-turbidity processing of the original underwater image, such as Figure 2 As shown, the specific steps include:
[0062] Step S201 : performing multi-scale illumination estimation on the original underwater image to obtain illumination components.
[0063] One possible implementation involves applying Gaussian blur to the original image several times at different scales (σ1, σ2, and σ3) to simulate the illumination components of underwater imaging. Based on empirical or statistical data, these blurred results are weighted averaged, or the layer that best fits the underwater scattering conditions is selected to obtain the illumination component I(x). I(x) is approximately equal to the large-scale information retained after illumination or scattering. Compared to traditional Retinex, which only uses a single-scale or fixed-size filter, this method is more adaptable to complex factors such as suspended particles and non-uniform illumination underwater.
[0064] Step S202 : extracting the reflection component based on the illumination component to obtain a preliminary de-illumination or scattering image.
[0065] One possible implementation method is to use the Retinex principle, where the original image is equal to the illumination component × the reflection component. The illumination component I(x) is divided into blocks or pixels to obtain the reflection component R(x). The division can be expressed as:
[0066] R(x)≈Original(x) / I(x)(1)
[0067] Among them, R(x) is the reflection component, I(x) is the illumination component, and Original(x) is the original image.
[0068] Furthermore, outlier clipping is performed on the reflection component R(x) to remove the large-scale influence of ambient light and prevent excessive brightness or unstable division caused by extremely small denominators, thus obtaining a preliminary de-illuminated or scattered image.
[0069] Step S203 : performing color gain and underwater color cast compensation on the de-illuminated or scattered image to obtain a gain-compensated image.
[0070] One possible implementation involves analyzing the color histogram of the current de-illuminated or scattered image to identify typical blue-green or yellow-brown color casts. Based on the image histogram or underwater prior parameters, the RGB three-channel gain coefficients (gR, gG, gB) are calculated and applied to the RGB channels in the de-illuminated or scattered image to obtain a gain-compensated image. This enhances the channels that are more absorbed / attenuated by water, achieving contrast balance in the RGB channels of the de-illuminated or scattered image and avoiding the overly strong or weak tones produced by traditional Retinex in turbid scenes. The gain applied to the RGB channels in the de-illuminated or scattered image can be expressed as:
[0071] R ′ (x)_c=R(x)_c × gc(c ∈{R,G,B}) (2)
[0072] Among them, R ′ (x)_c is the value after gain is applied to the c channel, R(x)_c is the original c channel value, and gc is the gain coefficient.
[0073] Step S204 : performing histogram redistribution on the gain-compensated image to obtain a de-turbidity enhanced image.
[0074] One possible implementation method is to statistically gain compensate the image R ′ Based on the brightness distribution of the image (x), the RGB channels are histogram stretched or balanced to control the brightness within a reasonable range, thereby obtaining the enhanced image E(x); making the overall brightness distribution more uniform and highlighting the originally dim laser stripes.
[0075] Optionally, if there is prior knowledge of the brightness range of the laser stripes, a targeted optimization of the common brightness range of the laser stripes can be performed in underwater scenes; for example, the stripe area is allowed to occupy a higher brightness segment in the histogram.
[0076] In an embodiment of the present application, by performing multi-scale illumination estimation and adaptive color gain and color cast compensation on the original underwater image, the contrast of the laser stripes can be effectively enhanced in complex underwater lighting and scattering environments, while suppressing the influence of background noise and non-uniform illumination; compared with traditional filtering methods, this method maintains the integrity of the laser stripes while descattering, providing a clearer input image for subsequent scattering suppression and laser line segmentation.
[0077] Based on the above embodiment, the present embodiment explains the above embodiment S103 in detail. Specifically, the present embodiment involves the process of scattering suppression and laser line segmentation of the de-hazy enhanced image, such as Figure 3 As shown, the specific steps include:
[0078] Step S301 : performing multi-layer lightweight convolution downsampling on the de-hazed enhanced image to obtain a deep feature image.
[0079] One possible implementation method is to first input the dehazed and enhanced image E(x), perform Initial Conv downsampling on E(x), preliminarily extract the features of the image E(x) while reducing the resolution; further, perform multi-layer DWSConv Blocks convolution downsampling to extract deeper features of the image, and set Skip Connection in the intermediate process to retain higher-resolution features for fusion during decoding.
[0080] Step S302: adaptively adjust the weight of the deep feature map to obtain an image with scattered interference removed.
[0081] One possible implementation involves globally pooling the input deep feature image information. A small neural network (MLP) processes the global pooling result from the previous step, redistributes the pooling weights using the sigmoid function, multiplies the result channel by channel, and then convolves it with DWSConv Blocks. Normalization is performed using the BN and ReLU functions to generate a spatial mask. Element-wise multiplication is then performed on the data to obtain a feature image free of scattering interference. By estimating the degree of scattering interference through global pooling or local convolution, the laser streak features are adaptively enhanced, improving the saliency of the laser lines.
[0082] Step S303 : performing multiple upsampling and bilinear interpolation on the image after removing the scattered interference to obtain a laser line probability map.
[0083] One possible implementation involves performing multiple upsampling and bilinear interpolation ×2 on the input image after removing scattering interference to gradually restore the image resolution. After concatenating it with the corresponding Skip Connection set in step S301, a small convolution is used to integrate channel and spatial information, and a Sigmoid activation is used to ultimately output a laser line probability map of the same size as the input image. DWSConv Blocks can be used for the small convolution.
[0084] In this embodiment, by applying channel and spatial attention to the image, the laser streak features are adaptively enhanced while suppressing interference from underwater scattered light spots and noise points. Compared with traditional edge detection and threshold segmentation methods, this embodiment is more adaptable to changes in water transparency and background lighting, and can still stably extract the laser line area in complex environments.
[0085] Based on the above embodiment, this embodiment provides an optional example of a laser line extraction method. Figure 4 As shown, the specific implementation process is as follows:
[0086] Step S401: input an original underwater image.
[0087] Step S402 : performing Gaussian smoothing of different scales on the original underwater image to obtain smoothing results of each scale.
[0088] Step S403: weighting or optimizing the smoothing results of each scale to obtain a lighting component.
[0089] Step S404: Based on the original underwater image, perform block or pixel-level division on the illumination component to obtain a reflection component.
[0090] Step S405 , performing outlier clipping on the reflection component to obtain a preliminary de-illumination or scattering image.
[0091] Step S406 : Analyze the color histogram of the de-illuminated or scattered image to identify typical blue-green or yellow-brown color casts.
[0092] Step S407: Calculate the RGB three-channel gain coefficients based on statistical or empirical parameters.
[0093] Step S408 : applying the gain coefficient to the RGB channels in the de-illuminated or scattered image to perform color gain and underwater color cast compensation to obtain a gain-compensated image.
[0094] Step S409: Counting the brightness distribution of the gain-compensated image.
[0095] Step S410 : Based on the brightness distribution, histogram stretching or equalization is performed on the RGB three channels to control the brightness within a preset range to obtain an enhanced image.
[0096] Step S411 , performing multi-layer lightweight convolution downsampling on the de-hazed enhanced image to obtain a deep feature image.
[0097] Step S412: adaptively adjust the weight of the deep feature map to obtain an image with scattered interference removed.
[0098] Step S413 , performing multiple upsampling and bilinear interpolation on the image after removing the scattered interference to obtain a laser line probability map.
[0099] The specific process of the above S401-S413 can refer to the description of the above method embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0100] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0101] This embodiment also provides a laser line scanning system for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc. may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0102] Figure 5 is a structural block diagram of a laser scanning system according to an embodiment of the present application, such as Figure 5 As shown, the system includes: an acquisition module 10, a preprocessing module 20, a deep network segmentation module 30, a center positioning module 40, and an output module 50, wherein:
[0103] The acquisition module 10 is used to acquire the original underwater image.
[0104] The pre-processing module 20 is used to perform de-turbidity pre-processing on the original underwater image to obtain a de-turbidity enhanced image.
[0105] The deep network segmentation module 30 is used to perform scattering suppression and laser line segmentation on the de-hazed and enhanced image to obtain a laser line probability map.
[0106] The center positioning module 40 is used to perform sub-pixel center positioning on the laser line probability map to obtain the laser line center coordinates.
[0107] The output module 50 transmits the laser line center coordinates to a surveying, navigation or storage system.
[0108] In one embodiment, Figure 6 As shown, the pre-processing module 20 specifically further includes:
[0109] The illumination estimation module 200 is used to perform multi-scale illumination estimation on the original underwater image to obtain illumination components.
[0110] The reflection component extraction module 210 is configured to extract the reflection component based on the illumination component to obtain a preliminary de-illumination or scattered image.
[0111] The gain and compensation module 220 is configured to perform color gain and underwater color cast compensation on the de-illuminated or scattered image to obtain a gain-compensated image.
[0112] The redistribution module 230 is configured to perform histogram redistribution on the gain-compensated image to obtain a de-hazed and enhanced image.
[0113] In one embodiment, Figure 7 As shown, the deep network segmentation module 30 specifically further includes:
[0114] The encoder module 300 performs multi-layer lightweight convolution downsampling on the de-hazed enhancement image to obtain a deep feature image.
[0115] The attention module 310 performs adaptive weight adjustment on the deep feature map to obtain an image with scattered interference removed.
[0116] The decoder module 320 performs multiple upsampling and bilinear interpolation on the image with the scattered interference removed to obtain a laser line probability map.
[0117] In one embodiment, Figure 8 As shown, the encoder module 300 specifically further includes:
[0118] Initial Conv 301 downsamples the input image (size approximately H×W×3) using Initial Conv (3×3, stride=2, out_ch=16), then normalizes it using the BN+ReLU function, and finally outputs the data with a size of (H / 2)×(W / 2)×16.
[0119] DWSConv Blocks E1 302 performs lightweight convolution on the input data to complete a round of feature extraction and nonlinear transformation. Specifically, the input data is convolved with DWSConv Blocks E1 (stride = 1, out_ch = 16), followed by Depthwise (3×3, stride = 1) + Pointwise (1×1) + BN + ReLU, and the output data has a size of (H / 2) × (W / 2) × 16.
[0120] DWSConv Blocks E2 303 performs a depthwise convolution with stride = 2 on the input data to expand the number of channels and extract deeper features. Specifically, the input data is convolved with DWSConv Blocks E2 (stride = 2, out_ch = 32), then normalized using the BN+ReLU function. Finally, the data is output with SkipConnection #1 set at the output. The data size is: (H / 4) × (W / 4) × 32.
[0121] DWSConv Blocks E3 304 further extracts the input feature map (H / 4×W / 4×32) at the same resolution. Specifically, the input data is convolved with DWSConv Blocks E3 (stride=1, out_ch=32), then normalized with the BN+ReLU function, and the output data is of size (H / 4)×(W / 4)×32.
[0122] DWSConv Blocks E4 305 downsamples and expands the input feature map (H / 4×W / 4×32) to extract deeper features at a lower resolution. Specifically, the input data is convolved with DWSConv Blocks E4 (stride=2, out_ch=64), then normalized with the BN+ReLU function. Finally, the data is output with Skip Connection#2 set at the output. The data size is: (H / 8)×(W / 8)×64.
[0123] DWSConv Blocks E5 306 further downsamples and expands the channels of the input feature map (H / 8×W / 8×64) to extract deeper features at a lower resolution. Specifically, the input data is convolved with DWSConv BlocksE5 (stride=2, out_ch=96), then normalized with the BN+ReLU function, and the output data is of size (H / 16)×(W / 16)×96.
[0124] In one embodiment, Figure 9 As shown, the decoder module 320 specifically further includes:
[0125] The first decoder 321 upsamples and bilinearly interpolates the input data. Specifically, Concat Skip Connection#2 (H / 8×W / 8×64) is performed on the input data, and then channel merging is performed. The number of channels after merging is 64+96=160. Then, Conv(1×1,out_ch=64) or DWSConv Blocks(1×1,out_ch=64) convolution is performed, and then the BN+ReLU function is used for normalization. Finally, the data is output. The data size is: (H / 8)×(W / 8)×64.
[0126] The second decoder 322 upsamples and bilinearly interpolates the input data. Specifically, Concat Skip Connection#1 (H / 4×W / 4×32) is performed on the input data, and then channel merging is performed. The number of channels after merging is 32+64=96. Then, Conv(1×1, out_ch=64) or DWSConv Blocks(1×1, out_ch=64) convolution is performed, and then the BN+ReLU function is normalized. Finally, the data is output. The data size is: (H / 4)×(W / 4)×48.
[0127] The third decoder 323 upsamples and bilinearly interpolates the input data. Specifically, it performs DWSConv Blocks (out_ch = 32) convolution on the input data, then normalizes it with the BN+ReLU function, and finally outputs the data with a data size of (H / 2) × (W / 2) × 32.
[0128] The first decoder 324 performs upsampling and bilinear interpolation on the input data. Specifically, it performs DWSConv Blocks (out_ch=32) convolution on the input data, then normalizes it with the BN+ReLU function, and finally outputs the data with a data size of: H×W×32.
[0129] Sigmoid activation 325, Conv(1×1, out_ch=1) is performed on the input data, and then activated with the Sigmoid function, and finally the laser line probability map is output with the size of H×W×32.
[0130] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0131] In addition, in conjunction with the laser line extraction method in the above embodiments, embodiments of the present application may provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the laser line extraction methods in the above embodiments is implemented.
[0132] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0133] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A laser line extraction method, characterized in that: The method comprises: Acquire original underwater images; Perform de-turbidity preprocessing on the original underwater image to obtain a de-turbidity enhanced image; performing scattering suppression and laser line segmentation on the de-hazed enhanced image to obtain a laser line probability map; Sub-pixel center positioning is performed on the laser line probability map to obtain the laser line center coordinates.
2. The method according to claim 1, characterized in that The de-turbidity preprocessing of the original underwater image to obtain the de-turbidity enhanced image includes: Perform multi-scale illumination estimation on the original underwater image to obtain illumination components; Extracting a reflection component based on the illumination component to obtain a preliminary de-illumination or scattering image; performing color gain and underwater color cast compensation on the de-illuminated or scattered image to obtain a gain-compensated image; Performing histogram redistribution on the gain-compensated image to obtain a de-turbidity enhanced image.
3. The method according to claim 2, characterized in that The multi-scale illumination estimation is performed on the original underwater image to obtain illumination components, including: Perform Gaussian smoothing of different scales on the original underwater image to obtain smoothing results at each scale; The smoothing results at each scale are weighted or optimized to obtain the illumination component.
4. The method according to claim 2, characterized in that Extracting the reflection component of the illumination component to obtain a preliminary de-illumination or scattering image includes: Based on the original underwater image, performing block or pixel-level division on the illumination component to obtain a reflection component; Outlier clipping is performed on the reflection component to obtain a preliminary de-illuminated or scattered image.
5. The method according to claim 2, characterized in that The performing color gain and underwater color cast compensation on the de-illuminated or scattered image to obtain a gain-compensated image includes: Analyzing a color histogram of the de-illuminated or diffused image to identify typical blue-green or yellow-brown color casts; Calculate the gain coefficients of the RGB three channels based on statistical or empirical parameters; The gain coefficient is applied to the RGB three channels in the de-illuminated or scattered image to perform color gain and underwater color cast compensation to obtain a gain-compensated image.
6. The method according to claim 2, characterized in that The step of performing histogram redistribution on the gain-compensated image to obtain a de-turbidity enhanced image includes: Counting the brightness distribution of the gain-compensated image; Based on the brightness distribution, histogram stretching or equalization is performed on the RGB three channels to control the brightness within a preset range to obtain an enhanced image.
7. The method according to claim 1, characterized in that The step of performing scattering suppression and laser line segmentation on the de-hazed enhanced image to obtain a laser line probability map includes: Perform multi-layer lightweight convolution downsampling on the de-hazed enhanced image to obtain a deep feature image; Adaptively adjusting the weight of the deep feature map to obtain an image with scattering interference removed; The image removed of scattered interference is subjected to multiple upsampling and bilinear interpolation to obtain a laser line probability map.
8. A laser scanning system, characterized in that: include: An acquisition module, used to acquire original underwater images; A preprocessing module is used to perform de-turbidity preprocessing on the original underwater image to obtain a de-turbidity enhanced image; a deep network segmentation module, configured to perform scattering suppression and laser line segmentation on the de-hazed and enhanced image to obtain a laser line probability map; The center positioning module is used to perform sub-pixel center positioning on the laser line probability map to obtain the center coordinates of the laser line. The output module transmits the center coordinates of the laser line to a surveying, navigation or storage system.
9. The system according to claim 8, characterized in that The pre-processing module comprises: The illumination estimation module is used to perform multi-scale illumination estimation on the original underwater image to obtain illumination components; A reflection component extraction module, configured to extract the reflection component based on the illumination component to obtain a preliminary de-illumination or scattering image; A gain and compensation module, configured to perform color gain and underwater color cast compensation on the de-illuminated or scattered image to obtain a gain-compensated image; The redistribution module is used to perform histogram redistribution on the gain-compensated image to obtain a de-turbidity enhanced image.
10. The system according to claim 8, wherein: The deep network segmentation module includes: The encoder module performs multi-layer lightweight convolution downsampling on the de-hazed enhancement image to obtain a deep feature image; An attention module adaptively adjusts the weights of the deep feature map to obtain an image with scattered interference removed; The decoder module performs multiple upsampling and bilinear interpolation on the image with the scattered interference removed to obtain a laser line probability map.