Video transition detection method and apparatus

By using HSV space detection algorithms based on pixel variance or color proportion in videos, the problem of low efficiency in transition point detection in long videos is solved, enabling transition detection for various color tones and improving creation efficiency and user experience.

CN113971665BActive Publication Date: 2026-02-03BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111271845.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2026-02-03
Estimated Expiration
2042-02-03

AI Technical Summary

Technical Problem

Existing technologies are inefficient in finding transition points in long videos, especially for non-dark transition points, which affects creative efficiency and user experience.

Method used

Using pixel variance or color percentage as color statistics, and leveraging the color statistical characteristics of the HSV color space, combined with dictionary statistical methods or octree algorithms, transition segments in videos are automatically detected, reducing the need for hyperparameter settings.

Benefits of technology

It improves video processing speed, supports transition detection for various solid tones, reduces the time cost for users to select hyperparameters, and enhances creative efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971665B_ABST
    Figure CN113971665B_ABST
Patent Text Reader

Abstract

The present disclosure provides a video transition detection method and device. The video transition detection method can include: obtaining a video to be processed; determining a color statistic of each video frame of the video to be processed; determining a transition segment in the video to be processed according to the color statistic of each video frame, wherein the color statistic is a pixel variance of the video frame or a color proportion in the video frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of video editing technology, and in particular to a video transition detection method and a video transition detection device for detecting transition segments in a video. Background Technology

[0002] With the development of communication technology and the rise of short videos on mobile devices, the demand for video creation is growing rapidly, and video creators are gradually expanding from professionals to the general public. Transitions are a common operation in video production and editing. These transitions make the video presentation clearer and the content before the transition more coherent. If a creator wants to further develop a video while maintaining the original video's flow, they need to find the corresponding transition points before adding new video content. However, if a video is very long, such as a movie or documentary, the process of finding transition points can be very lengthy, significantly impacting creative efficiency. Summary of the Invention

[0003] This disclosure provides a video transition detection method and a video transition detection apparatus to at least solve the aforementioned problems.

[0004] According to a first aspect of the present disclosure, a video transition detection method is provided, which may include: acquiring a video to be processed; determining the color statistics of each video frame of the video to be processed; and determining a transition segment in the video to be processed based on the color statistics of each video frame, wherein the color statistics are the pixel variance of the video frame or the color proportion in the video frame.

[0005] Optionally, determining the color statistics of each video frame of the video to be processed may include: converting each video frame to a hue, saturation, and brightness space; and determining the color statistics of each video frame in the hue, saturation, and brightness space.

[0006] Optionally, determining the transition segment in the video to be processed based on the color statistics of each video frame may include: when the color statistics of a video frame meet a threshold condition, determining the video frame as a candidate transition frame and determining the time of the candidate transition frame in the video to be processed; if the color statistics of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame all meet the threshold condition, then determining all video frames within the time period as the transition segment, and determining the start time and end time of the transition segment in the video to be processed based on the time of the candidate transition frame and the time period.

[0007] Optionally, when the color statistic is the pixel variance of a video frame, determining the color statistic for each video frame of the video to be processed may include: for each video frame, performing the following operations: calculating the average pixel value of the video frame; and calculating the pixel variance of the video frame based on the pixel value of each pixel in the video frame and the average pixel value, as the color statistic.

[0008] Optionally, determining the transition segment in the video to be processed based on the color statistics of each video frame may include: when the pixel variance of a video frame is less than a pixel threshold, determining the video frame as a candidate transition frame; if the pixel variance of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is less than the pixel threshold, then determining all video frames within the time period as the transition segment.

[0009] Optionally, when the color statistics are the color proportions in a video frame, determining the color statistics for each video frame of the video to be processed may include: for each video frame, using a dictionary-based statistical method or an octree algorithm to calculate the proportion of each color in that video frame.

[0010] Optionally, determining the transition segment in the video to be processed based on the color statistics of each video frame may include: when the proportion of one color in each color of a video frame is greater than a color threshold, the video frame is determined as a candidate transition frame; if the proportion of the one color in all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is greater than the color threshold, then all video frames within the time period are determined as the transition segment.

[0011] According to a second aspect of the present disclosure, a video transition detection apparatus is provided, which may include: an acquisition module configured to acquire a video to be processed; and a processing module configured to: determine the color statistics of each video frame of the video to be processed; and determine a transition segment in the video to be processed based on the color statistics of each video frame, wherein the color statistics are the pixel variance of the video frame or the color proportion in the video frame.

[0012] Optionally, the processing module may be configured to: convert each video frame to a hue, saturation, and brightness space; and determine the color statistics of each video frame in the hue, saturation, and brightness space.

[0013] Optionally, the processing module may be configured to: when the color statistics of a video frame meet a threshold condition, determine the video frame as a candidate transition frame and determine the time of the candidate transition frame in the video to be processed; if the color statistics of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame all meet the threshold condition, then determine all video frames within the time period as the transition segment, and determine the start time and end time of the transition segment in the video to be processed based on the time of the candidate transition frame and the time period.

[0014] Optionally, when the color statistic is the pixel variance of a video frame, the processing module may be configured to perform the following operations for each video frame: calculate the average pixel value of the video frame; calculate the pixel variance of the video frame based on the pixel value of each pixel in the video frame and the average pixel value, as the color statistic.

[0015] Optionally, the processing module can be configured to: determine the video frame as a candidate transition frame when the pixel variance of the video frame is less than a pixel threshold; and determine all video frames within the time period greater than or equal to a time threshold starting from the candidate transition frame as the transition segment if the pixel variance of all video frames within the time period is less than the pixel threshold.

[0016] Optionally, when the color statistics are the color proportions in a video frame, the processing module can be configured to: for each video frame, use a dictionary-based statistical method or an octree algorithm to calculate the proportion of each color in the video frame.

[0017] Optionally, the processing module can be configured to: when the proportion of one of the colors in a video frame is greater than a color threshold, determine the video frame as a candidate transition frame; if the proportion of the one color in all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is greater than the color threshold, then determine all video frames within the time period as the transition segment.

[0018] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device may include: at least one processor; at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, cause the at least one processor to perform the video transition detection method as described above.

[0019] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that stores instructions which, when executed by at least one processor, cause the at least one processor to perform the video transition detection method as described above.

[0020] According to a fifth aspect of the present disclosure, a computer program product is provided, wherein instructions in the computer program product are executed by at least one processor in an electronic device to perform the video transition detection method as described above.

[0021] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects:

[0022] This disclosure uses pixel variance or color proportion as color statistics, eliminating the need for histogram-based statistical operations in the detection algorithm implementation, thereby improving video processing speed. Furthermore, this disclosure utilizes the color statistical characteristics of the HSV color space, supporting various solid-tone transitions and overcoming the limitation of existing algorithms that can only handle dark-tone transitions. Additionally, this disclosure only requires setting a single color statistical threshold, reducing the time cost for users to select hyperparameters and thus improving user experience.

[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0025] Figure 1 This is a flowchart of a video transition detection method according to an embodiment of the present disclosure;

[0026] Figure 2 This is a flowchart of a video transition detection method according to another embodiment of the present disclosure;

[0027] Figure 3 This is a block diagram of a video transition detection apparatus according to an embodiment of the present disclosure;

[0028] Figure 4 This is a schematic diagram of the structure of a video transition detection device according to an embodiment of the present disclosure;

[0029] Figure 5 This is a block diagram of an electronic device according to an embodiment of the present disclosure.

[0030] Throughout the accompanying drawings, it should be noted that the same reference numerals are used to denote the same or similar elements, features, and structures. Detailed Implementation

[0031] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0032] The following description, provided with reference to the accompanying drawings, is intended to aid in a full understanding of embodiments of the present disclosure as defined by the claims and their equivalents. Various specific details are included to aid understanding, but these details are to be considered exemplary only. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Furthermore, for clarity and brevity, descriptions of well-known functions and structures are omitted.

[0033] The terms and words used in the following description and claims are not limited to their literal meaning, but are intended solely by the inventors to achieve a clear and consistent understanding of this disclosure. Therefore, it will be apparent to those skilled in the art that the following description of various embodiments of this disclosure is provided for illustrative purposes only and is not intended to limit the purpose of this disclosure as defined by the claims and their equivalents.

[0034] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0035] In related technologies, the presence of a transition at a given timestamp can be determined based on the proportion of black pixels in the image. The process involves three steps: First, the input video is broken down frame by frame, and each pixel in each frame is counted to see if it is smaller than a threshold A. If it is smaller than A, it is considered a black pixel and recorded. Then, the number of recorded pixels is divided by the total number of pixels in the image to obtain the proportion of black pixels. If this proportion is greater than a threshold B, the image is considered to be in black. Finally, the duration of the black-toned image is checked, and its duration is determined to be greater than a threshold C. If it is greater than C, it is considered a black transition. However, existing methods only support videos with dark-toned transitions. While this method can locate some transition positions, it fails when the transition is in other tones (e.g., red, blue, green, etc.). Furthermore, if the content of the normal video itself is dark-toned, it may be mistakenly identified as a transition segment and displayed to the user, which can negatively impact the creative experience.

[0036] Based on this, this disclosure proposes an intelligent transition detection scheme that can intelligently provide feedback on various solid-color transitions in a video, as well as the start and end times of these transitions. This makes it easier and faster for creators to locate sub-sequence intervals in a video and add new content based on different intervals.

[0037] In the following, the methods and apparatus of this disclosure will be described in detail with reference to the accompanying drawings, according to various embodiments of this disclosure.

[0038] Figure 1 This is a flowchart of a video transition detection method according to embodiments of the present disclosure. The video transition detection method according to the present disclosure can be applied to detecting various transition segments in various videos.

[0039] The video transition detection method according to this disclosure can be executed by any electronic device with video processing capabilities. The electronic device can be a user's terminal, such as the terminal used by the user when editing a video. The electronic device can be at least one of a smartphone, tablet, laptop, and desktop computer. The electronic device may have a target application installed for displaying the video to be processed, detecting transition segments in the video to be processed, and adding new content to the video to be processed based on the detected transition segments.

[0040] Reference Figure 1 In step S101, the video to be processed is acquired.

[0041] In step S102, the color statistics for each video frame of the video to be processed are determined. For example, the color statistics can be the pixel variance of the video frame or the color percentage in the video frame.

[0042] When the color statistics are the pixel variance of a video frame, the following operations can be performed for each video frame: calculate the average pixel value of the video frame; calculate the pixel variance of the video frame based on the pixel value of each pixel and the average pixel value in the video frame.

[0043] When color statistics refer to the proportion of colors in a video frame, the proportion of each color in that frame can be calculated using dictionary-based statistical methods or an octree algorithm. When the proportion of a certain color in the image exceeds a color threshold, the image can be classified as a solid color. For example, by allocating new storage space, an octree algorithm can be used to statistically analyze the proportion of colors in the image using a color index table.

[0044] According to embodiments of this disclosure, by using pixel variance or color proportion as color statistics instead of the histogram statistics method used in existing algorithms, computational efficiency is accelerated and video processing speed is improved.

[0045] In step S103, the transition segments in the video to be processed are determined based on the color statistics of each video frame.

[0046] When the color statistics of a video frame meet a threshold condition, the video frame can be identified as a candidate transition frame, and the time of the candidate transition frame in the video to be processed can be determined. If the color statistics of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame all meet the threshold condition, then all video frames within that time period can be identified as transition segments, and the start and end times of the transition segments in the video to be processed can be determined based on the time of the candidate transition frame and that time period.

[0047] For example, when a video frame in the video contains a color statistic that meets the threshold condition, the time corresponding to that video frame can be recorded as T0, until a frame's color statistic no longer meets the threshold condition, and the time corresponding to that frame is recorded as T1. If T1 - T0 is greater than the time threshold pts, then the video frames within this time period can be considered transition content. T0 can be taken as the start time of this transition content, and the time preceding T1 can be taken as the end time of this transition content.

[0048] After that, reset T0 and T1, and repeat the above operation on subsequent frames of the video to find all the transition segments of the video.

[0049] When the color statistics are the pixel variance of video frames, a video frame can be identified as a candidate transition frame if its pixel variance is less than a pixel threshold. If the pixel variance of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is less than the pixel threshold, then all video frames within this time period can be identified as transition segments.

[0050] When color statistics refer to the proportion of colors in a video frame, a video frame can be identified as a candidate transition frame if the proportion of any one of its colors is greater than a color threshold. If the proportion of this one color in all video frames within a time period greater than or equal to a time threshold, starting from this candidate transition frame, is greater than the color threshold, then all video frames within this time period can be identified as transition segments. Here, the color threshold can be set to 0.8; however, this disclosure is not limited to this and can be set differently according to actual needs.

[0051] According to embodiments of this disclosure, only one color statistics threshold needs to be set for the hyperparameters used for color statistics, which reduces the time cost for users to select hyperparameters and makes the transition detection algorithm more accurate.

[0052] According to another embodiment of this disclosure, the video to be processed can be converted to the HSV color space (hue, saturation, and brightness) before calculating color statistics, and then the color statistics of each video frame in the HSV space can be determined. By employing the color statistical characteristics of the HSV space, this disclosure can support various pure-tone transitions, overcoming the limitation of existing algorithms that can only handle dark-tone transitions.

[0053] Figure 2 This is a flowchart of a video transition detection method according to another embodiment of the present disclosure.

[0054] Reference Figure 2 In step S201, the video to be processed is obtained.

[0055] In step S202, each video frame of the video to be processed is converted to a hue, saturation, and brightness space. For example, the video to be processed can be converted from the red, green, and blue RGB space to the hue, saturation, and brightness HSV space. Another example is that the video to be processed can be converted from the luminance and chrominance YUV space to the HSV space.

[0056] According to embodiments of this disclosure, by employing the color statistical characteristics of the HSV color space, transition detection for various solid tones can be supported, which solves the limitation of existing algorithms that can only handle dark-toned transition scenes.

[0057] In step S203, the pixel variance of each video frame of the video to be processed in the hue, saturation, and brightness spaces is determined.

[0058] Pixel variance in HSV color space reflects the fluctuation of image color. A small pixel variance indicates pure color in the image; a large pixel variance indicates significant fluctuations in image content. The variance of normal video content is often large; while scenes with relatively pure colors can be considered transition scenes.

[0059] The pixel variance of each frame in the video to be processed can be calculated frame by frame. For example, for each frame of the video to be processed, the average pixel value of the video frame is calculated, and the pixel variance of the video frame is calculated based on the pixel value of each pixel in the video frame and the average pixel value.

[0060] According to embodiments of this disclosure, when performing color statistics on images, instead of using methods such as histograms, variance, which has a faster calculation speed, is used, thereby improving the speed of video processing.

[0061] In step S204, the transition segments in the video to be processed are determined based on the pixel variance of each video frame.

[0062] As an example, when the pixel variance of a video frame is less than a pixel threshold, the video frame can be identified as a candidate transition frame. If the pixel variance of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is less than the pixel threshold, then all video frames within that time period are identified as transition segments.

[0063] For example, when a video frame with a pixel variance less than the pixel threshold `std` appears, the time corresponding to that video frame is recorded as T0, until a frame with a pixel variance greater than `std` appears, and the time corresponding to that frame is recorded as T1. If T1 - T0 is greater than the time threshold `pts`, then the video frames within this time period can be considered transition content. Afterward, T0 and T1 are reset, and the above operation is repeated for subsequent frames of the video, thus identifying all transition segments in the video. The pixel threshold `std` can be set to 25, and the time threshold can be set to 0.5 seconds, but this disclosure is not limited to these; the pixel threshold and time threshold can be set differently according to actual needs.

[0064] This disclosure uses fewer hyperparameters for color statistics. For example, compared to existing transition detection which requires two thresholds, a black pixel threshold and a black pixel ratio, this disclosure only requires setting a single pixel threshold, reducing the time cost for users to select hyperparameters and improving the user experience.

[0065] Figure 3 This is a block diagram of a video transition detection apparatus according to an embodiment of the present disclosure.

[0066] Reference Figure 3 The video transition detection apparatus 300 may include an acquisition module 301 and a processing module 302. Each module in the video transition detection apparatus 300 may be implemented by one or more modules, and the names of the corresponding modules may vary depending on the type of module. In various embodiments, some modules in the video transition detection apparatus 300 may be omitted, or additional modules may be included. Furthermore, modules / elements according to various embodiments of this disclosure may be combined to form a single entity, and thus perform the functions of the respective modules / elements equivalently prior to the combination.

[0067] The acquisition module 301 can acquire the video to be processed.

[0068] The processing module 302 can determine the color statistics for each video frame of the video to be processed. The color statistics can be the pixel variance of the video frame or the color proportion in the video frame.

[0069] The processing module 302 can determine the transition segments in the video to be processed based on the color statistics of each video frame.

[0070] Optionally, the processing module 302 can convert each video frame of the video to be processed to a hue, saturation, and brightness space, and determine the color statistics of each video frame in the hue, saturation, and brightness space.

[0071] Optionally, the processing module 302 may determine a video frame as a candidate transition frame and determine the time of the candidate transition frame in the video to be processed when the color statistics of the video frame meet the threshold condition. If the color statistics of all video frames within a time period greater than or equal to the time threshold starting from the candidate transition frame meet the threshold condition, then all video frames within the time period are determined as transition segments, and the start and end times of the transition segments in the video to be processed are determined based on the time of the candidate transition frame and the time period.

[0072] Optionally, when the color statistic is the pixel variance of the video frame, the processing module 302 may perform the following operations for each video frame: calculate the average pixel value of the video frame, and calculate the pixel variance of the video frame based on the pixel value of each pixel and the average pixel value in the video frame, as the color statistic.

[0073] Optionally, the processing module 302 may determine a video frame as a candidate transition frame when the pixel variance of the video frame is less than a pixel threshold, and if the pixel variance of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is less than the pixel threshold, then all video frames within the time period shall be determined as transition segments.

[0074] Optionally, when the color statistics are the proportion of colors in a video frame, the processing module 302 can calculate the proportion of each color in the video frame for each video frame using a dictionary-based statistical method or an octree algorithm.

[0075] Optionally, the processing module 302 may determine a video frame as a candidate transition frame when the proportion of one of the colors in a video frame is greater than a color threshold; if the proportion of the one color in all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is greater than the color threshold, then all video frames within the time period are determined as transition segments.

[0076] The above has been based on Figure 1 and Figure 2 The process of detecting transition segments in the video has been described in detail, so it will not be described again here.

[0077] Figure 4 This is a schematic diagram of the structure of a video transition detection device in the hardware operating environment of an embodiment of this disclosure.

[0078] like Figure 4As shown, the video transition detection device 400 may include: a processing component 401, a communication bus 402, a network interface 403, an input / output interface 404, a memory 405, and a power supply component 406. The communication bus 402 is used to enable communication between these components. The input / output interface 404 may include a video display (such as a liquid crystal display), a microphone and speaker, and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). Optionally, the input / output interface 404 may also include a standard wired interface or a wireless interface. The network interface 403 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 405 may be a high-speed random access memory or a stable non-volatile memory. The memory 405 may also optionally be a storage device independent of the aforementioned processing component 401.

[0079] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the video transition detection device 400, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0080] like Figure 4 As shown, the memory 405, which serves as a storage medium, may include an operating system (such as a MAC operating system), a data storage module, a network communication module, a user interface module, a video transition detection program corresponding to the detection method of this disclosure, and a database.

[0081] exist Figure 4 In the video transition detection device 400 shown, the network interface 403 is mainly used for data communication with external electronic devices / terminals; the input / output interface 404 is mainly used for data interaction with users; the processing component 401 and the memory 405 in the video transition detection device 400 can be set in the video transition detection device 400. The video transition detection device 400 calls the video transition detection program stored in the memory 405 and various APIs provided by the operating system through the processing component 401 to execute the video transition detection method provided in this embodiment.

[0082] Processing component 401 may include at least one processor, and memory 405 stores a set of computer-executable instructions. When the set of computer-executable instructions is executed by the at least one processor, a video transition detection method according to embodiments of the present disclosure is performed. Furthermore, processing component 401 may perform encoding and decoding operations, etc. However, the above examples are merely exemplary, and the present disclosure is not limited thereto.

[0083] For example, input / output interface 404 can acquire video data to be processed.

[0084] The processing component 401 can detect transition segments in the video to be processed and the corresponding time of the transition segments in the video to be processed based on the video transition detection method disclosed herein.

[0085] The input / output interface 404 can display the position of the determined transition segment in the video to be processed, so that the user can quickly locate the transition sequence intervals in the video to be processed and add new content according to different intervals.

[0086] The processing component 401 can control the components included in the video transition detection device 400 by executing a program.

[0087] The video transition detection device 400 can receive or output video and / or audio via the input / output interface 404. For example, the video transition detection device 400 can output a user interface via the input / output interface 404, in which the position of the determined transition segment in the video to be processed can be displayed. The user can add new video content to the video to be processed via the user interface.

[0088] As an example, the video transition detection device 400 may be a PC, tablet, personal digital assistant, smartphone, or other device capable of executing the aforementioned set of instructions. Here, the video transition detection device 400 is not necessarily a single electronic device, but may be any collection of devices or circuits capable of executing the aforementioned instructions (or instruction sets) individually or in combination. The video transition detection device 400 may also be part of an integrated control system or system manager, or may be configured to interface with a portable electronic device locally or remotely (e.g., via wireless transmission).

[0089] In the video transition detection device 400, the processing component 401 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processing component 401 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.

[0090] Processing component 401 can execute instructions or code stored in memory, wherein memory 405 can also store data. Instructions and data can also be sent and received over a network via network interface 403, wherein network interface 403 can employ any known transport protocol.

[0091] The memory 405 can be integrated with the processing component 401, for example, by placing RAM or flash memory within an integrated circuit microprocessor. Alternatively, the memory 405 can include a separate device, such as an external disk drive, a storage array, or other storage device that can be used by any database system. The memory and processing component 401 can be operatively coupled, or can communicate with each other, for example, via I / O ports, network connections, etc., enabling the processing component 401 to read data stored in the memory 405.

[0092] According to embodiments of this disclosure, an electronic device may be provided. Figure 5 This is a block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 500 may include at least one memory 502 and at least one processor 501. The at least one memory 502 stores a set of computer-executable instructions. When the set of computer-executable instructions is executed by the at least one processor 501, a video transition detection method according to an embodiment of the present disclosure is performed.

[0093] Processor 501 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, processor 501 may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, etc.

[0094] The memory 502, which serves as a storage medium, may include an operating system (e.g., a MAC operating system), a data storage module, a network communication module, a user interface module, a video transition detection program, and a database.

[0095] The memory 502 may be integrated with the processor 501; for example, RAM or flash memory may be arranged within an integrated circuit microprocessor. Alternatively, the memory 502 may include a separate device, such as an external disk drive, a storage array, or other storage device that can be used by any database system. The memory 502 and the processor 501 may be operatively coupled, or may communicate with each other, for example, via I / O ports, network connections, etc., enabling the processor 501 to read files stored in the memory 502.

[0096] In addition, electronic device 500 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of electronic device 500 can be interconnected via a bus and / or network.

[0097] As will be understood by those skilled in the art, Figure 5 The structure shown does not constitute a limitation on the structure and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0098] According to embodiments of this disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, they cause at least one processor to perform a video transition detection method according to this disclosure. Examples of computer-readable storage media herein include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disc storage, hard disk drive (HDD), solid-state drive (SSD), card storage (such as multimedia cards, secure digital (SD) cards, or ultra-fast digital (XD) cards), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid-state drive, and any other device configured to store a computer program and any associated data, data files, and data structures in a non-transitory manner and to provide the computer program and any associated data, data files, and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the aforementioned computer-readable storage medium can run in an environment deployed in computer devices such as clients, hosts, agent devices, servers, etc. Furthermore, in one example, the computer program and any associated data, data files, and data structures are distributed across a networked computer system, such that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed manner through one or more processors or computers.

[0099] According to embodiments of this disclosure, a computer program product may also be provided, wherein the instructions in the computer program product can be executed by the processor of a computer device to complete the above-described video transition detection method.

[0100] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0101] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A video transition detection method, characterized in that, include: Get the video to be processed; Determine the color statistics for each video frame of the video to be processed; The transition segments in the video to be processed are determined based on the color statistics of each video frame. The color statistics are the pixel variance of the video frames. Wherein, when the color statistics are the pixel variance of video frames, determining the transition segments in the video to be processed based on the color statistics of each video frame includes: When the pixel variance of a video frame is less than a pixel threshold, the video frame is determined as a candidate transition frame. If the pixel variance of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is less than the pixel threshold, then all video frames within the time period are determined as the transition segment.

2. The video transition detection method according to claim 1, characterized in that, Determine the color statistics for each video frame of the video to be processed, including: Each video frame is converted to a hue, saturation, and brightness space; Determine the color statistics for each video frame in the hue, saturation, and brightness spaces.

3. The video transition detection method according to claim 1, characterized in that, Determining the transition segments in the video to be processed based on the color statistics of each video frame includes: When the color statistics of a video frame meet the threshold condition, the video frame is determined as a candidate transition frame and the time of the candidate transition frame in the video to be processed is determined. If the color statistics of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame all meet the threshold condition, then all video frames within the time period are determined as the transition segment, and the start and end times of the transition segment in the video to be processed are determined based on the time of the candidate transition frame and the time period.

4. The video transition detection method according to any one of claims 1-3, characterized in that, When the color statistics are the pixel variance of video frames, determining the color statistics for each video frame of the video to be processed includes: For each video frame, perform the following operations: Calculate the average pixel value of this video frame; The pixel variance of the video frame is calculated based on the pixel value of each pixel in the video frame and the average pixel value, and is used as the color statistic.

5. The video transition detection method according to any one of claims 1-3, characterized in that, When the color statistics are the color proportions in a video frame, determining the color statistics for each video frame of the video to be processed includes: For each video frame, the proportion of each color in the video frame is calculated using a dictionary-based statistical method or an octree algorithm.

6. The video transition detection method according to claim 5, characterized in that, Determining the transition segments in the video to be processed based on the color statistics of each video frame includes: When the proportion of any color in a video frame is greater than the color threshold, the video frame is identified as a candidate transition frame. If the proportion of the color in all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is greater than the color threshold, then all video frames within the time period are determined as the transition segment.

7. A video transition detection device, characterized in that, include: The acquisition module is configured to acquire the video to be processed. The processing module is configured as follows: Determine the color statistics for each video frame of the video to be processed; The transition segments in the video to be processed are determined based on the color statistics of each video frame. The color statistics are the pixel variance of the video frames. When the color statistics are the pixel variance of the video frame, the processing module is configured to: determine the video frame as a candidate transition frame when the pixel variance of the video frame is less than a pixel threshold; and determine all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame as the transition segment if the pixel variance of all video frames within that time period is less than the pixel threshold.

8. The video transition detection device according to claim 7, characterized in that, The processing module is configured as follows: Each video frame is converted to a hue, saturation, and brightness space; Determine the color statistics for each video frame in the hue, saturation, and brightness spaces.

9. The video transition detection device according to claim 7, characterized in that, The processing module is configured as follows: When the color statistics of a video frame meet the threshold condition, the video frame is determined as a candidate transition frame and the time of the candidate transition frame in the video to be processed is determined. If the color statistics of all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame all meet the threshold condition, then all video frames within the time period are determined as the transition segment, and the start and end times of the transition segment in the video to be processed are determined based on the time of the candidate transition frame and the time period.

10. The video transition detection apparatus according to any one of claims 7-9, characterized in that, When the color statistics are the pixel variance of the video frames, the processing module is configured as follows: For each video frame, perform the following operations: Calculate the average pixel value of this video frame; The pixel variance of the video frame is calculated based on the pixel value of each pixel in the video frame and the average pixel value, and is used as the color statistic.

11. The video transition detection apparatus according to any one of claims 7-9, characterized in that, When the color statistics are the color proportions in a video frame, the processing module is configured as follows: For each video frame, the proportion of each color in the video frame is calculated using a dictionary-based statistical method or an octree algorithm.

12. The video transition detection device according to claim 11, characterized in that, The processing module is configured as follows: When the proportion of any color in a video frame is greater than the color threshold, the video frame is identified as a candidate transition frame. If the proportion of the color in all video frames within a time period greater than or equal to a time threshold starting from the candidate transition frame is greater than the color threshold, then all video frames within the time period are determined as the transition segment.

13. An electronic device, characterized in that, include: At least one processor; At least one memory that stores computer-executable instructions. The computer-executable instructions, when executed by the at least one processor, cause the at least one processor to perform the video transition detection method as described in any one of claims 1 to 6.

14. A computer-readable storage medium for storing instructions, characterized in that, When the instruction is executed by at least one processor, it causes the at least one processor to perform the video transition detection method as described in any one of claims 1 to 6.

15. A computer program product, wherein instructions in the computer program product are executed by at least one processor in an electronic device to perform the video transition detection method as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Detecting method and detecting device for key frame

    CN103093458A

  • Method and apparatus of video transition detection

    CN104980625A