SLAM front-end optimization method based on brightness grading and gradient constraint

By employing brightness gradation and gradient constraints, the image of the SLAM system is enhanced with differentiation and feature points are selected. This solves the problems of unstable feature point quantity and low computational efficiency under complex lighting conditions, achieving a balance between high-quality feature matching and real-time performance.

CN121661479APending Publication Date: 2026-03-13HARBIN ENG UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing computer vision SLAM systems struggle to achieve a stable number and uniform distribution of feature points while maintaining real-time performance under complex lighting conditions. Traditional image enhancement methods also fall short in terms of lighting adaptability and computational efficiency.

Method used

A brightness grading and gradient constraint method is used to perform differential enhancement processing on images. The gamma parameter is determined by the CDF cumulative distribution function and combined with local adaptive histogram equalization. Feature point selection and mask optimization are performed for low-light and overexposed images to achieve high-quality and uniform distribution of feature points.

Benefits of technology

It significantly improves the robustness and real-time performance of the SLAM system under complex lighting conditions, enhances feature matching accuracy and system stability, and reduces computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661479A_ABST
    Figure CN121661479A_ABST
Patent Text Reader

Abstract

The invention discloses an SLAM front-end optimization method based on brightness grading and gradient constraint, and relates to the technical field of computer vision and vision SLAM. In order to solve the defects that adaptive grading enhancement and parameterization control based on illumination types are lacked in the prior art, and feature point quality, spatial distribution uniformity and front-end real-time performance are difficult to consider in a high-frequency input scene, the invention provides a comprehensive brightness grading and feature optimization scheme. The method comprises the following steps: firstly, calculating the average brightness of an input image, dividing the image into a dark light type, a normal type and an overexposure type, and respectively adopting gamma correction, contrast limited adaptive histogram equalization and inversion enhancement strategies for different types to realize illumination adaptive enhancement; then screening high-quality feature points with significant local curvature changes; and updating the detection area. According to the method, the feature stability, the matching precision and the real-time performance of the SLAM front end in a complex indoor environment are remarkably improved, and the method is suitable for a self-localization and mapping system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This involves the fields of computer vision and visual SLAM (simultaneous localization and mapping), specifically SLAM front-end optimization based on brightness gradation and gradient constraints. Background Technology

[0002] In the fields of computer vision and visual SLAM (Simultaneous Localization and Mapping) technology, the SLAM front-end typically includes image preprocessing, feature point detection and description, feature matching, and initial pose estimation. Its stability and real-time performance directly determine the accuracy and robustness of the entire system. Indoor scenes, due to factors such as rapid camera movement, dynamic occlusion, sparse textures, and more prominent complex lighting (coexistence of low light, strong highlights, and local shadows), are prone to a sharp decrease in the number of feature points and an increase in mismatches, which in turn leads to tracking interruptions and increased cumulative errors. If the sensor output frequency is high and the image frame inflow is too fast, it can also induce front-end processing congestion and buffer overflow, resulting in frame loss and further amplifying the pose error. This pain point is particularly significant in existing visual-inertial SLAM systems.

[0003] Regarding image preprocessing, traditional methods often employ a "one-size-fits-all" enhancement strategy for the entire image: for example, global histogram equalization (HE) and adaptive histogram equalization (CLAHE) can improve contrast, but under normal lighting conditions, they are prone to over-enhancing noise and disrupting photometric consistency. Retinex series and multi-scale fusion methods (such as LIME and MF-LIME), the dehazing approach of inversion + dehazing and then enhancement, and adaptive exposure correction based on camera response models (such as Ying) can indeed restore details under specific low light or exposure imbalance conditions, but their common problems are: ① lack of adaptive flow distribution for scene lighting types, which may still introduce unnecessary processing and noise into images with normal lighting; ② multi-scale and multi-channel processing often brings high computational overhead, making it difficult to run stably under the strong real-time constraints of SLAM front-end; ③ improper coupling between local and global enhancement can also produce block effects and structural distortion, affecting the subsequent feature operators' discrimination of corner points / edges.

[0004] In both low-light and overexposed scenes, simply relying on global gamma correction can quickly stretch intensity, but it ignores local details and differences in regional contrast. Using CLAHE alone in high-contrast areas easily leads to overstretching or fragmented boundaries. Applying such processing indiscriminately to all images creates additional noise and latency in frames that "don't need enhancement," disrupting the consistency and matchability between frames. Furthermore, even with multi-scale CLAHE, without combining image contrast / statistics for parameter adaptation, it's still difficult to balance detail fidelity and noise control at both scale and region. Therefore, existing solutions are still insufficient in the streamlined adaptive process of "classification before enhancement, diagnosis before prescription."

[0005] In feature point detection, traditional operators such as FAST / ORB / Harris / BRISK offer real-time advantages, but they are sensitive to extreme lighting and motion blur, easily leading to feature congestion in high-response areas and feature scarcity in low-texture areas, resulting in uneven global distribution and matching degradation. Common homogenization methods (such as grid quotas or pyramid hierarchical restrictions) can alleviate clustering to some extent, but often lack interpretable quality metrics to identify "more stable" corner points within the same grid. On the other hand, while learned features (such as SuperPoint) are robust, they have high computational cost and latency, making them difficult to implement in the front-end. With high-frequency camera + IMU input, without implementing "throttling" and "optimization" parallel mechanisms such as dynamic region of interest (mask) + feature upper limit at the front-end, the computation of invalid or redundant features can easily slow down the front-end, causing buffer overflow and frame loss. These problems have not been systematically addressed in existing VIO / VI-SLAM pipelines.

[0006] In contrast, the technical approach proposed in the disclosure materials of this case first categorizes images into three types based on average brightness: low light, normal, and overexposed. Based on this, a differentiated enhancement path is adopted: low light images undergo "CDF-guided gamma correction + multi-scale parameterized CLAHE"; normal frames are directly entered into the feature processing flow without processing to avoid noise and wasted computational power; overexposed frames are first negative-reversed before undergoing the "gamma + multi-scale CLAHE" process, achieving an adaptive closed loop of "grading first, then enhancement" at the process level. The CLAHE window and contrast upper limit are dynamically set by the image scale factor and contrast statistics (such as standard deviation and median) to control the balance between detail / noise and computational burden. This "light-based splitting + parameter adaptation" processing idea is a practical improvement direction for the aforementioned "one-size-fits-all enhancement" and "indiscriminate multi-scale" approaches.

[0007] In the feature detection chain, this approach uses FAST+Mask for rapid initial screening, then calculates gradients at candidate points and constructs a Hessian model. Eigenvalues ​​(two principal curvatures) are used as quality indicators for "trackability / geometric stability." Within the grid, minimum spacing and maximum number constraints are combined to sort and retain high-quality features, thus ensuring both uniform distribution and feature reliability. An upper limit on the number of features controls the computational load in the matching stage. Combined with the aforementioned strategy of "not over-processing normal frames," this approach can balance feature quality and latency control under high-frequency input, reducing the risk of frame loss and tracking divergence. Compared to existing coarse-grained homogenization or single-threshold screening, this approach emphasizes the synergy of quality measurement, distribution constraints, and cost throttling.

[0008] In summary, existing technologies lack adaptive hierarchical enhancement and parameterized control based on illumination type, and are difficult to simultaneously ensure feature point quality, uniform spatial distribution, and real-time performance in high-frequency input scenarios. Summary of the Invention

[0009] To address the shortcomings of existing technologies, such as the lack of adaptive hierarchical enhancement and parameterized control based on illumination type, and the difficulty in simultaneously ensuring feature point quality, uniform spatial distribution, and real-time performance in high-frequency input scenarios, the technical solution provided by this invention is as follows: A SLAM front-end optimization method based on brightness gradation and gradient constraints includes: The steps include: acquiring input image frames captured by the camera in an indoor environment; statistically calculating the grayscale values ​​of all pixels in the input image to obtain the average brightness; and comparing it with preset low brightness thresholds and high brightness thresholds to classify the input image into three categories: low-light image, normal lighting image, and overexposed image. Based on the classification results, corresponding image enhancement processing is performed on images of different categories. For low-light images, the gamma correction parameters are determined according to the gray-level distribution accumulation function and gamma correction is performed. Then, the contrast-limited adaptive histogram equalization method is used to enhance the image at multiple scales, and the region boundaries are smoothed using an interpolation algorithm to obtain the enhanced low-light image. For normal lighting images, the images are directly output to the subsequent processing module to keep the original features unchanged. For overexposed images, the process involves generating a negative image by inversion, performing gamma correction and adaptive histogram equalization processing, and then inverting the enhancement result to restore the enhanced overexposed image. The steps include: performing gradient calculation on the enhanced image to obtain the brightness change rate in the horizontal and vertical directions, constructing a Hessian matrix based on the gradient results, calculating the principal eigenvalues ​​to characterize the degree of local curvature change, and outputting feature point quality information. The steps are as follows: perform FAST feature detection on the enhanced image to obtain candidate feature points, assign the feature points to preset grid cells according to their coordinates, sort them according to the feature value of each feature point, retain a number of feature points with the highest feature value and whose spacing meets the constraint conditions, and remove the remaining feature points to output a high-quality feature point set after filtering. The steps involve using a masking mechanism to dynamically update the feature distribution, marking high-density regions that have been successfully tracked in adjacent frames as masked regions, marking sparse regions as regions of interest, performing new feature detection and tracking on regions of interest, and outputting a spatially balanced and high-quality set of feature points. The high-quality feature points, after brightness gradation enhancement, gradient constraint screening, and mask optimization, are input into the SLAM front-end pose estimation module to achieve a balance between feature matching accuracy and system real-time performance.

[0010] Furthermore, a preferred embodiment is provided, wherein the average brightness of the input image is obtained by summing the gray values ​​of all pixels in the image and dividing by the total number of pixels. The low brightness threshold and high brightness threshold are preset based on experimental statistical results and are used to distinguish between low-light images, normal lighting images and overexposed images.

[0011] Furthermore, a preferred embodiment is provided, wherein the image enhancement processing of the low-light image includes first calculating the cumulative distribution function based on the image gray-level distribution frequency to determine the gamma correction parameters, then performing gamma correction, followed by using a contrast-limited adaptive histogram equalization method to perform local contrast enhancement on each sub-region, and smoothing adjacent regions using a bilinear interpolation algorithm.

[0012] Furthermore, a preferred embodiment is provided, wherein the image enhancement processing of the overexposed image includes first generating a negative image by subtracting the maximum pixel value from the gray value of each pixel, then performing gamma correction and multi-scale adaptive histogram equalization on the negative image to restore details, and finally inverting the enhanced negative image to restore it to obtain an enhanced image with balanced brightness.

[0013] Furthermore, a preferred implementation is provided, wherein the gradient calculation uses the Sobel operator to process the enhanced image, calculates the brightness change rate in the horizontal and vertical directions respectively, constructs a Hessian matrix based on the change rate, and determines the intensity of local curvature change at the corner points by calculating the principal eigenvalues.

[0014] Furthermore, a preferred embodiment is provided, wherein the feature selection process includes dividing the entire enhanced image into multiple regular grid regions, setting a maximum number of feature points and a minimum spacing threshold for each grid, sorting the feature points within the same grid in descending order according to the size of the feature value, and retaining a number of feature points with the highest feature value.

[0015] Based on the same inventive concept, this invention also provides a SLAM front-end optimization method based on brightness gradation and gradient constraints, including: The steps include: acquiring input image frames captured by the camera in an indoor environment; statistically calculating the grayscale values ​​of all pixels in the input image to obtain the average brightness; and comparing it with preset low brightness thresholds and high brightness thresholds to classify the input image into three categories: low-light image, normal lighting image, and overexposed image. Based on the classification results, corresponding image enhancement processing is performed on images of different categories. For low-light images, the gamma correction parameters are determined according to the gray-level distribution accumulation function and gamma correction is performed. Then, the contrast-limited adaptive histogram equalization method is used to enhance the image at multiple scales, and the region boundaries are smoothed using an interpolation algorithm to obtain the enhanced low-light image. For normal lighting images, the images are directly output to the subsequent processing module to keep the original features unchanged. For overexposed images, the process involves generating a negative image by inversion, performing gamma correction and adaptive histogram equalization processing, and then inverting the enhancement result to restore the enhanced overexposed image. The steps include: performing gradient calculation on the enhanced image to obtain the brightness change rate in the horizontal and vertical directions, constructing a Hessian matrix based on the gradient results, calculating the principal eigenvalues ​​to characterize the degree of local curvature change, and outputting feature point quality information. The steps are as follows: perform FAST feature detection on the enhanced image to obtain candidate feature points, assign the feature points to preset grid cells according to their coordinates, sort them according to the feature value of each feature point, retain a number of feature points with the highest feature value and whose spacing meets the constraint conditions, and remove the remaining feature points to output a high-quality feature point set after filtering. The steps involve using a masking mechanism to dynamically update the feature distribution, marking high-density regions that have been successfully tracked in adjacent frames as masked regions, marking sparse regions as regions of interest, performing new feature detection and tracking on regions of interest, and outputting a spatially balanced and high-quality set of feature points. The high-quality feature points, after brightness gradation enhancement, gradient constraint screening, and mask optimization, are input into the SLAM front-end pose estimation module to achieve a balance between feature matching accuracy and system real-time performance.

[0016] Based on the same inventive concept, the present invention also provides a computer storage medium for storing a computer program, wherein when the computer program is read by a computer, the computer executes the method described thereon.

[0017] Based on the same inventive concept, the present invention also provides a computer, including a processor and a storage medium, wherein when the processor reads a computer program stored in the storage medium, the computer executes the method described thereon.

[0018] Based on the same inventive concept, the present invention also provides a computer program product, which, when executed, implements the method described.

[0019] Compared with the prior art, the advantages of the technical solution provided by the present invention are as follows: This scheme achieves differentiated enhancement strategies for low-light, normal-light, and overexposed images by evaluating and grading the brightness of the input image, significantly improving image quality under complex lighting conditions. Unlike the uniform enhancement processing commonly used in existing technologies, this scheme introduces the CDF cumulative distribution function to determine gamma parameters in low-light images, and then combines it with Local Adaptive Histogram Equalization (CLAHE) for multi-scale enhancement, effectively improving details in dark areas and avoiding the problem of traditional global gamma correction ignoring local details. In overexposed image processing, bright areas are converted to dark areas by negative inversion, followed by gamma correction and CLAHE processing, effectively restoring detail information in highlight areas. This brightness-grading-based enhancement method enables the system to adapt to different lighting conditions, achieving a dynamic balance between brightening dark areas and suppressing bright areas, providing clear and richly layered image input for subsequent feature extraction, and significantly improving the robustness and matching accuracy of the SLAM front-end.

[0020] This scheme introduces a dynamic adjustment mechanism based on image contrast and standard deviation in the CLAHE parameter settings, effectively solving the problems of over-enhancement or loss of detail in traditional fixed-parameter CLAHE algorithms at different image scales. By dynamically controlling the size of sub-regions and the maximum contrast limit according to the image pyramid hierarchy and local contrast features, the scheme can preserve edge details in high-contrast areas and enhance texture information in low-contrast areas, thereby maintaining the overall visual naturalness and structural integrity of the image. Compared with the block artifacts and color distortion problems easily generated by multi-scale fusion or Retinex models in existing methods under sudden changes in illumination, the parameter adaptive CLAHE of this scheme can reduce noise amplification while ensuring processing speed, significantly improving the real-time performance and visual consistency of SLAM systems in complex lighting environments.

[0021] This scheme introduces a feature quality assessment mechanism based on gradient information and eigenvalue constraints in feature point detection. It constructs a Hessian matrix using the gradient changes in the horizontal and vertical directions of the image, and judges corner point stability by the magnitude of its principal eigenvalues, prioritizing the retention of feature points with significant local curvature changes. Compared to traditional methods like FAST or Harris operators that simply rely on grayscale change thresholds, this approach more accurately identifies geometrically distinct and trackable feature points, effectively suppressing false detections of noisy points and blurred regions. Compared to existing methods, this eigenvalue-based corner point selection mechanism significantly improves feature point reliability while maintaining detection speed, providing high-quality input for subsequent inter-frame matching and pose estimation, and reducing tracking drift and matching errors.

[0022] This scheme combines feature gridding distribution with mask constraints. By setting maximum feature point count and minimum spacing limits for each grid, it achieves balanced feature space distribution and dynamic control of computational resources. Traditional feature detection algorithms often exhibit dense feature points in high-texture areas and sparse features in low-texture areas, leading to matching failures or unstable pose estimation. This scheme, through gridding and mask filtering, ensures uniform distribution of feature points across the entire image and automatically masks saturated areas, avoiding redundant detection and computation. This design improves feature coverage and matching success rate while maintaining a moderate overall feature count, effectively reducing the computational overhead of the SLAM front-end and achieving a dual improvement in feature detection accuracy and real-time performance.

[0023] This solution organically combines the image enhancement module and the feature detection module into an integrated front-end processing flow. By performing adaptive brightness enhancement before feature extraction, the input image maintains stable contrast and detail information under different lighting conditions, thereby making gradient and feature value calculations more accurate. Compared with the traditional approach of performing image enhancement and feature extraction independently, this solution optimizes the data flow in the algorithm structure, avoiding redundant calculations and feature distortion. In multi-dataset experiments, the proposed method significantly outperforms existing typical algorithms in both peak signal-to-noise ratio and structural similarity index, and reduces the average processing time by approximately 40%. This ensures high real-time performance while maintaining image quality, providing efficient support for the robust operation of SLAM systems in complex indoor environments.

[0024] It is suitable for front-end image enhancement and feature extraction in visual SLAM systems in complex indoor environments. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of an image enhancement algorithm based on brightness gradation; Figure 2 This diagram illustrates the enhancement effect of the algorithm of this invention compared with seven other algorithms. Figure 3 This is a schematic diagram showing the comprehensive simulation results of the seven algorithms. Detailed Implementation

[0026] To make the advantages and benefits of the technical solution provided by the present invention clearer, the technical solution provided by the present invention will now be described in further detail with reference to the accompanying drawings, specifically: Implementation Method 1: This implementation method provides a SLAM front-end optimization method based on brightness gradation and gradient constraints, including: The steps include: acquiring input image frames captured by the camera in an indoor environment; statistically calculating the grayscale values ​​of all pixels in the input image to obtain the average brightness; and comparing it with preset low brightness thresholds and high brightness thresholds to classify the input image into three categories: low-light image, normal lighting image, and overexposed image. Based on the classification results, corresponding image enhancement processing is performed on images of different categories. For low-light images, the gamma correction parameters are determined according to the gray-level distribution accumulation function and gamma correction is performed. Then, the contrast-limited adaptive histogram equalization method is used to enhance the image at multiple scales, and the region boundaries are smoothed using an interpolation algorithm to obtain the enhanced low-light image. For normal lighting images, the images are directly output to the subsequent processing module to keep the original features unchanged. For overexposed images, the process involves generating a negative image by inversion, performing gamma correction and adaptive histogram equalization processing, and then inverting the enhancement result to restore the enhanced overexposed image. The steps include: performing gradient calculation on the enhanced image to obtain the brightness change rate in the horizontal and vertical directions, constructing a Hessian matrix based on the gradient results, calculating the principal eigenvalues ​​to characterize the degree of local curvature change, and outputting feature point quality information. The steps are as follows: perform FAST feature detection on the enhanced image to obtain candidate feature points, assign the feature points to preset grid cells according to their coordinates, sort them according to the feature value of each feature point, retain a number of feature points with the highest feature value and whose spacing meets the constraint conditions, and remove the remaining feature points to output a high-quality feature point set after filtering. The steps involve using a masking mechanism to dynamically update the feature distribution, marking high-density regions that have been successfully tracked in adjacent frames as masked regions, marking sparse regions as regions of interest, performing new feature detection and tracking on regions of interest, and outputting a spatially balanced and high-quality set of feature points. The high-quality feature points, after brightness gradation enhancement, gradient constraint screening, and mask optimization, are input into the SLAM front-end pose estimation module to achieve a balance between feature matching accuracy and system real-time performance.

[0027] The average brightness of the input image is obtained by summing the gray values ​​of all pixels in the image and dividing by the total number of pixels. The low brightness threshold and high brightness threshold are preset based on experimental statistical results and are used to distinguish between low-light images, normal-light images and overexposed images.

[0028] Image enhancement processing for low-light images involves first calculating the cumulative distribution function based on the image's grayscale distribution frequency to determine the gamma correction parameters, then performing gamma correction, followed by using a contrast-limited adaptive histogram equalization method to enhance the local contrast of each sub-region, and finally smoothing adjacent regions using a bilinear interpolation algorithm.

[0029] Image enhancement processing for overexposed images includes first generating a negative image by subtracting the maximum pixel value from the gray value of each pixel, then performing gamma correction and multi-scale adaptive histogram equalization on the negative image to restore details, and finally inverting the enhanced negative image to restore the image and obtain a brightness-balanced enhanced image.

[0030] The gradient calculation uses the Sobel operator to process the enhanced image, calculates the brightness change rate in the horizontal and vertical directions respectively, and constructs a Hessian matrix based on the change rate. The intensity of local curvature change at the corner points is determined by calculating the principal eigenvalues.

[0031] The feature selection process involves dividing the entire enhanced image into multiple regular grid regions, setting a maximum number of feature points and a minimum spacing threshold for each grid, sorting the feature points within the same grid in descending order according to their feature values, and retaining the feature points with the highest feature values.

[0032] A SLAM front-end optimization method based on brightness gradation and gradient constraints is also provided, including: The steps include: acquiring input image frames captured by the camera in an indoor environment; statistically calculating the grayscale values ​​of all pixels in the input image to obtain the average brightness; and comparing it with preset low brightness thresholds and high brightness thresholds to classify the input image into three categories: low-light image, normal lighting image, and overexposed image. Based on the classification results, corresponding image enhancement processing is performed on images of different categories. For low-light images, the gamma correction parameters are determined according to the gray-level distribution accumulation function and gamma correction is performed. Then, the contrast-limited adaptive histogram equalization method is used to enhance the image at multiple scales, and the region boundaries are smoothed using an interpolation algorithm to obtain the enhanced low-light image. For normal lighting images, the images are directly output to the subsequent processing module to keep the original features unchanged. For overexposed images, the process involves generating a negative image by inversion, performing gamma correction and adaptive histogram equalization processing, and then inverting the enhancement result to restore the enhanced overexposed image. The steps include: performing gradient calculation on the enhanced image to obtain the brightness change rate in the horizontal and vertical directions, constructing a Hessian matrix based on the gradient results, calculating the principal eigenvalues ​​to characterize the degree of local curvature change, and outputting feature point quality information. The steps are as follows: perform FAST feature detection on the enhanced image to obtain candidate feature points, assign the feature points to preset grid cells according to their coordinates, sort them according to the feature value of each feature point, retain a number of feature points with the highest feature value and whose spacing meets the constraint conditions, and remove the remaining feature points to output a high-quality feature point set after filtering. The steps involve using a masking mechanism to dynamically update the feature distribution, marking high-density regions that have been successfully tracked in adjacent frames as masked regions, marking sparse regions as regions of interest, performing new feature detection and tracking on regions of interest, and outputting a spatially balanced and high-quality set of feature points. The high-quality feature points, after brightness gradation enhancement, gradient constraint screening, and mask optimization, are input into the SLAM front-end pose estimation module to achieve a balance between feature matching accuracy and system real-time performance.

[0033] A computer storage medium is also provided for storing a computer program, which, when read by the computer, executes the method.

[0034] A computer is also provided, including a processor and a storage medium, wherein the computer executes the method when the processor reads a computer program stored in the storage medium.

[0035] A computer program product is also provided, which, when executed, implements the method described.

[0036] Implementation Method Two: This implementation method is a further detailed description of the technical solution provided in Implementation Method One, specifically: A specific implementation of a SLAM front-end optimization method based on brightness gradation and gradient constraints is as follows: First, raw image frames continuously captured by the camera in an indoor environment are acquired and used as the front-end input for the SLAM system. Due to the complex and frequently changing indoor lighting, to ensure the stability and accuracy of feature point extraction and matching, the system first evaluates the brightness of the input image, calculating the average brightness of all pixel grayscale values ​​in the entire image. Using preset low-brightness and high-brightness thresholds as boundaries, the input image is categorized into three types based on the average brightness: low-light images, normal-light images, and overexposed images. This step outputs image brightness category information, providing a classification basis for subsequent adaptive image enhancement processing.

[0037] Next, based on the classification results, the system executes corresponding image enhancement strategies for images of different brightness levels. For low-light images, the gray-level distribution frequency is first calculated and its cumulative distribution function is obtained to determine the gamma correction parameters. Overall brightness is then improved through nonlinear intensity stretching. Then, a contrast-limited adaptive histogram equalization method is applied to the gamma-corrected image. The image is divided into several sub-regions, and the histogram distribution of each sub-region is calculated and local equalization is performed, thereby enhancing details in dark areas and improving texture contrast. To eliminate discontinuities at the boundaries of each sub-region, bilinear interpolation is used to smoothly transition between adjacent regions, outputting the enhanced low-light image.

[0038] For images under normal lighting, the system determines that their brightness and contrast are within a reasonable range, skips the enhancement step, and sends the image to the subsequent feature detection and matching module to reduce unnecessary computational overhead and maintain the naturalness of the original features.

[0039] For overexposed images, the system first performs an image inversion operation, swapping bright and dark areas to darken the original highlights, resulting in an inverted negative image. Then, the same gamma correction and multi-scale adaptive histogram equalization process as for the low-light image is performed on this negative image. By adjusting the local contrast limit threshold and sub-region size, details in the bright areas are restored. Finally, the enhanced image is inverted again to the normal brightness orientation, resulting in an enhanced image with restored bright area details. This step outputs an image after brightness grading and enhancement processing, providing high-quality input for feature detection.

[0040] Subsequently, gradient calculations are performed on the enhanced image to obtain the brightness change rate information in the horizontal and vertical directions, reflecting image texture changes and edge direction distribution. Based on the gradient results, a Hessian matrix is ​​constructed at each pixel location, and two principal eigenvalues ​​of this matrix are calculated to quantify the degree of local curvature change at that point. Larger eigenvalues ​​indicate more significant grayscale changes in the two principal directions, suggesting a potentially high-quality corner point. This step outputs the eigenvalue information for each candidate feature point, providing a quality basis for feature selection.

[0041] Next, the system performs preliminary feature point detection in the enhanced image based on the FAST algorithm, quickly identifying regions with significant local brightness variations as candidate feature points. To avoid feature points being concentrated in areas with rich local texture, the system divides the entire image into multiple regular grids and sets a maximum number of feature points and a minimum spacing constraint for each grid. Detected feature points are assigned to corresponding grid cells based on their coordinates. For feature points within each grid, the system sorts them according to the eigenvalues ​​calculated from the Hessian matrix, prioritizing the retention of the feature points with the largest eigenvalues ​​and removing low-quality or overly dense feature points, thus ensuring a uniform distribution and high stability of feature points. This step outputs a set of high-quality feature points after filtering.

[0042] Then, the system further optimizes the feature distribution using a masking mechanism. In adjacent image frames, feature points that were successfully tracked in the previous frame are detected, and regions with dense features are marked as masked areas to avoid repeated detection; while regions with sparse features or that have not reached the threshold are marked as regions of interest, and new features are extracted and tracked preferentially. Through dynamic updates of the mask markings, the feature detection process can adaptively adjust the detection area according to environmental changes, achieving a balance between the stability of feature point detection and computational efficiency.

[0043] Finally, the system inputs the selected high-quality feature points into the matching and pose estimation module of the SLAM front end. Since the input image has been adaptively enhanced at the brightness level, the feature points have high geometric stability and contrast consistency, thus significantly improving the success rate of feature matching and the accuracy of pose estimation. Through the connection of the input and output of the above consecutive steps, the entire method forms a complete closed-loop process from image acquisition, brightness grading, enhancement processing, gradient calculation, feature selection to feature mask update.

[0044] This implementation method can effectively address the image feature degradation problem in complex indoor lighting and fast-moving scenarios, and achieve adaptive optimization of SLAM front-end image enhancement and feature detection. It not only improves the robustness and matching stability of the system, but also takes into account real-time performance and computational efficiency, making it suitable for widespread application in vision-inertial fusion positioning and navigation systems.

[0045] In its implementation, this SLAM front-end optimization method based on brightness gradation and gradient constraints first inputs continuous frame image data from the camera into the image acquisition module of the visual SLAM system. After receiving each frame, the system performs statistical calculations on the grayscale values ​​of all pixels, obtaining the overall brightness level of the image by calculating the average of the pixel grayscale values. To distinguish images under different lighting conditions, the system pre-sets low-brightness and high-brightness thresholds. If the average brightness is below the low-brightness threshold, it is determined to be a dark image; if it is above the high-brightness threshold, it is determined to be an overexposed image; if it is between the two, it is considered a normally lit image. In this way, the system achieves rapid identification of the lighting state of the input image, providing a basis for subsequent targeted enhancement processing.

[0046] After classifying the image brightness, the system performs differentiated enhancement operations for different image types. For low-light images, the system first calculates the image's gray-level histogram and its cumulative distribution function, using this function to calculate the gamma correction parameter. The value of the gamma parameter determines the magnitude of brightness stretching; a parameter greater than 1 increases image brightness, while a parameter less than 1 decreases it. The system performs gamma correction based on this parameter, non-linearly stretching the dark areas of the image to enhance brightness. To further enhance image details and contrast, the system performs contrast-limited adaptive histogram equalization on the gamma-corrected image. The image is divided into several sub-regions, and a gray-level histogram is calculated and locally equalized for each sub-region, making the brightness distribution more uniform and thus enhancing texture details. To avoid edge breaks between regions, the system uses bilinear interpolation for smooth transitions between sub-regions, ensuring continuous brightness changes and ultimately outputting the enhanced low-light image.

[0047] For images under normal lighting conditions, the system does not perform any enhancement operations but directly passes the image to the subsequent feature detection module. This design avoids over-enhancement under suitable lighting conditions, thereby preventing noise amplification and feature distortion problems, and ensuring that the images processed by the SLAM system retain their original characteristics in terms of structural and lighting consistency.

[0048] For overexposed images, the system first performs an image inversion operation, subtracting the original pixel value from the maximum grayscale value of each pixel to obtain the corresponding negative image, thus darkening the originally bright areas and brightening the originally dark areas. This inverted image then undergoes gamma correction and adaptive histogram equalization to restore detail information in the bright areas. Gamma correction improves the evenness of brightness distribution, while adaptive histogram equalization suppresses localized highlights and enhances low-brightness areas. After enhancement, the system performs another image inversion operation to restore the image to its normal brightness orientation, outputting an enhanced image with balanced brightness and rich detail. Through graded processing of low-light, normal-light, and overexposed images, the system maintains a balance of sharpness and contrast under different lighting conditions, significantly improving the quality of the input image.

[0049] After image enhancement, the system proceeds to feature detection. First, the system calculates the gradient information of the enhanced image, using the Sobel operator to calculate the rate of change of brightness in the horizontal and vertical directions. Gradient information characterizes the direction and intensity of brightness changes in the image, thus reflecting the location of edges and corners. Based on this, the system constructs a Hessian matrix at each pixel and calculates its two principal eigenvalues ​​to determine the degree of local curvature change at that point. If both eigenvalues ​​are large, it indicates that the point has significant brightness changes in both the horizontal and vertical directions, making it a potential high-quality corner. The system uses these eigenvalues ​​as a measure of feature point quality, providing a quantitative standard for subsequent feature selection.

[0050] Subsequently, the system employs the FAST feature detection algorithm to perform preliminary feature detection on the enhanced image. This algorithm identifies regions with significant brightness variations as candidate feature points by rapidly comparing the brightness differences between the center pixel and its surrounding pixels. To prevent feature points from clustering in local high-texture areas, the system divides the entire image into multiple uniformly sized regular grids, setting maximum feature point counts and minimum spacing limits for each grid. Detected feature points are assigned to corresponding grid cells based on their coordinate positions, and within each grid, they are sorted according to their feature values. Only a few feature points with larger feature values ​​are retained, while the rest are discarded. This step effectively controls the number and distribution density of feature points, making them more spatially uniform, reducing feature redundancy in local areas, and improving the accuracy of subsequent feature matching.

[0051] After feature selection, the system further utilizes a masking mechanism to dynamically adjust the feature detection region. In consecutive image frames, the system detects feature points successfully tracked in the previous frame, marking densely packed areas as masked regions. These masked regions are not subject to further feature detection to avoid redundant computation. Regions with sparse feature points or where tracking has failed are marked as regions of interest (ROIs), where the system prioritizes new feature detection and matching. This dynamic masking mechanism allows the system to adaptively adjust the detection region based on scene changes and camera motion, thereby maintaining a stable number of feature points and reducing computational burden.

[0052] Finally, the system inputs the high-quality feature points, which have undergone brightness enhancement, gradient calculation, feature filtering, and mask optimization, into the matching and pose estimation module of the SLAM front end. Because the input image undergoes adaptive enhancement, the feature points have higher clarity and stability, exhibiting a higher matching success rate and a lower error rate during the feature matching stage, thus significantly improving the positioning accuracy and robustness of the entire SLAM system. This implementation method, while ensuring stable extraction of image features, reduces unnecessary computation, improves the real-time performance and efficiency of front-end processing, and is suitable for multi-sensor fusion visual inertial navigation systems and autonomous localization and mapping tasks in complex indoor environments.

[0053] Implementation Method 3: Combination Figure 1-3 This embodiment describes the technical solution provided above in further detail through specific examples. Specifically: Image enhancement algorithm based on brightness gradation In real indoor environments, images captured by cameras are often affected by various complex lighting conditions, posing a significant challenge to feature point extraction and matching. For example, rapidly changing lighting conditions can lead to insufficient or lost image texture information, resulting in a significant reduction in the number of feature points extracted by the camera, thus interfering with inter-frame matching and causing tracking failure. Many visual odometry algorithms perform image enhancement as a single image processing step. While this can effectively improve image quality, applying it indiscriminately to all images can lead to over-enhancement of images under normal lighting conditions, causing unnecessary noise. Furthermore, excessive image processing increases computational load and affects the system's real-time performance. This implementation proposes a brightness-graded image enhancement algorithm. The acquired images are first evaluated for brightness, categorized into three types: low light, normal, and overexposed. Then, different methods are used to enhance the images, such as... Figure 1 As shown.

[0054] The system first considers a size of Image The average brightness is determined by summing all pixel values ​​in the image and dividing by the number of pixels. :

[0055] in, It is a location The system then compares the pixel values ​​at that location with the average brightness of the image. Based on the brightness threshold, the input image is divided into three categories: dark, normal, and overly bright, as shown in the following formula:

[0056] in, It is the threshold for low brightness. This is the threshold for high brightness. The system applies different enhancement strategies to images at three different brightness levels.

[0057] (1) For low-light images, first calculate their CDF cumulative distribution function:

[0058] in, It is accumulated to pixel intensity The distribution value. Indicates pixel intensity The frequency, which is also the intensity in the histogram. The number of pixels. This represents the total number of pixels in an 8-bit grayscale image, while This is used to calculate the weighted distribution of the intensity of a given pixel. Based on this, the gamma parameters are determined:

[0059] in It is a predefined constant. When When the value is greater than 1, the image becomes brighter; when the value is less than 1, the image becomes brighter. When <1, the image darkens; when When =1, the image brightness remains unchanged. It is the selected pixel intensity threshold. The pixel intensity is The CDF value at that time. Assuming... The original image is in The pixel value at the location, based on the known gamma parameters, can be obtained using equation (2-5) after gamma correction. .

[0060]

[0061] Gamma correction is a non-linear intensity stretching method that is particularly effective for very dark images. However, when applied globally, it may neglect local image details, thus affecting the stability of feature point extraction and tracking. To further enhance image details, this implementation uses the CLAHE technique to compensate for the shortcomings of gamma correction as a global operation, while avoiding over-enhancement or noise amplification.

[0062] First, use CDF to equalize the pixel values ​​of each sub-region in the image:

[0063] In equation (2-6), The size of the sub-region When applying an 8-bit image at the pixel intensity level, It was set to 255.

[0064] Secondly, based on a set contrast limit threshold, pixels exceeding that threshold are evenly distributed across the entire histogram. To eliminate boundary effects between blocks, interpolation methods are used to ensure the smoothness and continuity of the image. Taking bilinear interpolation as an example, assuming... , , and The equilibrium values ​​of the four adjacent sub-regions are:

[0065] in , , and These values ​​are obtained through linear interpolation at the top left, top right, bottom left, and bottom right corners, respectively. The entire interpolation process is performed over four adjacent sub-regions, each with its own interpolation term. The final interpolated pixel value is obtained by weighted averaging, and is represented as follows: .

[0066] In environments with dynamically changing lighting, acquired images may contain areas of direct sunlight or significant shadows. To ensure that the image pyramid can effectively capture features at various scales in these complex scenes, this implementation applies parameterized CLAHE at each level based on the image's contrast properties. This method not only prevents noise amplification and detail loss due to over-enhancement but also improves the system's ability to adapt to changes in lighting. Furthermore, combining this method with the multi-scale processing of the image pyramid ensures consistent representation of the same feature point under various lighting conditions, reducing feature matching errors and thus improving the matching rate between feature points.

[0067] Since image contrast can be quantified by its standard deviation, which is a statistical measure describing the range of data distribution, a larger standard deviation for images indicates higher contrast. Therefore, this implementation first calculates the standard deviation of the image. :

[0068] in, This is the total number of pixels in the image, equal to the image width multiplied by its height. Pixel numbers in the image. The intensity value is expressed as .

[0069] Then, this embodiment applies an improved CLAHE image enhancement method to process the image at different scales and contrasts:

[0070] in It is the size of the sub-region. It is the scaling factor of the image, which is related to the scale of the image pyramid and ranges between [0,1]. It is the basic adjustment coefficient. express Changes The impact of amplitude changes. It is an integer operation. This is the maximum allowable contrast enhancement. It is the basic adjustment coefficient. When indicating contrast changes The range of change, It is the median of the image intensity.

[0071] Controlling contrast to enhance intensity, increase Highlight details and reduce This will enhance smoothness and maintain a natural look. Control the size of the sub-region, increase To process large-scale features to enhance overall contrast and reduce Suitable for handling local details while retaining more information.

[0072] Dynamic adjustment of the CLAHE parameters based on image contrast ensures enhancement effects across various image scales, optimizes computational efficiency, and reduces redundant enhancement operations. Furthermore, in uncontrollable and variable environments, images may experience frequent illumination changes. For example, some areas of an image may be directly exposed to sunlight, while others are in shadow. Multi-scale enhancement strategies combined with dynamic parameter adjustment ensure that all areas are appropriately processed.

[0073] (2) For images with normal brightness, this embodiment directly sends them to the subsequent feature detection and extraction steps. This avoids unnecessary computational overhead while maintaining the feature invariance of the image.

[0074] (3) For overly bright images This implementation first subtracts each pixel value in the original image from the maximum pixel value to create a corresponding negative image:

[0075] The purpose of creating a negative image is to darken the bright areas and brighten the dark areas of the original image. This step transforms an overly bright image into a dark image, which is then enhanced using gamma correction and multi-scale CLAHE.

[0076] Finally, the overly bright image is obtained by inverting the enhanced negative image using the maximum pixel value.

[0077] Point feature detection method based on gradient and eigenvalue constraints To address the challenges of high sensor frequency and an increasing number of images to be processed per second in real-world indoor scenes, many current visual-inertial SLAM algorithms suffer from slow front-end module processing speeds. The next frame is input into the system before the previous one has been processed, leading to buffer overflows and frame loss. This increases the cumulative error in pose estimation and reduces accuracy. Therefore, this implementation uses the fast FAST algorithm and masking for feature point detection. Furthermore, it proposes gradient and eigenvalue constraints, along with feature point meshing, to improve the quality of detected point features and ensure accurate tracking and matching.

[0078] To further enhance the accuracy of feature points, the system processes the input image. Apply the gradient operator to calculate its level. and vertical gradient in direction and :

[0079] Gradient information reveals the direction and extent of pixel brightness variations in an image, helping to identify regions with significant changes and thus select high-quality corner points. For each identified feature point in the image, its gradient information is used to further construct a Hessian matrix:

[0080] In the formula, , and These represent the second-order partial derivatives of the image at that feature point along the horizontal and vertical directions, respectively. The eigenvalues ​​of matrix H... and The calculation is expressed as follows:

[0081] and This represents the degree of change in the local principal curvature directions of the image at that point. The larger the eigenvalue, the more curvature change there is at that point in both principal directions. Such eigenpoints are usually considered high-quality corner points with strong local texture and geometric properties, making them suitable for subsequent feature matching and tracking.

[0082] To avoid feature point clustering, set a maximum number of feature points per grid cell. Distance between minimum feature points Feature points are assigned to corresponding grids based on their coordinates, and the grid index is used for this purpose. Represented as:

[0083] In the formula, w and h represent the width and height of the grid, respectively. Each newly detected feature point... To be added to the grid, the following conditions must be met:

[0084] For all feature points within the grid, the feature values ​​calculated according to equation (3) are sorted, and the feature value with the highest value is selected and retained. One feature point is selected, and the remaining feature points are eliminated.

[0085] In summary, the steps for feature point detection are as follows: Step 1: Check the feature points that were successfully tracked from the previous frame to the next frame; Step 2: The masking process divides the current frame image into regions. Regions with a known number of feature points reaching a threshold are masked and marked as irrelevant regions, and these regions will not undergo feature extraction and tracking. Conversely, regions with fewer feature points than the threshold are masked and marked as regions of interest, and these regions will undergo normal feature processing.

[0086] Step 3: Use the FAST algorithm to quickly detect feature points in the region of interest; Step 4: Calculate the gradients of the input image in the horizontal (X) and vertical (Y) directions. and ; Step 5: Construct the Hessian matrix using gradient information and calculate the eigenvalues. and , used to evaluate the quality of feature points; Step 6: Divide the image into grids, assign the feature points to the corresponding grids according to their coordinates, and set constraints on the maximum number of feature points and the minimum spacing between feature points in each grid. Step 7: Perform feature point filtering, sorting the points within each grid according to their feature values ​​and retaining the points with the highest values. One feature point is selected, and the remaining feature points are removed.

[0087] This method retains the highest-quality feature points in each region, ensuring that even if some areas are blurred, other areas still provide high-quality feature points for tracking. Applying this method to indoor scenes with fast-moving cameras effectively reduces the impact of scattered feature point distribution, local occlusion, or motion blur on overall feature point tracking. Furthermore, by limiting the number of feature points through feature selection, this method reduces the computational load of subsequent feature matching, making it highly suitable for SLAM systems that require significant computational power to handle fast-moving scenes.

[0088] Image Enhancement Experiment Results and Analysis (1) Algorithm selection for comparison: To verify the effectiveness of image enhancement algorithms, six training-free real-time image enhancement algorithms—Dong, Fu, LIME, Ying, MF-LIME, and CLAHE—were selected as comparison algorithms. Among them, CLAHE is the most commonly used adaptive histogram equalization technique in the SLAM field. Dong enhances and denoises low-light images by inverting them and then using a dehazing algorithm and inter-frame correlation optimization to significantly improve processing speed. Fu's method estimates illumination based on morphological closing operations, generates multiple inputs through sigmoid function and adaptive histogram equalization, and then performs weighted multi-scale fusion, combining it with reflection images to enhance low-light images. LIME extracts the maximum pixel value from the RGB channels to estimate illumination and applies structural priors to refine the image, resulting in outstanding performance in improving brightness and restoring detail in low-light images. Ying designed an adaptive exposure map estimation algorithm based on the camera response model, controlling the mean square error to an order of magnitude lower than the traditional two-parameter model by finding the optimal exposure ratio and using image fusion techniques. The MF-LIME method primarily utilizes the Retinex model and multi-scale fusion technology. It restores image texture details through gamma correction and image sharpening, achieving fusion of the original and restored images within a multi-scale pyramid model. This results in excellent texture restoration even in complex low-light environments. Comparison with the six advanced algorithms mentioned above fully validates the image enhancement effect, processing speed, and auxiliary enhancement of subsequent feature point extraction in SLAM systems under complex indoor lighting conditions.

[0089] (2) Dataset selection This implementation addresses the problem of inaccurate pose estimation in visual-inertial SLAM systems caused by missing feature information in images acquired by cameras under low-light or over-exposed conditions in indoor environments. For the low-light image enhancement experiment, the LOL dataset was selected as the benchmark dataset. The LOL dataset is the first real-world image pair dataset specifically designed for low-light enhancement methods. It contains 500 pairs of images with normal and low lighting conditions, with 485 pairs used for training and 15 pairs for testing. During the acquisition process, camera parameters such as aperture and exposure compensation were kept constant to ensure pixel-level alignment between each image pair. A three-step method was used to eliminate misalignment caused by camera shake, object movement, and changes in lighting. This involved adjusting the camera's exposure time and ISO to acquire both low-light and normal-light reference images. The dataset covers various real-world indoor scenes, including houses, campuses, and clubs, and includes typical low-light problems in real-world environments, such as noise amplification, reduced contrast, and loss of detail. This aligns with the challenges faced by visual-inertial SLAM systems in complex indoor environments.

[0090] Secondly, for the overexposed image enhancement experiment, this implementation uses the Learning Multi-Scale Photo Exposure Correction Dataset proposed by Afifi et al. as the benchmark dataset. This dataset is based on MIT-Adobe FiveK raw RAW images and uses the Adobe Camera Raw SDK to simulate overexposed and underexposed images within a ±1.5EV range, covering the widest range of exposure errors currently available. Furthermore, the reference images are manually adjusted in the ProPhoto RGB color space and then converted to sRGB, ensuring the professionalism of the exposure correction target and narrowing the gap between the synthesized image and the real scene. The dataset contains 24,330 images, of which 5,905 are the test set, 750 are the validation set, and the remainder are the training set. Among these, there are 3,543 overexposed test images. This data characteristic, built based on a real photographic workflow and covering a complete exposure error spectrum, allows for a comprehensive evaluation of the algorithm's ability to correct overexposed problems.

[0091] (3) Evaluation indicators In this chapter, the simulation experiments use peak signal-to-noise ratio (PSNR), structural similarity (SSIM), and average running time as evaluation metrics for image enhancement quality and algorithm real-time performance.

[0092] The PSNR of an image can be mathematically expressed as the root mean square error between the original image and the processed image relative to the mean square error of the original image. The logarithm of . It can be expressed as:

[0093] in, and For the height and width of the image, and These represent the coordinates of a pixel in the current image and the reference image, respectively. For the current image and reference image The mean square error, This refers to the number of bits per pixel. The unit of PSNR for an image is dB; the higher this value, the better the image quality.

[0094] Image SSIM measures the correlation between two images based on three aspects: brightness, contrast, and structure. Among these, brightness... Contrast and structure These can be represented as follows:

[0095] in, , Representing images respectively and The mean, , These represent the variance of the image, respectively. Representing an image and The covariance. SSIM uses the mean, standard deviation, and covariance to evaluate luminance, contrast, and structural similarity, respectively. That is:

[0096] In equation (2-18), to avoid the denominator being 0, it is usually taken as 0. , , ,have:

[0097] Substituting equation (2-18) into equation (2-19), the SSIM of the image can finally be expressed as:

[0098] The SSIM value for an image is [-1, 1]. The larger the value, the more similar the enhanced image is to the original image in terms of brightness, contrast, and structure, and the better the enhancement quality.

[0099] (4) Experimental results and analysis This implementation selects eight representative images from the LOL and Exposure datasets, including four sets of indoor scenes under low-light conditions (Low_1 to Low_4) and four sets of overexposed conditions (High_1 to High_4). The brightness-gradient-based enhancement algorithm proposed in this implementation is compared and evaluated with six other mainstream algorithms. Experimental results are as follows: Figure 2 As shown, in low-light scenes (Low_1 and Low_3), the texture details of the bookshelves and the ground in the images enhanced by the algorithm of this implementation are clearly preserved and enhanced, while other comparison algorithms show varying degrees of detail loss or blurring. In the Low_4 scene, the algorithm of this implementation effectively suppresses the noise amplification problem common in the enhancement process, presenting a cleaner visual effect. In overexposed scenes (High_1 and High_3), the details of bright areas such as windows and walls in the images enhanced by the algorithm of this implementation are effectively restored, while the LIME and MF-LIME algorithms show obvious highlight clipping. In the High_4 scene, in the light and dark transition areas of people and walls, the CLAHE algorithm has obvious block effects or edge shadows, while the enhancement effect of the algorithm of this implementation is smoother and more natural.

[0100] In addition, this implementation compares each enhanced image with the original image provided in the dataset to calculate the PSNR and SSIM of the enhanced images from each algorithm, quantitatively evaluating the enhancement effect of the algorithm in indoor low-light or high-light scenes. In the experiment, for each image pair, each algorithm was run 5 times and the average value was taken as the experimental result, recorded in Tables 1 and 2. For the evaluation index PSNR, the higher the value, the less noise in the image, the lower the mean square error between the enhanced image and the standard image, the better the useful information in the image is preserved, and the more helpful it is to improve the quality of subsequent feature extraction in the visual SLAM system and reduce the feature mismatch rate. As analyzed in Table 1, in all low-light scenes, the algorithm proposed in this implementation obtained the highest PSNR value. Especially in the Low_4 scene, the PSNR value of the algorithm in this implementation reached 27.477 dB, which is about 7% higher than the second-best algorithm Ying and about 75% higher than the worst performing CLAHE. In overexposed scenes, the algorithm of this embodiment also achieved the highest PSNR value in most scenarios. In the High_1 scene, CLAHE performed best with a PSNR value of 16.153 dB, while the algorithm of this embodiment was second only to it with 15.778 dB, only 2.3% lower. For the evaluation metric SSIM, a higher value indicates better preservation of important structural information such as image texture and edges. This structural information is crucial for feature detection and extraction in visual SLAM systems. Analysis of Table 2 shows that the algorithm of this embodiment achieved the highest SSIM value in overexposed scenes. In low-light scenes, the algorithm of this embodiment also achieved the best value in most scenarios, especially in the Low_4 scene, where the SSIM value of this embodiment was 0.826 dB, an improvement of approximately 25.9% over its superior algorithm Ying. However, in the Low_2 scene, the algorithm of this embodiment performed slightly worse than Ying by approximately 6.17%.

[0101]

[0102] Because visual-inertial SLAM systems need to cope with alternating changes in lighting conditions—from excessively dark to overexposed and from normal to normal—indoor environments, rather than being limited to a specific scene, this implementation presents the average values ​​of six algorithms in three key metrics: PSNR, SSIM, and runtime, as shown in Table 3. It can be seen that the PSNR value of the image enhanced using the algorithm of this implementation reaches 19.242 dB, significantly higher than the other six algorithms, with an average improvement of approximately 46.61%. This indicates that the algorithm of this implementation has a significant advantage in overall image quality improvement. Simultaneously, the SSIM value of the algorithm of this implementation is also higher than other algorithms, with an average improvement of approximately 20.22%. This indicates that the image enhanced by this implementation better preserves the structural information of the image and is closer to the original image. Regarding the runtime of the algorithm, the algorithm of this implementation is on average 397% shorter than other algorithms. This shows that under complex indoor lighting conditions, the algorithm proposed in this implementation maintains high-quality image output while possessing a certain degree of real-time performance.

[0103]

[0104] In summary, the algorithm in this implementation provides more stable feature points in the processed image by balancing brightness distribution, preserving clear edge information, and maintaining consistency in the geometric structure of the scene. Adaptive hierarchical processing effectively addresses different lighting conditions, supporting the stable operation of the SLAM system in complex indoor environments.

[0105] The above description of several specific embodiments further details the technical solution provided by the present invention in order to highlight the advantages and benefits of the technical solution provided by the present invention. However, the above-described specific embodiments are not intended to limit the present invention. Any reasonable modifications and improvements to the present invention, combinations of embodiments, and equivalent substitutions based on the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A SLAM front-end optimization method based on brightness gradation and gradient constraints, characterized in that, include: The steps include: acquiring input image frames captured by the camera in an indoor environment; statistically calculating the grayscale values ​​of all pixels in the input image to obtain the average brightness; and comparing it with preset low brightness thresholds and high brightness thresholds to classify the input image into three categories: low-light image, normal lighting image, and overexposed image. Based on the classification results, corresponding image enhancement processing is performed on images of different categories. For low-light images, the gamma correction parameters are determined according to the gray-level distribution accumulation function and gamma correction is performed. Then, the contrast-limited adaptive histogram equalization method is used to enhance the image at multiple scales, and the region boundaries are smoothed using an interpolation algorithm to obtain the enhanced low-light image. For normal lighting images, the images are directly output to the subsequent processing module to keep the original features unchanged. For overexposed images, the process involves inverting the image to generate a negative image, performing gamma correction and adaptive histogram equalization, and then inverting the enhancement result to restore the enhanced overexposed image. The steps include: performing gradient calculation on the enhanced image to obtain the brightness change rate in the horizontal and vertical directions, constructing a Hessian matrix based on the gradient results, calculating the principal eigenvalues ​​to characterize the degree of local curvature change, and outputting feature point quality information. The steps are as follows: perform FAST feature detection on the enhanced image to obtain candidate feature points, assign the feature points to preset grid cells according to their coordinates, sort them according to the feature value of each feature point, retain a number of feature points with the highest feature value and whose spacing meets the constraint conditions, and remove the remaining feature points to output a high-quality feature point set after filtering. The steps involve using a masking mechanism to dynamically update the feature distribution, marking high-density regions that have been successfully tracked in adjacent frames as masked regions, marking sparse regions as regions of interest, performing new feature detection and tracking on regions of interest, and outputting a spatially balanced and high-quality set of feature points. The high-quality feature points, after brightness gradation enhancement, gradient constraint screening, and mask optimization, are input into the SLAM front-end pose estimation module to achieve a balance between feature matching accuracy and system real-time performance.

2. The SLAM front-end optimization method based on brightness gradation and gradient constraints according to claim 1, characterized in that, The average brightness of the input image is obtained by summing the gray values ​​of all pixels in the image and dividing by the total number of pixels. The low brightness threshold and high brightness threshold are preset based on experimental statistical results and are used to distinguish between low-light images, normal-light images and overexposed images.

3. The SLAM front-end optimization method based on brightness gradation and gradient constraints according to claim 1, characterized in that, Image enhancement processing for low-light images involves first calculating the cumulative distribution function based on the image's grayscale distribution frequency to determine the gamma correction parameters, then performing gamma correction, followed by using a contrast-limited adaptive histogram equalization method to enhance the local contrast of each sub-region, and finally smoothing adjacent regions using a bilinear interpolation algorithm.

4. The SLAM front-end optimization method based on brightness gradation and gradient constraints according to claim 1, characterized in that, Image enhancement processing for overexposed images includes first generating a negative image by subtracting the maximum pixel value from the gray value of each pixel, then performing gamma correction and multi-scale adaptive histogram equalization on the negative image to restore details, and finally inverting the enhanced negative image to restore the image and obtain a brightness-balanced enhanced image.

5. The SLAM front-end optimization method based on brightness gradation and gradient constraints according to claim 1, characterized in that, The gradient calculation uses the Sobel operator to process the enhanced image, calculates the brightness change rate in the horizontal and vertical directions respectively, and constructs a Hessian matrix based on the change rate. The intensity of local curvature change at the corner points is determined by calculating the principal eigenvalues.

6. The SLAM front-end optimization method based on brightness gradation and gradient constraints according to claim 1, characterized in that, The feature selection process involves dividing the entire enhanced image into multiple regular grid regions, setting a maximum number of feature points and a minimum spacing threshold for each grid, sorting the feature points within the same grid in descending order according to their feature values, and retaining the feature points with the highest feature values.

7. A SLAM front-end optimization method based on brightness gradation and gradient constraints, characterized in that, include: The steps include: acquiring input image frames captured by the camera in an indoor environment; statistically calculating the grayscale values ​​of all pixels in the input image to obtain the average brightness; and comparing it with preset low brightness thresholds and high brightness thresholds to classify the input image into three categories: low-light image, normal lighting image, and overexposed image. Based on the classification results, corresponding image enhancement processing is performed on images of different categories. For low-light images, the gamma correction parameters are determined according to the gray-level distribution accumulation function and gamma correction is performed. Then, the contrast-limited adaptive histogram equalization method is used to enhance the image at multiple scales, and the region boundaries are smoothed using an interpolation algorithm to obtain the enhanced low-light image. For normal lighting images, the images are directly output to the subsequent processing module to keep the original features unchanged. For overexposed images, the process involves inverting the image to generate a negative image, performing gamma correction and adaptive histogram equalization, and then inverting the enhancement result to restore the enhanced overexposed image. The steps include: performing gradient calculation on the enhanced image to obtain the brightness change rate in the horizontal and vertical directions, constructing a Hessian matrix based on the gradient results, calculating the principal eigenvalues ​​to characterize the degree of local curvature change, and outputting feature point quality information. The steps are as follows: perform FAST feature detection on the enhanced image to obtain candidate feature points, assign the feature points to preset grid cells according to their coordinates, sort them according to the feature value of each feature point, retain a number of feature points with the highest feature value and whose spacing meets the constraint conditions, and remove the remaining feature points to output a high-quality feature point set after filtering. The steps involve using a masking mechanism to dynamically update the feature distribution, marking high-density regions that have been successfully tracked in adjacent frames as masked regions, marking sparse regions as regions of interest, performing new feature detection and tracking on regions of interest, and outputting a spatially balanced and high-quality set of feature points. The high-quality feature points, after brightness gradation enhancement, gradient constraint screening, and mask optimization, are input into the SLAM front-end pose estimation module to achieve a balance between feature matching accuracy and system real-time performance.

8. A computer storage medium for storing computer programs, characterized in that, When the computer program is read by the computer, the computer executes the method of claim 1.

9. A computer, comprising a processor and a storage medium, characterized in that, When the processor reads the computer program stored in the storage medium, the computer executes the method of claim 1.

10. A computer program product, as a computer program, is characterized by: When the computer program is executed, it implements the method of claim 1.

Citation Information

Cited By

  • Visual SLAM front-end camera parameter configuration method and device, medium and equipment

    CN122093670A

  • Method for enhancing and displaying low-light remote sensing images

    CN122243754A