A live camera picture detection method, system, electronic device and computer readable storage medium

CN122933890APending Publication Date: 2026-10-16HANGZHOU XINGXI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611417769.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0007]本申请实施例提供了一种直播相机画面检测方法、系统、电子设备和计算机可读存储介质,以至少解决相关技术中丢帧检测方法检测结果准确性低的问题

Benefits of technology

[0018] Compared to related technologies, the live camera image detection method, system, electronic device, and computer-readable storage medium provided in this application generate a color alternation test signal, acquire the video to be tested derived from the optical acquisition of the color alternation test signal by the live camera under test, extract the color pixel features of each frame in the video to be tested at a preset sampling position and generate color feature values, and determine whether there are missing frames in the video to be tested based on the comparison results of the color feature values ​​of two adjacent frames. This application solves the problems of high false positive rate and high computational cost caused by the reliance on real image comparison in related technologies for live camera image detection schemes, achieving high determinism and low computational cost for frame integrity detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933890A_ABST
    Figure CN122933890A_ABST
Patent Text Reader

Abstract

The application relates to a live camera picture detection method and system, electronic equipment and a storage medium, comprising: generating a color alternation test signal, obtaining a to-be-detected video derived by optical collection of the color alternation test signal by a measured live camera, extracting color pixel features of each frame of picture in the to-be-detected video at a preset sampling position and generating color feature values, and determining whether the to-be-detected video has frame loss based on a comparison result of the color feature values of adjacent two frames of pictures. Through the application, the problem of high misjudgment rate and large calculation cost caused by the fact that a live camera picture detection scheme in the related art relies on real picture comparison is solved, and high-determinacy and low-computing-load frame integrity detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video quality detection technology, and in particular to a method, system, electronic device, and computer-readable storage medium for detecting live camera footage. Background Technology

[0002] In the field of video quality inspection technology, live streaming cameras, as the core acquisition devices of live streaming systems, need to continuously and stably capture video frames at the target frame rate (such as 30fps or 60fps).

[0003] Frame dropping occurs when a camera fails to capture all frames at the predetermined frame rate during recording, resulting in a video file containing fewer frames than the theoretically required frame rate for a given time period. Frame dropping directly causes video quality issues such as stuttering and frame skipping in live streams, severely impacting the viewing experience.

[0004] Among the relevant technologies, the first type is the frame difference method, which calculates the pixel-by-pixel difference between adjacent frames of the video to be detected. When the difference is lower than a preset threshold, the frame is determined to be a duplicate frame, and then it is inferred that there is a frame loss phenomenon. The second type is the brightness comparison method, which extracts the brightness or grayscale information of each frame and judges the amount of change between frames by the brightness difference between frames, thereby inferring whether there are duplicate frames or frame loss.

[0005] Both of the aforementioned technical solutions use real-world scene video as the detection input and rely on visual differences between adjacent frames for judgment. When the scene is static or has minimal motion, adjacent frames are highly similar, which may cause normally alternating frames to be misjudged as duplicate frames. Furthermore, due to encoding noise, genuine duplicate frames may exhibit slight differences in pixel values ​​after low-level encoding and decompression, potentially leading to missed detections of dropped frames. Therefore, the reliability of this type of detection conclusion is highly dependent on the scene content and lacks deterministic indicators.

[0006] Currently, no effective solution has been proposed to address the issue of low accuracy in frame loss detection methods in related technologies. Summary of the Invention

[0007] This application provides a live camera image detection method, system, electronic device, and computer-readable storage medium to at least solve the problem of low accuracy of frame loss detection results in related technologies.

[0008] In a first aspect, embodiments of this application provide a method for detecting live camera footage, the method comprising: Generate a color alternation test signal, wherein the color alternation test signal includes pure color frames of multiple colors that are alternately presented according to a preset target frame rate; The video to be tested is obtained by optically acquiring the color alternation test signal from the live streaming camera under test; At a preset sampling position, the color pixel features of each frame in the video to be detected are extracted, and the color feature value of each frame is generated based on the color pixel features. Based on the comparison result of the color feature values ​​of two adjacent frames, it is determined whether there are any dropped frames in the video to be detected.

[0009] In some embodiments, determining whether the video to be detected has missing frames based on the comparison results of color feature values ​​of two adjacent frames includes: The display timestamp of each frame in the video to be detected is extracted frame by frame, and the display timestamp is combined with its corresponding color feature value to form a frame information sequence; By traversing the frame information sequence, and based on the comparison results of the color feature values ​​of two adjacent frames, it is determined whether the video to be detected has any dropped frames.

[0010] In some embodiments, the multi-color solid frame is two different solid color frames, and the color alternation test signal is a video in which the two different solid color frames are presented alternately. The determination of whether the video to be detected has dropped frames based on the comparison results of color feature values ​​of two adjacent frames includes: Scan the frame information sequence to detect whether the color feature values ​​of two adjacent frames are the same; If two adjacent frames are found to have the same color feature value, it is determined that there is a frame drop at the position corresponding to the two adjacent frames, and the position range and logarithm of the two adjacent frames with the same color feature value are recorded.

[0011] In some embodiments, generating the color alternation test signal includes: A preset cyclic color sequence containing multiple solid color frames is provided, and a unique state index value is configured for each color in the cyclic color sequence; The cyclic color sequence is played alternately at the target frame rate to generate a color test signal with cyclic timing characteristics, wherein the length of the cyclic color sequence is greater than the maximum number of consecutive frame drops that the live streaming camera under test is estimated to be possible.

[0012] In some embodiments, determining whether the video to be detected has dropped frames based on the comparison results of color feature values ​​of two adjacent frames includes: Based on the color feature values, extract the state index values ​​corresponding to the colors of two adjacent frames; Subtract the state index value of the previous frame from the state index value of the current frame to obtain the index difference, and use the value obtained by modulo the index difference with the length of the cyclic color sequence as the state span. If the state span is equal to 1, it is determined that there are no dropped frames; If the state span is equal to 0, it is determined that the camera capture is stuck, resulting in duplicate frames; If the state span is greater than 1, it is determined that a frame loss has occurred, and the specific number of consecutively lost frames is determined to be the state span minus 1.

[0013] In some embodiments, the step of extracting the color pixel features of each frame in the video to be detected at a preset sampling position, and generating the color feature value of each frame based on the color pixel features, includes: The RGB three-channel values ​​of pixels are sampled at the top left, top right, bottom left, bottom right and center of each frame to obtain the color pixel features corresponding to each frame. Based on the color pixel features corresponding to each frame, the average value of the RGB three-channel values ​​of each sampling point is calculated, and the average value is encoded into a string in a preset format to obtain the color feature value of each frame.

[0014] In some embodiments, the method further includes: For each frame in the frame information sequence, the rounded-down value of its display timestamp is obtained as the identifier of the corresponding second. Each frame is grouped according to its corresponding second number, and the actual number of frames in each group is counted. The actual number of frames and the frame loss determination results are output as a structured data report containing a second-by-second summary report and / or a frame-by-frame detailed report.

[0015] Secondly, embodiments of this application provide a live camera image detection system, the system comprising: a signal generation module, a video acquisition module, and a detection module, wherein: The signal generation module is used to generate a color alternation test signal, wherein the color alternation test signal includes pure color frames of multiple colors that are alternately presented according to a preset target frame rate; The video acquisition module is used to acquire the video to be tested exported by the live camera under test through optical acquisition of the color alternation test signal; The detection module is used to extract the color pixel features of each frame in the video to be detected at a preset sampling position, generate the color feature value of each frame based on the color pixel features, and determine whether there are any dropped frames in the video to be detected based on the comparison result of the color feature values ​​of two adjacent frames.

[0016] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.

[0018] Compared to related technologies, the live camera image detection method, system, electronic device, and computer-readable storage medium provided in this application generate a color alternation test signal, acquire the video to be tested derived from the optical acquisition of the color alternation test signal by the live camera under test, extract the color pixel features of each frame in the video to be tested at a preset sampling position and generate color feature values, and determine whether there are missing frames in the video to be tested based on the comparison results of the color feature values ​​of two adjacent frames. This application solves the problems of high false positive rate and high computational cost caused by the reliance on real image comparison in related technologies for live camera image detection schemes, achieving high determinism and low computational cost for frame integrity detection. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram illustrating an application scenario of a live camera image detection method according to an embodiment of this application; Figure 2 This is a flowchart of a live camera image detection method according to an embodiment of this application; Figure 3 This is a structural block diagram of a live camera image detection system according to an embodiment of this application; Figure 4 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0021] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0022] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0023] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0024] The live camera image detection method provided in this application embodiment can be applied in the automated testing and quality inspection environment of live streaming equipment. Figure 1This is a schematic diagram illustrating an application scenario of a live camera image detection method according to an embodiment of this application, such as... Figure 1 As shown, the scenario includes a standard display device 11, a live streaming camera under test 12, and a test computer 10. The standard display device 11 and the test computer 10 are connected via a video output interface, and the live streaming camera under test 12 is aligned with the screen area of ​​the standard display device 11 via a fixed bracket. Furthermore, the test computer 10 has a built-in image detection program. Through this program, the test computer 10 outputs a pre-constructed color alternation test signal to the standard display device 11. The live streaming camera under test optically acquires and records the test signal played on the screen of the standard display device 11 to form a video to be tested. The test computer 10 reads the video to be tested and, without requiring full-resolution decoding, extracts the color feature values ​​and display timestamps of specific spatial coordinate points. By comparing the color characteristics of two adjacent frames, it determines the continuity between frames, thereby achieving high-precision camera frame drop detection and quantitative measurement.

[0025] In this embodiment, the standard display device 11 may be a monitor or test light source screen with a specific refresh rate (such as 60Hz and above) and color reproduction that meets a preset threshold (such as supporting 100% sRGB color gamut); the live streaming camera 12 under test includes, but is not limited to, various types of external cameras, live streaming cameras, integrated live streaming machines and professional-grade streaming cameras; the test computer 10 is a workstation, PC server or automated test cabinet with certain data processing capabilities.

[0026] This embodiment provides a method for detecting live camera footage. Figure 2 This is a flowchart of a live camera image detection method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps: S201, Generate a color alternation test signal, wherein the color alternation test signal includes pure color frames of multiple colors that are presented alternately according to a preset target frame rate.

[0027] In this step, the test computer is configured according to preset parameters and generates a video stream signal that conforms to a specific pattern, namely the color alternation test signal, through a graphics rendering interface (such as OpenGL or DirectX) or a video encoding library.

[0028] In one embodiment, the solid color frame is a solid color frame of two different colors, and the color alternation test signal is a video in which the two solid color frames of different colors are presented alternately; for example, a standard test video is generated that alternates between solid red frames and solid green frames at a preset target frame rate N (fps), where the RGB value of the solid red frame is (255, 0, 0) and the RGB value of the solid green frame is (0, 255, 0), and this test video is recorded as the color alternation test signal; In one embodiment, the test computer pre-sets a cyclic color sequence containing multiple solid color frames. The length of the cyclic color sequence is defined as the total number of distinct solid color frames contained in a complete cyclic color sequence. Taking the length M of the cyclic color sequence as an example, the test computer establishes an ordered set of colors and assigns a unique state index value (e.g., Index = 0, 1, ..., M-1) to each color in the cyclic color sequence. The length M of this cyclic color sequence is greater than the maximum number of consecutive frame drops that the tested live streaming camera is estimated to be possible. This maximum number of consecutive frame drops can be determined by those skilled in the art based on camera parameters.

[0029] For example, if it is estimated that the camera will lose a maximum of 2 consecutive frames under extreme bus load, then M must be set to a value greater than 2; optionally, in this embodiment, M=4 is selected, including red solid color frames (RGB: 255, 0, 0), green solid color frames (RGB: 0, 255, 0), blue solid color frames (RGB: 0, 0, 255) and yellow solid color frames (RGB: 255, 255, 0), and their corresponding state index values ​​are set to 0, 1, 2, and 3 respectively.

[0030] It should be noted that configuring the state index value as consecutive natural numbers (i.e., an arithmetic sequence with a common difference of 1) is only a preferred embodiment of this application. Its main purpose is to greatly simplify the calculation logic of the state stride during subsequent determination. The function of this state index value is to establish a unique mathematical label with a temporal regularity for the color of the corresponding image. In practical applications, the setting of the state index value for each frame is not limited to an arithmetic sequence with a common difference of 1, as long as there is a preset, traceable deterministic regularity between the numbers before and after the index value sequence. Specifically, the selection range of the state index value can be flexibly extended to other types of arithmetic sequences (e.g., sequences with a common difference of 2 or a specific step size), geometric sequences, or sequences with other deterministic mapping regularities between the numbers before and after. Those skilled in the art will understand that when using other sequences with the aforementioned patterns as state index values, it is sufficient to replace the corresponding calculation formula with a mathematical analytical algorithm that matches the pattern of the sequence in the subsequent judgment calculation stage (for example, replacing the modulo operation of dividing by the length M with the corresponding difference divided by the common difference, or using a mapping lookup table, etc.). This will also achieve the goal of tracking the timing state and accurately quantifying the number of consecutive frame drops. The use of a continuous sequence with a common difference of 1 as the state index value in this application is merely a preferred embodiment to reduce computational overhead, and this specific example does not constitute a limitation on the rules for setting the state index value.

[0031] Furthermore, the test computer alternately plays the cyclic color sequence at a preset target frame rate (such as 30fps or 60fps) required by the live camera under test, generating a color test signal with cyclic timing characteristics. This mechanism upgrades the continuously presented video frames from simple color alternation to a timing state machine with an incrementing state index value, providing a physical source signal basis for subsequent quantitative measurement to solve the problem of multiple consecutive frame loss.

[0032] S202, acquire the video to be tested exported from the live streaming camera under test by optically acquiring the color alternation test signal.

[0033] The test computer instructs a standard display device to play the generated alternating color test signal in full screen. The image sensor (CMOS / CCD) and lens module of the live streaming camera under test are set to be aligned with the screen of the standard display device, and continuous optical acquisition is performed according to the acquisition frame rate set in its firmware.

[0034] In one alternative embodiment, the live streaming camera under test encapsulates the acquired video stream into a video file (such as MP4 or MOV format) using an internal encoder (such as an H.264 or H.265 hardware encoder). The test computer obtains this video file from the live streaming camera under test via a USB protocol bus or local area network protocol and records it as the video to be tested.

[0035] The optical acquisition process described in this embodiment does not require any invasive modifications or interface adaptations to the hardware or underlying driver of the camera under test, and has universal testing attributes for all device categories.

[0036] S203, at a preset sampling position, extract the color pixel features of each frame in the video to be detected, and generate the color feature value of each frame based on the color pixel features.

[0037] In processing the video to be tested, because the camera under test records the screen's light-emitting array using optical acquisition, the camera sensor's shutter scanning cycle is often not absolutely synchronized with the display device's screen's line-by-line refresh cycle and vertical synchronization signal. This asynchronous acquisition easily causes image tearing at the physical stitching points, resulting in a mixed state where the upper half of a single frame may be in the preceding color state (e.g., red) and the lower half in the following color state (e.g., green), or pixel aliasing may occur at color boundaries (e.g., yellow banded artifacts). To address this type of image tearing interference caused by asynchrony, using the conventional method of calculating the average pixel value across the entire screen results in obtaining invalid intermediate mixed colors, causing the state determination to fail.

[0038] Considering the above problems, in a preferred embodiment, the extraction program uses a five-point sampling method as the preset sampling position execution logic: for each frame of RGB raw image data of the decoded output, the sampling points are located in the upper left corner, upper right corner, lower left corner, lower right corner, and center of the image. The RGB three-channel values ​​of these five discrete sampling points are extracted as the color pixel features corresponding to that frame.

[0039] Furthermore, the extraction program collects the corresponding color pixel features based on five location points and calculates the arithmetic mean of the RGB three-channel values ​​of each sampling point as the color feature value of the extracted frame. In this embodiment, by reducing the global pixel resolution to five specific pixel coordinate points (i.e., a total of 15 bytes of raw data need to be extracted), the computational overhead is reduced to an extremely low level, enabling high-speed processing capabilities adapted to 4K resolution and 60fps specifications for the video to be detected.

[0040] In some optional embodiments, the extraction program encodes the obtained RGB three-channel arithmetic mean into a string in a preset format (preferably a six-digit hexadecimal string format, such as "RRGGBB"), which constitutes the color feature value of the current frame. This structured encoding mechanism compresses the color space, which originally had continuous floating-point attributes, into discrete and uniquely corresponding string key-value pairs to support subsequent efficient matching operations.

[0041] In other embodiments, the aforementioned five sampling points (i.e., the top left, top right, bottom left, bottom right, and center points of the image) can be replaced with other combinations of fixed coordinate positions for the frame color feature sampling locations. For example, only the pixel at the center of the image can be extracted as a sampling point, or nine position regions evenly distributed according to a nine-square grid can be extracted as sampling points, or the average RGB channel value of the central region of the frame (e.g., the central 16×16 pixel matrix region) can be extracted. In this example, the selected sampling locations need to reflect the overall dominant color tone of the video frame, and the location distribution should be able to avoid physical tearing areas in the image caused by the asynchronous refresh cycle of the display device and the acquisition cycle of the camera's image sensor.

[0042] S204: Extract the display timestamp of each frame in the video to be detected frame by frame, and combine the display timestamp with its corresponding color feature value to form a frame information sequence.

[0043] The test computer uses an audio / video detection tool to extract the display timestamp (PTS, recorded to the second) of each frame in the video to be tested. Additionally, a linear data mapping table is established, and the extracted display timestamps are bound to the color feature values ​​generated in step S203 using key-value pairs based on the global frame sequence number (i.e., physical arrangement order) to construct a temporally arranged frame information sequence.

[0044] S205, based on the comparison results of the color feature values ​​of two adjacent frames, determine whether there are any dropped frames in the video to be detected.

[0045] In the first case, if the solid color frame uses two different solid color frames, that is, the video stream uses two colors alternate, the frame loss is determined by directly detecting whether the color feature values ​​of two adjacent frames are consistent.

[0046] Under normal hardware recording mechanisms, the visual output of the color alternation test signal will inevitably be different in two consecutive frames. If the color feature values ​​of two adjacent frames are determined to be equal, it indicates that frame duplication exists in the internal buffer of the tested live streaming camera. Furthermore, combining the timestamps obtained in the above steps, this duplicated frame indicates that the hardware stream failed to capture new data at the moment of physical capture, and replaced the old frame with a supplementary frame to maintain the frame rate output, corresponding to a real data frame loss event. This record shows the physical location interval index and occurrence logarithm of two adjacent frames with the same color feature value in the sequence.

[0047] The aforementioned judgment logic uses the same color between two adjacent frames as the basis for judging frame loss. In the case of consecutive even-number frame loss in the camera hardware, the adjacent images remaining in the video to be detected still maintain the red-green alternation state. If the first alternation judgment logic is used as described above, the situation of consecutive even-number frame loss will be missed.

[0048] Considering the above problems, this embodiment also provides a method for extracting the state index value mapped back to the color feature values ​​of two adjacent frames in a multi-dimensional cyclic color sequence (e.g., length M=4) scenario, and letting the state index value corresponding to the previous frame be Index_{previous}. In a multi-dimensional cyclic color sequence scenario (e.g., the length of the cyclic color sequence is defined as M, and M≥3), the state span between two adjacent frames in the temporal state machine is calculated, and this state span is denoted as Stride. The formula for calculating the state span is defined as: Stride = (Index_{current} - Index_{previous}) mod M The calculation logic of this formula is configured as follows: extract the state index value mapped back to the color feature values ​​of two adjacent frames; let the state index value corresponding to the previous frame be Index_{previous}, and the state index value corresponding to the current frame be Index_{current}; subtract the state index value of the previous frame from the state index value of the current frame to obtain the index difference; further, take the modulo operation of this index difference with the length M of the cyclic color sequence as the state span Stride, that is, divide the index difference by the length M of the cyclic color sequence and extract the remainder as the state span Stride. This modulo operation mechanism forces the value to be mapped back to the positive integer valid period range when a negative difference is generated by a cross-period index jump.

[0049] Based on the obtained state span integer value, the system performs branch decisions in the following three dimensions: If the state span Stride equals 1, it means that the frame color changes progressively according to the next position of the source signal, indicating that the camera's underlying acquisition is proceeding normally and confirming that there are no dropped frames in the time interval between the two adjacent frames.

[0050] If the state span Stride equals 0: it means that the color of the current frame is stuck in the color state of the previous frame, indicating that the camera under test has experienced a hardware lag or buffer data backlog, and confirming that the camera under test is writing continuous repeating frames in the video stream.

[0051] If the state span (Stride) is greater than 1, it indicates that the color of the current frame has skipped steps in the timing state machine. This determines that a frame loss has occurred at that point in time, and the specific number of consecutively lost physical frames is determined by the state span value. Specifically, the logic for determining the specific number of lost frames is: the number of consecutively lost frames is the value obtained by subtracting 1 from the state span (Stride).

[0052] By introducing the above-mentioned span modulo calculation method, based on determining whether the video stream has experienced frame loss, the specific number of frame loss information is simultaneously analyzed and extracted, thereby completing the quantitative calculation of single frame loss and even number of consecutive frame loss.

[0053] S206 outputs the actual number of frames and the frame loss determination results as a structured data report containing a second-by-second summary report and / or a frame-by-frame detailed report.

[0054] To meet the requirements of the traceability system, a second-level grouping and archiving operation is performed on the frame information sequence. For each frame of data in the frame information sequence, the floor function is called to obtain the floor value of its display timestamp (i.e., floor(PTS)), which is used as the reference variable for the corresponding second.

[0055] Furthermore, each frame under the same second identifier is grouped into the same time cluster, and the actual number of valid frames within each time cluster is calculated. After grouping, a structured data report with two granular dimensions is generated and output: Second-by-second summary report: Arranged in absolute seconds, its record items include the value of the second, the total number of frames actually collected within the second interval, the physical location interval of the duplicate frames detected within the second interval (represented in array format with the start frame number and end frame number), and the cumulative number of duplicate frame pairs.

[0056] Frame-by-frame detailed report: Expanded according to the global physical frame sequence, its record items include the global frame number starting from the first frame of the video, the relative sequence number of the frame within its own second-level group, the display timestamp accurate to six decimal places, and the color feature value string of the frame.

[0057] This dual-granularity architecture design ensures the traceability of test results. Test analysts and underlying R&D personnel can use the second-by-second summary report to quickly pinpoint the time slice area where frame loss faults occur, and then delve into the frame-by-frame detailed report to verify the flow pattern of color feature value strings, thereby enabling targeted verification of bottlenecks in the underlying data link of the camera firmware or anomalies in the timing of hardware sensor readouts.

[0058] Finally, it should be noted that this embodiment features a background resident batch processing scheduling framework. Multiple video files to be tested are transmitted from external processes or automated production lines to the monitoring directory. The extraction and judgment steps S202 to S206 are executed sequentially according to the queuing order. If a decoding blockage occurs in a specific single file or a non-standard format causes a processing interruption, the scheduling framework executes an error throwing and exception capture mechanism, automatically skipping the blocked file and continuing to read subsequent queue objects, ensuring that the overall batch process is not interrupted. After each test is completed, the structured data report is automatically categorized and archived to a preset network storage node output directory, using the original video file name as a naming prefix. This supports and adapts to the needs of large-scale unattended camera matrix testing and automated mass production quality inspection scenarios.

[0059] In some embodiments, for batch detection trigger scheduling methods, the triggering and scheduling mechanism of the batch processing mode can also be replaced with various preset forms. These trigger scheduling forms include manual import triggering via a graphical human-machine interface, cyclical triggering via command-line execution of script programs, or automated scheduling triggering by connecting to an external industrial quality inspection production line system through a data interface. All of these triggering methods call and execute the same core screen detection and extraction and timing status determination process at the underlying execution level, with the internal determination logic and execution mechanism remaining unchanged.

[0060] Through the aforementioned steps S201 to S206, this application provides a live camera frame continuity analysis mechanism based on the regular alternation of solid color frames and fixed-point sampling, replacing the easily interfered traditional image similarity comparison with a rigorous mathematical temporal state model. This application not only ensures the determinism of frame loss diagnosis results, but also transforms the complex and computationally intensive full-screen pixels into lightweight discrete point data sampling calculations, thereby simultaneously balancing accuracy and operational efficiency under massive sample sizes.

[0061] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0062] This embodiment also provides a live camera image detection system, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0063] Figure 3 This is a structural block diagram of a live camera image detection system according to an embodiment of this application, such as... Figure 3 As shown, the system includes: a signal generation module 30, a video acquisition module 31, and a detection module 32, wherein: The signal generation module 30 is used to generate a color alternation test signal, wherein the color alternation test signal includes pure color frames of multiple colors that are alternately presented according to a preset target frame rate; The video acquisition module 31 is used to acquire the video to be tested exported by the live camera under test through optical acquisition of the color alternation test signal; The detection module 32 is used to extract the color pixel features of each frame in the video to be detected at a preset sampling position, generate the color feature value of each frame based on the color pixel features, and determine whether there are any dropped frames in the video to be detected based on the comparison results of the color feature values ​​of two adjacent frames.

[0064] The above system solves the problems of high false positive rate and large computational cost caused by the reliance on real image comparison in live camera image detection schemes in related technologies, and achieves frame integrity detection with high determinism and low computational cost.

[0065] In one embodiment, an electronic device is provided, which may be a terminal. The electronic device includes a processor, memory, a network interface, a display screen, and an input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a live camera image detection method. The display screen may be a liquid crystal display (LCD) or an e-ink display. The input device may be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0066] In one embodiment, Figure 4 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application, such as... Figure 4 As shown, an electronic device is provided, which can be a computer or a live streaming all-in-one machine, and its internal structure diagram can be as follows. Figure 4 As shown, the electronic device includes a processor, a network interface, internal memory, and non-volatile memory connected via an internal bus. The non-volatile memory stores an operating system, computer programs, and a database. The processor provides computing and control capabilities, the network interface communicates with external terminals via a network connection, the internal memory provides an environment for the operation of the operating system and computer programs, the computer programs are executed by the processor to implement a live camera image detection method, and the database stores data.

[0067] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0068] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0069] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for detecting live camera footage, characterized in that, The method includes: Generate a color alternation test signal, wherein the color alternation test signal includes pure color frames of multiple colors that are alternately presented according to a preset target frame rate; The video to be tested is obtained by optically acquiring the color alternation test signal from the live streaming camera under test; At a preset sampling position, the color pixel features of each frame in the video to be detected are extracted, and the color feature value of each frame is generated based on the color pixel features. Based on the comparison result of the color feature values ​​of two adjacent frames, it is determined whether there are any dropped frames in the video to be detected.

2. The method according to claim 1, characterized in that, Determining whether the video to be detected has missing frames based on the comparison results of the color feature values ​​of two adjacent frames includes: The display timestamp of each frame in the video to be detected is extracted frame by frame, and the display timestamp is combined with its corresponding color feature value to form a frame information sequence; By traversing the frame information sequence, and based on the comparison results of the color feature values ​​of two adjacent frames, it is determined whether the video to be detected has any dropped frames.

3. The method according to claim 2, characterized in that, The multi-color solid frame is a solid frame of two different colors, and the color alternation test signal is a video in which the two solid frames of different colors are presented alternately. The determination of whether the video to be detected has dropped frames based on the comparison results of color feature values ​​of two adjacent frames includes: Scan the frame information sequence to detect whether the color feature values ​​of two adjacent frames are the same; If the color feature values ​​of two adjacent frames are found to be the same, it is determined that there is a frame drop at the position corresponding to the two adjacent frames, and the position range and logarithm of the two adjacent frames with the same color feature values ​​are recorded.

4. The method according to claim 2, characterized in that, The generation of the color alternation test signal includes: A preset cyclic color sequence containing multiple solid color frames is provided, and a unique state index value is configured for each color in the cyclic color sequence; The cyclic color sequence is played alternately at the target frame rate to generate a color test signal with cyclic timing characteristics, wherein the length of the cyclic color sequence is greater than the maximum number of consecutive frame drops that the live streaming camera under test is estimated to be possible.

5. The method according to claim 4, characterized in that, The determination of whether the video to be detected has dropped frames based on the comparison results of color feature values ​​of two adjacent frames includes: Based on the color feature values, extract the state index values ​​corresponding to the colors of two adjacent frames; Subtract the state index value of the previous frame from the state index value of the current frame to obtain the index difference, and use the value obtained by modulo the index difference with the length of the cyclic color sequence as the state span. If the state span is equal to 1, it is determined that there are no dropped frames; If the state span is equal to 0, it is determined that the camera capture is stuck, resulting in duplicate frames; If the state span is greater than 1, it is determined that a frame loss has occurred, and the specific number of consecutively lost frames is determined to be the state span minus 1.

6. The method according to claim 1, characterized in that, The step of extracting the color pixel features of each frame in the video to be detected at a preset sampling position, and generating the color feature value of each frame based on the color pixel features, includes: The RGB three-channel values ​​of pixels are sampled at the top left, top right, bottom left, bottom right and center of each frame to obtain the color pixel features corresponding to each frame. Based on the color pixel features corresponding to each frame, the average value of the RGB three-channel values ​​of each sampling point is calculated, and the average value is encoded into a string in a preset format to obtain the color feature value of each frame.

7. The method according to claim 5, characterized in that, The method further includes: For each frame in the frame information sequence, the rounded-down value of its display timestamp is obtained as the identifier of the corresponding second. Each frame is grouped according to its corresponding second number, and the actual number of frames in each group is counted. The actual number of frames and the frame loss determination results are output as a structured data report containing a second-by-second summary report and / or a frame-by-frame detailed report.

8. A live streaming camera image detection system, characterized in that, The system includes: a signal generation module, a video acquisition module, and a detection module, wherein: The signal generation module is used to generate a color alternation test signal, wherein the color alternation test signal includes pure color frames of multiple colors that are alternately presented according to a preset target frame rate; The video acquisition module is used to acquire the video to be tested exported by the live camera under test through optical acquisition of the color alternation test signal; The detection module is used to extract the color pixel features of each frame in the video to be detected at a preset sampling position, generate the color feature value of each frame based on the color pixel features, and determine whether there are any dropped frames in the video to be detected based on the comparison result of the color feature values ​​of two adjacent frames.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.