Reflection noise suppression method for light supplement photo
By using ORB feature point extraction, KNN and RANSAC algorithm matching, homography matrix calculation and Gaussian mask fusion, the problem of reflective noise in supplementary lighting photos is solved, achieving efficient noise suppression and detail restoration, and is suitable for image processing in complex indoor scenes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA YANGTZE POWER
- Filing Date
- 2026-01-14
- Publication Date
- 2026-05-12
AI Technical Summary
When supplemental lighting is applied in a dimly lit indoor environment, reflective areas cause a loss of detail in the photograph. Existing technologies struggle to effectively suppress reflective noise, which affects image analysis and processing.
ORB feature point extraction is combined with KNN and RANSAC algorithms for feature matching, homography matrix is calculated, and reflective noise region is fitted by Gaussian distribution to generate dynamic Gaussian mask for weight fusion to suppress reflective noise.
It effectively suppresses reflective noise, restores image details, improves image quality, adapts to complex scenes, reduces computational costs, and achieves stable and consistent noise suppression effects.
Smart Images

Figure CN122023481A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated inspection technology, and in particular to a method for suppressing reflective noise in supplemental lighting photographs. Background Technology
[0002] In modern industrial production and automated inspection, robots are widely used in various complex environmental tasks, especially in indoor environments for inspecting critical components and equipment. These tasks typically require the use of vision sensors, such as cameras, to acquire image information of the equipment for condition monitoring, fault diagnosis, and data recording.
[0003] However, in dimly lit indoor environments, natural lighting is often insufficient for high-quality imaging. To ensure image sharpness and detail, supplemental lighting is usually required for the subject. While supplemental lighting significantly improves the overall brightness of the image, it also introduces new problems: due to the reflective properties of the equipment surface, strong reflective areas are created in the photograph after supplemental lighting. These reflective areas are often very bright, even overexposed, causing a complete loss of detail within these areas, rendering them unusable for subsequent analysis and processing. Therefore, effectively suppressing reflective noise after supplemental lighting and restoring image detail has become a pressing technical problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to overcome the above-mentioned shortcomings and provide a method for suppressing reflection noise in supplemental lighting photos, so as to effectively suppress reflection noise after supplemental lighting and restore the details of the image.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for suppressing reflection noise in supplemental lighting photographs, comprising the following steps: Step 1, ORB Feature Extraction: The ORB feature point extraction method is used, combined with FAST feature point detection and BRIEF descriptors, to extract feature points and their descriptors in the image; Step 2, Feature point matching: The extracted feature points are matched using the KNN algorithm, the Hamming distance is used to measure the similarity of descriptors, and then the RANSAC algorithm is used to remove outliers from the matched point pairs. Step 3: Calculate the homography matrix: Based on the matching point pairs after outlier removal, construct a system of linear equations, initially solve the homography matrix using the least squares method, and then refine the matrix parameters using the Levenberg-Marquardt method to obtain the final homography matrix; Step 4: Dynamic weight fusion of reflective noise regions: After image stitching is completed, a brightness threshold is set to identify reflective noise regions. A Gaussian distribution is used to fit the distribution of reflective noise pixels and generate a Gaussian mask. Dynamic weights are calculated based on the Gaussian mask, and pixels in overlapping regions are fused.
[0006] Preferably, in step 1, the FAST feature point detection includes: defining a circular region around each pixel p, which consists of N equally spaced pixels; the algorithm compares the brightness of the central pixel p. brightness of the surrounding N pixels We use this to determine whether p is a feature point.
[0007] Preferably, in step 1, the BRIEF descriptor includes: for each feature point Within its neighborhood, select n pairs of pixels. And compare the grayscale values of each pair of pixels; if If the j-th bit of the descriptor is 1, then the j-th bit is 1; otherwise, it is 0. The final generated descriptor is a binary vector of length n.
[0008] Preferably, in step 2, matching the extracted feature points using the KNN algorithm and measuring descriptor similarity using Hamming distance includes: using the KNN algorithm, with Hamming distance as the measure of descriptor similarity, calculating the Hamming distance between the descriptor of each feature point in each image and the descriptors of all feature points in other images, and filtering nearest neighbor feature points based on the magnitude of the Hamming distance to achieve preliminary feature point matching.
[0009] Preferably, in step 2, the outlier removal of matched point pairs using the RANSAC algorithm includes: Step 2.1: Randomly select 4 point pairs from the matched point pairs to estimate the model parameters of the plane homography transformation; Step 2.2: Estimate the homography matrix using the selected point pairs, substitute all matching point pairs into the model, and calculate the reprojection error for each point pair; Step 2.3: Set an error threshold. Point pairs with reprojection errors less than the threshold are identified as interior points, and the rest are outliers. Step 2.4: Repeat the above steps multiple times, select the model with the most interior points as the final model, and re-estimate the model parameters using all interior points.
[0010] Preferably, step 3 is performed as follows: Step 3.1: Let the matching point pairs in the two images be respectively... and Then the homography matrix H satisfies the following relationship:
[0011] Where H is:
[0012] In the formula, h11 , h 12 , h 13 The three elements in the first row of the homography matrix H are used to calculate the x-coordinates of the matching points. i ';h 21 , h 22 , h 23 These are the three elements in the second row of the homography matrix H, used to calculate the ordinate y of the matching point. i ';h 31 ,h 32 , h 33 These are the three elements in the third row of the homography matrix H, used for normalization; Step 3.2: Solve for the homography matrix H using the least squares method; construct the following system of linear equations for each pair of matching points:
[0013] Step 3.3: Construct the back projection error function:
[0014] Step 3.4: Given an initial estimate of the homography matrix, refine it using the Levenberg-Marquardt method to further reduce the projection error and obtain the final H matrix parameters.
[0015] Preferably, step 4 specifically includes the following process: Step 4.1: In the overlapping region, assume that the image with reflective noise is A, and the image without reflective noise is B; in order to identify the reflective noise region in A, set a brightness threshold T; traverse each pixel (x,y) of image A, and if its brightness value is greater than the threshold T, then the pixel is considered to have reflective noise; Step 4.2: Fit the distribution of these reflective noise pixels using a two-dimensional Gaussian distribution; Step 4.3: Based on the estimated Gaussian distribution parameters, generate a Gaussian mask M, whose value is higher near the center of the reflective noise region and gradually decreases away from the center. Step 4.4: Calculate the dynamic weight w(x,y) based on the value of the Gaussian mask M(x,y). The value range of the dynamic weight w(x,y) is [0,1]. Step 4.5: Merge the pixels of images A and B according to the dynamic weight w(x,y).
[0016] Preferably, in step 4.2, the probability density function of the two-dimensional Gaussian distribution is: ; in, These are the probability density function values of a two-dimensional Gaussian distribution, where (x, y) are the coordinates of a pixel in the image, with x being the horizontal coordinate and y being the vertical coordinate. It is the mean. ρ is the standard deviation, and ρ is the correlation coefficient. These parameters can be estimated using maximum likelihood estimation or other optimization methods.
[0017] Preferably, in step 4.4, the formula for calculating w(x,y) is as follows:
[0018] In the formula, represents the maximum value of all pixels in the Gaussian mask M; thus, the closer the position is to the center of the Gaussian distribution, the higher the dynamic weight w(x,y); the farther the position is from the center, the lower the weight w(x,y).
[0019] Preferably, in step 4.5, the fused pixel values are represented as follows:
[0020] In the formula, Let be the pixel value at pixel (x,y) of image A containing reflective noise. Let A be the pixel value of image B at pixel (x,y) without reflective noise. In this way, the pixels in the reflective noise area will be mainly determined by the pixel value of image B, while the pixels far from the reflective noise area will be determined by the average of the pixel values of A and B.
[0021] Beneficial effects of this invention: 1. Precise and efficient suppression of reflective noise, balancing noise reduction and detail preservation: This invention fits the distribution of reflective noise pixels with a two-dimensional Gaussian distribution and generates a dynamic Gaussian mask, so that the weight allocation is highly matched with the noise distribution; the weight in the noise concentration area is biased towards the non-reflective image, and the weight in the edge transition area is smoothly transitioned, which not only completely suppresses the bright reflective noise caused by the supplementary light, but also avoids the image blurring or loss of details caused by traditional fixed weight fusion, and finally the visual consistency of the fused image is stronger.
[0022] 2. Robust feature matching and transformation matrix solution, adaptable to complex scenarios: This invention adopts a combination of ORB feature extraction with KNN and RANSAC algorithms. Hamming distance ensures accurate and efficient similarity judgment of binary descriptors, while the RANSAC algorithm can effectively eliminate outliers with incorrect matching, greatly improving the accuracy of feature matching. Furthermore, the homography matrix is refined by combining the least squares method with the Levenberg-Marquardt method, further reducing projection errors and making image transformation and stitching more accurate. Even under conditions of uneven lighting and complex scene textures, it can still output reliable results stably.
[0023] 3. Wide technical compatibility and low implementation cost: The algorithm of this invention is based on a mature computer vision technology framework, without relying on dedicated hardware equipment. It can be adapted to common supplementary lighting shooting scenarios (such as indoor supplementary lighting, night scene supplementary lighting, etc.) and various image formats. The parameters of each step (such as Gaussian distribution standard deviation, brightness threshold, RANSAC iteration number) can be flexibly adjusted according to the actual noise situation, taking into account the adaptation needs of different scenarios. At the same time, there are no redundant operations in the calculation process, the running efficiency is high, and it is easy to be implemented in engineering.
[0024] 4. The fusion logic is scientific and reasonable, and the image quality is highly stable: The dynamic weight fusion formula of this invention achieves pixel complementarity between two images through linear combination. It uses the pure pixels of the non-reflective image to replace the noise area, while retaining the original image information of the noise-free area, avoiding information loss caused by dependence on a single image. The entire technical process forms a complete closed loop from feature extraction, matching to fusion. The error of each link is controllable, ensuring that the supplementary lighting photos under different batches and different scenes can obtain a stable and consistent reflection noise suppression effect. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of a method for suppressing reflection noise in supplemental lighting photographs. Figure 2 These are two images with overlapping areas in Example 2; Figure 3 This is a schematic diagram of feature point matching between two images in Example 2; Figure 4 This is a schematic diagram of the fusion result without reflection noise suppression; Figure 5 This is a schematic diagram of the fusion result after suppressing reflective noise. Detailed Implementation
[0026] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0027] like Figure 1 As shown, a method for suppressing reflection noise in supplemental lighting photographs includes the following steps: Step 1: ORB Feature Extraction The ORB feature point extraction method combines FAST feature point detection and BRIEF descriptors to form a highly efficient feature extraction method. The FAST algorithm is a feature point detection method based on local brightness variations, capable of quickly detecting feature points in an image. The FAST algorithm defines a circular region around each pixel p, consisting of N equally spaced pixels (typically N=16). The algorithm compares the brightness of the central pixel p... brightness of the surrounding N pixels This is used to determine whether p is a feature point. The FAST algorithm can quickly extract the set of feature points from an image. Each feature point It includes its location and orientation information.
[0028] The BRIEF descriptor is a binary descriptor generated by comparing the grayscale values of pixel pairs within the neighborhood of a feature point. For each feature point... Within its neighborhood, select n pairs of pixels. (Usually n=256), and compare the grayscale values of each pair of pixels. If If the value is 1, then the j-th bit of the descriptor is 1; otherwise, it is 0. The final generated descriptor is a binary vector of length n. .when hour, It is 1 if it is true, otherwise it is 0.
[0029] Step 2: Feature point matching: This invention employs the KNN algorithm to match extracted feature points and utilizes the RANSAC algorithm to remove outliers from matched point pairs, thereby improving matching accuracy. For each feature point in each image, the distance between its descriptor and the descriptors of all feature points in other images is calculated. Hamming distance is typically used to measure the similarity between BRIEF descriptors. Let... and If each of the two feature points is a descriptor, then the Hamming distance between them is:
[0030] Where n is the length of the descriptor. For each feature point Find the feature point that is closest to its descriptor.
[0031] To further improve matching accuracy, this invention employs the RANSAC algorithm to remove outliers from matched point pairs. The RANSAC algorithm identifies and removes outliers through random sampling and consistency checks. First, a minimum number of point pairs are randomly selected from the matched point pairs to estimate model parameters. For planar homography transformation, four point pairs are required. Then, the randomly selected point pairs are used to estimate model parameters. For example, for image stitching tasks, these point pairs can be used to estimate the homography matrix. All matched point pairs are substituted into the estimated model, and the reprojection error of each point pair is calculated. If the error is less than a certain threshold (usually 3 pixels), the point pair is considered an inlier; otherwise, it is an outlier. The above steps are repeated multiple times, and the model with the most inliers is selected as the final model. The model parameters are then re-estimated using all inliers to improve model accuracy.
[0032] Step 3: Calculate the homography matrix: A homography matrix (usually denoted as H) describes the geometric transformation relationship between two images. For image stitching tasks, it is typically assumed that there is a homography transformation between the two images, which can be represented by a 3x3 homography matrix H. The homography matrix H maps points in one image to corresponding points in the other image. Let the matching point pairs in the two images be... and Then the homography matrix H satisfies the following relationship:
[0033] Where H is:
[0034] Then, the homography matrix H is solved using the least squares method. First, a system of linear equations is constructed for each pair of matching points as follows:
[0035] Back projection error can be constructed:
[0036] By providing an initial estimate of the homography matrix, the Levenberg-Marquardt method is used for refinement to further reduce projection errors, thus obtaining the final H matrix parameters.
[0037] Step 4: Dynamic weight fusion of reflective noise regions: In the overlapping region, suppose image A contains reflective noise, while image B does not. To identify reflective noise areas in A, a pixel threshold T is first set to filter out pixels with abnormally high brightness in A. A brightness threshold T is set based on the pixel value distribution of image A. Typically, T can be set to a certain percentile of the image pixel values (e.g., 95%). For each pixel (x, y) in image A, if its brightness value is greater than the threshold T, then that pixel is considered to contain reflective noise.
[0038] To determine the precise extent of reflective noise regions in an image, this invention uses a Gaussian distribution to fit the distribution of these reflective noise pixels. It is assumed that the distribution of reflective noise pixels can be described by a two-dimensional Gaussian distribution with the following probability density function: ; in, It is the mean. Here, is the standard deviation, and ρ is the correlation coefficient. These parameters can be estimated using maximum likelihood estimation or other optimization methods. Based on the estimated Gaussian distribution parameters, a Gaussian mask M is generated, with its value being higher near the center of the reflective noise region and gradually decreasing away from the center. For each pixel (x,y) in the overlapping region, a dynamic weight w(x,y) is calculated based on the value of the Gaussian mask M(x,y). The weight w(x,y) ranges from [0,1], where:
[0039] Thus, the closer a location is to the center of the Gaussian distribution, the higher its weight w(x,y); the farther away from the center, the lower its weight w(x,y). Based on the dynamic weight w(x,y), the pixels of images A and B are merged. The merged pixel values can be represented as:
[0040] In this way, the pixels in the reflective noise area will be mainly determined by the pixel values of image B, while the pixels far from the reflective noise area will be determined by the average value of the pixels in images A and B. Through the above steps, the present invention can effectively remove the interference of the reflective noise area while retaining the useful information of images A and B, thereby improving the overall quality of image stitching.
[0041] Example 2: Refer to Figure 2-5 As one embodiment of the present invention, a method for suppressing reflective noise in supplementary lighting photographs is provided. To verify the beneficial effects of the present invention, a simulation experiment is conducted for scientific demonstration.
[0042] The experimental parameters were set as follows: In the ROS (Robot Operating System) system, a C++ program was used to stitch together two images with overlapping areas. The computer configuration was: i7-12500, 16G RAM.
[0043] like Figure 2 The image shown is two images with overlapping areas in a specific embodiment. The image on the right has been artificially illuminated to simulate reflective noise. like Figure 3 The image shows the feature point matching results of two images, based on... Figure 2 In the images, feature points are extracted from the two images using the feature extraction method in step 1, and feature point descriptors are generated. Then, the extracted feature points are initially matched using the KNN algorithm in step 2 to remove outliers. Figure 4 The image shows the fusion result without reflection noise suppression, based on Figure 3The feature point pairs in the image are used to calculate the homography matrix of the two images using the method in step 3. The two images are then fused. The brightness of the overlapping area is taken as the average of the brightness of the corresponding pixels in the two images. It can be seen that the brightness of the overlapping area is still affected by the lighting of the original image and is not uniform. Figure 5 The image shows the fusion result after suppressing reflective noise, based on... Figure 3 The feature point pairs in the image are used to calculate the homography matrix of the two images using the method in step 3. The two images are then fused. The dynamic weight fusion of the reflective noise region in step 4 is adopted. The dynamic weight is calculated based on the Gaussian mask, and the pixels in the overlapping region are fused, which can effectively suppress the illumination effect of the original image.
[0044] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for suppressing reflection noise in supplemental lighting photographs, characterized in that, Includes the following steps: Step 1, ORB Feature Extraction: The ORB feature point extraction method is used, combined with FAST feature point detection and BRIEF descriptors, to extract feature points and their descriptors in the image; Step 2, Feature point matching: The extracted feature points are matched using the KNN algorithm, the Hamming distance is used to measure the similarity of descriptors, and then the RANSAC algorithm is used to remove outliers from the matched point pairs. Step 3: Calculate the homography matrix: Based on the matching point pairs after outlier removal, construct a system of linear equations, initially solve the homography matrix using the least squares method, and then refine the matrix parameters using the Levenberg-Marquardt method to obtain the final homography matrix; Step 4: Dynamic weight fusion of reflective noise regions: After image stitching is completed, a brightness threshold is set to identify reflective noise regions. A Gaussian distribution is used to fit the distribution of reflective noise pixels and generate a Gaussian mask. Dynamic weights are calculated based on the Gaussian mask, and pixels in overlapping regions are fused.
2. The method for suppressing reflection noise in supplemental lighting photographs according to claim 1, characterized in that, In step 1, FAST feature point detection includes: defining a circular region around each pixel p, which consists of N equally spaced pixels; the algorithm compares the brightness of the central pixel p. brightness of the surrounding N pixels We use this to determine whether p is a feature point.
3. The method for suppressing reflection noise in supplemental lighting photographs according to claim 1, characterized in that, In step 1, the BRIEF descriptor includes: for each feature point Within its neighborhood, select n pairs of pixels. And compare the grayscale values of each pair of pixels; if If the j-th bit of the descriptor is 1, then the j-th bit is 1; otherwise, it is 0. The final generated descriptor is a binary vector of length n.
4. The method for suppressing reflection noise in supplemental lighting photographs according to claim 1, characterized in that, In step 2, the extracted feature points are matched using the KNN algorithm, and the Hamming distance is used to measure the similarity of descriptors. This includes: using the KNN algorithm, with the Hamming distance as the measure of descriptor similarity, calculating the Hamming distance between the descriptor of each feature point in each image and the descriptors of all feature points in other images, and filtering the nearest neighbor feature points based on the magnitude of the Hamming distance to achieve preliminary feature point matching.
5. The method for suppressing reflection noise in supplemental lighting photographs according to claim 1, characterized in that, In step 2, the outlier removal of matched point pairs using the RANSAC algorithm includes: Step 2.1: Randomly select 4 point pairs from the matched point pairs to estimate the model parameters of the plane homography transformation; Step 2.2: Estimate the homography matrix using the selected point pairs, substitute all matching point pairs into the model, and calculate the reprojection error for each point pair; Step 2.3: Set an error threshold. Point pairs with reprojection errors less than the threshold are identified as interior points, and the rest are outliers. Step 2.4: Repeat the above steps multiple times, select the model with the most interior points as the final model, and re-estimate the model parameters using all interior points.
6. The method for suppressing reflection noise in supplemental lighting photographs according to claim 1, characterized in that, The specific process of step 3 is as follows: Step 3.1: Let the matching point pairs in the two images be respectively... and Then the homography matrix H satisfies the following relationship: Where H is: In the formula, h 11 , h 12 , h 13 The three elements in the first row of the homography matrix H are used to calculate the x-coordinates of the matching points. i ';h 21 , h 22 , h 23 These are the three elements in the second row of the homography matrix H, used to calculate the ordinate y of the matching point. i ';h 31 , h 32 ,h 33 These are the three elements in the third row of the homography matrix H, used for normalization; Step 3.2: Solve for the homography matrix H using the least squares method; construct the following system of linear equations for each pair of matching points: Step 3.3: Construct the back projection error function: Step 3.4: Given an initial estimate of the homography matrix, refine it using the Levenberg-Marquardt method to further reduce the projection error and obtain the final H matrix parameters.
7. The method for suppressing reflection noise in supplemental lighting photographs according to claim 1, characterized in that, Step 4 specifically includes the following process: Step 4.1: In the overlapping region, assume that the image with reflective noise is A, and the image without reflective noise is B; in order to identify the reflective noise region in A, set a brightness threshold T; traverse each pixel (x,y) of image A, and if its brightness value is greater than the threshold T, then the pixel is considered to have reflective noise; Step 4.2: Fit the distribution of these reflective noise pixels using a two-dimensional Gaussian distribution; Step 4.3: Based on the estimated Gaussian distribution parameters, generate a Gaussian mask M, whose value is higher near the center of the reflective noise region and gradually decreases away from the center. Step 4.4: Calculate the dynamic weight w(x,y) based on the value of the Gaussian mask M(x,y). The value range of the dynamic weight w(x,y) is [0,1]. Step 4.5: Merge the pixels of images A and B according to the dynamic weight w(x,y).
8. The method for suppressing reflection noise in supplemental lighting photographs according to claim 7, characterized in that, In step 4.2, the probability density function of the two-dimensional Gaussian distribution is: ; in, These are the probability density function values of a two-dimensional Gaussian distribution, where (x, y) are the coordinates of a pixel in the image, with x being the horizontal coordinate and y being the vertical coordinate. It is the mean. ρ is the standard deviation, and ρ is the correlation coefficient. These parameters can be estimated using maximum likelihood estimation or other optimization methods.
9. The method for suppressing reflection noise in supplemental lighting photographs according to claim 7, characterized in that, In step 4.4, the formula for calculating w(x,y) is as follows: In the formula, represents the maximum value of all pixels in the Gaussian mask M; thus, the closer the position is to the center of the Gaussian distribution, the higher the dynamic weight w(x,y); the farther the position is from the center, the lower the weight w(x,y).
10. The method for suppressing reflection noise in supplemental lighting photographs according to claim 7, characterized in that, In step 4.5, the fused pixel values are represented as follows: In the formula, Let be the pixel value at pixel (x,y) of image A containing reflective noise. Let A be the pixel value of image B at pixel (x,y) without reflective noise. In this way, the pixels in the reflective noise area will be mainly determined by the pixel value of image B, while the pixels far from the reflective noise area will be determined by the average of the pixel values of A and B.