An AI-based method for identifying the authenticity of videos based on the temporal consistency of descaled solar shadows.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHAANXI UNIV OF SCI & TECH
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-26
Smart Images

Figure CN122090344A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of video content authenticity identification technology, and relates to an AI video authenticity identification method based on the temporal consistency of descaled solar shadows. Background Technology
[0002] With the rapid development of generative artificial intelligence technology, synthetic videos generated based on algorithms such as generative adversarial networks and diffusion models are visually very close to real-shot videos, bringing new challenges to network content governance, public opinion analysis, and judicial evidence collection.
[0003] Existing methods for video authenticity detection mainly include methods based on pixel texture feature analysis, methods based on frequency domain anomaly detection, and methods based on deep learning classification models. However, these methods generally suffer from the following shortcomings: First, they are highly dependent on specific generation models, and the detection performance drops significantly after model updates; second, they lack clear explanations of physical constraints, making it difficult to provide credible objective evidence for the detection results; and third, the detection stability decreases significantly after post-processing such as compression, cropping, or enhancement.
[0004] Videos shot in natural environments often include shadows cast by sunlight. The sun's position in the sky follows definite astronomical laws, and the direction and length of its shadow change continuously, monotonically, and physically consistently over time. In contrast, AI-generated videos focus more on visual consistency during generation and struggle to simultaneously satisfy the physical constraints of shadow geometry and temporal evolution.
[0005] Therefore, it is necessary to propose a video authenticity identification method that does not rely on specific generation models and is based on objective physical laws, so as to improve the reliability and interpretability of AI video authenticity detection. Summary of the Invention
[0006] The purpose of this invention is to provide an AI video authenticity identification method based on the temporal consistency of descaled solar shadows. This method does not rely on the actual size of the object or the absolute physical length of the shadow. It only uses the observable changes in the direction and relative length of the shadow in the video to construct a physical consistency discrimination model, thereby achieving effective identification of the authenticity of the video.
[0007] This invention is achieved through the following technical solution: An AI video authenticity identification method based on descaled solar shadow temporal consistency includes the following steps: Step 1: Set the core parameters, including video frame sampling interval, shadow region extraction threshold, shadow direction angle calculation accuracy, and shadow length normalization coefficient; Step 2: Construct the objective function and set constraints; combine the objective function and constraints to construct a complete model. Step 3: Solve the model using an algorithm that combines temporal consistency constraint analysis with anomaly detection, and output the conclusions and corresponding confidence scores.
[0008] The present invention also has the following technical features: Preferably, the video frame sampling interval set in step one is 1 second by default, and the shadow region extraction threshold is 0.81; The accuracy of shadow direction angle calculation includes a 15° threshold for sudden changes in shadow direction angle and a 30% threshold for length jumps. The confidence score threshold for the shadow length normalization coefficient is 60 points.
[0009] Preferably, the constraints in step two include shadow temporal continuity constraints, feature extraction effectiveness constraints, physical law consistency constraints, and model adaptability constraints.
[0010] Furthermore, the shadow temporal continuity constraint is that the change in shadow direction angle between adjacent frames does not exceed 15° and the relative length change rate does not exceed 30%; the feature extraction effectiveness constraint is that the total number of pixels in the shadow region is not less than 50.
[0011] Preferably, the method for solving the model using an algorithm combining time series analysis and anomaly detection in step three specifically includes: Video keyframes are extracted at preset intervals, and grayscale conversion, filtering, edge enhancement, shadow region extraction and contour fitting are performed on each frame to obtain the shadow direction angle and pixel length. A relative length sequence is constructed by normalization, and the change amount and rate of change between adjacent frames are calculated. By comparing the detected abnormal features with the constraint threshold, and combining the weighted discriminant function, the confidence score and the discriminant conclusion are output.
[0012] Furthermore, in step three, the discrimination algorithm is fully automated using MATLAB software. Its image processing toolbox is used to extract shadow regions and perform contour analysis. The numerical calculation toolbox is used to construct feature sequences and perform consistency checks. Data storage functions are used to record the feature values, changes, and anomaly detection results of each frame.
[0013] Preferably, the output conclusion in step three includes: high probability of being a genuine filming or suspected of being a composite or tampered with.
[0014] Preferably, the output conclusions in step three also include the abnormal feature types and the distribution of abnormal frame locations. The output file includes the core discrimination conclusions, confidence score reports, shadow time series feature change curves, abnormal frame marker screenshots, detailed feature value data tables for each frame, and MATLAB simulation source code.
[0015] Preferably, it also includes the step of inferring the actual video shooting location and date by combining a spatiotemporal inversion model, specifically including: The video is preprocessed to obtain several binary denoised images, and the vertex coordinates of the shadow of the straight rod are extracted. The problem of speculating the shooting location and date is transformed into a single-objective optimization problem, and the problem is analyzed to establish the objective function, decision variables and constraints. A global traversal search was performed to filter out several possible shooting locations.
[0016] Compared with the prior art, the present invention has the following technical effects: This invention utilizes only the observable changes in shadow direction and relative length in videos to construct a physical consistency discrimination model, enabling effective identification of video authenticity. It abandons the dependence on the actual size of objects and the absolute length of shadows, transforms the shadow direction into an angle parameter independent of pixel scale, and constructs a relative length sequence through "single frame length / average length" to eliminate interference from shooting distance and focal length, thus adapting to public video scenarios without reference objects. This invention aims to "maximize credibility and interpretability," constructs a weighted objective function, and combines directional temporal consistency, length temporal consistency, and feature extraction effectiveness scores with four types of constraints to ensure that the judgment conforms to the laws of solar motion. This invention automates the entire chain of operations from "keyframe extraction → grayscale conversion / filtering / edge enhancement preprocessing → shadow direction and length calculation → temporal consistency verification → anomaly identification" using MATLAB to achieve feature extraction, sequence analysis and result output, and the discrimination process is traceable. Based on real video identification, this invention can infer the shooting location and date by combining a spatiotemporal inversion model; and it does not rely on a specific AI generation model. It is still effective for compressed, cropped videos and high-quality AI-synthesized videos. The accuracy rate for real video identification is 92% and the recognition rate for AI-synthesized videos is 88%. It is suitable for scenarios such as network governance. Attached Figure Description
[0017] Figure 1 This is a flowchart of the image preprocessing process of the present invention; Figure 2 The image is the result obtained by processing it using MATLAB software. Detailed Implementation
[0018] The present invention will be further described in detail below with reference to specific embodiments. These descriptions are for explanation purposes only and are not intended to limit the scope of the invention.
[0019] This invention provides an AI video authenticity identification method based on the temporal consistency of descaled solar shadows, comprising the following steps: Step 1: Set the core parameters, including video frame sampling interval, shadow region extraction threshold, shadow direction angle calculation accuracy, and shadow length normalization coefficient; Video frame sampling interval: The default is 1 second, which can be adjusted according to the video duration and the rate of shadow change to ensure that the continuous change features of the shadow can be captured; Shadow region extraction threshold: 0.81, determined based on a large amount of experimental data, is used to distinguish shadow regions from background regions to ensure the accuracy of shadow region extraction; Shadow direction angle calculation accuracy: accurate to 0.1°, ensuring the accuracy of direction angle change calculation and meeting the timing consistency constraint judgment requirements; Shadow length normalization coefficient: Based on the average value of the shadow pixel length of all frames, it is used to eliminate the influence of shooting distance, focal length and object size on shadow length; Direction angle abrupt change threshold: 15°. If this threshold is exceeded, it is determined to be an abnormal change in shadow direction. Length jump threshold: 30%, which means that when the relative length change rate of the shadows of adjacent frames exceeds 30%, it is judged as an abnormal change in shadow length; Confidence score threshold: 60 points (out of 100). Scores above this threshold are considered "highly likely to be genuine" and scores below this threshold are considered "suspected to be fabricated or tampered with". Step 2: Construct the objective function and set constraints; combine the objective function and constraints to construct a complete model. With the goal of maximizing the credibility and interpretability of the video authenticity assessment results, an objective function is constructed, as shown in the following formula: in, The objective function value, The shadow direction temporal consistency score is given (value range 0-100). The relative length of the shadow is scored for temporal consistency (value range 0-100). The effectiveness score for feature extraction is given (value range 0-100). , , These are the weighting coefficients, and Based on the importance of each factor in the actual application scenario, the default setting is... =0.4, =0.4, =0.2; The constraints include shadow temporal continuity constraints, feature extraction effectiveness constraints, physical law consistency constraints, and model adaptability constraints; Shadow temporal continuity constraints include constraints on the change in shadow orientation angle between adjacent frames and constraints on the rate of change of shadow relative length between adjacent frames. The constraint on the change in shadow orientation angle between adjacent frames is expressed as follows: in, i =2,3,…,n (n is the number of keyframes extracted). For the first i Frame shadow direction angle, For the first i- 1-frame shadow direction angle; The constraint on the relative length change rate of shadows between adjacent frames is expressed as: in, , For the first i Frame shadow pixel length, This is the average length of the shadow pixels across all frames. For the first i- Relative length of shadow in 1 frame.
[0020] The specific constraint on the effectiveness of feature extraction is the total number of pixels in the shadow region: ,in This represents the total number of pixels extracted from the shadow region in each frame, ensuring the accuracy of contour fitting and feature calculation.
[0021] The physical law consistency constraint includes the shadow direction change trend constraint and the shadow relative length change trend constraint. Specifically, the direction angle sudden change threshold is 15°. If it exceeds this threshold, it is judged as an abnormal change in the shadow direction. Length jump threshold: 30%, which means that when the relative length change rate of the shadows of adjacent frames exceeds 30%, it is judged as an abnormal change in shadow length; The model fit constraint satisfies the following formula: In the formula, The shadow direction angle after descaling. The relative length of the shadow after descaling. The solar altitude angle, The solar declination angle, The latitude of the shooting location. It is the solar hour angle.
[0022] Association function , and The calculation formula is as follows: in, n Number of keyframes; in , For the first i Frame shadow pixel length, The average length; in, 50 is the average number of pixels in the shadow region of all keyframes, and 50 is the effective threshold for feature extraction.
[0023] Step 3: Solve the model using an algorithm that combines temporal consistency constraint analysis with anomaly detection, and output the conclusions and corresponding confidence scores.
[0024] Video keyframes are extracted at preset intervals, and keyframe preprocessing is performed using the MATLAB Image Processing Toolbox. Each frame undergoes grayscale conversion, filtering, edge enhancement, shadow region extraction, and contour fitting to obtain the shadow direction angle and pixel length. The image preprocessing workflow is as follows: Figure 1 As shown, the processing results are as follows Figure 2 As shown; A relative length sequence is constructed by normalization, and the change amount and rate of change between adjacent frames are calculated. By comparing the detected abnormal features with the constraint threshold, and combining the weighted discriminant function, the confidence score and the discriminant conclusion are output.
[0025] like F A score of ≥60 and meeting all constraints is considered "highly probable as actual filming"; if F A score below 60 or violation of any constraint will be deemed "suspected of being synthesized or tampered with".
[0026] The output conclusions also include the types of abnormal features and the distribution of abnormal frame locations. The output file contains the core discrimination conclusions, confidence score report, shadow time series feature change curve, abnormal frame marker screenshots, detailed feature value data tables for each frame, and MATLAB simulation source code.
[0027] Step four involves using a spatiotemporal inversion model to infer the actual location and date of the video recording. This includes: Keyframes are extracted from the video at preset intervals (e.g., 2 minutes / frame). A streamlined process is then performed using MATLAB: first, color frames are converted to grayscale, and noise is suppressed using Gaussian or median filtering; then, the contrast between the shadow and background edges is enhanced using Canny or Sobel operators; the shadow region is segmented based on a threshold of 0.81; isolated noise points are eliminated using morphological opening operations to obtain a binary denoised image; for the straight rod shadow in the binary denoised image, a contour fitting algorithm is used to extract the complete shadow contour, identifying the endpoint (vertex) of the shadow furthest from the straight rod, and reading the pixel coordinates (x, y) of this vertex using the MATLAB image coordinate system. The vertex coordinates corresponding to the timestamp of each frame are recorded to form a coordinate dataset.
[0028] The problem of speculating the shooting location and date is transformed into a single-objective optimization problem, and the problem is analyzed to establish the objective function, decision variables and constraints. Set the latitude of the shooting location ( β (Unit: degrees), longitude ( l (Unit: degrees) and accumulated days are the decision variables; Constructed based on the least squares method, with the first... i Theoretical value of frame shadow length L 0 (i) Compared with actual value The objective is to minimize the sum of squared differences, expressed as: in, The solar altitude angle is derived from the formula, calculated by combining latitude, longitude, and date, and then determined by the height of the vertical rod. h calculate, , This is the actual length of the shadow; The constraint is: latitude β ∈[0°,60°], Longitude l ∈[0°, 180°]; Solar declination angle ∈[-23.5°, 23.5°]; The relative error between theoretical and actual shadow length values is ≤10%; A global traversal search was performed to filter out several possible shooting locations. Specifically, a double / triple loop traversal algorithm based on MATLAB was written to perform latitude and longitude traversal. β ,longitude l Perform a double cycle, or adjust the latitude. β ,longitude l The process involves a triple cycle over several days. Set an error threshold and filter out multiple groups that meet the conditions. b, l It outputs the error value and confidence level for each location, completing the estimation of the shooting location. If the date is unknown, it simultaneously outputs the day with the highest matching degree.
[0029] Verified by multiple sets of test videos, the algorithm achieved an accuracy rate of 92% in distinguishing real videos and 88% in recognizing high-quality AI-synthesized videos.
[0030] For real videos, the change in orientation angle is less than 15° and the change rate in length is less than 30%, which fully meets the constraints. For AI-synthesized videos, 88% of the samples have abrupt changes in orientation angle or length, which exceed the constraint threshold and are judged as abnormal.
[0031] For videos with clear shadows, the total number of shadow outline pixels is greater than 50, which meets the feature extraction validity constraint; for videos with blurry or severely occluded shadows, the system will output a message "feature extraction is invalid and cannot be judged" to avoid misjudgment.
[0032] The variation patterns of the shadow direction angle and relative length are highly consistent with the astronomical laws of the sun's motion (error less than 10%). The overall physical logic of the model is self-consistent, and the judgment criteria have clear physical meaning.
[0033] The output file includes: core discrimination conclusions, confidence score report, shadow temporal feature change curve, screenshots of abnormal frames, detailed data tables of feature values for each frame, and MATLAB simulation source code. The confidence score report can be directly used for judicial evidence collection or public opinion analysis, and the feature change curve can visually demonstrate the evolution of the video shadow.
Claims
1. An AI video authenticity discrimination method based on descaling solar shadow timing consistency, characterized in that, It comprises the following steps: Step one, set the core parameters including video frame sampling interval, shadow area extraction threshold, shadow direction angle calculation accuracy and shadow length normalization coefficient; Step two, build the objective function, set the constraint conditions, and build the complete model combining the objective function and the constraint conditions; Step three, solve the model by using the algorithm of time sequence consistency constraint analysis combined with abnormality detection, and output the conclusion and the corresponding confidence score.
2. The AI video authenticity discrimination method based on descaled solar shadow timing consistency according to claim 1, characterized in that, The video frame sampling interval set in step one is 1 second by default, and the shadow area extraction threshold is 0.81; The shadow direction angle calculation accuracy includes a shadow direction angle mutation threshold of 15° and a length jump threshold of 30%; The confidence score threshold of the shadow length normalization coefficient is 60 points. 3.The AI video authenticity discrimination method based on descaled solar shadow timing consistency according to claim 1, characterized in that, The constraint conditions in step two include shadow time sequence continuity constraint, feature extraction effectiveness constraint, physical law consistency constraint and model adaptability constraint.
4. The AI video authenticity discrimination method based on descaled solar shadow timing consistency according to claim 3, characterized in that, The shadow time sequence continuity constraint is that the change amount of adjacent frame shadow direction angle is not more than 15°, and the relative length change rate is not more than 30%; The feature extraction effectiveness constraint is that the total number of shadow area pixel points is not less than 50. 5.The AI video authenticity discrimination method based on descaled solar shadow timing consistency according to claim 1, characterized in that, The method of solving the model by using the algorithm of time sequence analysis combined with abnormality detection in step three specifically includes: Extract the video key frame according to the preset interval, perform gray processing, filtering, edge enhancement, shadow area extraction and contour fitting on each frame of image to obtain the shadow direction angle and pixel length; Construct the relative length sequence through normalization processing, calculate the change amount and change rate of adjacent frames; Compare the constraint threshold to detect abnormal features, and output the confidence score and the discrimination conclusion by combining the weighted discrimination function.
6. The AI video authenticity discrimination method based on descaled solar shadow timing consistency according to claim 5, characterized in that, The discrimination algorithm in step three realizes full-process automation by means of MATLAB software, uses its image processing toolbox to complete shadow area extraction and contour analysis, realizes the construction and consistency test of feature sequence by means of numerical calculation toolbox, and uses data storage function to record the feature value, change amount and abnormality determination result of each frame completely.
7. The AI video authenticity discrimination method based on descaled solar shadow timing consistency according to claim 1, characterized in that, The output conclusion in step three includes: high possibility of real shooting or suspected synthesis or tampering.
8. The AI video authenticity discrimination method based on descaled solar shadow timing consistency according to claim 7, characterized in that, The output conclusion in step three also includes the type of abnormal features and the distribution of abnormal frame position, and the output file includes the core discrimination conclusion, confidence score report, shadow time sequence feature change curve, abnormal frame marked screenshot, detailed data table of each frame feature value and MATLAB simulation source code. 9.The AI video authenticity discrimination method based on descaled solar shadow timing consistency according to claim 1, characterized in that, It also includes the step of inferring the real video shooting location and date combined with the space-time inversion model, which specifically includes: Image preprocessing is performed on the video to obtain a plurality of binary denoising pictures, and the vertex coordinates of the straight rod shadow are taken out; The problem of inferring the shooting location and date is converted into a single objective optimization problem, and the problem is analyzed to determine the objective function, decision variable and constraint condition; Global traversal search is performed to screen out a plurality of possible shooting locations.