A fully automatic phototactic lighting compensation system and method

By collecting illuminance, correlated color temperature, and monitoring images, calculating the light color temporal curvature value and the image brightness transition curvature sequence, and combining a spatiotemporal dual verification mechanism, the problem of misjudgment and response lag in the identification of shadow edge sweeping process in complex lighting partition indoor scenes of existing automatic lighting compensation systems is solved, and a fast and smooth lighting compensation effect is achieved.

CN122227477APending Publication Date: 2026-06-16BEIJING QIMING QINGYUN TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING QIMING QINGYUN TECHNOLOGY CO LTD
Filing Date
2026-03-18
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing automatic lighting compensation systems cannot recognize the process of shadow edges sweeping by the sun's movement in complex indoor lighting scenarios, leading to misjudgments and delayed responses in the control logic, which affects the user's visual comfort.

Method used

By collecting illuminance, correlated color temperature, and monitoring images, calculating the light color temporal curvature value and the image brightness transition curvature sequence, and combining a spatiotemporal dual verification mechanism, the system accurately identifies the start time of shadow transition and performs fully automatic light-seeking illumination compensation.

Benefits of technology

It enables fast and smooth lighting intervention, avoiding the miscompensation problem caused by the inability to distinguish the source of light change in existing technologies, and improving user visual comfort and the accuracy of lighting control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122227477A_ABST
    Figure CN122227477A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electric device control, in particular to a kind of full-automatic phototaxis lighting compensation system and method, the distribution trend of light intensity and correlated color temperature is combined to calculate light color timing curvature value, and its timing change trend is associated with the spatial brightness transition law of monitoring image in the direction perpendicular to shadow movement, so that the present application can utilize the morphological consistency of light color timing characteristics and image spatial characteristics, accurately identify the specific shadow sweeping event caused by solar motion.This spatiotemporal dual verification mechanism not only effectively eliminates the interference sources such as cloud random occlusion and personnel movement, which cause light intensity change but do not have specific spatiotemporal correlation characteristics, fundamentally solves the problem of false compensation caused by the inability to distinguish the source of light change in the prior art, so that the effect of full-automatic phototaxis lighting compensation is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrical device control technology, and specifically to a fully automatic light-finding illumination compensation system and method. Background Technology

[0002] Existing automatic lighting compensation systems typically operate on the principle of feedback control based on a light sensor's measurement of illuminance in the work area. When the sensor's measurement falls below a preset illuminance threshold, the system increases artificial lighting output; conversely, it decreases it. However, this method has limitations in indoor scenes with complex lighting zones. A typical scenario is that as the sun moves due to the Earth's rotation, the edges of shadows cast by buildings or window frames slowly sweep across the work area. During this process, due to light diffraction and the mixing of direct sunlight and scattered skylight, the illuminance and correlated color temperature within the shadow transition zone undergo a unique, non-linear dynamic change.

[0003] Traditional controllers cannot recognize this specific process; their control logic relies solely on changes in light intensity and lacks a mechanism to verify the source of these changes. Therefore, the system may misinterpret this nonlinear light color change as measurement noise or random disturbances, such as movement or cloud cover. This misinterpretation typically leads to a severely delayed compensation response, or the system suddenly boosts artificial lighting to high power only after a significant drop in illuminance, causing drastic changes in the lighting environment and impacting user visual comfort. Consequently, existing technologies for fully automatic light-seeking compensation based on illuminance thresholds are ineffective. Summary of the Invention

[0004] To address the poor performance of existing technologies that rely on illuminance thresholds for fully automatic light-seeking illumination compensation, this application aims to provide a fully automatic light-seeking illumination compensation system and method. The specific technical solution adopted is as follows: The first aspect of this application provides a fully automatic light-seeking illumination compensation method, including: The illuminance, correlated color temperature, and monitoring images of the monitored area were collected at each sampling time. Based on the overall distribution trend of illuminance and correlated color temperature at all sampling times in chronological order, the light and color temporal curvature value at each sampling time is determined; based on the temporal change trend of the light and color temporal curvature value, the shadow transition start time is selected. The system acquires the direction of shadow movement in the monitored area at the start of each shadow transition. In the analysis window after the start of the shadow transition, it determines the image brightness transition curvature sequence based on the brightness change pattern of the monitored image perpendicular to the shadow movement direction. It then performs fully automatic light-seeking illumination compensation based on the correlation between the temporal change of the light color curvature value and the change of the image brightness transition curvature sequence.

[0005] Furthermore, the process of obtaining the light color temporal curvature value includes: Arrange the illuminance and correlated color temperature at each sampling time sequentially to determine the corresponding light and color state vector; Each sampling time is taken as the target time in sequence, and the light and color state vectors of the target time and all the previous sampling times are arranged in time sequence to determine the corresponding light and color state vector sequence; the discrete curvature value of the target time is calculated in the light and color state vector sequence to determine the light and color temporal curvature value of the target time.

[0006] Furthermore, the process of obtaining the start time of the shadow transition includes: The corresponding curvature change detection threshold is determined based on the mean and standard deviation of the light color temporal curvature values ​​of all sampling times in the historical time period of each sampling time. The sampling time when the light color temporal curvature value is greater than the corresponding curvature change detection threshold is taken as the shadow transition feature time; the shadow transition start time is obtained, wherein the sampling time before the shadow transition start time does not belong to the shadow transition feature time, and the sampling time after the shadow transition start time belongs to the shadow transition feature time.

[0007] Furthermore, the process of obtaining the image brightness transition curvature sequence includes: Calculate the cumulative value of the gray-level gradient magnitude of all pixels in the gradient image corresponding to the monitoring image at each sampling time, and determine the corresponding cumulative gradient sum; Each shadow transition start time is taken as the target start time; all sampling times within a preset time window after the target start time are taken as shadow transition analysis times. In all shadow transition analysis moments, the monitoring image corresponding to the maximum value of the accumulated gradient at the shadow transition analysis moment is taken as the brightness transition significant image; based on the brightness change trend of the brightness transition significant image in the direction perpendicular to the shadow movement, the image brightness transition curvature sequence is determined.

[0008] Furthermore, the process of determining the image brightness transition curvature sequence based on the brightness change trend of the image with significant brightness transitions in the direction perpendicular to the shadow movement includes: The image with significant brightness transitions is traversed by scanning at equal intervals using scan lines perpendicular to the direction of shadow movement. The direction of the scan sequence is the same as the direction of shadow movement, and the number of scan lines is the same as the number of shadow transition analysis moments. The brightness values ​​of all pixels on each scan line are calculated to determine the corresponding image cross-sectional brightness. The image cross-sectional brightness of all scan lines is arranged according to the scan line scanning order to determine the image cross-sectional brightness sequence. Discrete curvature values ​​are calculated for each scan line in the image cross-sectional brightness sequence to determine the image brightness transition curvature of each scan line. The image brightness transition curvature of all scan lines is arranged according to the scan line scanning order to determine the image brightness transition curvature sequence at the target start moment.

[0009] Furthermore, the process of performing fully automatic light-seeking illumination compensation based on the correlation between the temporal change of light color curvature value and the change of image brightness transition curvature sequence includes: Arrange the light and color temporal curvature values ​​of all shadow transition analysis moments corresponding to the target start moment in chronological order to determine the light and color temporal curvature value sequence of the target start moment. The image brightness transition curvature sequence and the light color temporal curvature value sequence are input into a normalized cross-correlation algorithm to output the spatiotemporal curvature morphology correlation coefficient and the optimal scale factor at the beginning of the target; the verification rate deviation at the beginning of the target is determined based on the optimal scale factor and the sampling frequency. Based on the spatiotemporal curvature morphology correlation coefficient and the verification rate deviation at the start of each shadow transition, the timing of illumination compensation requirements is selected. All sampling moments between the last shadow transition analysis moment and the compensation cutoff moment corresponding to each illumination compensation requirement moment are taken as illumination compensation moments; the compensation cutoff moment is the first sampling moment after the shadow transition start moment when the light color temporal curvature value is less than or equal to the curvature change detection threshold. Based on the relative deviation between the illuminance at each lighting compensation moment and the corresponding shadow transition start moment, the final lighting power of the lighting compensation device at each lighting compensation moment is determined; and fully automatic light-seeking lighting compensation is performed based on the final lighting power.

[0010] Furthermore, the process of obtaining the verification rate deviation includes: The corresponding data-fitted shadow movement rate is determined by multiplying the optimal scale factor by the sampling frequency at the sampling time; the prior shadow movement rate is obtained; a reference rate difference value is determined based on the difference between the data-fitted shadow movement rate and the prior shadow movement rate; and the validation rate deviation is determined based on the ratio between the reference rate difference value and the prior shadow movement rate.

[0011] Furthermore, the process of obtaining the moment of illumination compensation requirement includes: The moment when the corresponding spatiotemporal curvature morphology correlation coefficient is greater than the preset morphology correlation threshold and the verification rate deviation is less than the preset rate compliance threshold is taken as the moment when illumination compensation is required.

[0012] Furthermore, the process of obtaining the final lighting power includes: The difference between the illuminance at each lighting compensation moment and the illuminance at the corresponding shadow transition start moment is positively correlated to determine the lighting demand at each lighting compensation moment; the product of the lighting demand and the rated power of the lighting equipment is used to determine the final lighting power of the lighting equipment at each lighting compensation moment.

[0013] Secondly, this application provides a fully automatic light-finding illumination compensation system, the system comprising: The data acquisition module is used to collect the illuminance, correlated color temperature, and monitoring images of the monitoring area at each sampling time. The shadow transition start time filtering module is used to determine the light and color temporal curvature value of each sampling time based on the overall distribution trend of illuminance and correlated color temperature corresponding to all sampling times in time sequence; and to filter out the shadow transition start time based on the temporal change trend of the light and color temporal curvature value. The illumination compensation module is used to obtain the shadow movement direction of the monitoring area at the beginning of each shadow transition; in the analysis window after the beginning of the shadow transition, the brightness transition curvature sequence of the image is determined according to the brightness change law of the monitoring image in the direction perpendicular to the shadow movement; and fully automatic light-seeking illumination compensation is performed based on the correlation between the temporal change of the light color curvature value and the change of the image brightness transition curvature sequence.

[0014] Thirdly, this application provides a computer device including a memory and a processor. The memory is used to store computer program code, and the processor is used to call and run the computer program code from the memory to perform the method as described in the first aspect of this application or any embodiment of the first aspect.

[0015] Fourthly, this application provides a computer program product comprising computer program code, which, when executed, performs the method as described in the first aspect of this application or any embodiment thereof.

[0016] Fifthly, this application provides a computer-readable storage medium that stores computer program code, which, when executed, performs the method as described in the first aspect of this application or any embodiment thereof.

[0017] This application has the following beneficial effects: This application calculates the temporal curvature value of light color by combining the distribution trends of illuminance and correlated color temperature, and analyzes the correlation between its temporal change trend and the spatial brightness transition law of the monitored image in the direction perpendicular to the shadow movement. This allows the invention to accurately identify specific shadow sweeping events caused by solar motion by utilizing the morphological consistency between the temporal features of light color and the spatial features of the image. This spatiotemporal dual verification mechanism not only effectively eliminates interference sources such as random cloud cover and personnel movement that cause changes in illuminance but do not possess specific spatiotemporal correlation characteristics, fundamentally solving the problem of miscompensation caused by the inability to distinguish the source of illuminance change in existing technologies; but also, by performing correlation analysis between the image and temporal curvature at the beginning of the shadow transition, the system can quickly lock the nature of the event in the early stage of the shadow event, overcoming the lag defect of existing technologies that require waiting for illuminance to drop to a low threshold before passively responding, providing an accurate triggering time for achieving rapid and smooth lighting intervention; thus making the fully automatic light-seeking lighting compensation effect of this application better. Attached Figure Description

[0018] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of a fully automatic light-finding illumination compensation method provided in one embodiment of the present invention; Figure 2 This is a structural diagram of a fully automatic light-finding illumination compensation system provided in one embodiment of the present invention; Figure 3 This is a schematic diagram of a computer device structure provided in one embodiment of the present invention. Detailed Implementation

[0020] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a fully automatic light-seeking illumination compensation system and method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment, and specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0022] The following description, in conjunction with the accompanying drawings, details the specific implementation of a fully automatic light-finding illumination compensation system and method provided by this invention.

[0023] This application provides a fully automatic light-finding illumination compensation method. Please refer to [link / reference]. Figure 1 The diagram illustrates a flowchart of a fully automatic light-seeking illumination compensation method according to an embodiment of the present invention, the method comprising: Step S101: Collect the illuminance, correlated color temperature, and monitoring images of the monitoring area at each sampling time.

[0024] Since the edge of the sun's shadow sweeping across the working area is a dynamic process lasting several seconds, there is a specific nonlinear coupling relationship between the changes in illuminance and correlated color temperature. Traditional low-frequency or single-channel data acquisition would lose the key dynamic information used to identify this event. Therefore, this step acquires data from both illuminance and correlated color temperature channels simultaneously at high frequency to obtain complete raw time-series data characterizing the event. In a specific implementation of this invention, an illuminance sensor is deployed at the center of the monitoring area. The illuminance and correlated color temperature readings are collected at each sampling time using the illuminance sensor. The sampling frequency is set to 20Hz, which can be adjusted according to the specific implementation environment.

[0025] Considering that subsequent analysis will be conducted in conjunction with spatial performance, this embodiment of the invention uses a camera to capture images of the monitoring area directly in front of it, obtaining monitoring images at each sampling time. The shooting direction is perpendicular to the plane where the monitoring area is located, which will not be further elaborated here.

[0026] Step S102: Based on the overall distribution trend of illuminance and correlated color temperature at all sampling times in the time sequence, determine the light and color temporal curvature value at each sampling time; based on the temporal change trend of the light and color temporal curvature value, select the shadow transition start time.

[0027] Due to the unique nonlinear coupling relationship between illuminance and color temperature inherent in the solar shadow transition process, it manifests as a trajectory with significant curvature in the two-dimensional light and color state space. Other common illumination disturbances, such as human movement or slow cloud cover, tend to exhibit linear or random variations. Therefore, this step quantifies this nonlinear characteristic by calculating the curvature of this trajectory and uses this as a basis to dynamically determine the start and end boundaries of the event, thereby segmenting the complete event process from the continuous data stream. Thus, this embodiment of the invention determines the light and color temporal curvature value for each sampling moment based on the overall distribution trend of illuminance and associated color temperature at all sampling moments in time sequence.

[0028] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the light color temporal curvature value includes: The illuminance and correlated color temperature at each sampling moment are arranged sequentially to determine the corresponding light and color state vector. Each sampling moment is then taken as the target moment, and the light and color state vectors of the target moment and all previous sampling moments are arranged temporally to determine the corresponding light and color state vector sequence. Discrete curvature values ​​are calculated for the target moment within the light and color state vector sequence to determine the light and color temporal curvature value of the target moment. Specifically, the vector difference between the light and color state vector at each sampling moment and the light and color state vector at the previous sampling moment is taken as the first-order difference vector at each sampling moment. The second-order difference vector is used as the numerator, and the cube of the magnitude of the first-order difference vector is used as the denominator to calculate the corresponding light color temporal curvature value. When the denominator is 0, the minimum value of the magnitude of the non-zero first-order difference vector among all sampling times before the corresponding sampling time is used as the denominator in the calculation. In the construction of the second-order determinant, the first row is composed of two elements corresponding to the first-order difference vector arranged in sequence, and the second row is composed of two elements corresponding to the second-order difference vector arranged in sequence. This process belongs to the calculation process of discrete curvature value, and the calculation of discrete curvature value is a well-known technique in the art, which will not be further limited or elaborated here.

[0029] When the ratio of direct sunlight to scattered skylight changes nonlinearly in the penumbra, the trajectory it forms in the light color state space will inevitably exhibit an observable curved shape. Conventional disturbances, such as human obstruction or cloud cover changes, will primarily manifest as an approximately straight line or irregular random fluctuations. Quantifying this curved shape using the light color temporal curvature value provides a data foundation for capturing the start of the shadow transition. Therefore, this embodiment of the invention further filters out the start of the shadow transition based on the temporal variation trend of the light color temporal curvature value.

[0030] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the start time of the shadow transition includes: Based on the mean and standard deviation of the light and color temporal curvature values ​​of all sampling times in the historical time period of each sampling time, the corresponding curvature change detection threshold is determined; the sampling time when the light and color temporal curvature value is greater than the corresponding curvature change detection threshold is taken as the shadow transition feature time; the shadow transition start time is obtained, the sampling time before the shadow transition start time is not a shadow transition feature time, and the sampling time after the shadow transition start time is a shadow transition feature time.

[0031] The sampling time corresponding to the curvature change detection threshold has a large curvature value, indicating that illuminance and color temperature form a significant nonlinear bending trajectory in the light color state space. Therefore, based on the physical characteristic of the nonlinear change in the ratio of direct and scattered components when sunlight illuminates the penumbra, this usually corresponds to the moment of shadow edge transition, i.e., the shadow transition characteristic moment. The reason for selecting the shadow transition start moment in this way is that the method can accurately capture the critical instant when the shadow edge first contacts the working area. This allows the shadow transition start moment to characterize the turning point of the environment from a stable state to a dynamic state, providing the most complete time window starting point for subsequent cross-modal verification, enabling the observation of the spatial-temporal evolution characteristics of the entire shadow transition process.

[0032] Specifically, the curvature change detection threshold is obtained by taking the sum of five times the standard deviation of the curvature values ​​of the light and color temporal sequence at all sampling times in the historical time period of each sampling moment and the mean of the curvature values ​​of the light and color temporal sequence at all sampling times. Since the curvature signal generated by the solar shadow event in the light and color state space has extremely high significance, the standard deviation multiple is set to 5 instead of 3. It can be adjusted according to the specific implementation environment, and will not be elaborated further here.

[0033] In one specific implementation of this invention, the historical time period is set to within one hour before each sampling time, which can be adjusted according to the specific implementation environment. The threshold is set based on the curvature change of historical data, which enables adaptive threshold selection in different implementation environments and avoids the inapplicability of fixed thresholds in different scenarios.

[0034] Step S103: Obtain the shadow movement direction of the monitoring area at the start of each shadow transition; in the analysis window after the start of the shadow transition, determine the image brightness transition curvature sequence according to the brightness change law of the monitoring image in the direction perpendicular to the shadow movement; perform fully automatic light-seeking illumination compensation based on the correlation between the temporal change of the light color curvature value and the change of the image brightness transition curvature sequence.

[0035] Considering that random disturbances such as rapid movement of people, flickering electronic screens, or sudden changes in indoor lighting may result in large light color temporal curvature values, after selecting the start time of the shadow transition, further cross-modal verification of the solar shadow sweep event is required. This requires the system to obtain the theoretical shadow movement direction of the monitored area under the influence of sunlight. Only when the temporal nonlinear characteristics captured by the light sensor are consistent in morphology with the spatial transition characteristics observed in the image, and their movement rate conforms to astronomical laws, can the true source of the event be confirmed. This avoids misjudging random disturbances as solar shadow events that need compensation, laying the foundation for subsequent accurate and imperceptible lighting compensation.

[0036] A real event of a sun shadow sweeping across the sky, with its nonlinear temporal variation characteristics on a light sensor and its nonlinear spatial transition characteristics in a camera image, is essentially two different projections of the same event in the temporal and spatial domains. They are usually similar in form, and their spatiotemporal scale transformation relationship must conform to the motion rate defined by astronomy. Since the direction of movement of a sun shadow on any given working plane is uniquely determined by astronomical laws, this direction is an absolute benchmark independent of environmental interference. Therefore, this step, by calculating this theoretical direction—the direction of shadow movement in the monitored area at the beginning of each shadow transition—provides an unbiased, high-confidence search basis for subsequent visual analysis, thereby achieving directional constraints for the extraction of shadow spatial features.

[0037] In one specific implementation of this invention, the process of obtaining the shadow movement direction includes: in response to the selected shadow transition start time, obtaining the timestamp of that time, and combining the geographical coordinates (longitude and latitude) of the monitoring area with the attitude parameters of the physical working plane (defined by the tilt angle and azimuth angle relative to the horizontal plane), calling the standard astronomical algorithm library to perform calculations, first deriving the theoretical movement direction vector of the shadow edge on the physical working plane; then, using the pre-calibrated camera intrinsic and extrinsic parameters, projecting and transforming the theoretical movement direction vector on the physical working plane to the pixel coordinate system of the monitoring image to obtain a two-dimensional unit vector, denoted as the shadow movement direction, wherein the physical working plane is the actual illuminated surface (e.g., a desktop or floor surface) where the monitoring area is located, and its spatial position corresponds to the imaging field of view of the monitoring image. It should be noted that the process of obtaining the shadow movement direction here is a well-known technique in the field. The specific implementation can be completed using a professional astronomical computing library (such as PyEphem or NOAA Solar Calculator algorithm): that is, firstly, the solar position vector at a specific moment is calculated, then the vector is projected onto the working plane through coordinate system transformation, and then the theoretical movement direction of the shadow edge on the plane is derived based on the rate of change of the solar position caused by the Earth's rotation. Finally, the direction is mapped to the camera image coordinate system to obtain the shadow movement direction.

[0038] After accurately locating the starting point of the shadow transition and determining the direction of shadow movement, the next step is to verify, from a spatial perspective, whether the event corresponding to the start of the shadow transition conforms to the physical characteristics of solar shadows. Because the solar shadow transition process exhibits a unique penumbra structure in space, its brightness change is not a simple step or linear transition, but rather a complex nonlinear form formed by the combined effects of direct light attenuation and changes in the proportion of scattered light. This spatial transition characteristic is one of the essential attributes that distinguishes solar shadow events from other illumination disturbances, and cannot be fully captured by relying solely on temporal features. By sampling perpendicular to the shadow movement direction, the system can accurately capture the most typical brightness transition curve at the shadow edge, because the gradient change of illumination is most significant in this direction, fully reflecting the physical characteristics of the penumbra. Furthermore, random disturbances such as people walking or light flickering usually do not possess this specific spatial structure; they typically present as irregular, non-directional brightness changes in the image. Therefore, by quantitatively analyzing the brightness change pattern in this specific direction, the system can obtain spatial verification evidence independent of temporal features. Therefore, in combination with the above characteristics, the embodiments of the present invention further determine the image brightness transition curvature sequence in the analysis window after the start of the shadow transition, based on the brightness change law of the monitored image in the direction perpendicular to the shadow movement.

[0039] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the image brightness transition curvature sequence includes: The cumulative value of the grayscale gradient magnitude of all pixels in the gradient image corresponding to the monitoring image at each sampling time is calculated to determine the corresponding cumulative gradient sum; each shadow transition start time is sequentially taken as the target start time; all sampling times within a preset time window after the target start time are taken as shadow transition analysis times; among all shadow transition analysis times, the monitoring image of the shadow transition analysis time corresponding to the maximum value of the corresponding cumulative gradient sum is taken as the brightness transition significant image. In a specific implementation of this invention, the length of the preset time window is set to 5 seconds, which can be adjusted according to the specific implementation environment.

[0040] The image with significant brightness transition selected by accumulating the maximum value of the gradient has the clearest shadow edge contrast and complete penumbra structure. It can show the state where the spatial transition characteristics of the sun's shadow are most obvious at that moment. Therefore, further analysis based on this image can make the extracted image brightness transition curvature sequence more accurately reflect the nonlinear spatial characteristics of the real shadow event. It avoids feature extraction deviation caused by incomplete transition areas when the shadow just enters or is about to leave the field of view. This provides high-quality spatial verification evidence for subsequent morphological matching with the light color temporal curvature sequence, and significantly improves the accuracy of sun shadow event recognition.

[0041] Further, based on the brightness change trend of the image with significant brightness transition in the direction perpendicular to the shadow movement direction, the image brightness transition curvature sequence is determined. Specifically: the image with significant brightness transition is traversed by scanning at equal intervals with scan lines perpendicular to the shadow movement direction. The direction of the scan order is the same as the direction of shadow movement, and the number of scan lines is the same as the number of shadow transition analysis moments. The brightness values ​​of all pixels on each scan line are calculated to determine the corresponding image cross-sectional brightness. The image cross-sectional brightness of all scan lines is arranged in the scan line scanning order to determine the image cross-sectional brightness sequence. Discrete curvature values ​​are calculated for each scan line in the image cross-sectional brightness sequence to determine the image brightness transition curvature of each scan line. The image brightness transition curvature of all scan lines is arranged in the scan line scanning order to determine the image brightness transition curvature sequence at the beginning of the target moment.

[0042] The purpose of setting the number of scan lines to be the same as the number of shadow transition analysis moments is to establish dimensional consistency of spatiotemporal features, providing a directly comparable sequence structure for subsequent normalized cross-correlation calculations, enabling accurate matching of curvature features in the spatial and temporal domains without additional resampling. The process of obtaining the brightness value of each pixel includes: converting the monitored image to the LAB color space and extracting the brightness value of each pixel.

[0043] A defined image cross-sectional brightness sequence can characterize the nonlinear transition morphology of shadow edges in space, especially the illuminance gradient characteristics within the penumbra. Real solar shadow events are physically deterministic; their temporal (color change) and spatial (image transition) manifestations are projections of the same physical process—the ratio of direct sunlight to diffused light—in different dimensions. This inevitably results in highly consistent nonlinear morphological characteristics. Random disturbances (such as people moving or lights flickering) cannot simultaneously simulate this specific morphological consistency in two independent modes. Therefore, after calculating the image brightness transition curvature based on the discrete curvature formula, comparing the resulting image brightness transition curvature sequence with the sequence corresponding to the color temporal curvature values ​​allows for verification of the event's physical consistency at the morphological level, effectively distinguishing solar shadow events from random disturbances. Simultaneously, it allows for the inverse fitting of shadow movement rates, providing dual evidence for authentication decisions.

[0044] Through the aforementioned steps, dual temporal and spatial characteristics characterizing shadow events have been obtained: the sequence corresponding to the light color temporal curvature captures the nonlinear coupling changes of illuminance and color temperature in the time dimension, while the image brightness transition curvature sequence accurately depicts the transitional form of the shadow edge in the spatial dimension. These two features originate from different observation perspectives of the same physical process, and their morphological consistency and kinematic conformity constitute the key criteria for distinguishing solar shadow events from random disturbances. The system confirms the event as a solar shadow sweep event only when the two are highly similar in morphology and the fitting rate conforms to astronomical laws, and performs illumination compensation accordingly; therefore, this embodiment of the invention performs fully automatic light-seeking illumination compensation based on the correlation between the temporal changes of the light color temporal curvature value and the changes in the image brightness transition curvature sequence.

[0045] Preferably, in some possible implementations of the embodiments of the present invention, the process of performing fully automatic light-seeking illumination compensation based on the correlation between the temporal change of the light color temporal curvature value and the change of the image brightness transition curvature sequence includes: The light and color temporal curvature values ​​at all shadow transition analysis moments corresponding to the target's start moment are arranged in chronological order to determine the sequence of light and color temporal curvature values ​​at the target's start moment. This sequence construction process ensures that the temporal features and spatial features (image brightness transition curvature sequence) are precisely aligned in dimension, providing structurally consistent input data for subsequent normalized cross-correlation calculations. This enables the system to accurately quantify the morphological similarity between the two independent modal features and inversely fit the actual movement rate of the shadow, providing dual criteria for the final authentication of the sun's shadow sweeping event.

[0046] The image brightness transition curvature sequence and the light color temporal curvature value sequence are input into a normalized cross-correlation algorithm to output the spatiotemporal curvature morphology correlation coefficient and the optimal scale factor at the target's starting moment. Based on the optimal scale factor and the sampling frequency, the verification rate deviation at the target's starting moment is determined. In a specific implementation of this invention, the process of obtaining the verification rate deviation includes: determining the corresponding data-fitted shadow movement rate based on the product of the optimal scale factor and the sampling frequency at the sampling moment; obtaining the prior shadow movement rate; determining a reference rate difference value based on the difference between the data-fitted shadow movement rate and the prior shadow movement rate; and determining the verification rate deviation based on the ratio between the reference rate difference value and the prior shadow movement rate.

[0047] In one specific implementation of this invention, the a priori shadow movement rate needs to be calculated based on preset camera calibration parameters (e.g., camera height, lens focal length, etc.) and an astronomical model to determine the astronomical model shadow movement rate that the shadow should have on the working plane, i.e., the a priori shadow movement rate. This process is a well-known technique among those skilled in the art and will not be further limited or described here. It should be noted that the normalized cross-correlation algorithm is a well-known technique among those skilled in the art and will not be further limited or described here.

[0048] The spatiotemporal curvature morphology correlation coefficient calculated by the normalized cross-correlation algorithm characterizes the similarity between the temporal light color change features and the spatial shadow transition features in terms of nonlinear morphological structure. The larger the spatiotemporal curvature morphology correlation coefficient, the more the temporal nonlinear features captured by the light sensor and the spatial transition features observed in the image conform to the projection law of the same physical event, and the more likely the shadow transition start time corresponds to the true start time when the edge of the sun's shadow sweeps across the monitoring area.

[0049] The optimal scale factor calculated by the normalized cross-correlation algorithm actually contains the physical relationship of how many pixels of spatial movement correspond to the evolution of one time step. Multiplying this scale factor by the sampling frequency can be converted into a movement rate with clear physical meaning, namely the data-fitted shadow movement rate, with the corresponding unit being pixels per second. The smaller the difference between the corresponding data-fitted shadow movement rate and the prior shadow movement rate predicted by the astronomical model, the more it conforms to the celestial mechanical characteristics of the solar shadow motion. In other words, the smaller the corresponding verification rate deviation, the higher the probability that the event corresponding to the start of the shadow transition passes the kinematic consistency test, and the more likely the start of the shadow transition corresponds to the true start time when the edge of the solar shadow sweeps across the monitoring area.

[0050] Further, based on the spatiotemporal curvature morphology correlation coefficient and the verification rate deviation at each shadow transition start time, the required illumination compensation time is selected. Specifically, the shadow transition start time where the corresponding spatiotemporal curvature morphology correlation coefficient is greater than a preset morphology correlation threshold and the verification rate deviation is less than a preset rate compliance threshold is taken as the required illumination compensation time. In a specific implementation of this invention, the preset morphology correlation threshold is set to 0.9 and the preset rate compliance threshold is set to 0.2. The larger the preset morphology correlation threshold and the smaller the preset rate compliance threshold, the more stringent the selection criteria. These can be adjusted according to the specific implementation environment, and will not be elaborated further here.

[0051] All sampling moments between the last shadow transition analysis moment and the compensation cutoff moment corresponding to each illumination compensation requirement moment are taken as illumination compensation moments; the compensation cutoff moment is the first sampling moment after the shadow transition start moment when the light color temporal curvature value is less than or equal to the curvature change detection threshold.

[0052] For each shadow transition start moment, if it falls within the illumination compensation requirement moment, it indicates that this moment has been verified by the system as the true starting point of the solar shadow sweeping event, rather than random interference, through dual verification of the spatiotemporal curvature morphology correlation coefficient and the validation rate conformity. The analysis process for illumination compensation requirement moments needs to combine each shadow transition start moment with all corresponding shadow transition analysis moments. Therefore, the illumination compensation process can only be performed after the last shadow transition analysis moment corresponding to each illumination compensation requirement moment. The shadow transition process has clear start and end boundaries. Its end moment corresponds to the turning point where the curvature value in the light-color state space returns to a stable state. The compensation cutoff moment represents the stable state turning point where the curvature value in the light-color state space has fallen below the curvature change detection threshold and has continued for more than the preset silent time. This perfectly matches the physical process of the shadow completely sweeping across the working area and the illumination environment reaching equilibrium again. Therefore, the compensation cutoff moment needs to be used as the termination point of the illumination compensation process.

[0053] Based on the relative deviation between the illuminance at each lighting compensation moment and the corresponding shadow transition start moment, the final lighting power of the lighting compensation device at each lighting compensation moment is determined. In a specific implementation of this invention, the process of obtaining the final lighting power includes: performing a positive correlation mapping between the illuminance at each lighting compensation moment and the illuminance at the corresponding shadow transition start moment to determine the lighting demand at each lighting compensation moment; and multiplying the lighting demand by the rated power of the lighting device to determine the final lighting power of the lighting device at each lighting compensation moment.

[0054] Considering that directly compensating with a constant rated power of lighting equipment would cause drastic changes in the light environment and affect user visual comfort, this approach calculates the lighting demand based on the relative deviation between the illuminance at each lighting compensation moment and the corresponding shadow transition start moment. A higher lighting demand indicates a greater degree of decay in the current natural illuminance compared to its pre-event stable state, requiring a larger luminous flux for artificial lighting compensation. Furthermore, the lighting demand is used as a weight to multiply the rated power of the lighting equipment to calculate the final lighting power. This allows the final lighting power to be dynamically adjusted according to the nonlinear characteristics of natural light decay. Therefore, when lighting is applied based on the final lighting power, changes in the light environment are smooth, continuous, and imperceptible, improving user visual comfort and work experience. This event-characteristic-based customized compensation strategy ensures that the intervention of artificial lighting and the decay of natural light are precisely complementary in form, avoiding the abrupt changes in the light environment common in traditional threshold control methods.

[0055] In one specific implementation of this invention, the process of obtaining the final lighting power is expressed by the following formula: ;in, For illumination compensation needs The corresponding number The final lighting power at each lighting compensation moment; Rated power of the lighting equipment; For illumination compensation needs Illuminance; For illumination compensation needs The corresponding number Illuminance at each lighting compensation moment; For illumination compensation needs The corresponding number The lighting demand at each lighting compensation moment; under normal circumstances. The value is usually less than In extreme cases Greater than or equal to If so, the corresponding lighting demand level will be forcibly set to 1.

[0056] Finally, based on the final lighting power, fully automatic light-seeking lighting compensation is performed for all lighting compensation times at the time of lighting compensation requirement.

[0057] In summary, this application calculates the temporal curvature value of light color by combining the distribution trends of illuminance and correlated color temperature, and analyzes the correlation between its temporal change trend and the spatial brightness transition law of the monitored image perpendicular to the shadow movement direction. This allows the invention to accurately identify specific shadow sweeping events caused by solar motion by utilizing the morphological consistency between the temporal features of light color and the spatial features of the image. This spatiotemporal dual verification mechanism not only effectively eliminates interference sources such as random cloud cover and personnel movement that cause changes in illuminance but do not possess specific spatiotemporal correlation characteristics, fundamentally solving the problem of miscompensation caused by the inability to distinguish the source of illuminance change in existing technologies; but also, by performing correlation analysis between the image and temporal curvature at the beginning of the shadow transition, the system can quickly lock the nature of the event in the early stage of the shadow event, overcoming the lag defect of existing technologies that require waiting for illuminance to drop to a low threshold before passively responding, providing an accurate triggering time for achieving rapid and smooth lighting intervention; thus making the fully automatic light-seeking lighting compensation effect of this application better.

[0058] This application also provides a fully automatic light-finding illumination compensation system; please refer to [link / reference]. Figure 2 The diagram shows a structural diagram of a fully automatic light-finding illumination compensation system according to an embodiment of the present invention. The system includes: a data acquisition module 201, a shadow transition start time filtering module 202, and an illumination compensation module 203.

[0059] Data acquisition module 201 is used to acquire illuminance, correlated color temperature and monitoring images of the monitoring area at each sampling time; The shadow transition start time filtering module 202 is used to determine the light color temporal curvature value of each sampling time based on the overall distribution trend of illuminance and related color temperature corresponding to all sampling times in time sequence; and to filter out the shadow transition start time based on the temporal change trend of the light color temporal curvature value. The illumination compensation module 203 is used to obtain the shadow movement direction of the monitoring area at the beginning of each shadow transition; in the analysis window after the beginning of the shadow transition, it determines the image brightness transition curvature sequence according to the brightness change law of the monitoring image in the direction perpendicular to the shadow movement; and performs fully automatic light-seeking illumination compensation based on the correlation between the temporal change of the light color curvature value and the change of the image brightness transition curvature sequence.

[0060] It should be noted that the system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the fully automatic light-finding illumination compensation system and the fully automatic light-finding illumination compensation method embodiment provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiment, which will not be repeated here.

[0061] This application also provides a computer device; please refer to [link / reference]. Figure 3 The diagram illustrates a computer device structure according to an embodiment of the present invention. The computer device includes a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and running on the processor 302. When the processor 302 executes the computer program 303, the computer device can execute any of the fully automatic light-seeking illumination compensation methods described above.

[0062] This application also provides a computer program product that, when run on a computer device, enables the computer device to execute any of the aforementioned fully automatic light-seeking illumination compensation methods.

[0063] This application also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer device, the computer device can execute any of the fully automatic light-finding illumination compensation methods described above.

[0064] In the embodiments provided in this application, it should be understood that the computer device, computer program product and computer-readable storage medium provided are all used to perform the corresponding methods provided above, and therefore the beneficial effects they can achieve can be referred to the beneficial effects of the methods provided above, which will not be repeated here.

[0065] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0066] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A fully automatic light-finding illumination compensation method, characterized in that, The method includes: The illuminance, correlated color temperature, and monitoring images of the monitored area were collected at each sampling time. Based on the overall distribution trend of illuminance and correlated color temperature at all sampling times in chronological order, the light and color temporal curvature value at each sampling time is determined; based on the temporal change trend of the light and color temporal curvature value, the shadow transition start time is selected. The system acquires the direction of shadow movement in the monitored area at the start of each shadow transition. In the analysis window after the start of the shadow transition, it determines the image brightness transition curvature sequence based on the brightness change pattern of the monitored image perpendicular to the shadow movement direction. It then performs fully automatic light-seeking illumination compensation based on the correlation between the temporal change of the light color curvature value and the change of the image brightness transition curvature sequence.

2. The fully automatic light-finding illumination compensation method according to claim 1, characterized in that, The process of obtaining the light color temporal curvature value includes: Arrange the illuminance and correlated color temperature at each sampling time sequentially to determine the corresponding light and color state vector; Each sampling time is taken as the target time in sequence, and the light and color state vectors of the target time and all the previous sampling times are arranged in time sequence to determine the corresponding light and color state vector sequence; the discrete curvature value of the target time is calculated in the light and color state vector sequence to determine the light and color temporal curvature value of the target time.

3. The fully automatic light-finding illumination compensation method according to claim 1, characterized in that, The process of obtaining the start time of the shadow transition includes: The corresponding curvature change detection threshold is determined based on the mean and standard deviation of the light color temporal curvature values ​​of all sampling times in the historical time period of each sampling time. The sampling time when the light color temporal curvature value is greater than the corresponding curvature change detection threshold is taken as the shadow transition feature time; the shadow transition start time is obtained, wherein the sampling time before the shadow transition start time does not belong to the shadow transition feature time, and the sampling time after the shadow transition start time belongs to the shadow transition feature time.

4. The fully automatic light-finding illumination compensation method according to claim 1, characterized in that, The process of obtaining the image brightness transition curvature sequence includes: Calculate the cumulative value of the gray-level gradient magnitude of all pixels in the gradient image corresponding to the monitoring image at each sampling time, and determine the corresponding cumulative gradient sum; Each shadow transition start time is taken as the target start time; all sampling times within a preset time window after the target start time are taken as shadow transition analysis times. In all shadow transition analysis moments, the monitoring image corresponding to the maximum value of the accumulated gradient at the shadow transition analysis moment is taken as the brightness transition significant image; based on the brightness change trend of the brightness transition significant image in the direction perpendicular to the shadow movement, the image brightness transition curvature sequence is determined.

5. The fully automatic light-finding illumination compensation method according to claim 4, characterized in that, The process of determining the image brightness transition curvature sequence based on the brightness change trend of the image with significant brightness transitions in the direction perpendicular to the shadow movement includes: The image with significant brightness transitions is traversed by scanning at equal intervals using scan lines perpendicular to the direction of shadow movement. The direction of the scan sequence is the same as the direction of shadow movement, and the number of scan lines is the same as the number of shadow transition analysis moments. The brightness values ​​of all pixels on each scan line are calculated to determine the corresponding image cross-sectional brightness. The image cross-sectional brightness of all scan lines is arranged according to the scan line scanning order to determine the image cross-sectional brightness sequence. Discrete curvature values ​​are calculated for each scan line in the image cross-sectional brightness sequence to determine the image brightness transition curvature of each scan line. The image brightness transition curvature of all scan lines is arranged according to the scan line scanning order to determine the image brightness transition curvature sequence at the target start moment.

6. The fully automatic light-finding illumination compensation method according to claim 4, characterized in that, The process of performing fully automatic light-seeking illumination compensation based on the correlation between the temporal change of light color curvature value and the change of image brightness transition curvature sequence includes: Arrange the light and color temporal curvature values ​​of all shadow transition analysis moments corresponding to the target start moment in chronological order to determine the light and color temporal curvature value sequence of the target start moment. The image brightness transition curvature sequence and the light color temporal curvature value sequence are input into a normalized cross-correlation algorithm to output the spatiotemporal curvature morphology correlation coefficient and the optimal scale factor at the beginning of the target; the verification rate deviation at the beginning of the target is determined based on the optimal scale factor and the sampling frequency. Based on the spatiotemporal curvature morphology correlation coefficient and the verification rate deviation at the start of each shadow transition, the timing of illumination compensation requirements is selected. All sampling moments between the last shadow transition analysis moment and the compensation cutoff moment corresponding to each illumination compensation requirement moment are taken as illumination compensation moments; the compensation cutoff moment is the first sampling moment after the shadow transition start moment when the light color temporal curvature value is less than or equal to the curvature change detection threshold. Based on the relative deviation between the illuminance at each lighting compensation moment and the corresponding shadow transition start moment, the final lighting power of the lighting compensation device at each lighting compensation moment is determined; and fully automatic light-seeking lighting compensation is performed based on the final lighting power.

7. The fully automatic light-finding illumination compensation method according to claim 6, characterized in that, The process of obtaining the verification rate deviation includes: The corresponding data-fitted shadow movement rate is determined by multiplying the optimal scale factor by the sampling frequency at the sampling time; the prior shadow movement rate is obtained; a reference rate difference value is determined based on the difference between the data-fitted shadow movement rate and the prior shadow movement rate; and the validation rate deviation is determined based on the ratio between the reference rate difference value and the prior shadow movement rate.

8. The fully automatic light-finding illumination compensation method according to claim 6, characterized in that, The process of obtaining the illumination compensation requirement includes: The moment when the corresponding spatiotemporal curvature morphology correlation coefficient is greater than the preset morphology correlation threshold and the verification rate deviation is less than the preset rate compliance threshold is taken as the moment when illumination compensation is required.

9. The fully automatic light-finding illumination compensation method according to claim 6, characterized in that, The process of obtaining the final lighting power includes: The difference between the illuminance at each lighting compensation moment and the illuminance at the corresponding shadow transition start moment is positively correlated to determine the lighting demand at each lighting compensation moment; the product of the lighting demand and the rated power of the lighting equipment is used to determine the final lighting power of the lighting equipment at each lighting compensation moment.

10. A fully automatic light-finding illumination compensation system, characterized in that, The system includes: The data acquisition module is used to collect the illuminance, correlated color temperature, and monitoring images of the monitoring area at each sampling time. The shadow transition start time filtering module is used to determine the light and color temporal curvature value of each sampling time based on the overall distribution trend of illuminance and correlated color temperature corresponding to all sampling times in time sequence; and to filter out the shadow transition start time based on the temporal change trend of the light and color temporal curvature value. The illumination compensation module is used to obtain the shadow movement direction of the monitoring area at the beginning of each shadow transition; in the analysis window after the beginning of the shadow transition, the brightness transition curvature sequence of the image is determined according to the brightness change law of the monitoring image in the direction perpendicular to the shadow movement; and fully automatic light-seeking illumination compensation is performed based on the correlation between the temporal change of the light color curvature value and the change of the image brightness transition curvature sequence.