CN110119652B - Video shot segmentation method and device - Google Patents

Video shot segmentation method and device Download PDF

Info

Publication number
CN110119652B
CN110119652B CN201810118861.8A CN201810118861A CN110119652B CN 110119652 B CN110119652 B CN 110119652B CN 201810118861 A CN201810118861 A CN 201810118861A CN 110119652 B CN110119652 B CN 110119652B
Authority
CN
China
Prior art keywords
frame
video
candidate
determining
shot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810118861.8A
Other languages
Chinese (zh)
Other versions
CN110119652A (en
Inventor
璁镐鸡
许伦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201810118861.8A priority Critical patent/CN110119652B/en
Publication of CN110119652A publication Critical patent/CN110119652A/en
Application granted granted Critical
Publication of CN110119652B publication Critical patent/CN110119652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/49Segmenting video sequences, i.e. computational techniques such as parsing or cutting the sequence, low-level clustering or determining units such as shots or scenes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440236Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by media transcoding, e.g. video is transformed into a slideshow of still pictures, audio is converted into text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The disclosure relates to a shot segmentation method and device for video. The method comprises the following steps: under the condition that a transcoding instruction is detected, decoding the video to obtain a decoding result; determining candidate frames in the decoding result; extracting features of each of the candidate frames; determining a first shot start frame of the video; for each candidate frame, calculating the distance between the candidate frame and the last lens starting frame of the candidate frame according to the characteristics of the candidate frame and the characteristics of the last lens starting frame of the candidate frame; determining the candidate frame as a lens start frame if the distance is greater than a threshold. The shot segmentation method and the device can perform shot segmentation after decoding and before encoding in the transcoding process, so that separate decoding operation for shot segmentation is not needed, and repeated decoding is avoided.

Description

Video shot segmentation method and device
Technical Field
The present disclosure relates to the field of video technologies, and in particular, to a method and an apparatus for segmenting a shot of a video.
Background
In the related art, a single tool is used for shot segmentation of a video, and the video needs to be decoded first, and then the video needs to be analyzed frame by frame to determine shot segmentation points in the video. Since the video transcoding process also requires decoding, the shot segmentation method of the video in the related art causes repeated decoding operations.
Disclosure of Invention
In view of this, the present disclosure provides a method and an apparatus for shot segmentation of a video.
According to an aspect of the present disclosure, there is provided a shot segmentation method for a video, including:
under the condition that a transcoding instruction is detected, decoding the video to obtain a decoding result;
determining candidate frames in the decoding result;
extracting features of each of the candidate frames;
determining a first shot start frame of the video;
for each candidate frame, calculating the distance between the candidate frame and the last lens starting frame of the candidate frame according to the characteristics of the candidate frame and the characteristics of the last lens starting frame of the candidate frame;
determining the candidate frame as a lens start frame if the distance is greater than a threshold.
In one possible implementation, determining candidate frames in the decoding result includes:
and determining the key frame in the decoding result as a candidate frame.
In one possible implementation, determining candidate frames in the decoding result includes:
and determining a candidate frame in every N video frames in the decoding result, wherein N is a positive integer.
In one possible implementation, determining a first shot start frame of the video includes:
determining a first video frame of the video as a first shot start frame of the video.
In one possible implementation, determining a first shot start frame of the video includes:
determining a first candidate frame of the video as a first start-of-shot frame of the video.
According to another aspect of the present disclosure, there is provided a shot segmentation apparatus for a video, including:
the decoding module is used for decoding the video under the condition that the transcoding instruction is detected to obtain a decoding result;
a first determining module for determining candidate frames in the decoding result;
the extraction module is used for extracting the characteristics of each candidate frame;
the second determining module is used for determining a first lens starting frame of the video;
a calculating module, configured to calculate, for each candidate frame, a distance between the candidate frame and a previous lens start frame of the candidate frame according to a feature of the candidate frame and a feature of the previous lens start frame of the candidate frame;
and a third determining module, configured to determine the candidate frame as a lens start frame if the distance is greater than a threshold.
In one possible implementation manner, the first determining module is configured to:
and determining the key frame in the decoding result as a candidate frame.
In one possible implementation manner, the first determining module is configured to:
and determining a candidate frame in every N video frames in the decoding result, wherein N is a positive integer.
In one possible implementation manner, the second determining module is configured to:
determining a first video frame of the video as a first shot start frame of the video.
In one possible implementation manner, the second determining module is configured to:
determining a first candidate frame of the video as a first start-of-shot frame of the video.
According to another aspect of the present disclosure, there is provided a shot segmentation apparatus for a video, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
The method and the device for segmenting the shot of the video in each aspect of the disclosure decode the video to obtain a decoding result under the condition that a transcoding instruction is detected, determine candidate frames in the decoding result, extract the characteristics of each candidate frame, determine the first shot start frame of the video, calculate the distance between each candidate frame and the last shot start frame of the candidate frame according to the characteristics of the candidate frame and the characteristics of the last shot start frame of the candidate frame, and determine the candidate frame as the shot start frame under the condition that the distance is greater than a threshold value, so that the shot segmentation can be performed after the decoding and before the encoding in the transcoding process, a separate decoding operation for the shot segmentation is not needed, and the repeated decoding is avoided.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flowchart of a shot segmentation method of a video according to an embodiment of the present disclosure.
Fig. 2 illustrates a schematic diagram of inserting a split-mirror filter between decoding and encoding of a transcoding process in a shot segmentation method of a video according to an embodiment of the present disclosure.
Fig. 3 illustrates a block diagram of a shot segmentation apparatus for a video according to an embodiment of the present disclosure.
Fig. 4 is a block diagram illustrating an apparatus 800 for shot segmentation of a video, according to an example embodiment.
Fig. 5 is a block diagram illustrating an apparatus 1900 for shot segmentation of video according to an example embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flowchart of a shot segmentation method of a video according to an embodiment of the present disclosure. The method may be applied to a server or a terminal device, and is not limited herein. As shown in fig. 1, the method includes steps S11 to S16.
In step S11, when the transcoding command is detected, the video is decoded to obtain a decoding result.
The decoding of the video refers to decoding of the video in a transcoding process.
In the embodiment, shot segmentation is performed after decoding and before encoding in the transcoding process, so that decoding operation in the transcoding process can be multiplexed without performing separate decoding operation on shot segmentation, and multiple times of decoding and repeated decoding are avoided.
In one possible implementation, a split-mirror filter may be inserted between decoding and encoding in the transcoding process, and shot segmentation may be performed by the split-mirror filter. Fig. 2 illustrates a schematic diagram of inserting a split-mirror filter between decoding and encoding of a transcoding process in a shot segmentation method of a video according to an embodiment of the present disclosure. Steps S12 to S16 may be implemented by the split filter.
In step S12, candidate frames are determined in the decoding result.
In one possible implementation, among all video frames of the video in the decoding result, candidate frames and non-candidate frames are included. In other words, in this implementation, all video frames are not used as candidate frames, so that the amount of computation for shot segmentation can be reduced and the speed of shot segmentation can be increased.
In one possible implementation, determining the candidate frame in the decoding result may include: and determining the key frame in the decoding result as a candidate frame. In the implementation mode, the key frames are used as candidate frames, the lens starting frame is determined from each key frame of the video, and the lens starting frame is not required to be determined from all frames of the video, so that the calculation amount is greatly reduced and the time consumption of lens segmentation is reduced on the premise of ensuring the accuracy of lens segmentation.
In another possible implementationDetermining the candidate frame in the decoding result may include: and determining a candidate frame in every N video frames in the decoding result, wherein N is a positive integer. For example, N equals 9. This implementation will only determine one candidate frame every N video frames, so that
Figure BDA0001571451880000051
As candidate frames, only from
Figure BDA0001571451880000052
The initial frame of the lens is determined in the video frame, so that the operation amount can be greatly reduced, and the time consumption of lens segmentation is reduced.
In step S13, the feature of each candidate frame is extracted.
In one possible implementation, extracting the feature of each candidate frame may include: the gray value of each candidate frame is extracted.
In another possible implementation, extracting the feature of each candidate frame may include: local features of each candidate frame are extracted.
As an example of this implementation, extracting the local features of each candidate frame may include: SIFT (Scale-Invariant Feature Transform) features of each candidate frame are extracted.
As another example of this implementation, extracting the local features of each candidate frame may include: SURF (Speeded Up Robust Features) of each candidate frame is extracted.
As another example of this implementation, extracting the local features of each candidate frame may include: the KAZE feature of each candidate frame is extracted.
As another example of this implementation, extracting the local features of each candidate frame may include: VLAD (local Aggregated descriptor) features of each candidate frame are extracted.
As another example of this implementation, extracting the local features of each candidate frame may include: VLAT (Vector of Locally Aggregated Tensors) of each candidate frame is extracted.
As another example of this implementation, extracting the local features of each candidate frame may include: LLC (locally-constrained Linear Coding) features of each candidate frame are extracted.
As another example of this implementation, extracting the local features of each candidate frame may include: and extracting LSH (Locality Sensitive Hashing based) features of each candidate frame.
It should be noted that, although the above implementation describes extracting the local feature of each candidate frame, the skilled person can understand that the disclosure should not be limited thereto. The specific type of extracted local features can be flexibly selected by those skilled in the art according to the requirements of the actual application scenario and/or personal preference.
In another possible implementation, extracting the feature of each candidate frame may include: and extracting the depth feature of each candidate frame. In this implementation, the deep features may refer to features extracted through a deep learning network. The deep learning network may be ResNet, VGG network, AlexNet, or the like, and is not limited herein.
In another possible implementation, extracting the feature of each candidate frame may include: local features and depth features of each candidate frame are extracted.
In step S14, the first shot start frame of the video is determined.
In one possible implementation, determining a first shot start frame of the video may include: and determining the first video frame of the video as the first shot start frame of the video.
In another possible implementation, determining a first shot start frame of the video includes: and determining the first candidate frame of the video as the first shot start frame of the video.
In step S15, for each candidate frame, a distance between the candidate frame and the shot start frame immediately preceding the candidate frame is calculated according to the feature of the candidate frame and the feature of the shot start frame immediately preceding the candidate frame.
In one possible implementation, the euclidean distance between the candidate frame and the last lens start frame of the candidate frame may be calculated.
In this embodiment, whether each candidate frame is a start-of-shot frame may be sequentially determined according to the order of the candidate frames from front to back.
In step S16, in the case where the distance is greater than the threshold, the candidate frame is determined as the lens start frame.
In this embodiment, in the case where the distance between the candidate frame and the last shot start frame of the candidate frame is greater than the threshold, it may be determined that the candidate frame is greatly different from the last shot start frame, and therefore, the candidate frame may be determined as the shot start frame, that is, the candidate frame is taken as the start frame of the new shot. In this embodiment, a shot may refer to a video clip corresponding to the shot.
In the embodiment, when a transcoding instruction is detected, a video is decoded to obtain a decoding result, candidate frames are determined in the decoding result, the feature of each candidate frame is extracted, a first shot start frame of the video is determined, for each candidate frame, the distance between the candidate frame and the last shot start frame of the candidate frame is calculated according to the feature of the candidate frame and the feature of the last shot start frame of the candidate frame, and when the distance is greater than a threshold value, the candidate frame is determined as the shot start frame, so that shot segmentation can be performed after decoding and before encoding in a transcoding process, a separate decoding operation for the shot segmentation is not needed, and repeated decoding is avoided.
Fig. 3 illustrates a block diagram of a shot segmentation apparatus for a video according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus includes: the decoding module 31 is configured to decode the video to obtain a decoding result when the transcoding instruction is detected; a first determining module 32 for determining candidate frames in the decoding result; an extraction module 33, configured to extract features of each candidate frame; a second determining module 34, configured to determine a first shot start frame of the video; a calculating module 35, configured to calculate, for each candidate frame, a distance between the candidate frame and a previous shot start frame of the candidate frame according to the feature of the candidate frame and the feature of the previous shot start frame of the candidate frame; a third determining module 36, configured to determine the candidate frame as a start-of-shot frame if the distance is greater than the threshold.
In one possible implementation, the first determining module 32 is configured to: and determining the key frame in the decoding result as a candidate frame.
In one possible implementation, the first determining module 32 is configured to: and determining a candidate frame in every N video frames in the decoding result, wherein N is a positive integer.
In one possible implementation, the second determining module 34 is configured to: and determining the first video frame of the video as the first shot start frame of the video.
In one possible implementation, the second determining module 34 is configured to: and determining the first candidate frame of the video as the first shot start frame of the video.
In the embodiment, when a transcoding instruction is detected, a video is decoded to obtain a decoding result, candidate frames are determined in the decoding result, the feature of each candidate frame is extracted, a first shot start frame of the video is determined, for each candidate frame, the distance between the candidate frame and the last shot start frame of the candidate frame is calculated according to the feature of the candidate frame and the feature of the last shot start frame of the candidate frame, and when the distance is greater than a threshold value, the candidate frame is determined as the shot start frame, so that shot segmentation can be performed after decoding and before encoding in a transcoding process, a separate decoding operation for the shot segmentation is not needed, and repeated decoding is avoided.
Fig. 4 is a block diagram illustrating an apparatus 800 for shot segmentation of a video, according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the device 800 to perform the above-described methods.
Fig. 5 is a block diagram illustrating an apparatus 1900 for shot segmentation of video according to an example embodiment. For example, the apparatus 1900 may be provided as a server. Referring to FIG. 5, the device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by the processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The device 1900 may also include a power component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input/output (I/O) interface 1958. The device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the apparatus 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (12)

1. A shot segmentation method for a video, comprising:
under the condition that a transcoding instruction is detected, decoding the video to obtain a decoding result;
determining candidate frames in the decoding result, wherein all video frames of the video in the decoding result comprise candidate frames and non-candidate frames;
extracting features of each of the candidate frames;
determining a first shot start frame of the video;
and sequentially judging whether each candidate frame is a lens starting frame or not according to the sequence of the candidate frames from front to back, wherein for each candidate frame, the distance between the candidate frame and the last lens starting frame of the candidate frame is calculated according to the characteristics of the candidate frame and the characteristics of the last lens starting frame of the candidate frame, and the candidate frame is determined as the lens starting frame under the condition that the distance is greater than a threshold value.
2. The method of claim 1, wherein determining candidate frames in the decoding result comprises:
and determining the key frame in the decoding result as a candidate frame.
3. The method of claim 1, wherein determining candidate frames in the decoding result comprises:
and determining a candidate frame in every N video frames in the decoding result, wherein N is a positive integer.
4. The method of claim 1, wherein determining a first start-of-shot frame for the video comprises:
determining a first video frame of the video as a first shot start frame of the video.
5. The method of claim 1, wherein determining a first start-of-shot frame for the video comprises:
determining a first candidate frame of the video as a first start-of-shot frame of the video.
6. A shot segmentation apparatus for video, comprising:
the decoding module is used for decoding the video under the condition that the transcoding instruction is detected to obtain a decoding result;
a first determining module, configured to determine candidate frames in the decoding result, where all video frames of a video in the decoding result include candidate frames and non-candidate frames;
the extraction module is used for extracting the characteristics of each candidate frame;
the second determining module is used for determining a first lens starting frame of the video;
a calculating module, configured to calculate, for each candidate frame according to a sequence of the candidate frame from front to back, a distance between the candidate frame and a previous shot start frame of the candidate frame according to a feature of the candidate frame and a feature of the previous shot start frame of the candidate frame;
and a third determining module, configured to determine the candidate frame as a lens start frame if the distance is greater than a threshold.
7. The apparatus of claim 6, wherein the first determining module is configured to:
and determining the key frame in the decoding result as a candidate frame.
8. The apparatus of claim 6, wherein the first determining module is configured to:
and determining a candidate frame in every N video frames in the decoding result, wherein N is a positive integer.
9. The apparatus of claim 6, wherein the second determining module is configured to:
determining a first video frame of the video as a first shot start frame of the video.
10. The apparatus of claim 6, wherein the second determining module is configured to:
determining a first candidate frame of the video as a first start-of-shot frame of the video.
11. A shot segmentation apparatus for video, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any one of claims 1 to 5.
12. A non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1 to 5.
CN201810118861.8A 2018-02-06 2018-02-06 Video shot segmentation method and device Active CN110119652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810118861.8A CN110119652B (en) 2018-02-06 2018-02-06 Video shot segmentation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810118861.8A CN110119652B (en) 2018-02-06 2018-02-06 Video shot segmentation method and device

Publications (2)

Publication Number Publication Date
CN110119652A CN110119652A (en) 2019-08-13
CN110119652B true CN110119652B (en) 2021-11-12

Family

ID=67519945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810118861.8A Active CN110119652B (en) 2018-02-06 2018-02-06 Video shot segmentation method and device

Country Status (1)

Country Link
CN (1) CN110119652B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007134986A (en) * 2005-11-10 2007-05-31 Kddi Corp Shot boundary detection device
CN101236604B (en) * 2008-01-11 2010-06-09 北京航空航天大学 Fast lens boundary detection method
CN101650722B (en) * 2009-06-01 2011-10-26 南京理工大学 Method based on audio/video combination for detecting highlight events in football video

Also Published As

Publication number Publication date
CN110119652A (en) 2019-08-13

Similar Documents

Publication Publication Date Title
CN110287874B (en) Target tracking method and device, electronic equipment and storage medium
CN108804980B (en) Video scene switching detection method and device
CN107692997B (en) Heart rate detection method and device
CN107944409B (en) Video analysis method and device capable of distinguishing key actions
CN111553864B (en) Image restoration method and device, electronic equipment and storage medium
CN109615006B (en) Character recognition method and device, electronic equipment and storage medium
CN110858924B (en) Video background music generation method and device and storage medium
CN110569777B (en) Image processing method and device, electronic device and storage medium
CN110633700B (en) Video processing method and device, electronic equipment and storage medium
CN110781813B (en) Image recognition method and device, electronic equipment and storage medium
CN110781957A (en) Image processing method and device, electronic equipment and storage medium
CN112465843A (en) Image segmentation method and device, electronic equipment and storage medium
CN111539410B (en) Character recognition method and device, electronic equipment and storage medium
CN111523346B (en) Image recognition method and device, electronic equipment and storage medium
CN109344703B (en) Object detection method and device, electronic equipment and storage medium
CN112085097A (en) Image processing method and device, electronic equipment and storage medium
CN110633715B (en) Image processing method, network training method and device and electronic equipment
CN109992754B (en) Document processing method and device
CN110955800A (en) Video retrieval method and device
CN110909562A (en) Video auditing method and device
CN110121115B (en) Method and device for determining wonderful video clip
CN109635926B (en) Attention feature acquisition method and device for neural network and storage medium
CN111694571A (en) Compiling method and device
CN113506325B (en) Image processing method and device, electronic equipment and storage medium
CN110119652B (en) Video shot segmentation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200515

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 200241 room 1162, building 555, Dongchuan Road, Shanghai, Minhang District

Applicant before: SHANGHAI QUANTUDOU CULTURE COMMUNICATION Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant