Methods for Detecting and Adjusting Brightness Anomalies in Panoramic Images
By analyzing the brightness distribution characteristics and light source properties of panoramic images, and combining time and seasonal factors, a convolutional neural network was used to adjust the brightness, solving the problem of identifying and adjusting abnormal brightness areas in panoramic images, thus improving the visual quality and realism of the images.
Patent Information
- Application Number
- CN202510482640.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-04-17
AI Technical Summary
In the process of panoramic image synthesis, how to accurately identify and adjust areas of abnormal brightness, especially under complex lighting conditions, to maintain the natural lighting effect of the image.
By analyzing the global and local brightness distribution characteristics of panoramic images, combined with time and seasonal factors, a light source characteristic database is used to identify high-brightness areas, and a convolutional neural network is used to adjust the brightness to ensure that the adjustment results are consistent with the natural lighting characteristics of the scene.
It enables accurate identification and intelligent adjustment of areas with abnormal brightness in panoramic images, improving the visual quality and realism of the images.
Smart Images

Figure CN120013932B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lighting technology, and in particular to a method for detecting and adjusting abnormal brightness areas in panoramic images. Background Technology
[0002] In the process of panoramic image synthesis, the core issue of the brightness discrimination mechanism is how to accurately distinguish between abnormal and normal brightness areas in the image, especially under complex lighting conditions.
[0003] When an image contains a large light source (such as a window), the area directly illuminated by the light source will form a high-brightness area, while the brightness characteristics of the scene itself may exhibit a uniform or gradually changing brightness distribution. Furthermore, when multiple light sources work together in an image, such as the superposition of natural and artificial light sources, this leads to a more complex brightness distribution pattern.
[0004] Therefore, accurately identifying and adjusting these areas of abnormal brightness while maintaining the natural lighting effect of the image is an urgent problem to be solved. Summary of the Invention
[0005] The purpose of this invention is to address the aforementioned problems by proposing a method for detecting and adjusting abnormal brightness areas in panoramic images. This method analyzes the global and local brightness distribution characteristics of panoramic images, combined with time and seasonal factors, to identify high-brightness areas and determine whether they are directly illuminated by a light source or have natural brightness characteristics. This method can effectively identify and adjust abnormal brightness areas in panoramic images, improve image quality and realism, and is applicable to image processing in fields such as panoramic photography and virtual reality.
[0006] The technical solution of this invention is:
[0007] This invention provides a method for detecting and adjusting abnormal brightness regions in panoramic images, including:
[0008] A panoramic image is acquired, and its global and local brightness distribution features are extracted to generate a brightness distribution map. Based on the brightness distribution map, high-brightness regions in the image are identified, and their spatial locations and brightness value ranges are marked. Considering time and seasonal factors, the light source intensity, angle, and color temperature information of the current scene are obtained from a pre-set light source characteristic database. Based on the matching of the brightness values of the high-brightness regions with the light source characteristic data, it is determined whether there are any abnormal brightness regions. Based on global and local features, it is identified whether multiple light sources are superimposed in the image, generating a light source superposition region map. Based on whether the brightness distribution in the light source superposition region map conforms to natural lighting characteristics, it is determined whether to mark it as a brightness abnormal region. Based on the marking results of the brightness abnormal regions, a brightness adjustment decision map is generated for brightness adjustment in subsequent panoramic image synthesis. A convolutional neural network is used to optimize the brightness adjustment decision map to ensure that the brightness adjustment result is consistent with the natural lighting characteristics of the scene.
[0009] Furthermore, the step of extracting the global brightness distribution features and local brightness distribution features of the panoramic image to generate a brightness distribution map includes: extracting the global brightness distribution features of the panoramic image using a histogram equalization algorithm to obtain global brightness feature data; extracting the local brightness distribution features of the panoramic image using a local binary mode algorithm to obtain local brightness feature data; generating a brightness distribution feature matrix based on the global brightness feature data and the local brightness feature data; inputting the brightness distribution feature matrix into a convolutional neural network for feature fusion to obtain fused brightness features; and generating a brightness distribution map using an image generation algorithm based on the fused brightness features.
[0010] Furthermore, the step of identifying high-brightness regions in the image based on the brightness distribution map and labeling their spatial location and brightness value range includes: converting the brightness distribution map into a brightness map using a grayscale processing algorithm; extracting high-brightness regions from the brightness map using a preset brightness threshold segmentation algorithm; performing morphological operations on the high-brightness regions to remove noise areas and obtain accurate high-brightness region contours; calculating the spatial coordinates of each high-brightness region based on the high-brightness region contours and recording its position value; extracting the brightness value range for each high-brightness region and statistically analyzing the minimum and maximum values of the interval values; associating the position values with the interval values to generate high-brightness region labeling information; grouping the high-brightness regions using a clustering algorithm, determining their distribution characteristics, and outputting the final labeling results.
[0011] Furthermore, the step of obtaining the light source intensity, angle, and color temperature information of the current scene from a preset light source characteristic database includes: determining the time and seasonal factors in the environmental parameters based on the current time and seasonal information; filtering the light source dataset that meets the conditions from the preset light source characteristic database based on the time and seasonal factors; processing the filtered light source dataset using a lighting condition analysis algorithm to extract the light source intensity, angle, and color temperature characteristics; if there are multiple matching items for the light source characteristics, calling a weighted average algorithm to calculate the average value of the light source intensity, determining the median value of the light source angle, and obtaining the mode value of the light source color temperature; comparing the calculated light source characteristics with the current scene using an environmental parameter matching algorithm to determine whether the lighting conditions match; if the lighting conditions match, outputting the final results of the light source intensity, angle, and color temperature.
[0012] Furthermore, determining whether there is a brightness anomaly region based on the matching of the brightness value of the high-brightness region with the light source characteristic data includes: if the brightness value of the high-brightness region matches the light source characteristic data, then the region is determined to be a region directly illuminated by the light source and marked as a brightness anomaly region; if the brightness value of the high-brightness region does not match the light source characteristic data, then its brightness distribution pattern is further analyzed to determine whether it is a natural brightness characteristic of the scene.
[0013] Furthermore, the step of identifying whether multiple light sources are superimposed in the image based on global and local features, and generating a light source superposition region map, includes: determining the number of light sources based on the global and local features; if the number of light sources is greater than 1, it is determined to be a superposition state; dividing the superposition state into regions using a preset threshold to obtain light source regions and superposition regions; performing feature matching between the light source regions and the superposition regions using a recognizer to determine the superposition region map; and calculating region values based on the region map to generate the light source superposition region map.
[0014] Furthermore, the step of using a convolutional neural network to optimize the brightness adjustment decision map to ensure that the brightness adjustment result is consistent with the natural lighting characteristics of the scene includes: processing the brightness adjustment decision map using a preset convolutional neural network to generate an optimized decision map; fusing the optimized decision map with the scene map to generate an adjusted scene map; determining the consistency between the adjusted scene map and the natural lighting characteristic values, and if they are inconsistent, re-optimizing the decision map.
[0015] The technical solution of the present invention has the following beneficial effects:
[0016] This invention discloses a method for detecting and adjusting abnormal brightness regions in panoramic images. This method analyzes the global and local brightness distribution characteristics of panoramic images, combined with time and seasonal factors and a preset database of light source characteristics, to accurately identify and label high-brightness regions.
[0017] This invention innovatively introduces light source superposition analysis, effectively distinguishing between normal and abnormal brightness areas by comparing brightness distribution with natural lighting characteristics. For the identified abnormal brightness areas, this invention generates a brightness adjustment decision map and optimizes it using a convolutional neural network to ensure that the adjustment result is consistent with the natural lighting characteristics of the scene.
[0018] This method can not only accurately detect brightness anomalies in panoramic images, but also intelligently adjust the brightness to improve the visual quality and realism of panoramic images, providing strong support for panoramic image synthesis and processing. Attached Figure Description
[0019] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] like Figure 1 This invention provides a method for detecting and adjusting abnormal brightness regions in panoramic images, specifically including the following steps:
[0022] S101. Acquire the panoramic image of the target, extract the global brightness distribution features and local brightness distribution features of the image, and generate a brightness distribution map.
[0023] Panoramic images are acquired using image acquisition equipment and preprocessed to obtain high-definition panoramic images. Global brightness distribution features are extracted from the high-definition panoramic images using a histogram equalization algorithm, yielding global brightness feature data. Local binary mode algorithms are then used to extract local brightness distribution features from the high-definition panoramic images, yielding local brightness feature data. A brightness distribution feature matrix is generated based on the global and local brightness feature data. This matrix is then input into a convolutional neural network for feature fusion, resulting in fused brightness features. Based on these fused brightness features, an image generation algorithm is used to generate a brightness distribution map. The generated brightness distribution map is stored in a designated database.
[0024] S102. Based on the brightness distribution map, identify the high-brightness areas in the image and mark their spatial location and brightness value range.
[0025] The process begins by acquiring the brightness distribution map of the image and converting it into a brightness map using a grayscale processing algorithm. A pre-defined brightness threshold segmentation algorithm is then used to extract highlight areas from the brightness map. Morphological operations are performed on these highlight areas to remove noise and obtain precise highlight area contours. Based on these contours, the spatial coordinates of each highlight area are calculated and recorded. For each highlight area, its brightness value range is extracted, and the minimum and maximum values within each range are calculated. The position values are then correlated with the range values to generate highlight area annotation information. Finally, a clustering algorithm is used to group the highlight areas, determine their distribution characteristics, and output the final annotation results.
[0026] S103. Combining time and seasonal factors, obtain the light intensity, angle, and color temperature information of the current scene from the preset light source characteristic database.
[0027] Obtain current time and season information to determine time and seasonal factors in environmental parameters. Based on these factors, filter suitable light source datasets from a pre-defined light source characteristic database. Use a lighting condition analysis algorithm to process the filtered light source datasets, extracting light source intensity, angle, and color temperature characteristics. Light source characteristics refer to light source intensity, angle, and color temperature. If multiple light source intensities match, calculate the average intensity; if multiple light source angles match, calculate the median angle; if multiple color temperature characteristics match, obtain the mode color temperature. Use an environmental parameter matching algorithm to compare the calculated light source characteristics with the current scene to determine if the lighting conditions match. If the lighting conditions match, output the final results for light source intensity, angle, and color temperature; if not, re-filter the light source dataset and repeat the characteristic extraction process. Store the final light source intensity, angle, and color temperature information in the scene lighting database, completing the process of obtaining light source characteristics for the current scene. 0024.S104. If the brightness value of the high-brightness area matches the light source characteristic data, then the area is determined to be a direct illumination area of the light source and marked as a brightness abnormal area; if the brightness value of the high-brightness area does not match the light source characteristic data, then its brightness distribution pattern is further analyzed to determine whether it is a natural brightness characteristic of the scene.
[0028] Based on the light source characteristic data, calculate the brightness range of the area directly illuminated by the light source. If the brightness value of a high-brightness area falls within the range of the directly illuminated area, it is identified as a directly illuminated area. Mark the directly illuminated area as a brightness anomaly region. Use a region segmentation algorithm to delineate the boundaries of the brightness anomaly regions. Remove interference information from the brightness anomaly regions using image processing techniques. Generate a distribution map of the brightness anomaly regions and store the processing results.
[0029] If the brightness value does not match the light source characteristic data, the brightness distribution pattern of the high-brightness area is extracted. A clustering algorithm is used to classify the brightness distribution pattern, resulting in brightness distribution categories. Based on the brightness distribution category, it is determined whether it conforms to the natural brightness characteristics of the scene. If it conforms to the natural brightness characteristics of the scene, the area is determined as a natural high-brightness area. If it does not conform to the natural brightness characteristics of the scene, an anomaly detection algorithm is used to identify abnormal brightness areas. Based on the distribution range of the abnormal brightness areas, brightness correction parameters are generated.
[0030] To address the mismatch between brightness values and light source characteristics, the brightness distribution pattern of high-brightness areas is extracted.
[0031] Specifically, the brightness distribution is obtained through image data, and a histogram is generated by statistically analyzing the grayscale parameters of high-brightness pixels, which can reflect the characteristics of concentrated or dispersed brightness. The K-means clustering algorithm is used to divide the brightness values into low-brightness, medium-brightness, and high-brightness clusters according to the grayscale range.
[0032] Since the natural brightness of an indoor scene should exhibit a gradual characteristic rather than abrupt bright patches; if the clustering results show that the low brightness, medium brightness and high brightness clusters exhibit a gradual characteristic, and the brightness change is smooth and consistent with the characteristics of ambient light distribution, then it is a natural brightness scene; otherwise, further identification is needed to determine whether it is a case of multiple light sources superimposed.
[0033] S105. Based on global and local features, identify whether there are multiple light sources superimposed in the image, and generate a map of the light source superimposed area.
[0034] Based on global and local features, feature points and feature values are obtained. The number of light sources is determined based on the feature values; if the number of light sources is greater than 1, it is identified as a superposition state. A preset threshold is used to divide the superposition state into regions, resulting in light source regions and superposition regions. Feature matching is performed on the light source regions and superposition regions using a recognizer to determine the superposition region map. Region values are calculated based on the region map to generate a light source superposition region map. The light source superposition region map is compared with the image set to verify the accuracy of the region map. The light source superposition region map is output, completing the light source superposition recognition and region map generation.
[0035] Global features reflect the overall brightness distribution of an image, such as the average brightness and contrast; local features focus on the texture or edge information of a specific region.
[0036] For example, in an indoor image, the global average brightness is 150, and the gray values of the feature points in the locally bright areas are concentrated between 200 and 240.
[0037] If the feature value shows two obvious bright peaks, corresponding to gray levels 234 and 240 respectively, then it is inferred that there are two light sources.
[0038] A grayscale threshold of 200 is set. Areas above this value are marked as light source areas, while areas between 180 and 200 may be overlay areas. Through threshold division, the main light area and overlapping areas are clearly distinguished. The threshold can be dynamically adjusted according to the scene lighting to ensure accurate division.
[0039] Furthermore, a feature matching algorithm is used to match the light source area and the overlay area to generate an overlay region map. The algorithm compares the feature points of the light source area with a preset light source model based on a template. The feature points of the main light area appear as circular bright spots, with a 90% match rate with the model, confirming it as the light source area. The feature points of the overlay area display a mixed brightness pattern and are marked as the overlay area after matching.
[0040] The region value is calculated based on the overlapping area, obtained by statistically analyzing the pixel percentage and average grayscale value of each region. For example, the light source area occupies 10% of the image with an average grayscale value of 215; the overlapping area occupies 5% with an average grayscale value of 190. The region map is presented in the form of a heatmap, with bright areas marked in red and overlapping areas marked in yellow for easy and intuitive analysis. The output region map clearly marks the main light area, auxiliary light area, and overlapping area, and the region boundaries are readily apparent. This method, through multi-level feature analysis, ensures accurate identification of the light source distribution, providing a reliable basis for subsequent image processing.
[0041] S106. If the brightness distribution in the light source superposition area diagram conforms to the characteristics of natural lighting, it shall not be marked as a brightness abnormal area; otherwise, it shall be marked as a brightness abnormal area.
[0042] Brightness distribution data of the overlay area of the light sources is acquired. This data is then analyzed using a pre-defined natural lighting characteristic model to determine the degree of conformity between the brightness distribution data and the model. If the brightness distribution data conforms to the natural lighting characteristic model, the area is determined to be a normal brightness area. If the brightness distribution data does not conform to the natural lighting characteristic model, the area is determined to be a brightness anomaly area. A brightness anomaly area marker map is generated based on the distribution characteristics of the brightness anomaly area. The brightness anomaly area marker map is then smoothed using an image processing algorithm to obtain the final brightness anomaly area marker result.
[0043] S107. Based on the marking results of the brightness anomaly areas, generate a brightness adjustment decision map for subsequent brightness adjustment in panoramic image synthesis.
[0044] The process involves acquiring the brightness values of a panoramic image, dividing the image into regions based on these values, and identifying markers for anomalous areas. A region map is generated based on the location information of these markers. Using data from the region map and pre-defined brightness adjustment values, a decision map is generated. The brightness values of the panoramic image are adjusted according to the instructions in the decision map to obtain a composite image. The brightness adjustment effect is assessed by comparing the composite image with the original image. If the brightness adjustment effect does not meet the preset standard, a new decision map is generated, and the brightness adjustment is performed again. Finally, a panoramic composite image that meets the brightness standard is obtained.
[0045] S108. Use a convolutional neural network to optimize the brightness adjustment decision map to ensure that the brightness adjustment result is consistent with the natural lighting characteristics of the scene.
[0046] The process begins by acquiring the scene image to be processed and extracting its brightness map. A pre-defined convolutional neural network is then used to process the brightness map, generating an initial decision map. This initial decision map is optimized based on natural lighting characteristics, resulting in an optimized decision map. The optimized decision map is then fused with the scene image to generate an adjusted scene image. The consistency between the adjusted scene image and the natural lighting characteristics is assessed; if they are inconsistent, the decision map is re-optimized. The accuracy of brightness adjustment is improved through parameter adjustments of the convolutional neural network. Finally, a scene image consistent with the natural lighting characteristics is output.
[0047] The detection method of this invention analyzes the degree of matching between the brightness values of high-brightness areas in an image and the light source characteristic data to determine whether it is a region directly illuminated by a light source and marks it as a brightness anomaly region. For high-brightness areas that do not match, it further determines whether they are natural brightness characteristics of the scene; if not, it identifies whether there are multiple light sources superimposed in the image and generates a light source superposition area map; it can effectively distinguish between normal lighting and abnormal lighting, accurately identify brightness anomaly regions under complex lighting environments, and provide a comprehensive and accurate solution for light source anomaly detection and lighting environment analysis.
[0048] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within this application.
Claims
1. A method for detecting and adjusting abnormal brightness regions in panoramic images, characterized in that, include: Acquire a panoramic image, extract the global brightness distribution features and local brightness distribution features of the panoramic image, and generate a brightness distribution map; Based on the brightness distribution map, identify the high-brightness areas in the image and mark their spatial location and brightness value range; Taking into account time and season factors, the light intensity, angle, and color temperature information of the current scene are obtained from a pre-set light source characteristic database; Based on the matching between the brightness value of the high-brightness area and the light source characteristic data, it is determined whether there are any areas with abnormal brightness. Based on global and local features, identify whether there are multiple light sources superimposed in the image and generate a map of the light source superimposition area. Based on whether the brightness distribution in the superimposed light source area diagram conforms to the characteristics of natural lighting, determine whether to mark it as a brightness abnormal area; Based on the marking results of the abnormal brightness areas, a brightness adjustment decision map is generated for brightness adjustment in subsequent panoramic image synthesis; A convolutional neural network is used to optimize the brightness adjustment decision map to ensure that the brightness adjustment result is consistent with the natural lighting characteristics of the scene; The step of identifying whether multiple light sources are superimposed in an image based on global and local features, and generating a light source superposition region map, includes: determining the number of light sources based on the global and local features; if the number of light sources is greater than 1, it is determined to be a superposition state; dividing the superposition state into regions using a preset threshold to obtain light source regions and superposition regions; performing feature matching between the light source regions and the superposition regions using a recognizer to determine the superposition region map; and calculating region values based on the region map to generate the light source superposition region map. The step of obtaining the light source intensity, angle, and color temperature information of the current scene from a preset light source characteristic database includes: determining the time and seasonal factors in the environmental parameters based on the current time and seasonal information; filtering a set of light source datasets that meet the conditions from the preset light source characteristic database based on the time and seasonal factors; processing the filtered light source datasets using a lighting condition analysis algorithm to extract the light source intensity, angle, and color temperature characteristics; if there are multiple matching items for the light source characteristics, calling a weighted average algorithm to calculate the average value of the light source intensity, determining the median value of the light source angle, and obtaining the mode value of the light source color temperature; comparing the calculated light source characteristics with the current scene using an environmental parameter matching algorithm to determine whether the lighting conditions match; and outputting the final results of the light source intensity, angle, and color temperature if the lighting conditions match.
2. The method as described in claim 1, characterized in that, The step of extracting the global brightness distribution features and local brightness distribution features of the panoramic image to generate a brightness distribution map includes: The global brightness distribution features of the panoramic image are extracted using a histogram equalization algorithm to obtain global brightness feature data. The local binary mode algorithm is used to extract the local brightness distribution features of the panoramic image to obtain local brightness feature data; A brightness distribution feature matrix is generated based on the global brightness feature data and the local brightness feature data; The brightness distribution feature matrix is input into a convolutional neural network for feature fusion to obtain fused brightness features. Based on the fused brightness features, a brightness distribution map is generated using an image generation algorithm.
3. The method as described in claim 1, characterized in that, The step of identifying high-brightness regions in the image based on the brightness distribution map and marking their spatial location and brightness value range includes: The brightness distribution map is converted into a brightness map using a grayscale processing algorithm; High-brightness areas are extracted from the brightness map using a preset brightness threshold segmentation algorithm; Morphological operations are performed on the highlighted area to remove noise areas and obtain an accurate outline of the highlighted area. Based on the outline of the highlighted area, calculate the spatial coordinates of each highlighted area and record its position value; For each highlighted area, extract its brightness value range and calculate the minimum and maximum values within the range; The position value is associated with the interval value to generate highlighted area annotation information; Clustering algorithms are used to group the highlighted areas, determine their distribution characteristics, and output the final annotation results.
4. The method as described in claim 1, characterized in that, The step of determining whether there are abnormal brightness areas based on the matching of the brightness value of the high-brightness area with the light source characteristic data includes: If the brightness value of the high-brightness area matches the light source characteristic data, then the area is determined to be a direct illumination area of the light source and is marked as a brightness abnormal area. If the brightness value of the high-brightness area does not match the light source characteristic data, its brightness distribution pattern is further analyzed to determine whether it is a natural brightness characteristic of the scene.
5. The method as described in claim 1, characterized in that, The step of optimizing the brightness adjustment decision map using a convolutional neural network to ensure that the brightness adjustment result is consistent with the natural lighting characteristics of the scene includes: The brightness adjustment decision map is processed using a pre-defined convolutional neural network to generate an optimized decision map; The optimized decision graph and the scene graph are merged to generate an adjusted scene graph; Determine the consistency between the adjusted scene map and the natural lighting characteristic values. If they are inconsistent, re-optimize the decision map.
Citation Information
Patent Citations
Method and system for dynamic brightness adjustment of intelligent visual assistance system
CN117640864A
Urban monitoring image recognition system
CN118823292A